@coolon/angular-ui-powerups 0.0.43 → 0.0.46
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/bundles/coolon-angular-ui-powerups.umd.js +1499 -1188
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +16 -15
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +16 -15
- package/esm2015/index.js +2 -2
- package/esm2015/lib/components/disposable-component.js +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +1 -1
- package/esm2015/lib/components/resize-aware.component.js +1 -1
- package/esm2015/lib/components/types/bounds.class.js +1 -1
- package/esm2015/lib/components/types/dimension.class.js +1 -1
- package/esm2015/lib/components/types/point.class.js +1 -1
- package/esm2015/lib/directives/command.directive.js +1 -1
- package/esm2015/lib/directives/focus-binding.directive.js +2 -2
- package/esm2015/lib/interaction/alert.js +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -2
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +6 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -2
- package/esm2015/lib/interaction/confirm.js +1 -1
- package/esm2015/lib/interaction/interaction.module.js +2 -2
- package/esm2015/lib/interaction/result.js +1 -1
- package/esm2015/lib/interaction/services/dialog-interaction.service.js +2 -2
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +3 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +135 -84
- package/esm2015/lib/place/components/place-outlet/route-animations.js +2 -2
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm2015/lib/place/guards/leave-place.guard.js +12 -10
- package/esm2015/lib/place/guards/place-route.guard.js +40 -33
- package/esm2015/lib/place/index.js +5 -6
- package/esm2015/lib/place/nav-item.js +1 -1
- package/esm2015/lib/place/place-component.js +39 -169
- package/esm2015/lib/place/place-definition.js +79 -0
- package/esm2015/lib/place/place-history.js +77 -0
- package/esm2015/lib/place/place-router.js +98 -0
- package/esm2015/lib/place/place.decorator.js +30 -3
- package/esm2015/lib/place/place.module.js +2 -5
- package/esm2015/lib/place/route/json-types.js +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +7 -60
- package/esm2015/lib/place/route/parameter-definition.class.js +187 -9
- package/esm2015/lib/place/route/parameter-sanitiser.js +4 -17
- package/esm2015/lib/place/route/parameter-snapshot.js +228 -72
- package/esm2015/lib/place/route/parameter-type.js +2 -2
- package/esm2015/lib/place/route/route-parameter-sanitiser.js +7 -21
- package/esm2015/lib/place/visit.js +3 -3
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +16 -15
- package/esm5/index.js +2 -2
- package/esm5/lib/components/disposable-component.js +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +1 -1
- package/esm5/lib/components/resize-aware.component.js +1 -1
- package/esm5/lib/components/types/bounds.class.js +1 -1
- package/esm5/lib/components/types/dimension.class.js +1 -1
- package/esm5/lib/components/types/point.class.js +1 -1
- package/esm5/lib/directives/command.directive.js +1 -1
- package/esm5/lib/directives/focus-binding.directive.js +2 -2
- package/esm5/lib/interaction/alert.js +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +2 -2
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +6 -1
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -2
- package/esm5/lib/interaction/confirm.js +1 -1
- package/esm5/lib/interaction/interaction.module.js +2 -2
- package/esm5/lib/interaction/result.js +1 -1
- package/esm5/lib/interaction/services/dialog-interaction.service.js +2 -2
- package/esm5/lib/place/components/abstract-place-navigation.component.js +3 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +153 -113
- package/esm5/lib/place/components/place-outlet/route-animations.js +2 -2
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm5/lib/place/guards/leave-place.guard.js +12 -10
- package/esm5/lib/place/guards/place-route.guard.js +40 -32
- package/esm5/lib/place/index.js +5 -6
- package/esm5/lib/place/nav-item.js +1 -1
- package/esm5/lib/place/place-component.js +53 -199
- package/esm5/lib/place/place-definition.js +88 -0
- package/esm5/lib/place/place-history.js +90 -0
- package/esm5/lib/place/place-router.js +118 -0
- package/esm5/lib/place/place.decorator.js +30 -3
- package/esm5/lib/place/place.module.js +2 -5
- package/esm5/lib/place/route/json-types.js +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +7 -60
- package/esm5/lib/place/route/parameter-definition.class.js +227 -9
- package/esm5/lib/place/route/parameter-sanitiser.js +4 -17
- package/esm5/lib/place/route/parameter-snapshot.js +295 -80
- package/esm5/lib/place/route/parameter-type.js +2 -2
- package/esm5/lib/place/route/route-parameter-sanitiser.js +7 -20
- package/esm5/lib/place/visit.js +3 -3
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +1144 -904
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1462 -1154
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/index.d.ts +1 -1
- package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +7 -0
- package/lib/place/components/abstract-place-navigation.component.d.ts +3 -2
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +30 -19
- package/lib/place/guards/place-route.guard.d.ts +7 -6
- package/lib/place/index.d.ts +3 -4
- package/lib/place/place-component.d.ts +13 -41
- package/lib/place/place-definition.d.ts +20 -0
- package/lib/place/place-history.d.ts +13 -0
- package/lib/place/place-router.d.ts +10 -0
- package/lib/place/place.decorator.d.ts +13 -1
- package/lib/place/route/parameter-decorators.d.ts +0 -4
- package/lib/place/route/parameter-definition.class.d.ts +39 -6
- package/lib/place/route/parameter-sanitiser.d.ts +3 -8
- package/lib/place/route/parameter-snapshot.d.ts +15 -12
- package/lib/place/route/route-parameter-sanitiser.d.ts +1 -3
- package/lib/place/visit.d.ts +4 -4
- package/package.json +1 -1
- package/schematics/place-routes/index.js.map +1 -1
- package/schematics/place-routes/place-def.js +1 -1
- package/schematics/place-routes/place-def.js.map +1 -1
- package/schematics/place-routes/templates/place-destinations.ts.template +21 -0
- package/schematics/place-routes/templates/{places.ts.template → place-routes.ts.template} +1 -13
- package/esm2015/lib/place/place-component-like.js +0 -17
- package/esm2015/lib/place/place-updates-service.js +0 -16
- package/esm2015/lib/place/place.service.js +0 -102
- package/esm2015/lib/place/route/default-parameter-sanitiser.js +0 -78
- package/esm5/lib/place/place-component-like.js +0 -17
- package/esm5/lib/place/place-updates-service.js +0 -16
- package/esm5/lib/place/place.service.js +0 -136
- package/esm5/lib/place/route/default-parameter-sanitiser.js +0 -85
- package/lib/place/place-component-like.d.ts +0 -5
- package/lib/place/place-updates-service.d.ts +0 -10
- package/lib/place/place.service.d.ts +0 -22
- package/lib/place/route/default-parameter-sanitiser.d.ts +0 -13
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@angular/router'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/tooltip', '@angular/router', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', '
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.tooltip, global.ng.router, global.src, global.fastMemoizeDecorator, global.
|
|
5
|
-
}(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, icon, list, tooltip, router, src, fastMemoizeDecorator,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@angular/router'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('lodash'), require('@angular/animations'), require('resize-observer-polyfill')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/tooltip', '@angular/router', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', 'lodash', '@angular/animations', 'resize-observer-polyfill'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.tooltip, global.ng.router, global.src, global.fastMemoizeDecorator, null, global.___default, global.ng.animations, global.ResizeObserver));
|
|
5
|
+
}(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, icon, list, tooltip, router, src, fastMemoizeDecorator, reflectMetadata, ___default, animations$1, ResizeObserver) { 'use strict';
|
|
6
6
|
|
|
7
|
+
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
7
8
|
ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
|
|
8
9
|
|
|
9
10
|
/*! *****************************************************************************
|
|
@@ -816,7 +817,7 @@
|
|
|
816
817
|
}));
|
|
817
818
|
}
|
|
818
819
|
else {
|
|
819
|
-
pectin.Logger.get(this).warn(
|
|
820
|
+
pectin.Logger.get(this).warn('pectinFocusBinding was nil');
|
|
820
821
|
}
|
|
821
822
|
};
|
|
822
823
|
/**
|
|
@@ -1046,9 +1047,14 @@
|
|
|
1046
1047
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1047
1048
|
*/
|
|
1048
1049
|
/**
|
|
1050
|
+
* ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an
|
|
1051
|
+
* external service.
|
|
1052
|
+
*
|
|
1053
|
+
* It might be nice to have wrapper component that allows more declarative use, i.e.
|
|
1054
|
+
* <activity-view [activityClass]="...", [activityData]="..." (done)=".." (cancel)="..."></activity-view>
|
|
1049
1055
|
* @template D, R, E
|
|
1050
1056
|
*/
|
|
1051
|
-
exports.ɵ
|
|
1057
|
+
exports.ɵv = /** @class */ (function () {
|
|
1052
1058
|
function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
|
|
1053
1059
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
1054
1060
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -1170,27 +1176,27 @@
|
|
|
1170
1176
|
}());
|
|
1171
1177
|
if (false) {
|
|
1172
1178
|
/** @type {?} */
|
|
1173
|
-
exports.ɵ
|
|
1179
|
+
exports.ɵv.prototype.interactionContext;
|
|
1174
1180
|
/**
|
|
1175
1181
|
* @type {?}
|
|
1176
1182
|
* @private
|
|
1177
1183
|
*/
|
|
1178
|
-
exports.ɵ
|
|
1184
|
+
exports.ɵv.prototype.activityComponentRef;
|
|
1179
1185
|
/**
|
|
1180
1186
|
* @type {?}
|
|
1181
1187
|
* @private
|
|
1182
1188
|
*/
|
|
1183
|
-
exports.ɵ
|
|
1189
|
+
exports.ɵv.prototype.componentFactoryResolver;
|
|
1184
1190
|
/**
|
|
1185
1191
|
* @type {?}
|
|
1186
1192
|
* @private
|
|
1187
1193
|
*/
|
|
1188
|
-
exports.ɵ
|
|
1194
|
+
exports.ɵv.prototype.viewContainerRef;
|
|
1189
1195
|
/**
|
|
1190
1196
|
* @type {?}
|
|
1191
1197
|
* @private
|
|
1192
1198
|
*/
|
|
1193
|
-
exports.ɵ
|
|
1199
|
+
exports.ɵv.prototype.injector;
|
|
1194
1200
|
/* Skipping unhandled member: ;*/
|
|
1195
1201
|
}
|
|
1196
1202
|
(function (ActivityOutletComponent) {
|
|
@@ -1251,7 +1257,7 @@
|
|
|
1251
1257
|
*/
|
|
1252
1258
|
OutletInteractionContext.prototype.context;
|
|
1253
1259
|
}
|
|
1254
|
-
})(exports.ɵ
|
|
1260
|
+
})(exports.ɵv || (exports.ɵv = {}));
|
|
1255
1261
|
|
|
1256
1262
|
/**
|
|
1257
1263
|
* @fileoverview added by tsickle
|
|
@@ -1499,7 +1505,7 @@
|
|
|
1499
1505
|
ConfirmationDialogComponent.decorators = [
|
|
1500
1506
|
{ type: core.Component, args: [{
|
|
1501
1507
|
selector: 'angular-ui-powerups-confirmation-dialog',
|
|
1502
|
-
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)=\"cancel()\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"
|
|
1508
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)=\"cancel()\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done(true)\">{{confirm.ok()}}</button>\n</p>\n\n",
|
|
1503
1509
|
styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1504
1510
|
}] }
|
|
1505
1511
|
];
|
|
@@ -1518,7 +1524,7 @@
|
|
|
1518
1524
|
* @fileoverview added by tsickle
|
|
1519
1525
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1520
1526
|
*/
|
|
1521
|
-
exports.ɵ
|
|
1527
|
+
exports.ɵu = /** @class */ (function (_super) {
|
|
1522
1528
|
__extends(ActivityContainerComponent, _super);
|
|
1523
1529
|
function ActivityContainerComponent() {
|
|
1524
1530
|
var _this = _super.call(this) || this;
|
|
@@ -1641,7 +1647,7 @@
|
|
|
1641
1647
|
ActivityContainerComponent.decorators = [
|
|
1642
1648
|
{ type: core.Component, args: [{
|
|
1643
1649
|
selector: 'angular-ui-powerups-activity-container',
|
|
1644
|
-
template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"
|
|
1650
|
+
template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"initialActivityOutlet\"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of activityOutletTabs.value\">\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"tab\"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
1645
1651
|
styles: [":host{display:block}"]
|
|
1646
1652
|
}] }
|
|
1647
1653
|
];
|
|
@@ -1651,31 +1657,31 @@
|
|
|
1651
1657
|
parentInteractionContext: [{ type: core.Input }],
|
|
1652
1658
|
initialActivityOutlet: [{ type: core.Input }],
|
|
1653
1659
|
tabs: [{ type: core.ViewChild, args: ['tabs', { static: true },] }],
|
|
1654
|
-
outlets: [{ type: core.ViewChildren, args: [exports.ɵ
|
|
1660
|
+
outlets: [{ type: core.ViewChildren, args: [exports.ɵv,] }]
|
|
1655
1661
|
};
|
|
1656
1662
|
return ActivityContainerComponent;
|
|
1657
1663
|
}(DisposableComponent));
|
|
1658
1664
|
if (false) {
|
|
1659
1665
|
/** @type {?} */
|
|
1660
|
-
exports.ɵ
|
|
1666
|
+
exports.ɵu.prototype.parentInteractionContext;
|
|
1661
1667
|
/** @type {?} */
|
|
1662
|
-
exports.ɵ
|
|
1668
|
+
exports.ɵu.prototype.initialActivityOutlet;
|
|
1663
1669
|
/** @type {?} */
|
|
1664
|
-
exports.ɵ
|
|
1670
|
+
exports.ɵu.prototype.tabs;
|
|
1665
1671
|
/** @type {?} */
|
|
1666
|
-
exports.ɵ
|
|
1672
|
+
exports.ɵu.prototype.outlets;
|
|
1667
1673
|
/** @type {?} */
|
|
1668
|
-
exports.ɵ
|
|
1674
|
+
exports.ɵu.prototype.activityOutletTabs;
|
|
1669
1675
|
/**
|
|
1670
1676
|
* @type {?}
|
|
1671
1677
|
* @private
|
|
1672
1678
|
*/
|
|
1673
|
-
exports.ɵ
|
|
1679
|
+
exports.ɵu.prototype.obsoleteTabs;
|
|
1674
1680
|
/**
|
|
1675
1681
|
* @type {?}
|
|
1676
1682
|
* @private
|
|
1677
1683
|
*/
|
|
1678
|
-
exports.ɵ
|
|
1684
|
+
exports.ɵu.prototype.lastActivityTab;
|
|
1679
1685
|
}
|
|
1680
1686
|
(function (ActivityContainerComponent) {
|
|
1681
1687
|
/**
|
|
@@ -1694,7 +1700,7 @@
|
|
|
1694
1700
|
/** @type {?} */
|
|
1695
1701
|
ActivityContext.prototype.onCancel;
|
|
1696
1702
|
}
|
|
1697
|
-
})(exports.ɵ
|
|
1703
|
+
})(exports.ɵu || (exports.ɵu = {}));
|
|
1698
1704
|
|
|
1699
1705
|
/**
|
|
1700
1706
|
* @fileoverview added by tsickle
|
|
@@ -1750,7 +1756,7 @@
|
|
|
1750
1756
|
autoFocus: false
|
|
1751
1757
|
};
|
|
1752
1758
|
/** @type {?} */
|
|
1753
|
-
var matDialogRef = (/** @type {?} */ (this.dialogService.open(exports.ɵ
|
|
1759
|
+
var matDialogRef = (/** @type {?} */ (this.dialogService.open(exports.ɵu, config)));
|
|
1754
1760
|
return new Promise((/**
|
|
1755
1761
|
* @param {?} resolve
|
|
1756
1762
|
* @param {?} reject
|
|
@@ -1842,17 +1848,17 @@
|
|
|
1842
1848
|
portal.PortalModule
|
|
1843
1849
|
],
|
|
1844
1850
|
declarations: [
|
|
1845
|
-
exports.ɵ
|
|
1851
|
+
exports.ɵu,
|
|
1846
1852
|
ConfirmationDialogComponent,
|
|
1847
1853
|
AlertDialogComponent,
|
|
1848
|
-
exports.ɵ
|
|
1854
|
+
exports.ɵv
|
|
1849
1855
|
],
|
|
1850
1856
|
exports: [
|
|
1851
|
-
exports.ɵ
|
|
1852
|
-
exports.ɵ
|
|
1857
|
+
exports.ɵu,
|
|
1858
|
+
exports.ɵv
|
|
1853
1859
|
],
|
|
1854
1860
|
entryComponents: [
|
|
1855
|
-
exports.ɵ
|
|
1861
|
+
exports.ɵu,
|
|
1856
1862
|
ConfirmationDialogComponent,
|
|
1857
1863
|
AlertDialogComponent
|
|
1858
1864
|
],
|
|
@@ -1940,1039 +1946,1490 @@
|
|
|
1940
1946
|
* @fileoverview added by tsickle
|
|
1941
1947
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1942
1948
|
*/
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
this.
|
|
1950
|
-
this.
|
|
1949
|
+
var PlaceDefinition = /** @class */ (function () {
|
|
1950
|
+
function PlaceDefinition(component, path, authenticate, order, data, routeParameters, children) {
|
|
1951
|
+
this.component = component;
|
|
1952
|
+
this.path = path;
|
|
1953
|
+
this.authenticate = authenticate;
|
|
1954
|
+
this.order = order;
|
|
1955
|
+
this.data = data;
|
|
1956
|
+
this.routeParameters = routeParameters;
|
|
1957
|
+
this.children = children;
|
|
1951
1958
|
}
|
|
1952
1959
|
/**
|
|
1953
|
-
* @param {?} other
|
|
1954
1960
|
* @return {?}
|
|
1955
1961
|
*/
|
|
1956
|
-
|
|
1957
|
-
* @param {?} other
|
|
1962
|
+
PlaceDefinition.prototype.getRouteParameters = /**
|
|
1958
1963
|
* @return {?}
|
|
1959
1964
|
*/
|
|
1960
|
-
function (
|
|
1961
|
-
|
|
1962
|
-
var changed = this.resolved.find((/**
|
|
1963
|
-
* @param {?} r
|
|
1964
|
-
* @return {?}
|
|
1965
|
-
*/
|
|
1966
|
-
function (r) {
|
|
1967
|
-
return !r.isSame(other.getResolvedParameterValue(r.parameterDef));
|
|
1968
|
-
}));
|
|
1969
|
-
if (changed) {
|
|
1970
|
-
console.log({ mine: changed, theirs: other.getResolvedParameter(changed.parameterDef) });
|
|
1971
|
-
}
|
|
1972
|
-
return !!changed;
|
|
1965
|
+
function () {
|
|
1966
|
+
return this.routeParameters;
|
|
1973
1967
|
};
|
|
1974
1968
|
/**
|
|
1975
|
-
* @
|
|
1969
|
+
* @template T
|
|
1970
|
+
* @param {?} key
|
|
1971
|
+
* @param {?=} defaultValue
|
|
1976
1972
|
* @return {?}
|
|
1977
1973
|
*/
|
|
1978
|
-
|
|
1979
|
-
* @
|
|
1974
|
+
PlaceDefinition.prototype.getData = /**
|
|
1975
|
+
* @template T
|
|
1976
|
+
* @param {?} key
|
|
1977
|
+
* @param {?=} defaultValue
|
|
1980
1978
|
* @return {?}
|
|
1981
1979
|
*/
|
|
1982
|
-
function (
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1980
|
+
function (key, defaultValue) {
|
|
1981
|
+
return this.data ?
|
|
1982
|
+
___default__default.isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
1983
|
+
defaultValue;
|
|
1984
|
+
};
|
|
1985
|
+
/**
|
|
1986
|
+
* @template T
|
|
1987
|
+
* @param {?} keys
|
|
1988
|
+
* @param {?=} defaultValue
|
|
1989
|
+
* @return {?}
|
|
1990
|
+
*/
|
|
1991
|
+
PlaceDefinition.prototype.searchData = /**
|
|
1992
|
+
* @template T
|
|
1993
|
+
* @param {?} keys
|
|
1994
|
+
* @param {?=} defaultValue
|
|
1995
|
+
* @return {?}
|
|
1996
|
+
*/
|
|
1997
|
+
function (keys, defaultValue) {
|
|
1998
|
+
var _this = this;
|
|
1999
|
+
if (this.data) {
|
|
2000
|
+
/** @type {?} */
|
|
2001
|
+
var found = keys.find((/**
|
|
2002
|
+
* @param {?} key
|
|
2003
|
+
* @return {?}
|
|
2004
|
+
*/
|
|
2005
|
+
function (key) { return !___default__default.isNil(_this.data[key]); }));
|
|
2006
|
+
return found ? this.data[found] : defaultValue;
|
|
1999
2007
|
}
|
|
2000
2008
|
else {
|
|
2001
|
-
|
|
2009
|
+
return defaultValue;
|
|
2002
2010
|
}
|
|
2003
|
-
routeParts.push(this.getFormattedParameters());
|
|
2004
|
-
return routeParts;
|
|
2005
2011
|
};
|
|
2012
|
+
return PlaceDefinition;
|
|
2013
|
+
}());
|
|
2014
|
+
if (false) {
|
|
2015
|
+
/** @type {?} */
|
|
2016
|
+
PlaceDefinition.prototype.component;
|
|
2017
|
+
/** @type {?} */
|
|
2018
|
+
PlaceDefinition.prototype.path;
|
|
2019
|
+
/** @type {?} */
|
|
2020
|
+
PlaceDefinition.prototype.authenticate;
|
|
2021
|
+
/** @type {?} */
|
|
2022
|
+
PlaceDefinition.prototype.order;
|
|
2023
|
+
/** @type {?} */
|
|
2024
|
+
PlaceDefinition.prototype.data;
|
|
2025
|
+
/** @type {?} */
|
|
2026
|
+
PlaceDefinition.prototype.routeParameters;
|
|
2027
|
+
/** @type {?} */
|
|
2028
|
+
PlaceDefinition.prototype.children;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
* @fileoverview added by tsickle
|
|
2033
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2034
|
+
*/
|
|
2035
|
+
// RAKE: making this Symbol(...) broke things.
|
|
2036
|
+
/** @type {?} */
|
|
2037
|
+
var DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
2038
|
+
// this one seems ok.
|
|
2039
|
+
/** @type {?} */
|
|
2040
|
+
var ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
2041
|
+
exports.PlaceComponent = /** @class */ (function (_super) {
|
|
2042
|
+
__extends(PlaceComponent, _super);
|
|
2043
|
+
function PlaceComponent() {
|
|
2044
|
+
return _super.call(this) || this;
|
|
2045
|
+
}
|
|
2006
2046
|
/**
|
|
2007
|
-
* @
|
|
2008
|
-
* @param {?} parameterDef
|
|
2047
|
+
* @param {?} resolvedParameters
|
|
2009
2048
|
* @return {?}
|
|
2010
2049
|
*/
|
|
2011
|
-
|
|
2012
|
-
* @
|
|
2013
|
-
* @param {?} parameterDef
|
|
2050
|
+
PlaceComponent.prototype.initialiseBindings = /**
|
|
2051
|
+
* @param {?} resolvedParameters
|
|
2014
2052
|
* @return {?}
|
|
2015
2053
|
*/
|
|
2016
|
-
function (
|
|
2017
|
-
|
|
2018
|
-
|
|
2054
|
+
function (resolvedParameters) {
|
|
2055
|
+
var _this = this;
|
|
2056
|
+
pectin.assert.isNil(this.resolvedParameters);
|
|
2057
|
+
this.resolvedParameters = resolvedParameters;
|
|
2058
|
+
this.placeDefinition.getRouteParameters().forEach((/**
|
|
2059
|
+
* @param {?} parameterDef
|
|
2019
2060
|
* @return {?}
|
|
2020
2061
|
*/
|
|
2021
|
-
function (
|
|
2062
|
+
function (parameterDef) {
|
|
2063
|
+
_this.installBinding(parameterDef);
|
|
2064
|
+
}));
|
|
2022
2065
|
};
|
|
2023
2066
|
/**
|
|
2067
|
+
* @private
|
|
2024
2068
|
* @template T, S
|
|
2025
2069
|
* @param {?} parameterDef
|
|
2026
2070
|
* @return {?}
|
|
2027
2071
|
*/
|
|
2028
|
-
|
|
2072
|
+
PlaceComponent.prototype.installBinding = /**
|
|
2073
|
+
* @private
|
|
2029
2074
|
* @template T, S
|
|
2030
2075
|
* @param {?} parameterDef
|
|
2031
2076
|
* @return {?}
|
|
2032
2077
|
*/
|
|
2033
2078
|
function (parameterDef) {
|
|
2034
2079
|
/** @type {?} */
|
|
2035
|
-
var
|
|
2036
|
-
|
|
2080
|
+
var model = (/** @type {?} */ (this[parameterDef.propertyName]));
|
|
2081
|
+
// this.txo.observe(parameterDef.propertyName, model);
|
|
2082
|
+
this.registerDisposable(new pectin.Binding(this.resolvedParameters, model, {
|
|
2083
|
+
toRight: /**
|
|
2084
|
+
* @param {?} parameters
|
|
2085
|
+
* @return {?}
|
|
2086
|
+
*/
|
|
2087
|
+
function (parameters) {
|
|
2088
|
+
return parameters.getValueOf(parameterDef);
|
|
2089
|
+
},
|
|
2090
|
+
toLeft: /**
|
|
2091
|
+
* @param {?} value
|
|
2092
|
+
* @param {?=} currentParameters
|
|
2093
|
+
* @return {?}
|
|
2094
|
+
*/
|
|
2095
|
+
function (value, currentParameters) {
|
|
2096
|
+
return currentParameters.replace(parameterDef, value);
|
|
2097
|
+
}
|
|
2098
|
+
}));
|
|
2037
2099
|
};
|
|
2100
|
+
Object.defineProperty(PlaceComponent.prototype, "placeDefinition", {
|
|
2101
|
+
get: /**
|
|
2102
|
+
* @return {?}
|
|
2103
|
+
*/
|
|
2104
|
+
function () {
|
|
2105
|
+
return PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
2106
|
+
},
|
|
2107
|
+
enumerable: true,
|
|
2108
|
+
configurable: true
|
|
2109
|
+
});
|
|
2110
|
+
Object.defineProperty(PlaceComponent.prototype, "childPlaces", {
|
|
2111
|
+
get: /**
|
|
2112
|
+
* @return {?}
|
|
2113
|
+
*/
|
|
2114
|
+
function () {
|
|
2115
|
+
return this.placeDefinition.children.map((/**
|
|
2116
|
+
* @param {?} d
|
|
2117
|
+
* @return {?}
|
|
2118
|
+
*/
|
|
2119
|
+
function (d) { return d.component; }));
|
|
2120
|
+
},
|
|
2121
|
+
enumerable: true,
|
|
2122
|
+
configurable: true
|
|
2123
|
+
});
|
|
2038
2124
|
/**
|
|
2039
2125
|
* @return {?}
|
|
2040
2126
|
*/
|
|
2041
|
-
|
|
2127
|
+
PlaceComponent.prototype.canDeactivate = /**
|
|
2042
2128
|
* @return {?}
|
|
2043
2129
|
*/
|
|
2044
2130
|
function () {
|
|
2045
|
-
return
|
|
2131
|
+
return true;
|
|
2046
2132
|
};
|
|
2047
2133
|
/**
|
|
2048
|
-
* @param {?} name
|
|
2049
2134
|
* @return {?}
|
|
2050
2135
|
*/
|
|
2051
|
-
|
|
2052
|
-
* @param {?} name
|
|
2136
|
+
PlaceComponent.prototype.onPlaceReady = /**
|
|
2053
2137
|
* @return {?}
|
|
2054
2138
|
*/
|
|
2055
|
-
function (
|
|
2056
|
-
/** @type {?} */
|
|
2057
|
-
var resolvedParameter = this.resolved.find((/**
|
|
2058
|
-
* @param {?} r
|
|
2059
|
-
* @return {?}
|
|
2060
|
-
*/
|
|
2061
|
-
function (r) { return r.parameterDef.name === name; }));
|
|
2062
|
-
return resolvedParameter ? resolvedParameter.value : null;
|
|
2139
|
+
function () {
|
|
2063
2140
|
};
|
|
2141
|
+
__decorate([
|
|
2142
|
+
fastMemoizeDecorator.Memoize(),
|
|
2143
|
+
__metadata("design:type", PlaceDefinition),
|
|
2144
|
+
__metadata("design:paramtypes", [])
|
|
2145
|
+
], PlaceComponent.prototype, "placeDefinition", null);
|
|
2146
|
+
return PlaceComponent;
|
|
2147
|
+
}(DisposableComponent));
|
|
2148
|
+
if (false) {
|
|
2064
2149
|
/**
|
|
2150
|
+
* @type {?}
|
|
2065
2151
|
* @private
|
|
2066
|
-
* @return {?}
|
|
2067
|
-
*/
|
|
2068
|
-
ParameterSnapshot.prototype.getResolvedRouteId = /**
|
|
2069
|
-
* @private
|
|
2070
|
-
* @return {?}
|
|
2071
2152
|
*/
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
return (/** @type {?} */ (this.resolved.find((/**
|
|
2076
|
-
* @param {?} p
|
|
2077
|
-
* @return {?}
|
|
2078
|
-
*/
|
|
2079
|
-
function (p) { return p.parameterDef.isRouteId; }))));
|
|
2080
|
-
};
|
|
2153
|
+
exports.PlaceComponent.prototype.resolvedParameters;
|
|
2154
|
+
}
|
|
2155
|
+
(function (PlaceComponent) {
|
|
2081
2156
|
/**
|
|
2157
|
+
* @param {?} target
|
|
2082
2158
|
* @return {?}
|
|
2083
2159
|
*/
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
return !!this.getResolvedRouteId();
|
|
2089
|
-
};
|
|
2160
|
+
function isPlaceComponentConstructor(target) {
|
|
2161
|
+
return pectin.lang.constructorChain((/** @type {?} */ (target))).includes(PlaceComponent);
|
|
2162
|
+
}
|
|
2163
|
+
PlaceComponent.isPlaceComponentConstructor = isPlaceComponentConstructor;
|
|
2090
2164
|
/**
|
|
2165
|
+
* @param {?} klass
|
|
2091
2166
|
* @return {?}
|
|
2092
2167
|
*/
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
/** @type {?} */
|
|
2098
|
-
var routeIdParam = this.getResolvedRouteId();
|
|
2099
|
-
return routeIdParam ? routeIdParam.formattedValue() : null;
|
|
2100
|
-
};
|
|
2168
|
+
function getRouteParameters(klass) {
|
|
2169
|
+
return typescriptUtilities.Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY);
|
|
2170
|
+
}
|
|
2171
|
+
PlaceComponent.getRouteParameters = getRouteParameters;
|
|
2101
2172
|
/**
|
|
2173
|
+
* @param {?} klass
|
|
2102
2174
|
* @return {?}
|
|
2103
2175
|
*/
|
|
2104
|
-
|
|
2176
|
+
function getDefinition(klass) {
|
|
2177
|
+
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
2178
|
+
}
|
|
2179
|
+
PlaceComponent.getDefinition = getDefinition;
|
|
2180
|
+
/**
|
|
2181
|
+
* @param {?} klass
|
|
2182
|
+
* @param {?} definition
|
|
2105
2183
|
* @return {?}
|
|
2106
2184
|
*/
|
|
2107
|
-
function () {
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2185
|
+
function injectDefinition(klass, definition) {
|
|
2186
|
+
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);
|
|
2187
|
+
}
|
|
2188
|
+
PlaceComponent.injectDefinition = injectDefinition;
|
|
2189
|
+
})(exports.PlaceComponent || (exports.PlaceComponent = {}));
|
|
2190
|
+
|
|
2191
|
+
/**
|
|
2192
|
+
* @fileoverview added by tsickle
|
|
2193
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2194
|
+
*/
|
|
2195
|
+
var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
2196
|
+
__extends(AbstractPlaceNavigationComponent, _super);
|
|
2197
|
+
function AbstractPlaceNavigationComponent() {
|
|
2198
|
+
var _this = _super.call(this) || this;
|
|
2199
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2200
|
+
_this.placeDefinitions = chain(_this.placesModel).map((/**
|
|
2201
|
+
* @param {?} c
|
|
2117
2202
|
* @return {?}
|
|
2118
2203
|
*/
|
|
2119
|
-
function (
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
return params;
|
|
2123
|
-
};
|
|
2204
|
+
function (c) { return exports.PlaceComponent.getDefinition(c); }));
|
|
2205
|
+
return _this;
|
|
2206
|
+
}
|
|
2124
2207
|
/**
|
|
2125
|
-
* @
|
|
2126
|
-
* @param {?} parameter
|
|
2127
|
-
* @param {?} value
|
|
2208
|
+
* @param {?} placeDef
|
|
2128
2209
|
* @return {?}
|
|
2129
2210
|
*/
|
|
2130
|
-
|
|
2131
|
-
* @
|
|
2132
|
-
* @param {?} parameter
|
|
2133
|
-
* @param {?} value
|
|
2211
|
+
AbstractPlaceNavigationComponent.prototype.getNav = /**
|
|
2212
|
+
* @param {?} placeDef
|
|
2134
2213
|
* @return {?}
|
|
2135
2214
|
*/
|
|
2136
|
-
function (
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2215
|
+
function (placeDef) {
|
|
2216
|
+
/** @type {?} */
|
|
2217
|
+
var navItem = (/** @type {?} */ (placeDef.getData('nav')));
|
|
2218
|
+
return {
|
|
2219
|
+
title: (/**
|
|
2220
|
+
* @return {?}
|
|
2221
|
+
*/
|
|
2222
|
+
function () { return navItem ? navItem.title() : placeDef.searchData(['navTitle', 'title']); }),
|
|
2223
|
+
tooltip: (/**
|
|
2224
|
+
* @return {?}
|
|
2225
|
+
*/
|
|
2226
|
+
function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getData('navTooltip', null); }),
|
|
2227
|
+
icon: (/**
|
|
2228
|
+
* @return {?}
|
|
2229
|
+
*/
|
|
2230
|
+
function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getData('navIcon', null); })
|
|
2231
|
+
};
|
|
2144
2232
|
};
|
|
2145
2233
|
/**
|
|
2146
|
-
* @param {?} url
|
|
2147
2234
|
* @return {?}
|
|
2148
2235
|
*/
|
|
2149
|
-
|
|
2150
|
-
* @param {?} url
|
|
2236
|
+
AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
|
|
2151
2237
|
* @return {?}
|
|
2152
2238
|
*/
|
|
2153
|
-
function (
|
|
2154
|
-
|
|
2239
|
+
function () {
|
|
2240
|
+
};
|
|
2241
|
+
AbstractPlaceNavigationComponent.propDecorators = {
|
|
2242
|
+
places: [{ type: core.Input }],
|
|
2243
|
+
placesModel: [{ type: core.Input }]
|
|
2155
2244
|
};
|
|
2156
|
-
var _a;
|
|
2157
2245
|
__decorate([
|
|
2158
|
-
|
|
2159
|
-
__metadata("design:type",
|
|
2160
|
-
|
|
2161
|
-
__metadata("design:returntype", ParameterSnapshot.ResolvedParameter)
|
|
2162
|
-
], ParameterSnapshot.prototype, "getResolvedParameter", null);
|
|
2246
|
+
pectin.StoreInListModel('placesModel'),
|
|
2247
|
+
__metadata("design:type", Array)
|
|
2248
|
+
], AbstractPlaceNavigationComponent.prototype, "places", void 0);
|
|
2163
2249
|
__decorate([
|
|
2164
|
-
|
|
2165
|
-
__metadata("design:type",
|
|
2166
|
-
|
|
2167
|
-
__metadata("design:returntype", typeof (_a = typeof S !== "undefined" && S) === "function" ? _a : Object)
|
|
2168
|
-
], ParameterSnapshot.prototype, "getResolvedParameterValue", null);
|
|
2250
|
+
pectin.UseDelegate(),
|
|
2251
|
+
__metadata("design:type", pectin.ListModel)
|
|
2252
|
+
], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
2169
2253
|
__decorate([
|
|
2170
2254
|
src.Memoize(),
|
|
2171
2255
|
__metadata("design:type", Function),
|
|
2172
|
-
__metadata("design:paramtypes", [
|
|
2256
|
+
__metadata("design:paramtypes", [PlaceDefinition]),
|
|
2173
2257
|
__metadata("design:returntype", Object)
|
|
2174
|
-
],
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
__metadata("design:type", Function),
|
|
2178
|
-
__metadata("design:paramtypes", []),
|
|
2179
|
-
__metadata("design:returntype", ParameterSnapshot.ResolvedValueParameter)
|
|
2180
|
-
], ParameterSnapshot.prototype, "getResolvedRouteId", null);
|
|
2181
|
-
return ParameterSnapshot;
|
|
2182
|
-
}());
|
|
2258
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2259
|
+
return AbstractPlaceNavigationComponent;
|
|
2260
|
+
}(DisposableComponent));
|
|
2183
2261
|
if (false) {
|
|
2184
2262
|
/** @type {?} */
|
|
2185
|
-
|
|
2263
|
+
AbstractPlaceNavigationComponent.prototype.places;
|
|
2264
|
+
/** @type {?} */
|
|
2265
|
+
AbstractPlaceNavigationComponent.prototype.placesModel;
|
|
2266
|
+
/** @type {?} */
|
|
2267
|
+
AbstractPlaceNavigationComponent.prototype.placeDefinitions;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* @fileoverview added by tsickle
|
|
2272
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2273
|
+
*/
|
|
2274
|
+
var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
2275
|
+
__extends(ListPlaceNavComponent, _super);
|
|
2276
|
+
function ListPlaceNavComponent() {
|
|
2277
|
+
var _this = _super.call(this) || this;
|
|
2278
|
+
_this.expanded = true;
|
|
2279
|
+
return _this;
|
|
2280
|
+
}
|
|
2186
2281
|
/**
|
|
2187
|
-
* @
|
|
2188
|
-
* @private
|
|
2282
|
+
* @return {?}
|
|
2189
2283
|
*/
|
|
2190
|
-
|
|
2284
|
+
ListPlaceNavComponent.prototype.expandMenu = /**
|
|
2285
|
+
* @return {?}
|
|
2286
|
+
*/
|
|
2287
|
+
function () {
|
|
2288
|
+
this.expanded = true;
|
|
2289
|
+
};
|
|
2290
|
+
/**
|
|
2291
|
+
* @return {?}
|
|
2292
|
+
*/
|
|
2293
|
+
ListPlaceNavComponent.prototype.collapseMenu = /**
|
|
2294
|
+
* @return {?}
|
|
2295
|
+
*/
|
|
2296
|
+
function () {
|
|
2297
|
+
this.expanded = false;
|
|
2298
|
+
};
|
|
2299
|
+
/**
|
|
2300
|
+
* @return {?}
|
|
2301
|
+
*/
|
|
2302
|
+
ListPlaceNavComponent.prototype.toggleMenu = /**
|
|
2303
|
+
* @return {?}
|
|
2304
|
+
*/
|
|
2305
|
+
function () {
|
|
2306
|
+
this.expanded = !this.expanded;
|
|
2307
|
+
};
|
|
2308
|
+
ListPlaceNavComponent.decorators = [
|
|
2309
|
+
{ type: core.Component, args: [{
|
|
2310
|
+
selector: 'angular-ui-powerups-list-place-nav',
|
|
2311
|
+
template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n",
|
|
2312
|
+
styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
|
|
2313
|
+
}] }
|
|
2314
|
+
];
|
|
2315
|
+
/** @nocollapse */
|
|
2316
|
+
ListPlaceNavComponent.ctorParameters = function () { return []; };
|
|
2317
|
+
ListPlaceNavComponent.propDecorators = {
|
|
2318
|
+
expanded: [{ type: core.HostBinding, args: ['class.expanded',] }]
|
|
2319
|
+
};
|
|
2320
|
+
return ListPlaceNavComponent;
|
|
2321
|
+
}(AbstractPlaceNavigationComponent));
|
|
2322
|
+
if (false) {
|
|
2323
|
+
/** @type {?} */
|
|
2324
|
+
ListPlaceNavComponent.prototype.expanded;
|
|
2191
2325
|
}
|
|
2192
|
-
|
|
2326
|
+
|
|
2327
|
+
/**
|
|
2328
|
+
* @fileoverview added by tsickle
|
|
2329
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2330
|
+
*/
|
|
2331
|
+
var PlaceHistory = /** @class */ (function () {
|
|
2332
|
+
function PlaceHistory(router) {
|
|
2333
|
+
this.router = router;
|
|
2334
|
+
this._history = new Map();
|
|
2335
|
+
}
|
|
2193
2336
|
/**
|
|
2337
|
+
* @param {?} state
|
|
2338
|
+
* @return {?}
|
|
2339
|
+
*/
|
|
2340
|
+
PlaceHistory.prototype.add = /**
|
|
2341
|
+
* @param {?} state
|
|
2342
|
+
* @return {?}
|
|
2343
|
+
*/
|
|
2344
|
+
function (state) {
|
|
2345
|
+
/** @type {?} */
|
|
2346
|
+
var history = this.getHistory(state.placeDefinition);
|
|
2347
|
+
/** @type {?} */
|
|
2348
|
+
var previousState = ___default__default.last(history);
|
|
2349
|
+
if (!previousState || state.hasChanged(previousState)) {
|
|
2350
|
+
history.unshift(state); // LIFO
|
|
2351
|
+
this.setHistory(state.placeDefinition, history.slice(-3)); // limit our history to 3 visits
|
|
2352
|
+
}
|
|
2353
|
+
};
|
|
2354
|
+
/**
|
|
2355
|
+
* @param {?} placeDef
|
|
2356
|
+
* @return {?}
|
|
2357
|
+
*/
|
|
2358
|
+
PlaceHistory.prototype.getHistory = /**
|
|
2194
2359
|
* @param {?} placeDef
|
|
2195
|
-
* @param {?} paramMap
|
|
2196
2360
|
* @return {?}
|
|
2197
2361
|
*/
|
|
2198
|
-
function
|
|
2362
|
+
function (placeDef) {
|
|
2199
2363
|
/** @type {?} */
|
|
2200
|
-
var
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2364
|
+
var history = this._history.get(placeDef);
|
|
2365
|
+
if (!history) {
|
|
2366
|
+
history = [];
|
|
2367
|
+
this.setHistory(placeDef, history);
|
|
2368
|
+
}
|
|
2369
|
+
return history;
|
|
2370
|
+
};
|
|
2371
|
+
/**
|
|
2372
|
+
* @private
|
|
2373
|
+
* @param {?} placeDef
|
|
2374
|
+
* @param {?} history
|
|
2375
|
+
* @return {?}
|
|
2376
|
+
*/
|
|
2377
|
+
PlaceHistory.prototype.setHistory = /**
|
|
2378
|
+
* @private
|
|
2379
|
+
* @param {?} placeDef
|
|
2380
|
+
* @param {?} history
|
|
2381
|
+
* @return {?}
|
|
2382
|
+
*/
|
|
2383
|
+
function (placeDef, history) {
|
|
2384
|
+
this._history.set(placeDef, history);
|
|
2385
|
+
};
|
|
2386
|
+
PlaceHistory.decorators = [
|
|
2387
|
+
{ type: core.Injectable, args: [{
|
|
2388
|
+
providedIn: 'root'
|
|
2389
|
+
},] }
|
|
2390
|
+
];
|
|
2391
|
+
/** @nocollapse */
|
|
2392
|
+
PlaceHistory.ctorParameters = function () { return [
|
|
2393
|
+
{ type: router.Router }
|
|
2394
|
+
]; };
|
|
2395
|
+
/** @nocollapse */ PlaceHistory.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(core.ɵɵinject(router.Router)); }, token: PlaceHistory, providedIn: "root" });
|
|
2396
|
+
return PlaceHistory;
|
|
2397
|
+
}());
|
|
2398
|
+
if (false) {
|
|
2399
|
+
/**
|
|
2400
|
+
* @type {?}
|
|
2401
|
+
* @private
|
|
2402
|
+
*/
|
|
2403
|
+
PlaceHistory.prototype._history;
|
|
2404
|
+
/**
|
|
2405
|
+
* @type {?}
|
|
2406
|
+
* @private
|
|
2407
|
+
*/
|
|
2408
|
+
PlaceHistory.prototype.router;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
/**
|
|
2412
|
+
* @fileoverview added by tsickle
|
|
2413
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2414
|
+
*/
|
|
2415
|
+
/**
|
|
2416
|
+
* @abstract
|
|
2417
|
+
* @template T, S
|
|
2418
|
+
*/
|
|
2419
|
+
/**
|
|
2420
|
+
* @abstract
|
|
2421
|
+
* @template T, S
|
|
2422
|
+
*/
|
|
2423
|
+
exports.ParameterDefinition = /** @class */ (function () {
|
|
2424
|
+
function ParameterDefinition(propertyName, type, options) {
|
|
2425
|
+
this.propertyName = propertyName;
|
|
2426
|
+
this.type = type;
|
|
2427
|
+
/** @type {?} */
|
|
2428
|
+
var opts = typescriptUtilities.Opts.get(options);
|
|
2429
|
+
this.name = opts.getOptional('as', propertyName);
|
|
2430
|
+
this.remember = opts.getOptional('remember', false);
|
|
2431
|
+
this.defaultValue = opts.getOptional('defaultValue', null);
|
|
2222
2432
|
}
|
|
2223
|
-
ParameterSnapshot.create = create;
|
|
2224
2433
|
/**
|
|
2225
|
-
* @
|
|
2226
|
-
* @
|
|
2434
|
+
* @param {?} injector
|
|
2435
|
+
* @return {?}
|
|
2436
|
+
*/
|
|
2437
|
+
ParameterDefinition.prototype.getSanitiser = /**
|
|
2438
|
+
* @param {?} injector
|
|
2439
|
+
* @return {?}
|
|
2440
|
+
*/
|
|
2441
|
+
function (injector) {
|
|
2442
|
+
if (this.remember || !___default__default.isNil(this.defaultValue)) {
|
|
2443
|
+
return new ParameterDefinition.DefaultParameterSanitiser(this.remember, this.defaultValue, injector.get(PlaceHistory));
|
|
2444
|
+
}
|
|
2445
|
+
else {
|
|
2446
|
+
return null;
|
|
2447
|
+
}
|
|
2448
|
+
};
|
|
2449
|
+
return ParameterDefinition;
|
|
2450
|
+
}());
|
|
2451
|
+
if (false) {
|
|
2452
|
+
/** @type {?} */
|
|
2453
|
+
exports.ParameterDefinition.prototype.isRouteId;
|
|
2454
|
+
/** @type {?} */
|
|
2455
|
+
exports.ParameterDefinition.prototype.isArray;
|
|
2456
|
+
/** @type {?} */
|
|
2457
|
+
exports.ParameterDefinition.prototype.name;
|
|
2458
|
+
/**
|
|
2459
|
+
* @type {?}
|
|
2460
|
+
* @private
|
|
2461
|
+
*/
|
|
2462
|
+
exports.ParameterDefinition.prototype.remember;
|
|
2463
|
+
/**
|
|
2464
|
+
* @type {?}
|
|
2465
|
+
* @private
|
|
2466
|
+
*/
|
|
2467
|
+
exports.ParameterDefinition.prototype.defaultValue;
|
|
2468
|
+
/** @type {?} */
|
|
2469
|
+
exports.ParameterDefinition.prototype.propertyName;
|
|
2470
|
+
/** @type {?} */
|
|
2471
|
+
exports.ParameterDefinition.prototype.type;
|
|
2472
|
+
}
|
|
2473
|
+
(function (ParameterDefinition) {
|
|
2474
|
+
/**
|
|
2475
|
+
* @record
|
|
2476
|
+
* @template T
|
|
2477
|
+
*/
|
|
2478
|
+
function Options() { }
|
|
2479
|
+
ParameterDefinition.Options = Options;
|
|
2480
|
+
if (false) {
|
|
2481
|
+
/** @type {?|undefined} */
|
|
2482
|
+
Options.prototype.as;
|
|
2483
|
+
/** @type {?|undefined} */
|
|
2484
|
+
Options.prototype.optional;
|
|
2485
|
+
/** @type {?|undefined} */
|
|
2486
|
+
Options.prototype.remember;
|
|
2487
|
+
/** @type {?|undefined} */
|
|
2488
|
+
Options.prototype.defaultValue;
|
|
2489
|
+
}
|
|
2490
|
+
/**
|
|
2491
|
+
* @template T
|
|
2227
2492
|
*/
|
|
2228
2493
|
var /**
|
|
2229
|
-
* @
|
|
2230
|
-
* @template T, S
|
|
2494
|
+
* @template T
|
|
2231
2495
|
*/
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2496
|
+
RouteId = /** @class */ (function (_super) {
|
|
2497
|
+
__extends(RouteId, _super);
|
|
2498
|
+
function RouteId() {
|
|
2499
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2500
|
+
_this.isRouteId = true;
|
|
2501
|
+
_this.isArray = false;
|
|
2502
|
+
return _this;
|
|
2236
2503
|
}
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
ResolvedParameter.prototype.isRouteId = /**
|
|
2241
|
-
* @return {?}
|
|
2242
|
-
*/
|
|
2243
|
-
function () {
|
|
2244
|
-
return this.parameterDef.isRouteId;
|
|
2245
|
-
};
|
|
2246
|
-
return ResolvedParameter;
|
|
2247
|
-
}());
|
|
2248
|
-
ParameterSnapshot.ResolvedParameter = ResolvedParameter;
|
|
2504
|
+
return RouteId;
|
|
2505
|
+
}(ParameterDefinition));
|
|
2506
|
+
ParameterDefinition.RouteId = RouteId;
|
|
2249
2507
|
if (false) {
|
|
2250
2508
|
/** @type {?} */
|
|
2251
|
-
|
|
2509
|
+
RouteId.prototype.isRouteId;
|
|
2252
2510
|
/** @type {?} */
|
|
2253
|
-
|
|
2254
|
-
/**
|
|
2255
|
-
* @abstract
|
|
2256
|
-
* @param {?} dest
|
|
2257
|
-
* @return {?}
|
|
2258
|
-
*/
|
|
2259
|
-
ResolvedParameter.prototype.injectRouteParam = function (dest) { };
|
|
2260
|
-
/**
|
|
2261
|
-
* @abstract
|
|
2262
|
-
* @param {?} otherValue
|
|
2263
|
-
* @return {?}
|
|
2264
|
-
*/
|
|
2265
|
-
ResolvedParameter.prototype.isSame = function (otherValue) { };
|
|
2266
|
-
/**
|
|
2267
|
-
* @abstract
|
|
2268
|
-
* @return {?}
|
|
2269
|
-
*/
|
|
2270
|
-
ResolvedParameter.prototype.formattedValue = function () { };
|
|
2271
|
-
/**
|
|
2272
|
-
* @abstract
|
|
2273
|
-
* @param {?} value
|
|
2274
|
-
* @return {?}
|
|
2275
|
-
*/
|
|
2276
|
-
ResolvedParameter.prototype.replace = function (value) { };
|
|
2511
|
+
RouteId.prototype.isArray;
|
|
2277
2512
|
}
|
|
2278
2513
|
/**
|
|
2279
2514
|
* @template T
|
|
2280
2515
|
*/
|
|
2281
|
-
var
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2516
|
+
var /**
|
|
2517
|
+
* @template T
|
|
2518
|
+
*/
|
|
2519
|
+
ValueParameter = /** @class */ (function (_super) {
|
|
2520
|
+
__extends(ValueParameter, _super);
|
|
2521
|
+
function ValueParameter() {
|
|
2522
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2523
|
+
_this.isRouteId = false;
|
|
2524
|
+
_this.isArray = false;
|
|
2525
|
+
return _this;
|
|
2285
2526
|
}
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
return this.value === otherValue;
|
|
2296
|
-
};
|
|
2297
|
-
/**
|
|
2298
|
-
* @param {?} dest
|
|
2299
|
-
* @return {?}
|
|
2300
|
-
*/
|
|
2301
|
-
ResolvedValueParameter.prototype.injectRouteParam = /**
|
|
2302
|
-
* @param {?} dest
|
|
2303
|
-
* @return {?}
|
|
2304
|
-
*/
|
|
2305
|
-
function (dest) {
|
|
2306
|
-
dest[this.parameterDef.name] = this.parameterDef.type.format(this.value);
|
|
2307
|
-
};
|
|
2308
|
-
/**
|
|
2309
|
-
* @param {?} value
|
|
2310
|
-
* @return {?}
|
|
2311
|
-
*/
|
|
2312
|
-
ResolvedValueParameter.prototype.replace = /**
|
|
2313
|
-
* @param {?} value
|
|
2314
|
-
* @return {?}
|
|
2315
|
-
*/
|
|
2316
|
-
function (value) {
|
|
2317
|
-
return new ResolvedValueParameter(this.parameterDef, value);
|
|
2318
|
-
};
|
|
2319
|
-
/**
|
|
2320
|
-
* @return {?}
|
|
2321
|
-
*/
|
|
2322
|
-
ResolvedValueParameter.prototype.formattedValue = /**
|
|
2323
|
-
* @return {?}
|
|
2324
|
-
*/
|
|
2325
|
-
function () {
|
|
2326
|
-
return !lodash.isNil(this.value) ? this.parameterDef.type.format(this.value) : null;
|
|
2327
|
-
};
|
|
2328
|
-
__decorate([
|
|
2329
|
-
pectin.Trace(),
|
|
2330
|
-
__metadata("design:type", Function),
|
|
2331
|
-
__metadata("design:paramtypes", [Object]),
|
|
2332
|
-
__metadata("design:returntype", Boolean)
|
|
2333
|
-
], ResolvedValueParameter.prototype, "isSame", null);
|
|
2334
|
-
return ResolvedValueParameter;
|
|
2335
|
-
}(ResolvedParameter));
|
|
2336
|
-
ParameterSnapshot.ResolvedValueParameter = ResolvedValueParameter;
|
|
2527
|
+
return ValueParameter;
|
|
2528
|
+
}(ParameterDefinition));
|
|
2529
|
+
ParameterDefinition.ValueParameter = ValueParameter;
|
|
2530
|
+
if (false) {
|
|
2531
|
+
/** @type {?} */
|
|
2532
|
+
ValueParameter.prototype.isRouteId;
|
|
2533
|
+
/** @type {?} */
|
|
2534
|
+
ValueParameter.prototype.isArray;
|
|
2535
|
+
}
|
|
2337
2536
|
/**
|
|
2338
2537
|
* @template T
|
|
2339
2538
|
*/
|
|
2340
|
-
var
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2539
|
+
var /**
|
|
2540
|
+
* @template T
|
|
2541
|
+
*/
|
|
2542
|
+
ArrayParameter = /** @class */ (function (_super) {
|
|
2543
|
+
__extends(ArrayParameter, _super);
|
|
2544
|
+
function ArrayParameter() {
|
|
2545
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2546
|
+
_this.isRouteId = false;
|
|
2547
|
+
_this.isArray = true;
|
|
2548
|
+
return _this;
|
|
2549
|
+
}
|
|
2550
|
+
return ArrayParameter;
|
|
2551
|
+
}(ParameterDefinition));
|
|
2552
|
+
ParameterDefinition.ArrayParameter = ArrayParameter;
|
|
2553
|
+
if (false) {
|
|
2554
|
+
/** @type {?} */
|
|
2555
|
+
ArrayParameter.prototype.isRouteId;
|
|
2556
|
+
/** @type {?} */
|
|
2557
|
+
ArrayParameter.prototype.isArray;
|
|
2558
|
+
}
|
|
2559
|
+
/**
|
|
2560
|
+
* @template T, S
|
|
2561
|
+
*/
|
|
2562
|
+
var /**
|
|
2563
|
+
* @template T, S
|
|
2564
|
+
*/
|
|
2565
|
+
DefaultParameterSanitiser = /** @class */ (function () {
|
|
2566
|
+
function DefaultParameterSanitiser(remember, defaultValue, placeHistory) {
|
|
2567
|
+
this.remember = remember;
|
|
2568
|
+
this.defaultValue = defaultValue;
|
|
2569
|
+
this.placeHistory = placeHistory;
|
|
2344
2570
|
}
|
|
2345
2571
|
/**
|
|
2346
|
-
* @param {?}
|
|
2347
|
-
* @return {?}
|
|
2348
|
-
*/
|
|
2349
|
-
ResolvedArrayParameter.prototype.isSame = /**
|
|
2350
|
-
* @param {?} otherValue
|
|
2351
|
-
* @return {?}
|
|
2352
|
-
*/
|
|
2353
|
-
function (otherValue) {
|
|
2354
|
-
return lodash.isEqual(this.value, otherValue);
|
|
2355
|
-
};
|
|
2356
|
-
/**
|
|
2357
|
-
* @param {?} dest
|
|
2358
|
-
* @return {?}
|
|
2359
|
-
*/
|
|
2360
|
-
ResolvedArrayParameter.prototype.injectRouteParam = /**
|
|
2361
|
-
* @param {?} dest
|
|
2362
|
-
* @return {?}
|
|
2363
|
-
*/
|
|
2364
|
-
function (dest) {
|
|
2365
|
-
var _this = this;
|
|
2366
|
-
dest[this.parameterDef.name] = this.value.map((/**
|
|
2367
|
-
* @param {?} v
|
|
2368
|
-
* @return {?}
|
|
2369
|
-
*/
|
|
2370
|
-
function (v) { return _this.parameterDef.type.format(v); }));
|
|
2371
|
-
};
|
|
2372
|
-
/**
|
|
2572
|
+
* @param {?} parameterDef
|
|
2373
2573
|
* @param {?} value
|
|
2574
|
+
* @param {?=} visit
|
|
2374
2575
|
* @return {?}
|
|
2375
2576
|
*/
|
|
2376
|
-
|
|
2577
|
+
DefaultParameterSanitiser.prototype.sanitise = /**
|
|
2578
|
+
* @param {?} parameterDef
|
|
2377
2579
|
* @param {?} value
|
|
2580
|
+
* @param {?=} visit
|
|
2378
2581
|
* @return {?}
|
|
2379
2582
|
*/
|
|
2380
|
-
function (value) {
|
|
2381
|
-
|
|
2583
|
+
function (parameterDef, value, visit) {
|
|
2584
|
+
var _this = this;
|
|
2585
|
+
if (this.isBlank(parameterDef, value)) {
|
|
2586
|
+
if (this.remember) {
|
|
2587
|
+
/** @type {?} */
|
|
2588
|
+
var visits = this.placeHistory.getHistory(visit.placeDefinition);
|
|
2589
|
+
value = visits.map((/**
|
|
2590
|
+
* @param {?} v
|
|
2591
|
+
* @return {?}
|
|
2592
|
+
*/
|
|
2593
|
+
function (v) { return v.getValueOf(parameterDef); }))
|
|
2594
|
+
.filter((/**
|
|
2595
|
+
* @param {?} v
|
|
2596
|
+
* @return {?}
|
|
2597
|
+
*/
|
|
2598
|
+
function (v) { return !___default__default.isNil(v); }))
|
|
2599
|
+
.find((/**
|
|
2600
|
+
* @param {?} v
|
|
2601
|
+
* @return {?}
|
|
2602
|
+
*/
|
|
2603
|
+
function (v) { return !_this.isBlank(parameterDef, v); }));
|
|
2604
|
+
}
|
|
2605
|
+
value = this.isBlank(parameterDef, value) ? this.defaultValue : value;
|
|
2606
|
+
console.log(parameterDef.name + " is blank, returning: " + value);
|
|
2607
|
+
return value;
|
|
2608
|
+
}
|
|
2609
|
+
else {
|
|
2610
|
+
console.log(parameterDef.name + " is not blank");
|
|
2611
|
+
return value;
|
|
2612
|
+
}
|
|
2382
2613
|
};
|
|
2383
2614
|
/**
|
|
2615
|
+
* @private
|
|
2616
|
+
* @param {?} def
|
|
2617
|
+
* @param {?} value
|
|
2384
2618
|
* @return {?}
|
|
2385
2619
|
*/
|
|
2386
|
-
|
|
2620
|
+
DefaultParameterSanitiser.prototype.isBlank = /**
|
|
2621
|
+
* @private
|
|
2622
|
+
* @param {?} def
|
|
2623
|
+
* @param {?} value
|
|
2387
2624
|
* @return {?}
|
|
2388
2625
|
*/
|
|
2389
|
-
function () {
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
* @return {?}
|
|
2394
|
-
*/
|
|
2395
|
-
function (v) { return _this.parameterDef.type.format(v); })) : [];
|
|
2626
|
+
function (def, value) {
|
|
2627
|
+
/** @type {?} */
|
|
2628
|
+
var isNil = ___default__default.isNil(value);
|
|
2629
|
+
return isNil ? true : def.isArray ? value['length'] < 1 : false;
|
|
2396
2630
|
};
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2631
|
+
return DefaultParameterSanitiser;
|
|
2632
|
+
}());
|
|
2633
|
+
ParameterDefinition.DefaultParameterSanitiser = DefaultParameterSanitiser;
|
|
2634
|
+
if (false) {
|
|
2635
|
+
/** @type {?} */
|
|
2636
|
+
DefaultParameterSanitiser.prototype.remember;
|
|
2637
|
+
/** @type {?} */
|
|
2638
|
+
DefaultParameterSanitiser.prototype.defaultValue;
|
|
2639
|
+
/** @type {?} */
|
|
2640
|
+
DefaultParameterSanitiser.prototype.placeHistory;
|
|
2641
|
+
}
|
|
2642
|
+
})(exports.ParameterDefinition || (exports.ParameterDefinition = {}));
|
|
2407
2643
|
|
|
2408
2644
|
/**
|
|
2409
2645
|
* @fileoverview added by tsickle
|
|
2410
2646
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2411
2647
|
*/
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
.last()
|
|
2433
|
-
.map((/**
|
|
2434
|
-
* @param {?} params
|
|
2435
|
-
* @return {?}
|
|
2436
|
-
*/
|
|
2437
|
-
function (params) { return exports.ParameterSnapshot.create(_this.placeDefinition, params); }))
|
|
2438
|
-
.subscribe((/**
|
|
2439
|
-
* @param {?} resolvedParameters
|
|
2648
|
+
exports.ParameterSnapshot = /** @class */ (function () {
|
|
2649
|
+
function ParameterSnapshot(placeDefinition, resolved) {
|
|
2650
|
+
this.placeDefinition = placeDefinition;
|
|
2651
|
+
this.resolved = resolved;
|
|
2652
|
+
}
|
|
2653
|
+
/**
|
|
2654
|
+
* @param {?} other
|
|
2655
|
+
* @param {?=} debug
|
|
2656
|
+
* @return {?}
|
|
2657
|
+
*/
|
|
2658
|
+
ParameterSnapshot.prototype.hasChanged = /**
|
|
2659
|
+
* @param {?} other
|
|
2660
|
+
* @param {?=} debug
|
|
2661
|
+
* @return {?}
|
|
2662
|
+
*/
|
|
2663
|
+
function (other, debug) {
|
|
2664
|
+
if (debug === void 0) { debug = false; }
|
|
2665
|
+
/** @type {?} */
|
|
2666
|
+
var changed = this.resolved.find((/**
|
|
2667
|
+
* @param {?} r
|
|
2440
2668
|
* @return {?}
|
|
2441
2669
|
*/
|
|
2442
|
-
function (
|
|
2443
|
-
|
|
2444
|
-
_this.resolvedParameters.value = resolvedParameters;
|
|
2445
|
-
_this._incomingRouteChange.value = false;
|
|
2670
|
+
function (r) {
|
|
2671
|
+
return !r.isSame(other.getValueOf(r.parameterDef));
|
|
2446
2672
|
}));
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
function (params, previous) {
|
|
2453
|
-
placeService.notifyRouteParametersChanged({
|
|
2454
|
-
activatedRoute: _this.activatedRoute,
|
|
2455
|
-
next: params,
|
|
2456
|
-
previous: previous,
|
|
2457
|
-
updateRoute: !_this.incomingRouteChange.value // we update the route if it's a component triggered change.
|
|
2673
|
+
if (changed && debug) {
|
|
2674
|
+
console.log({
|
|
2675
|
+
name: changed.parameterDef.name,
|
|
2676
|
+
mine: changed.value,
|
|
2677
|
+
theirs: other.getValueOf(changed.parameterDef)
|
|
2458
2678
|
});
|
|
2459
|
-
}
|
|
2460
|
-
return
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
|
|
2679
|
+
}
|
|
2680
|
+
return !!changed;
|
|
2681
|
+
};
|
|
2682
|
+
/**
|
|
2683
|
+
* @template T, S
|
|
2684
|
+
* @param {?} parameterDef
|
|
2685
|
+
* @return {?}
|
|
2686
|
+
*/
|
|
2687
|
+
ParameterSnapshot.prototype.getParameter = /**
|
|
2688
|
+
* @template T, S
|
|
2689
|
+
* @param {?} parameterDef
|
|
2690
|
+
* @return {?}
|
|
2691
|
+
*/
|
|
2692
|
+
function (parameterDef) {
|
|
2693
|
+
return this.resolved.find((/**
|
|
2694
|
+
* @param {?} r
|
|
2464
2695
|
* @return {?}
|
|
2465
2696
|
*/
|
|
2466
|
-
function () {
|
|
2467
|
-
|
|
2468
|
-
},
|
|
2469
|
-
enumerable: true,
|
|
2470
|
-
configurable: true
|
|
2471
|
-
});
|
|
2697
|
+
function (r) { return r.parameterDef === parameterDef; }));
|
|
2698
|
+
};
|
|
2472
2699
|
/**
|
|
2473
|
-
* @private
|
|
2474
2700
|
* @template T, S
|
|
2475
2701
|
* @param {?} parameterDef
|
|
2476
2702
|
* @return {?}
|
|
2477
2703
|
*/
|
|
2478
|
-
|
|
2479
|
-
* @private
|
|
2704
|
+
ParameterSnapshot.prototype.getValueOf = /**
|
|
2480
2705
|
* @template T, S
|
|
2481
2706
|
* @param {?} parameterDef
|
|
2482
2707
|
* @return {?}
|
|
2483
2708
|
*/
|
|
2484
2709
|
function (parameterDef) {
|
|
2485
2710
|
/** @type {?} */
|
|
2486
|
-
var
|
|
2487
|
-
|
|
2488
|
-
this.registerDisposable(new pectin.Binding(this.resolvedParameters, model, {
|
|
2489
|
-
toRight: /**
|
|
2490
|
-
* @param {?} parameters
|
|
2491
|
-
* @return {?}
|
|
2492
|
-
*/
|
|
2493
|
-
function (parameters) {
|
|
2494
|
-
return parameters.getResolvedParameterValue(parameterDef);
|
|
2495
|
-
},
|
|
2496
|
-
toLeft: /**
|
|
2497
|
-
* @param {?} value
|
|
2498
|
-
* @param {?=} currentParameters
|
|
2499
|
-
* @return {?}
|
|
2500
|
-
*/
|
|
2501
|
-
function (value, currentParameters) {
|
|
2502
|
-
return currentParameters.replace(parameterDef, value);
|
|
2503
|
-
}
|
|
2504
|
-
}));
|
|
2711
|
+
var resolvedParameter = this.getParameter(parameterDef);
|
|
2712
|
+
return resolvedParameter ? resolvedParameter.value : null;
|
|
2505
2713
|
};
|
|
2506
|
-
|
|
2507
|
-
|
|
2714
|
+
/**
|
|
2715
|
+
* @return {?}
|
|
2716
|
+
*/
|
|
2717
|
+
ParameterSnapshot.prototype.getRouteIdValue = /**
|
|
2718
|
+
* @return {?}
|
|
2719
|
+
*/
|
|
2720
|
+
function () {
|
|
2721
|
+
return this.getRouteIdParameter() ? this.getRouteIdParameter().value : null;
|
|
2722
|
+
};
|
|
2723
|
+
/**
|
|
2724
|
+
* @param {?} name
|
|
2725
|
+
* @return {?}
|
|
2726
|
+
*/
|
|
2727
|
+
ParameterSnapshot.prototype.getParameterValue = /**
|
|
2728
|
+
* @param {?} name
|
|
2729
|
+
* @return {?}
|
|
2730
|
+
*/
|
|
2731
|
+
function (name) {
|
|
2732
|
+
/** @type {?} */
|
|
2733
|
+
var resolvedParameter = this.resolved.find((/**
|
|
2734
|
+
* @param {?} r
|
|
2508
2735
|
* @return {?}
|
|
2509
2736
|
*/
|
|
2510
|
-
function () {
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
enumerable: true,
|
|
2514
|
-
configurable: true
|
|
2515
|
-
});
|
|
2737
|
+
function (r) { return r.parameterDef.name === name; }));
|
|
2738
|
+
return resolvedParameter ? resolvedParameter.value : null;
|
|
2739
|
+
};
|
|
2516
2740
|
/**
|
|
2741
|
+
* @private
|
|
2517
2742
|
* @return {?}
|
|
2518
2743
|
*/
|
|
2519
|
-
|
|
2744
|
+
ParameterSnapshot.prototype.getRouteIdParameter = /**
|
|
2745
|
+
* @private
|
|
2520
2746
|
* @return {?}
|
|
2521
2747
|
*/
|
|
2522
2748
|
function () {
|
|
2523
|
-
|
|
2749
|
+
// RouteId's are never arrays: see parameter-decorators.ts createDefinition methods. It would be nice to
|
|
2750
|
+
// capture this in the type system though
|
|
2751
|
+
return (/** @type {?} */ (this.resolved.find((/**
|
|
2752
|
+
* @param {?} p
|
|
2753
|
+
* @return {?}
|
|
2754
|
+
*/
|
|
2755
|
+
function (p) { return p.parameterDef.isRouteId; }))));
|
|
2756
|
+
};
|
|
2757
|
+
/**
|
|
2758
|
+
* @private
|
|
2759
|
+
* @return {?}
|
|
2760
|
+
*/
|
|
2761
|
+
ParameterSnapshot.prototype.getRouteParameters = /**
|
|
2762
|
+
* @private
|
|
2763
|
+
* @return {?}
|
|
2764
|
+
*/
|
|
2765
|
+
function () {
|
|
2766
|
+
return this.resolved.filter((/**
|
|
2767
|
+
* @param {?} r
|
|
2768
|
+
* @return {?}
|
|
2769
|
+
*/
|
|
2770
|
+
function (r) { return !r.parameterDef.isRouteId; }));
|
|
2524
2771
|
};
|
|
2525
|
-
// @Trace()
|
|
2526
|
-
// @Trace()
|
|
2527
2772
|
/**
|
|
2528
2773
|
* @return {?}
|
|
2529
2774
|
*/
|
|
2530
|
-
|
|
2531
|
-
|
|
2775
|
+
ParameterSnapshot.prototype.hasRouteId = /**
|
|
2776
|
+
* @return {?}
|
|
2777
|
+
*/
|
|
2778
|
+
function () {
|
|
2779
|
+
return !!this.getRouteIdParameter();
|
|
2780
|
+
};
|
|
2781
|
+
/**
|
|
2782
|
+
* @return {?}
|
|
2783
|
+
*/
|
|
2784
|
+
ParameterSnapshot.prototype.getFormattedRouteId = /**
|
|
2785
|
+
* @return {?}
|
|
2786
|
+
*/
|
|
2787
|
+
function () {
|
|
2788
|
+
/** @type {?} */
|
|
2789
|
+
var routeIdParam = this.getRouteIdParameter();
|
|
2790
|
+
return routeIdParam ? routeIdParam.formattedValue() : null;
|
|
2791
|
+
};
|
|
2792
|
+
/**
|
|
2793
|
+
* @return {?}
|
|
2794
|
+
*/
|
|
2795
|
+
ParameterSnapshot.prototype.getFormattedParameters = /**
|
|
2796
|
+
* @return {?}
|
|
2797
|
+
*/
|
|
2798
|
+
function () {
|
|
2799
|
+
/** @type {?} */
|
|
2800
|
+
var params = {};
|
|
2801
|
+
/** @type {?} */
|
|
2802
|
+
var routeIdParam = this.resolved.filter((/**
|
|
2803
|
+
* @param {?} p
|
|
2804
|
+
* @return {?}
|
|
2805
|
+
*/
|
|
2806
|
+
function (p) { return !p.parameterDef.isRouteId; })).forEach((/**
|
|
2807
|
+
* @param {?} p
|
|
2808
|
+
* @return {?}
|
|
2809
|
+
*/
|
|
2810
|
+
function (p) {
|
|
2811
|
+
params[p.parameterDef.name] = p.formattedValue();
|
|
2812
|
+
}));
|
|
2813
|
+
return params;
|
|
2814
|
+
};
|
|
2532
2815
|
/**
|
|
2533
2816
|
* @return {?}
|
|
2534
2817
|
*/
|
|
2818
|
+
ParameterSnapshot.prototype.getAllFormattedParameters = /**
|
|
2819
|
+
* @return {?}
|
|
2820
|
+
*/
|
|
2535
2821
|
function () {
|
|
2822
|
+
/** @type {?} */
|
|
2823
|
+
var params = {};
|
|
2824
|
+
/** @type {?} */
|
|
2825
|
+
var routeIdParam = this.resolved.forEach((/**
|
|
2826
|
+
* @param {?} p
|
|
2827
|
+
* @return {?}
|
|
2828
|
+
*/
|
|
2829
|
+
function (p) {
|
|
2830
|
+
params[p.parameterDef.name] = p.formattedValue();
|
|
2831
|
+
}));
|
|
2832
|
+
return params;
|
|
2833
|
+
};
|
|
2834
|
+
/**
|
|
2835
|
+
* @template T, S
|
|
2836
|
+
* @param {?} parameter
|
|
2837
|
+
* @param {?} value
|
|
2838
|
+
* @return {?}
|
|
2839
|
+
*/
|
|
2840
|
+
ParameterSnapshot.prototype.replace = /**
|
|
2841
|
+
* @template T, S
|
|
2842
|
+
* @param {?} parameter
|
|
2843
|
+
* @param {?} value
|
|
2844
|
+
* @return {?}
|
|
2845
|
+
*/
|
|
2846
|
+
function (parameter, value) {
|
|
2847
|
+
return new ParameterSnapshot(this.placeDefinition, this.resolved.map((/**
|
|
2848
|
+
* @param {?} p
|
|
2849
|
+
* @return {?}
|
|
2850
|
+
*/
|
|
2851
|
+
function (p) {
|
|
2852
|
+
return p.parameterDef === parameter ? p.replace(value) : p;
|
|
2853
|
+
})));
|
|
2854
|
+
};
|
|
2855
|
+
/**
|
|
2856
|
+
* @param {?} injector
|
|
2857
|
+
* @return {?}
|
|
2858
|
+
*/
|
|
2859
|
+
ParameterSnapshot.prototype.sanitise = /**
|
|
2860
|
+
* @param {?} injector
|
|
2861
|
+
* @return {?}
|
|
2862
|
+
*/
|
|
2863
|
+
function (injector) {
|
|
2864
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2865
|
+
var routeId, sanitisedValue, result, routeParameters, i, sanitisedValue;
|
|
2866
|
+
return __generator(this, function (_a) {
|
|
2867
|
+
switch (_a.label) {
|
|
2868
|
+
case 0:
|
|
2869
|
+
if (!this.hasRouteId()) return [3 /*break*/, 2];
|
|
2870
|
+
routeId = this.getRouteIdParameter();
|
|
2871
|
+
return [4 /*yield*/, routeId.sanitise(this, injector)];
|
|
2872
|
+
case 1:
|
|
2873
|
+
sanitisedValue = _a.sent();
|
|
2874
|
+
if (!routeId.isSame(sanitisedValue)) {
|
|
2875
|
+
// if the route id has changed we redirect immediately as other
|
|
2876
|
+
// parameter sanitisers might use it.
|
|
2877
|
+
return [2 /*return*/, this.replace(routeId.parameterDef, sanitisedValue)];
|
|
2878
|
+
}
|
|
2879
|
+
_a.label = 2;
|
|
2880
|
+
case 2:
|
|
2881
|
+
result = this;
|
|
2882
|
+
routeParameters = this.getRouteParameters();
|
|
2883
|
+
i = 0;
|
|
2884
|
+
_a.label = 3;
|
|
2885
|
+
case 3:
|
|
2886
|
+
if (!(i < routeParameters.length)) return [3 /*break*/, 6];
|
|
2887
|
+
return [4 /*yield*/, routeParameters[i].sanitise(this, injector)];
|
|
2888
|
+
case 4:
|
|
2889
|
+
sanitisedValue = _a.sent();
|
|
2890
|
+
if (!routeParameters[i].isSame(sanitisedValue)) {
|
|
2891
|
+
result = this.replace(routeParameters[i].parameterDef, sanitisedValue);
|
|
2892
|
+
}
|
|
2893
|
+
_a.label = 5;
|
|
2894
|
+
case 5:
|
|
2895
|
+
i++;
|
|
2896
|
+
return [3 /*break*/, 3];
|
|
2897
|
+
case 6: return [2 /*return*/, result];
|
|
2898
|
+
}
|
|
2899
|
+
});
|
|
2900
|
+
});
|
|
2536
2901
|
};
|
|
2902
|
+
var _a;
|
|
2903
|
+
__decorate([
|
|
2904
|
+
src.Memoize(),
|
|
2905
|
+
__metadata("design:type", Function),
|
|
2906
|
+
__metadata("design:paramtypes", [exports.ParameterDefinition]),
|
|
2907
|
+
__metadata("design:returntype", ParameterSnapshot.ResolvedParameter)
|
|
2908
|
+
], ParameterSnapshot.prototype, "getParameter", null);
|
|
2537
2909
|
__decorate([
|
|
2538
|
-
|
|
2539
|
-
__metadata("design:type",
|
|
2540
|
-
__metadata("design:paramtypes", [])
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2910
|
+
src.Memoize(),
|
|
2911
|
+
__metadata("design:type", Function),
|
|
2912
|
+
__metadata("design:paramtypes", [exports.ParameterDefinition]),
|
|
2913
|
+
__metadata("design:returntype", typeof (_a = typeof S !== "undefined" && S) === "function" ? _a : Object)
|
|
2914
|
+
], ParameterSnapshot.prototype, "getValueOf", null);
|
|
2915
|
+
__decorate([
|
|
2916
|
+
src.Memoize(),
|
|
2917
|
+
__metadata("design:type", Function),
|
|
2918
|
+
__metadata("design:paramtypes", [String]),
|
|
2919
|
+
__metadata("design:returntype", Object)
|
|
2920
|
+
], ParameterSnapshot.prototype, "getParameterValue", null);
|
|
2921
|
+
__decorate([
|
|
2922
|
+
src.Memoize(),
|
|
2923
|
+
__metadata("design:type", Function),
|
|
2924
|
+
__metadata("design:paramtypes", []),
|
|
2925
|
+
__metadata("design:returntype", ParameterSnapshot.ResolvedValueParameter)
|
|
2926
|
+
], ParameterSnapshot.prototype, "getRouteIdParameter", null);
|
|
2927
|
+
__decorate([
|
|
2928
|
+
src.Memoize(),
|
|
2929
|
+
__metadata("design:type", Function),
|
|
2930
|
+
__metadata("design:paramtypes", []),
|
|
2931
|
+
__metadata("design:returntype", Array)
|
|
2932
|
+
], ParameterSnapshot.prototype, "getRouteParameters", null);
|
|
2933
|
+
__decorate([
|
|
2934
|
+
pectin.Trace(),
|
|
2935
|
+
__metadata("design:type", Function),
|
|
2936
|
+
__metadata("design:paramtypes", [core.Injector]),
|
|
2937
|
+
__metadata("design:returntype", Promise)
|
|
2938
|
+
], ParameterSnapshot.prototype, "sanitise", null);
|
|
2939
|
+
return ParameterSnapshot;
|
|
2940
|
+
}());
|
|
2544
2941
|
if (false) {
|
|
2545
2942
|
/** @type {?} */
|
|
2546
|
-
exports.
|
|
2943
|
+
exports.ParameterSnapshot.prototype.placeDefinition;
|
|
2547
2944
|
/**
|
|
2548
2945
|
* @type {?}
|
|
2549
2946
|
* @private
|
|
2550
2947
|
*/
|
|
2551
|
-
exports.
|
|
2552
|
-
/** @type {?} */
|
|
2553
|
-
exports.PlaceComponent.prototype.activatedRoute;
|
|
2948
|
+
exports.ParameterSnapshot.prototype.resolved;
|
|
2554
2949
|
}
|
|
2555
|
-
(function (
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2950
|
+
(function (ParameterSnapshot) {
|
|
2951
|
+
/**
|
|
2952
|
+
* @param {?} placeDef
|
|
2953
|
+
* @param {?} params
|
|
2954
|
+
* @param {?} urlSegments
|
|
2955
|
+
* @return {?}
|
|
2956
|
+
*/
|
|
2957
|
+
function create(placeDef, params, urlSegments) {
|
|
2958
|
+
/** @type {?} */
|
|
2959
|
+
var paramMap = new ConsolidatedParameterMap(params, urlSegments);
|
|
2960
|
+
/** @type {?} */
|
|
2961
|
+
var resolvedParameters = placeDef.getRouteParameters()
|
|
2962
|
+
.map((/**
|
|
2963
|
+
* @param {?} def
|
|
2964
|
+
* @return {?}
|
|
2965
|
+
*/
|
|
2966
|
+
function (def) {
|
|
2967
|
+
if (def.isArray) {
|
|
2968
|
+
/** @type {?} */
|
|
2969
|
+
var value = paramMap.has(def.name) ? paramMap.getAll(def.name).filter((/**
|
|
2970
|
+
* @param {?} s
|
|
2971
|
+
* @return {?}
|
|
2972
|
+
*/
|
|
2973
|
+
function (s) { return !___default__default.isEmpty(s); })).map((/**
|
|
2974
|
+
* @param {?} raw
|
|
2975
|
+
* @return {?}
|
|
2976
|
+
*/
|
|
2977
|
+
function (raw) { return def.type.parse(raw); })) : null;
|
|
2978
|
+
return new ResolvedArrayParameter(def, value);
|
|
2979
|
+
}
|
|
2980
|
+
else {
|
|
2981
|
+
/** @type {?} */
|
|
2982
|
+
var value = paramMap.has(def.name) ? def.type.parse(paramMap.get(def.name)) : null;
|
|
2983
|
+
return new ResolvedValueParameter(def, value);
|
|
2984
|
+
}
|
|
2985
|
+
}));
|
|
2986
|
+
return new ParameterSnapshot(placeDef, resolvedParameters);
|
|
2987
|
+
}
|
|
2988
|
+
ParameterSnapshot.create = create;
|
|
2989
|
+
/**
|
|
2990
|
+
* This a work around for the fact that an activated route with multiple segments doesn't
|
|
2991
|
+
* include the segment params in the paramMap as well as each segment returns an empty
|
|
2992
|
+
* param map even when `parameter`s has content.
|
|
2993
|
+
*/
|
|
2994
|
+
var /**
|
|
2995
|
+
* This a work around for the fact that an activated route with multiple segments doesn't
|
|
2996
|
+
* include the segment params in the paramMap as well as each segment returns an empty
|
|
2997
|
+
* param map even when `parameter`s has content.
|
|
2998
|
+
*/
|
|
2999
|
+
ConsolidatedParameterMap = /** @class */ (function () {
|
|
3000
|
+
function ConsolidatedParameterMap(paramMap, urlSegments) {
|
|
3001
|
+
this.paramMaps = [paramMap].concat((urlSegments || []).map((/**
|
|
3002
|
+
* @param {?} s
|
|
2566
3003
|
* @return {?}
|
|
2567
3004
|
*/
|
|
2568
|
-
function (
|
|
3005
|
+
function (s) { return new ParamMapAdapter(s.parameters); }))).filter((/**
|
|
3006
|
+
* @param {?} m
|
|
3007
|
+
* @return {?}
|
|
3008
|
+
*/
|
|
3009
|
+
function (m) { return !!m; })); // the activated route param map can be null
|
|
2569
3010
|
}
|
|
2570
3011
|
/**
|
|
3012
|
+
* @param {?} name
|
|
2571
3013
|
* @return {?}
|
|
2572
3014
|
*/
|
|
2573
|
-
|
|
3015
|
+
ConsolidatedParameterMap.prototype.get = /**
|
|
3016
|
+
* @param {?} name
|
|
2574
3017
|
* @return {?}
|
|
2575
3018
|
*/
|
|
2576
|
-
function () {
|
|
2577
|
-
return
|
|
3019
|
+
function (name) {
|
|
3020
|
+
return this.paramMaps.find((/**
|
|
3021
|
+
* @param {?} m
|
|
3022
|
+
* @return {?}
|
|
3023
|
+
*/
|
|
3024
|
+
function (m) { return m.has(name); })).get(name);
|
|
2578
3025
|
};
|
|
2579
3026
|
/**
|
|
2580
|
-
* @param {?}
|
|
3027
|
+
* @param {?} name
|
|
2581
3028
|
* @return {?}
|
|
2582
3029
|
*/
|
|
2583
|
-
|
|
2584
|
-
* @param {?}
|
|
3030
|
+
ConsolidatedParameterMap.prototype.getAll = /**
|
|
3031
|
+
* @param {?} name
|
|
2585
3032
|
* @return {?}
|
|
2586
3033
|
*/
|
|
2587
|
-
function (
|
|
2588
|
-
return
|
|
3034
|
+
function (name) {
|
|
3035
|
+
return this.paramMaps.find((/**
|
|
3036
|
+
* @param {?} m
|
|
3037
|
+
* @return {?}
|
|
3038
|
+
*/
|
|
3039
|
+
function (m) { return m.has(name); })).getAll(name);
|
|
2589
3040
|
};
|
|
2590
3041
|
/**
|
|
2591
|
-
* @param {?}
|
|
3042
|
+
* @param {?} name
|
|
2592
3043
|
* @return {?}
|
|
2593
3044
|
*/
|
|
2594
|
-
|
|
2595
|
-
* @param {?}
|
|
3045
|
+
ConsolidatedParameterMap.prototype.has = /**
|
|
3046
|
+
* @param {?} name
|
|
2596
3047
|
* @return {?}
|
|
2597
3048
|
*/
|
|
2598
|
-
function (
|
|
2599
|
-
return
|
|
3049
|
+
function (name) {
|
|
3050
|
+
return !!this.paramMaps.find((/**
|
|
3051
|
+
* @param {?} m
|
|
3052
|
+
* @return {?}
|
|
3053
|
+
*/
|
|
3054
|
+
function (m) { return m.has(name); }));
|
|
2600
3055
|
};
|
|
3056
|
+
return ConsolidatedParameterMap;
|
|
3057
|
+
}());
|
|
3058
|
+
if (false) {
|
|
3059
|
+
/**
|
|
3060
|
+
* @type {?}
|
|
3061
|
+
* @private
|
|
3062
|
+
*/
|
|
3063
|
+
ConsolidatedParameterMap.prototype.paramMaps;
|
|
3064
|
+
}
|
|
3065
|
+
var ParamMapAdapter = /** @class */ (function () {
|
|
3066
|
+
function ParamMapAdapter(params) {
|
|
3067
|
+
this.params = params;
|
|
3068
|
+
}
|
|
2601
3069
|
/**
|
|
2602
|
-
* @
|
|
2603
|
-
* @param {?} key
|
|
2604
|
-
* @param {?=} defaultValue
|
|
3070
|
+
* @param {?} name
|
|
2605
3071
|
* @return {?}
|
|
2606
3072
|
*/
|
|
2607
|
-
|
|
2608
|
-
* @
|
|
2609
|
-
* @param {?} key
|
|
2610
|
-
* @param {?=} defaultValue
|
|
3073
|
+
ParamMapAdapter.prototype.get = /**
|
|
3074
|
+
* @param {?} name
|
|
2611
3075
|
* @return {?}
|
|
2612
3076
|
*/
|
|
2613
|
-
function (
|
|
2614
|
-
return this.
|
|
2615
|
-
lodash.isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
2616
|
-
defaultValue;
|
|
3077
|
+
function (name) {
|
|
3078
|
+
return this.params[name];
|
|
2617
3079
|
};
|
|
2618
3080
|
/**
|
|
2619
|
-
* @
|
|
2620
|
-
* @param {?} keys
|
|
2621
|
-
* @param {?=} defaultValue
|
|
3081
|
+
* @param {?} name
|
|
2622
3082
|
* @return {?}
|
|
2623
3083
|
*/
|
|
2624
|
-
|
|
2625
|
-
* @
|
|
2626
|
-
* @param {?} keys
|
|
2627
|
-
* @param {?=} defaultValue
|
|
3084
|
+
ParamMapAdapter.prototype.getAll = /**
|
|
3085
|
+
* @param {?} name
|
|
2628
3086
|
* @return {?}
|
|
2629
3087
|
*/
|
|
2630
|
-
function (
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
3088
|
+
function (name) {
|
|
3089
|
+
/** @type {?} */
|
|
3090
|
+
var value = this.get(name);
|
|
3091
|
+
return Array.isArray(value) ? value : [value];
|
|
3092
|
+
};
|
|
3093
|
+
/**
|
|
3094
|
+
* @param {?} name
|
|
3095
|
+
* @return {?}
|
|
3096
|
+
*/
|
|
3097
|
+
ParamMapAdapter.prototype.has = /**
|
|
3098
|
+
* @param {?} name
|
|
3099
|
+
* @return {?}
|
|
3100
|
+
*/
|
|
3101
|
+
function (name) {
|
|
3102
|
+
return this.keys.includes(name);
|
|
2644
3103
|
};
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
3104
|
+
Object.defineProperty(ParamMapAdapter.prototype, "keys", {
|
|
3105
|
+
get: /**
|
|
3106
|
+
* @return {?}
|
|
3107
|
+
*/
|
|
3108
|
+
function () {
|
|
3109
|
+
return Object.keys(this.params);
|
|
3110
|
+
},
|
|
3111
|
+
enumerable: true,
|
|
3112
|
+
configurable: true
|
|
3113
|
+
});
|
|
3114
|
+
return ParamMapAdapter;
|
|
2652
3115
|
}());
|
|
2653
|
-
PlaceComponent.Definition = Definition;
|
|
2654
3116
|
if (false) {
|
|
2655
|
-
/**
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
Definition.prototype.order;
|
|
2661
|
-
/** @type {?} */
|
|
2662
|
-
Definition.prototype.data;
|
|
2663
|
-
/** @type {?} */
|
|
2664
|
-
Definition.prototype.children;
|
|
2665
|
-
/** @type {?} */
|
|
2666
|
-
Definition.prototype.component;
|
|
3117
|
+
/**
|
|
3118
|
+
* @type {?}
|
|
3119
|
+
* @private
|
|
3120
|
+
*/
|
|
3121
|
+
ParamMapAdapter.prototype.params;
|
|
2667
3122
|
}
|
|
2668
3123
|
/**
|
|
2669
|
-
* @
|
|
3124
|
+
* @abstract
|
|
3125
|
+
* @template T, S
|
|
2670
3126
|
*/
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
/** @type {?} */
|
|
2675
|
-
Options.prototype.path;
|
|
2676
|
-
/** @type {?} */
|
|
2677
|
-
Options.prototype.order;
|
|
2678
|
-
/** @type {?|undefined} */
|
|
2679
|
-
Options.prototype.data;
|
|
2680
|
-
/** @type {?|undefined} */
|
|
2681
|
-
Options.prototype.authenticate;
|
|
2682
|
-
/** @type {?|undefined} */
|
|
2683
|
-
Options.prototype.children;
|
|
2684
|
-
}
|
|
2685
|
-
/**
|
|
2686
|
-
* @record
|
|
3127
|
+
var /**
|
|
3128
|
+
* @abstract
|
|
3129
|
+
* @template T, S
|
|
2687
3130
|
*/
|
|
2688
|
-
function
|
|
2689
|
-
|
|
3131
|
+
ResolvedParameter = /** @class */ (function () {
|
|
3132
|
+
function ResolvedParameter(parameterDef, value) {
|
|
3133
|
+
this.parameterDef = parameterDef;
|
|
3134
|
+
this.value = value;
|
|
3135
|
+
}
|
|
3136
|
+
/**
|
|
3137
|
+
* @return {?}
|
|
3138
|
+
*/
|
|
3139
|
+
ResolvedParameter.prototype.isRouteId = /**
|
|
3140
|
+
* @return {?}
|
|
3141
|
+
*/
|
|
3142
|
+
function () {
|
|
3143
|
+
return this.parameterDef.isRouteId;
|
|
3144
|
+
};
|
|
3145
|
+
/**
|
|
3146
|
+
* @param {?} visit
|
|
3147
|
+
* @param {?} injector
|
|
3148
|
+
* @return {?}
|
|
3149
|
+
*/
|
|
3150
|
+
ResolvedParameter.prototype.sanitise = /**
|
|
3151
|
+
* @param {?} visit
|
|
3152
|
+
* @param {?} injector
|
|
3153
|
+
* @return {?}
|
|
3154
|
+
*/
|
|
3155
|
+
function (visit, injector) {
|
|
3156
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3157
|
+
var sanitiser;
|
|
3158
|
+
return __generator(this, function (_a) {
|
|
3159
|
+
sanitiser = this.parameterDef.getSanitiser(injector);
|
|
3160
|
+
if (sanitiser) {
|
|
3161
|
+
return [2 /*return*/, sanitiser.sanitise(this.parameterDef, this.value, visit)];
|
|
3162
|
+
}
|
|
3163
|
+
else {
|
|
3164
|
+
return [2 /*return*/, this.value];
|
|
3165
|
+
}
|
|
3166
|
+
return [2 /*return*/];
|
|
3167
|
+
});
|
|
3168
|
+
});
|
|
3169
|
+
};
|
|
3170
|
+
return ResolvedParameter;
|
|
3171
|
+
}());
|
|
3172
|
+
ParameterSnapshot.ResolvedParameter = ResolvedParameter;
|
|
2690
3173
|
if (false) {
|
|
2691
3174
|
/** @type {?} */
|
|
2692
|
-
|
|
3175
|
+
ResolvedParameter.prototype.parameterDef;
|
|
3176
|
+
/** @type {?} */
|
|
3177
|
+
ResolvedParameter.prototype.value;
|
|
3178
|
+
/**
|
|
3179
|
+
* @abstract
|
|
3180
|
+
* @param {?} dest
|
|
3181
|
+
* @return {?}
|
|
3182
|
+
*/
|
|
3183
|
+
ResolvedParameter.prototype.injectRouteParam = function (dest) { };
|
|
3184
|
+
/**
|
|
3185
|
+
* @abstract
|
|
3186
|
+
* @param {?} otherValue
|
|
3187
|
+
* @return {?}
|
|
3188
|
+
*/
|
|
3189
|
+
ResolvedParameter.prototype.isSame = function (otherValue) { };
|
|
3190
|
+
/**
|
|
3191
|
+
* @abstract
|
|
3192
|
+
* @return {?}
|
|
3193
|
+
*/
|
|
3194
|
+
ResolvedParameter.prototype.formattedValue = function () { };
|
|
3195
|
+
/**
|
|
3196
|
+
* @abstract
|
|
3197
|
+
* @param {?} value
|
|
3198
|
+
* @return {?}
|
|
3199
|
+
*/
|
|
3200
|
+
ResolvedParameter.prototype.replace = function (value) { };
|
|
2693
3201
|
}
|
|
2694
3202
|
/**
|
|
2695
|
-
* @
|
|
2696
|
-
* @return {?}
|
|
3203
|
+
* @template T
|
|
2697
3204
|
*/
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
}
|
|
2701
|
-
PlaceComponent.getDefinition = getDefinition;
|
|
2702
|
-
/**
|
|
2703
|
-
* @param {?} klass
|
|
2704
|
-
* @param {?} options
|
|
2705
|
-
* @return {?}
|
|
3205
|
+
var /**
|
|
3206
|
+
* @template T
|
|
2706
3207
|
*/
|
|
2707
|
-
function
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
3208
|
+
ResolvedValueParameter = /** @class */ (function (_super) {
|
|
3209
|
+
__extends(ResolvedValueParameter, _super);
|
|
3210
|
+
function ResolvedValueParameter() {
|
|
3211
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3212
|
+
}
|
|
3213
|
+
/**
|
|
3214
|
+
* @param {?} otherValue
|
|
3215
|
+
* @return {?}
|
|
3216
|
+
*/
|
|
3217
|
+
ResolvedValueParameter.prototype.isSame = /**
|
|
3218
|
+
* @param {?} otherValue
|
|
3219
|
+
* @return {?}
|
|
3220
|
+
*/
|
|
3221
|
+
function (otherValue) {
|
|
3222
|
+
return this.value === otherValue;
|
|
3223
|
+
};
|
|
3224
|
+
/**
|
|
3225
|
+
* @param {?} dest
|
|
3226
|
+
* @return {?}
|
|
3227
|
+
*/
|
|
3228
|
+
ResolvedValueParameter.prototype.injectRouteParam = /**
|
|
3229
|
+
* @param {?} dest
|
|
3230
|
+
* @return {?}
|
|
3231
|
+
*/
|
|
3232
|
+
function (dest) {
|
|
3233
|
+
dest[this.parameterDef.name] = this.parameterDef.type.format(this.value);
|
|
3234
|
+
};
|
|
3235
|
+
/**
|
|
3236
|
+
* @param {?} value
|
|
3237
|
+
* @return {?}
|
|
3238
|
+
*/
|
|
3239
|
+
ResolvedValueParameter.prototype.replace = /**
|
|
3240
|
+
* @param {?} value
|
|
3241
|
+
* @return {?}
|
|
3242
|
+
*/
|
|
3243
|
+
function (value) {
|
|
3244
|
+
return new ResolvedValueParameter(this.parameterDef, value);
|
|
3245
|
+
};
|
|
3246
|
+
/**
|
|
3247
|
+
* @return {?}
|
|
3248
|
+
*/
|
|
3249
|
+
ResolvedValueParameter.prototype.formattedValue = /**
|
|
2724
3250
|
* @return {?}
|
|
2725
3251
|
*/
|
|
2726
|
-
function (
|
|
2727
|
-
|
|
2728
|
-
|
|
3252
|
+
function () {
|
|
3253
|
+
return !___default__default.isNil(this.value) ? this.parameterDef.type.format(this.value) : null;
|
|
3254
|
+
};
|
|
3255
|
+
return ResolvedValueParameter;
|
|
3256
|
+
}(ResolvedParameter));
|
|
3257
|
+
ParameterSnapshot.ResolvedValueParameter = ResolvedValueParameter;
|
|
2729
3258
|
/**
|
|
2730
|
-
* @
|
|
2731
|
-
* @return {?}
|
|
3259
|
+
* @template T
|
|
2732
3260
|
*/
|
|
2733
|
-
|
|
2734
|
-
* @
|
|
2735
|
-
* @return {?}
|
|
3261
|
+
var /**
|
|
3262
|
+
* @template T
|
|
2736
3263
|
*/
|
|
2737
|
-
function (
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
3264
|
+
ResolvedArrayParameter = /** @class */ (function (_super) {
|
|
3265
|
+
__extends(ResolvedArrayParameter, _super);
|
|
3266
|
+
function ResolvedArrayParameter() {
|
|
3267
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3268
|
+
}
|
|
3269
|
+
/**
|
|
3270
|
+
* @param {?} otherValue
|
|
3271
|
+
* @return {?}
|
|
3272
|
+
*/
|
|
3273
|
+
ResolvedArrayParameter.prototype.isSame = /**
|
|
3274
|
+
* @param {?} otherValue
|
|
3275
|
+
* @return {?}
|
|
3276
|
+
*/
|
|
3277
|
+
function (otherValue) {
|
|
3278
|
+
return ___default__default.isEqual(this.value, otherValue);
|
|
3279
|
+
};
|
|
3280
|
+
/**
|
|
3281
|
+
* @param {?} dest
|
|
3282
|
+
* @return {?}
|
|
3283
|
+
*/
|
|
3284
|
+
ResolvedArrayParameter.prototype.injectRouteParam = /**
|
|
3285
|
+
* @param {?} dest
|
|
3286
|
+
* @return {?}
|
|
3287
|
+
*/
|
|
3288
|
+
function (dest) {
|
|
3289
|
+
var _this = this;
|
|
3290
|
+
dest[this.parameterDef.name] = this.value.map((/**
|
|
3291
|
+
* @param {?} v
|
|
2746
3292
|
* @return {?}
|
|
2747
3293
|
*/
|
|
2748
|
-
function () { return
|
|
2749
|
-
|
|
3294
|
+
function (v) { return _this.parameterDef.type.format(v); }));
|
|
3295
|
+
};
|
|
3296
|
+
/**
|
|
3297
|
+
* @param {?} value
|
|
3298
|
+
* @return {?}
|
|
3299
|
+
*/
|
|
3300
|
+
ResolvedArrayParameter.prototype.replace = /**
|
|
3301
|
+
* @param {?} value
|
|
3302
|
+
* @return {?}
|
|
3303
|
+
*/
|
|
3304
|
+
function (value) {
|
|
3305
|
+
return new ResolvedArrayParameter(this.parameterDef, value);
|
|
3306
|
+
};
|
|
3307
|
+
/**
|
|
3308
|
+
* @return {?}
|
|
3309
|
+
*/
|
|
3310
|
+
ResolvedArrayParameter.prototype.formattedValue = /**
|
|
3311
|
+
* @return {?}
|
|
3312
|
+
*/
|
|
3313
|
+
function () {
|
|
3314
|
+
var _this = this;
|
|
3315
|
+
return this.value ? this.value.map((/**
|
|
3316
|
+
* @param {?} v
|
|
2750
3317
|
* @return {?}
|
|
2751
3318
|
*/
|
|
2752
|
-
function () { return
|
|
3319
|
+
function (v) { return _this.parameterDef.type.format(v); })) : [];
|
|
2753
3320
|
};
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
|
|
2759
|
-
* @return {?}
|
|
2760
|
-
*/
|
|
2761
|
-
function () {
|
|
2762
|
-
};
|
|
2763
|
-
AbstractPlaceNavigationComponent.propDecorators = {
|
|
2764
|
-
places: [{ type: core.Input }],
|
|
2765
|
-
placesModel: [{ type: core.Input }]
|
|
2766
|
-
};
|
|
2767
|
-
__decorate([
|
|
2768
|
-
pectin.StoreInListModel('placesModel'),
|
|
2769
|
-
__metadata("design:type", Array)
|
|
2770
|
-
], AbstractPlaceNavigationComponent.prototype, "places", void 0);
|
|
2771
|
-
__decorate([
|
|
2772
|
-
pectin.UseDelegate(),
|
|
2773
|
-
__metadata("design:type", pectin.ListModel)
|
|
2774
|
-
], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
2775
|
-
__decorate([
|
|
2776
|
-
src.Memoize(),
|
|
2777
|
-
__metadata("design:type", Function),
|
|
2778
|
-
__metadata("design:paramtypes", [exports.PlaceComponent.Definition]),
|
|
2779
|
-
__metadata("design:returntype", Object)
|
|
2780
|
-
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2781
|
-
return AbstractPlaceNavigationComponent;
|
|
2782
|
-
}(DisposableComponent));
|
|
2783
|
-
if (false) {
|
|
2784
|
-
/** @type {?} */
|
|
2785
|
-
AbstractPlaceNavigationComponent.prototype.places;
|
|
2786
|
-
/** @type {?} */
|
|
2787
|
-
AbstractPlaceNavigationComponent.prototype.placesModel;
|
|
2788
|
-
/** @type {?} */
|
|
2789
|
-
AbstractPlaceNavigationComponent.prototype.placeDefinitions;
|
|
2790
|
-
}
|
|
3321
|
+
return ResolvedArrayParameter;
|
|
3322
|
+
}(ResolvedParameter));
|
|
3323
|
+
ParameterSnapshot.ResolvedArrayParameter = ResolvedArrayParameter;
|
|
3324
|
+
})(exports.ParameterSnapshot || (exports.ParameterSnapshot = {}));
|
|
2791
3325
|
|
|
2792
3326
|
/**
|
|
2793
3327
|
* @fileoverview added by tsickle
|
|
2794
3328
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2795
3329
|
*/
|
|
2796
|
-
var
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
var _this = _super.call(this) || this;
|
|
2800
|
-
_this.expanded = true;
|
|
2801
|
-
return _this;
|
|
3330
|
+
var PlaceRouter = /** @class */ (function () {
|
|
3331
|
+
function PlaceRouter(router) {
|
|
3332
|
+
this.router = router;
|
|
2802
3333
|
}
|
|
2803
3334
|
/**
|
|
3335
|
+
* @param {?} activatedRoute
|
|
3336
|
+
* @param {?} previous
|
|
3337
|
+
* @param {?} next
|
|
2804
3338
|
* @return {?}
|
|
2805
3339
|
*/
|
|
2806
|
-
|
|
3340
|
+
PlaceRouter.prototype.pushParameterChangesToRoute = /**
|
|
3341
|
+
* @param {?} activatedRoute
|
|
3342
|
+
* @param {?} previous
|
|
3343
|
+
* @param {?} next
|
|
2807
3344
|
* @return {?}
|
|
2808
3345
|
*/
|
|
2809
|
-
function () {
|
|
2810
|
-
|
|
3346
|
+
function (activatedRoute, previous, next) {
|
|
3347
|
+
/** @type {?} */
|
|
3348
|
+
var relativePath = !!previous.hasRouteId() ? '..' : '.';
|
|
3349
|
+
this.router.navigate([relativePath].concat(this.createRouteParameters(next), this.getChildPath(activatedRoute.snapshot)), {
|
|
3350
|
+
relativeTo: activatedRoute
|
|
3351
|
+
});
|
|
2811
3352
|
};
|
|
2812
3353
|
/**
|
|
3354
|
+
* @param {?} activatedRoute
|
|
3355
|
+
* @param {?} sanitised
|
|
2813
3356
|
* @return {?}
|
|
2814
3357
|
*/
|
|
2815
|
-
|
|
3358
|
+
PlaceRouter.prototype.getRedirectUrlTree = /**
|
|
3359
|
+
* @param {?} activatedRoute
|
|
3360
|
+
* @param {?} sanitised
|
|
2816
3361
|
* @return {?}
|
|
2817
3362
|
*/
|
|
2818
|
-
function () {
|
|
2819
|
-
|
|
3363
|
+
function (activatedRoute, sanitised) {
|
|
3364
|
+
/** @type {?} */
|
|
3365
|
+
var urlSegments = activatedRoute.url;
|
|
3366
|
+
/** @type {?} */
|
|
3367
|
+
var weHaveARouteId = sanitised.hasRouteId() && sanitised.getFormattedRouteId();
|
|
3368
|
+
/** @type {?} */
|
|
3369
|
+
var commands = (weHaveARouteId) ?
|
|
3370
|
+
[urlSegments[0].path, sanitised.getFormattedRouteId(), sanitised.getFormattedParameters()] :
|
|
3371
|
+
[urlSegments[0].path, sanitised.getFormattedParameters()];
|
|
3372
|
+
console.log("redirect path", commands);
|
|
3373
|
+
return this.router.createUrlTree(commands);
|
|
2820
3374
|
};
|
|
2821
3375
|
/**
|
|
3376
|
+
* @protected
|
|
3377
|
+
* @param {?} activatedRoute
|
|
2822
3378
|
* @return {?}
|
|
2823
3379
|
*/
|
|
2824
|
-
|
|
3380
|
+
PlaceRouter.prototype.getChildPath = /**
|
|
3381
|
+
* @protected
|
|
3382
|
+
* @param {?} activatedRoute
|
|
2825
3383
|
* @return {?}
|
|
2826
3384
|
*/
|
|
2827
|
-
function () {
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
ListPlaceNavComponent.decorators = [
|
|
2831
|
-
{ type: core.Component, args: [{
|
|
2832
|
-
selector: 'angular-ui-powerups-list-place-nav',
|
|
2833
|
-
template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n",
|
|
2834
|
-
styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
|
|
2835
|
-
}] }
|
|
2836
|
-
];
|
|
2837
|
-
/** @nocollapse */
|
|
2838
|
-
ListPlaceNavComponent.ctorParameters = function () { return []; };
|
|
2839
|
-
ListPlaceNavComponent.propDecorators = {
|
|
2840
|
-
expanded: [{ type: core.HostBinding, args: ['class.expanded',] }]
|
|
2841
|
-
};
|
|
2842
|
-
return ListPlaceNavComponent;
|
|
2843
|
-
}(AbstractPlaceNavigationComponent));
|
|
2844
|
-
if (false) {
|
|
2845
|
-
/** @type {?} */
|
|
2846
|
-
ListPlaceNavComponent.prototype.expanded;
|
|
2847
|
-
}
|
|
2848
|
-
|
|
2849
|
-
/**
|
|
2850
|
-
* @fileoverview added by tsickle
|
|
2851
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2852
|
-
*/
|
|
2853
|
-
var PlaceService = /** @class */ (function (_super) {
|
|
2854
|
-
__extends(PlaceService, _super);
|
|
2855
|
-
function PlaceService(router, injector) {
|
|
2856
|
-
var _this = _super.call(this) || this;
|
|
2857
|
-
_this.router = router;
|
|
2858
|
-
_this.injector = injector;
|
|
2859
|
-
_this._activePlaces = new pectin.MutableListModel();
|
|
2860
|
-
return _this;
|
|
2861
|
-
}
|
|
2862
|
-
Object.defineProperty(PlaceService.prototype, "activePlaces", {
|
|
2863
|
-
get: /**
|
|
3385
|
+
function (activatedRoute) {
|
|
3386
|
+
return ___default__default.flatten(activatedRoute.children.map((/**
|
|
3387
|
+
* @param {?} child
|
|
2864
3388
|
* @return {?}
|
|
2865
3389
|
*/
|
|
2866
|
-
function () {
|
|
2867
|
-
return this._activePlaces.readonly;
|
|
2868
|
-
},
|
|
2869
|
-
enumerable: true,
|
|
2870
|
-
configurable: true
|
|
2871
|
-
});
|
|
2872
|
-
// @Trace()
|
|
2873
|
-
// @Trace()
|
|
2874
|
-
/**
|
|
2875
|
-
* @param {?} place
|
|
2876
|
-
* @return {?}
|
|
2877
|
-
*/
|
|
2878
|
-
PlaceService.prototype.onActivate =
|
|
2879
|
-
// @Trace()
|
|
2880
|
-
/**
|
|
2881
|
-
* @param {?} place
|
|
2882
|
-
* @return {?}
|
|
2883
|
-
*/
|
|
2884
|
-
function (place) {
|
|
2885
|
-
this._activePlaces.push(place);
|
|
2886
|
-
};
|
|
2887
|
-
// @Trace()
|
|
2888
|
-
// @Trace()
|
|
2889
|
-
/**
|
|
2890
|
-
* @param {?} place
|
|
2891
|
-
* @return {?}
|
|
2892
|
-
*/
|
|
2893
|
-
PlaceService.prototype.onDeactivate =
|
|
2894
|
-
// @Trace()
|
|
2895
|
-
/**
|
|
2896
|
-
* @param {?} place
|
|
2897
|
-
* @return {?}
|
|
2898
|
-
*/
|
|
2899
|
-
function (place) {
|
|
2900
|
-
this._activePlaces.remove(place);
|
|
2901
|
-
};
|
|
2902
|
-
// @Trace()
|
|
2903
|
-
// @Trace()
|
|
2904
|
-
/**
|
|
2905
|
-
* @param {?} params
|
|
2906
|
-
* @return {?}
|
|
2907
|
-
*/
|
|
2908
|
-
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2909
|
-
// @Trace()
|
|
2910
|
-
/**
|
|
2911
|
-
* @param {?} params
|
|
2912
|
-
* @return {?}
|
|
2913
|
-
*/
|
|
2914
|
-
function (params) {
|
|
2915
|
-
// We update the router state...
|
|
2916
|
-
if (params.updateRoute) {
|
|
2917
|
-
/** @type {?} */
|
|
2918
|
-
var routeId = params.next.getFormattedRouteId();
|
|
2919
|
-
/** @type {?} */
|
|
2920
|
-
var relativePath = !!params.previous.hasRouteId() ? '..' : '.';
|
|
2921
|
-
/** @type {?} */
|
|
2922
|
-
var path = routeId ? [relativePath, routeId, params.next.getFormattedParameters()] : [relativePath, params.next.getFormattedParameters()];
|
|
2923
|
-
this.router.navigate(path, {
|
|
2924
|
-
relativeTo: params.activatedRoute
|
|
2925
|
-
});
|
|
2926
|
-
}
|
|
3390
|
+
function (child) { return child.url; })));
|
|
2927
3391
|
};
|
|
2928
|
-
// @Trace()
|
|
2929
|
-
// @Trace()
|
|
2930
3392
|
/**
|
|
2931
|
-
* @
|
|
3393
|
+
* @protected
|
|
3394
|
+
* @param {?} parameters
|
|
2932
3395
|
* @return {?}
|
|
2933
3396
|
*/
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
* @param {?} snapshot
|
|
3397
|
+
PlaceRouter.prototype.createRouteParameters = /**
|
|
3398
|
+
* @protected
|
|
3399
|
+
* @param {?} parameters
|
|
2938
3400
|
* @return {?}
|
|
2939
3401
|
*/
|
|
2940
|
-
function (
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
3402
|
+
function (parameters) {
|
|
3403
|
+
/** @type {?} */
|
|
3404
|
+
var routeId = parameters.getFormattedRouteId();
|
|
3405
|
+
return routeId ?
|
|
3406
|
+
[routeId, parameters.getFormattedParameters()] :
|
|
3407
|
+
[parameters.getFormattedParameters()];
|
|
2946
3408
|
};
|
|
2947
|
-
|
|
3409
|
+
PlaceRouter.decorators = [
|
|
2948
3410
|
{ type: core.Injectable, args: [{
|
|
2949
3411
|
providedIn: 'root'
|
|
2950
3412
|
},] }
|
|
2951
3413
|
];
|
|
2952
3414
|
/** @nocollapse */
|
|
2953
|
-
|
|
2954
|
-
{ type: router.Router }
|
|
2955
|
-
{ type: core.Injector }
|
|
3415
|
+
PlaceRouter.ctorParameters = function () { return [
|
|
3416
|
+
{ type: router.Router }
|
|
2956
3417
|
]; };
|
|
2957
|
-
/** @nocollapse */
|
|
2958
|
-
|
|
2959
|
-
|
|
3418
|
+
/** @nocollapse */ PlaceRouter.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router)); }, token: PlaceRouter, providedIn: "root" });
|
|
3419
|
+
__decorate([
|
|
3420
|
+
pectin.Trace(),
|
|
3421
|
+
__metadata("design:type", Function),
|
|
3422
|
+
__metadata("design:paramtypes", [router.ActivatedRouteSnapshot, exports.ParameterSnapshot]),
|
|
3423
|
+
__metadata("design:returntype", router.UrlTree)
|
|
3424
|
+
], PlaceRouter.prototype, "getRedirectUrlTree", null);
|
|
3425
|
+
return PlaceRouter;
|
|
3426
|
+
}());
|
|
2960
3427
|
if (false) {
|
|
2961
3428
|
/**
|
|
2962
3429
|
* @type {?}
|
|
2963
3430
|
* @private
|
|
2964
3431
|
*/
|
|
2965
|
-
|
|
2966
|
-
/**
|
|
2967
|
-
* @type {?}
|
|
2968
|
-
* @protected
|
|
2969
|
-
*/
|
|
2970
|
-
PlaceService.prototype.router;
|
|
2971
|
-
/**
|
|
2972
|
-
* @type {?}
|
|
2973
|
-
* @protected
|
|
2974
|
-
*/
|
|
2975
|
-
PlaceService.prototype.injector;
|
|
3432
|
+
PlaceRouter.prototype.router;
|
|
2976
3433
|
}
|
|
2977
3434
|
|
|
2978
3435
|
/**
|
|
@@ -3026,56 +3483,98 @@
|
|
|
3026
3483
|
]);
|
|
3027
3484
|
}
|
|
3028
3485
|
/** @type {?} */
|
|
3029
|
-
var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation(
|
|
3486
|
+
var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
|
|
3030
3487
|
|
|
3031
3488
|
/**
|
|
3032
3489
|
* @fileoverview added by tsickle
|
|
3033
3490
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3034
3491
|
*/
|
|
3492
|
+
/**
|
|
3493
|
+
* @record
|
|
3494
|
+
*/
|
|
3495
|
+
function PlaceRef() { }
|
|
3496
|
+
if (false) {
|
|
3497
|
+
/** @type {?} */
|
|
3498
|
+
PlaceRef.prototype.placeDefinition;
|
|
3499
|
+
/**
|
|
3500
|
+
* @param {?} param
|
|
3501
|
+
* @return {?}
|
|
3502
|
+
*/
|
|
3503
|
+
PlaceRef.prototype.initialiseBindings = function (param) { };
|
|
3504
|
+
/**
|
|
3505
|
+
* @return {?}
|
|
3506
|
+
*/
|
|
3507
|
+
PlaceRef.prototype.onPlaceReady = function () { };
|
|
3508
|
+
}
|
|
3035
3509
|
var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
3036
3510
|
__extends(PlaceOutletComponent, _super);
|
|
3037
|
-
function PlaceOutletComponent(
|
|
3511
|
+
function PlaceOutletComponent(router, placeHistory) {
|
|
3038
3512
|
var _this = _super.call(this) || this;
|
|
3039
|
-
_this.
|
|
3040
|
-
_this.
|
|
3513
|
+
_this.router = router;
|
|
3514
|
+
_this.placeHistory = placeHistory;
|
|
3041
3515
|
_this.animate = true;
|
|
3042
|
-
_this.
|
|
3516
|
+
_this._incomingRouteChange = new pectin.Guard();
|
|
3517
|
+
_this._inOutletUpdate = new pectin.Guard();
|
|
3518
|
+
_this._activatedRouteModel = new pectin.MutableValueModel();
|
|
3519
|
+
_this._placeDefinition = new pectin.MutableValueModel();
|
|
3520
|
+
_this._resolvedParameters = new pectin.MutableValueModel();
|
|
3043
3521
|
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
* @
|
|
3047
|
-
*/
|
|
3048
|
-
function (s) { return s.toString(); })).reduce((/**
|
|
3049
|
-
* @param {?} bits
|
|
3050
|
-
* @return {?}
|
|
3051
|
-
*/
|
|
3052
|
-
function (bits) { return bits.join(','); }));
|
|
3053
|
-
console.log("new outlet@(" + _this.myPath.value + ")");
|
|
3054
|
-
_this.outletChildPath = chain(_this.outletUrlSegment).map((/**
|
|
3055
|
-
* @param {?} s
|
|
3522
|
+
/** @type {?} */
|
|
3523
|
+
var paramMap = chain(_this._activatedRouteModel).pullObservableValue((/**
|
|
3524
|
+
* @param {?} ar
|
|
3056
3525
|
* @return {?}
|
|
3057
3526
|
*/
|
|
3058
|
-
function (
|
|
3059
|
-
|
|
3527
|
+
function (ar) { return ar.paramMap; }));
|
|
3528
|
+
/** @type {?} */
|
|
3529
|
+
var urls = chain(_this._activatedRouteModel).pullObservableValue((/**
|
|
3530
|
+
* @param {?} ar
|
|
3060
3531
|
* @return {?}
|
|
3061
3532
|
*/
|
|
3062
|
-
function (
|
|
3063
|
-
_this.
|
|
3064
|
-
|
|
3533
|
+
function (ar) { return ar.url; }));
|
|
3534
|
+
_this.placeConfigured = valueOf.all(chain(_this._inOutletUpdate).isFalsey(), _this._placeDefinition, paramMap, urls).areTruthy();
|
|
3535
|
+
when.anyOf(paramMap, urls).changes((/**
|
|
3065
3536
|
* @return {?}
|
|
3066
3537
|
*/
|
|
3067
|
-
function (
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3538
|
+
function () {
|
|
3539
|
+
/** @type {?} */
|
|
3540
|
+
var snapshot = exports.ParameterSnapshot.create(_this._placeDefinition.value, paramMap.value, urls.value);
|
|
3541
|
+
_this._incomingRouteChange.whileTrue((/**
|
|
3542
|
+
* @return {?}
|
|
3543
|
+
*/
|
|
3544
|
+
function () {
|
|
3545
|
+
_this._resolvedParameters.value = snapshot;
|
|
3546
|
+
_this.placeHistory.add(snapshot);
|
|
3547
|
+
}));
|
|
3548
|
+
}), {
|
|
3549
|
+
postponeUntil: _this.placeConfigured
|
|
3550
|
+
});
|
|
3551
|
+
when.valueOf(_this._resolvedParameters).changes((/**
|
|
3552
|
+
* @param {?} next
|
|
3553
|
+
* @param {?} previous
|
|
3072
3554
|
* @return {?}
|
|
3073
3555
|
*/
|
|
3074
|
-
function (
|
|
3075
|
-
|
|
3076
|
-
|
|
3556
|
+
function (next, previous) {
|
|
3557
|
+
_this.pushChangesToRoute(next, previous);
|
|
3558
|
+
_this.placeHistory.add(next); // the above route change doesn't seem to propagate back in, so I'm add the state to the history manually for now.
|
|
3559
|
+
}), {
|
|
3560
|
+
unless: _this.incomingRouteChange
|
|
3561
|
+
});
|
|
3077
3562
|
return _this;
|
|
3563
|
+
// const txo = new TransactionObserver().onEvent(e => console.log(e.toString()));
|
|
3564
|
+
// txo.observe('paramMap', paramMap);
|
|
3565
|
+
// txo.observe('urls', urls);
|
|
3566
|
+
// txo.observe('this._resolvedParameters', this._resolvedParameters);
|
|
3078
3567
|
}
|
|
3568
|
+
Object.defineProperty(PlaceOutletComponent.prototype, "incomingRouteChange", {
|
|
3569
|
+
get: /**
|
|
3570
|
+
* @return {?}
|
|
3571
|
+
*/
|
|
3572
|
+
function () {
|
|
3573
|
+
return this._incomingRouteChange;
|
|
3574
|
+
},
|
|
3575
|
+
enumerable: true,
|
|
3576
|
+
configurable: true
|
|
3577
|
+
});
|
|
3079
3578
|
/**
|
|
3080
3579
|
* @return {?}
|
|
3081
3580
|
*/
|
|
@@ -3085,76 +3584,56 @@
|
|
|
3085
3584
|
function () {
|
|
3086
3585
|
};
|
|
3087
3586
|
/**
|
|
3587
|
+
* @param {?} routerOutlet
|
|
3588
|
+
* @param {?} place
|
|
3088
3589
|
* @return {?}
|
|
3089
3590
|
*/
|
|
3090
|
-
PlaceOutletComponent.prototype.
|
|
3091
|
-
* @
|
|
3092
|
-
|
|
3093
|
-
function () {
|
|
3094
|
-
// this.routerOutLetQuery.changes.subscribe(() => {
|
|
3095
|
-
// this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
3096
|
-
// });
|
|
3097
|
-
};
|
|
3098
|
-
/**
|
|
3099
|
-
* @return {?}
|
|
3100
|
-
*/
|
|
3101
|
-
PlaceOutletComponent.prototype.ngAfterViewChecked = /**
|
|
3102
|
-
* @return {?}
|
|
3103
|
-
*/
|
|
3104
|
-
function () {
|
|
3105
|
-
// console.log(`@AfterViewChecked: ${this.state.value}`);
|
|
3106
|
-
this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
3107
|
-
};
|
|
3108
|
-
// @Trace()
|
|
3109
|
-
// ngOnDestroy(): void {
|
|
3110
|
-
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3111
|
-
// console.log('mySegments', this.myPath.value);
|
|
3112
|
-
// super.ngOnDestroy();
|
|
3113
|
-
// }
|
|
3114
|
-
// @Trace()
|
|
3115
|
-
// @Trace()
|
|
3116
|
-
// ngOnDestroy(): void {
|
|
3117
|
-
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3118
|
-
// console.log('mySegments', this.myPath.value);
|
|
3119
|
-
// super.ngOnDestroy();
|
|
3120
|
-
// }
|
|
3121
|
-
// @Trace()
|
|
3122
|
-
/**
|
|
3123
|
-
* @param {?} $event
|
|
3124
|
-
* @return {?}
|
|
3125
|
-
*/
|
|
3126
|
-
PlaceOutletComponent.prototype.onOutletActivated =
|
|
3127
|
-
// @Trace()
|
|
3128
|
-
// ngOnDestroy(): void {
|
|
3129
|
-
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3130
|
-
// console.log('mySegments', this.myPath.value);
|
|
3131
|
-
// super.ngOnDestroy();
|
|
3132
|
-
// }
|
|
3133
|
-
// @Trace()
|
|
3134
|
-
/**
|
|
3135
|
-
* @param {?} $event
|
|
3591
|
+
PlaceOutletComponent.prototype.onOutletActivated = /**
|
|
3592
|
+
* @param {?} routerOutlet
|
|
3593
|
+
* @param {?} place
|
|
3136
3594
|
* @return {?}
|
|
3137
3595
|
*/
|
|
3138
|
-
function (
|
|
3139
|
-
|
|
3140
|
-
this.
|
|
3141
|
-
|
|
3596
|
+
function (routerOutlet, place) {
|
|
3597
|
+
var _this = this;
|
|
3598
|
+
this._inOutletUpdate.whileTrue((/**
|
|
3599
|
+
* @return {?}
|
|
3600
|
+
*/
|
|
3601
|
+
function () {
|
|
3602
|
+
try {
|
|
3603
|
+
_this._currentPlace = place;
|
|
3604
|
+
_this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
3605
|
+
_this._placeDefinition.value = place.placeDefinition;
|
|
3606
|
+
place.initialiseBindings(_this._resolvedParameters);
|
|
3607
|
+
}
|
|
3608
|
+
catch (error) {
|
|
3609
|
+
console.error(error);
|
|
3610
|
+
}
|
|
3611
|
+
}));
|
|
3142
3612
|
if (!this.animate) {
|
|
3143
3613
|
// we're not animating so trigger any post animation callbacks now.
|
|
3144
3614
|
this.animationDone();
|
|
3145
3615
|
}
|
|
3146
3616
|
};
|
|
3147
3617
|
/**
|
|
3618
|
+
* @param {?} routerOutlet
|
|
3148
3619
|
* @param {?} $event
|
|
3149
3620
|
* @return {?}
|
|
3150
3621
|
*/
|
|
3151
3622
|
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
3623
|
+
* @param {?} routerOutlet
|
|
3152
3624
|
* @param {?} $event
|
|
3153
3625
|
* @return {?}
|
|
3154
3626
|
*/
|
|
3155
|
-
function ($event) {
|
|
3156
|
-
|
|
3157
|
-
this.
|
|
3627
|
+
function (routerOutlet, $event) {
|
|
3628
|
+
var _this = this;
|
|
3629
|
+
this._inOutletUpdate.whileTrue((/**
|
|
3630
|
+
* @return {?}
|
|
3631
|
+
*/
|
|
3632
|
+
function () {
|
|
3633
|
+
_this._currentPlace = null;
|
|
3634
|
+
_this._activatedRouteModel.value = null;
|
|
3635
|
+
_this._placeDefinition.value = null;
|
|
3636
|
+
}));
|
|
3158
3637
|
};
|
|
3159
3638
|
/**
|
|
3160
3639
|
* @param {?} outlet
|
|
@@ -3174,45 +3653,54 @@
|
|
|
3174
3653
|
* @return {?}
|
|
3175
3654
|
*/
|
|
3176
3655
|
function () {
|
|
3177
|
-
if (this.
|
|
3178
|
-
this.
|
|
3656
|
+
if (this._currentPlace) {
|
|
3657
|
+
this._currentPlace.onPlaceReady();
|
|
3179
3658
|
}
|
|
3180
3659
|
};
|
|
3181
|
-
// @Trace()
|
|
3182
|
-
// @Trace()
|
|
3183
3660
|
/**
|
|
3184
|
-
* @
|
|
3185
|
-
* @param {?}
|
|
3661
|
+
* @param {?} next
|
|
3662
|
+
* @param {?} previous
|
|
3663
|
+
* @return {?}
|
|
3664
|
+
*/
|
|
3665
|
+
PlaceOutletComponent.prototype.pushChangesToRoute = /**
|
|
3666
|
+
* @param {?} next
|
|
3667
|
+
* @param {?} previous
|
|
3186
3668
|
* @return {?}
|
|
3187
3669
|
*/
|
|
3188
|
-
|
|
3189
|
-
|
|
3670
|
+
function (next, previous) {
|
|
3671
|
+
/** @type {?} */
|
|
3672
|
+
var activatedRoute = this._activatedRouteModel.value;
|
|
3673
|
+
this.router.pushParameterChangesToRoute(activatedRoute, previous, next);
|
|
3674
|
+
};
|
|
3190
3675
|
/**
|
|
3191
|
-
* @
|
|
3192
|
-
* @param {?}
|
|
3676
|
+
* @param {?} snapshot
|
|
3677
|
+
* @param {?} callback
|
|
3193
3678
|
* @return {?}
|
|
3194
3679
|
*/
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3680
|
+
PlaceOutletComponent.prototype.sanitise = /**
|
|
3681
|
+
* @param {?} snapshot
|
|
3682
|
+
* @param {?} callback
|
|
3683
|
+
* @return {?}
|
|
3684
|
+
*/
|
|
3685
|
+
function (snapshot, callback) {
|
|
3686
|
+
return snapshot;
|
|
3199
3687
|
};
|
|
3200
3688
|
PlaceOutletComponent.decorators = [
|
|
3201
3689
|
{ type: core.Component, args: [{
|
|
3202
3690
|
selector: 'angular-ui-powerups-place-outlet',
|
|
3203
|
-
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated($event)\"\n (deactivate)=\"onOutletDeactivated($event)\">\n </router-outlet>\n</div>\n\n",
|
|
3691
|
+
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated(routerOutlet, $event)\">\n </router-outlet>\n</div>\n\n",
|
|
3204
3692
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
3205
3693
|
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
|
|
3206
3694
|
}] }
|
|
3207
3695
|
];
|
|
3208
3696
|
/** @nocollapse */
|
|
3209
3697
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
3210
|
-
{ type:
|
|
3211
|
-
{ type:
|
|
3698
|
+
{ type: PlaceRouter },
|
|
3699
|
+
{ type: PlaceHistory }
|
|
3212
3700
|
]; };
|
|
3213
3701
|
PlaceOutletComponent.propDecorators = {
|
|
3214
3702
|
animate: [{ type: core.Input }],
|
|
3215
|
-
|
|
3703
|
+
routerOut: [{ type: core.ViewChild, args: ['routeOutlet', { static: true },] }]
|
|
3216
3704
|
};
|
|
3217
3705
|
return PlaceOutletComponent;
|
|
3218
3706
|
}(DisposableComponent));
|
|
@@ -3220,42 +3708,49 @@
|
|
|
3220
3708
|
/** @type {?} */
|
|
3221
3709
|
PlaceOutletComponent.prototype.animate;
|
|
3222
3710
|
/** @type {?} */
|
|
3223
|
-
PlaceOutletComponent.prototype.
|
|
3711
|
+
PlaceOutletComponent.prototype.routerOut;
|
|
3712
|
+
/**
|
|
3713
|
+
* @type {?}
|
|
3714
|
+
* @private
|
|
3715
|
+
*/
|
|
3716
|
+
PlaceOutletComponent.prototype._currentPlace;
|
|
3224
3717
|
/**
|
|
3225
3718
|
* @type {?}
|
|
3226
3719
|
* @private
|
|
3227
3720
|
*/
|
|
3228
|
-
PlaceOutletComponent.prototype.
|
|
3721
|
+
PlaceOutletComponent.prototype._incomingRouteChange;
|
|
3229
3722
|
/**
|
|
3230
3723
|
* @type {?}
|
|
3231
3724
|
* @private
|
|
3232
3725
|
*/
|
|
3233
|
-
PlaceOutletComponent.prototype.
|
|
3726
|
+
PlaceOutletComponent.prototype._inOutletUpdate;
|
|
3234
3727
|
/**
|
|
3235
3728
|
* @type {?}
|
|
3236
3729
|
* @private
|
|
3237
3730
|
*/
|
|
3238
|
-
PlaceOutletComponent.prototype.
|
|
3731
|
+
PlaceOutletComponent.prototype._activatedRouteModel;
|
|
3239
3732
|
/**
|
|
3240
3733
|
* @type {?}
|
|
3241
3734
|
* @private
|
|
3242
3735
|
*/
|
|
3243
|
-
PlaceOutletComponent.prototype.
|
|
3736
|
+
PlaceOutletComponent.prototype._placeDefinition;
|
|
3737
|
+
/** @type {?} */
|
|
3738
|
+
PlaceOutletComponent.prototype._resolvedParameters;
|
|
3244
3739
|
/**
|
|
3245
3740
|
* @type {?}
|
|
3246
3741
|
* @private
|
|
3247
3742
|
*/
|
|
3248
|
-
PlaceOutletComponent.prototype.
|
|
3743
|
+
PlaceOutletComponent.prototype.placeConfigured;
|
|
3249
3744
|
/**
|
|
3250
3745
|
* @type {?}
|
|
3251
3746
|
* @private
|
|
3252
3747
|
*/
|
|
3253
|
-
PlaceOutletComponent.prototype.
|
|
3748
|
+
PlaceOutletComponent.prototype.router;
|
|
3254
3749
|
/**
|
|
3255
3750
|
* @type {?}
|
|
3256
3751
|
* @private
|
|
3257
3752
|
*/
|
|
3258
|
-
PlaceOutletComponent.prototype.
|
|
3753
|
+
PlaceOutletComponent.prototype.placeHistory;
|
|
3259
3754
|
}
|
|
3260
3755
|
|
|
3261
3756
|
/**
|
|
@@ -3313,9 +3808,7 @@
|
|
|
3313
3808
|
TabbedPlaceNavigationComponent,
|
|
3314
3809
|
ListPlaceNavComponent
|
|
3315
3810
|
],
|
|
3316
|
-
providers: [
|
|
3317
|
-
PlaceService
|
|
3318
|
-
]
|
|
3811
|
+
providers: []
|
|
3319
3812
|
},] }
|
|
3320
3813
|
];
|
|
3321
3814
|
return PlaceModule;
|
|
@@ -3754,39 +4247,6 @@
|
|
|
3754
4247
|
NavItem.prototype.tooltip = function () { };
|
|
3755
4248
|
}
|
|
3756
4249
|
|
|
3757
|
-
/**
|
|
3758
|
-
* @fileoverview added by tsickle
|
|
3759
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3760
|
-
*/
|
|
3761
|
-
/**
|
|
3762
|
-
* @record
|
|
3763
|
-
*/
|
|
3764
|
-
function PlaceComponentLike() { }
|
|
3765
|
-
if (false) {
|
|
3766
|
-
/** @type {?} */
|
|
3767
|
-
PlaceComponentLike.prototype.activatedRoute;
|
|
3768
|
-
/**
|
|
3769
|
-
* @return {?}
|
|
3770
|
-
*/
|
|
3771
|
-
PlaceComponentLike.prototype.onPlaceReady = function () { };
|
|
3772
|
-
}
|
|
3773
|
-
|
|
3774
|
-
/**
|
|
3775
|
-
* @fileoverview added by tsickle
|
|
3776
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3777
|
-
*/
|
|
3778
|
-
/**
|
|
3779
|
-
* @record
|
|
3780
|
-
*/
|
|
3781
|
-
function PlaceUpdatesService() { }
|
|
3782
|
-
if (false) {
|
|
3783
|
-
/**
|
|
3784
|
-
* @param {?} params
|
|
3785
|
-
* @return {?}
|
|
3786
|
-
*/
|
|
3787
|
-
PlaceUpdatesService.prototype.notifyRouteParametersChanged = function (params) { };
|
|
3788
|
-
}
|
|
3789
|
-
|
|
3790
4250
|
/**
|
|
3791
4251
|
* @fileoverview added by tsickle
|
|
3792
4252
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3801,12 +4261,37 @@
|
|
|
3801
4261
|
* @return {?}
|
|
3802
4262
|
*/
|
|
3803
4263
|
function (target) {
|
|
3804
|
-
if (
|
|
4264
|
+
if (exports.PlaceComponent.isPlaceComponentConstructor(target)) {
|
|
4265
|
+
exports.PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, ___default.isNil(options.authenticate) ? false : options.authenticate, options.order, options.data, exports.PlaceComponent.getRouteParameters(target), (options.children || []).map((/**
|
|
4266
|
+
* @param {?} c
|
|
4267
|
+
* @return {?}
|
|
4268
|
+
*/
|
|
4269
|
+
function (c) { return exports.PlaceComponent.getDefinition(c); }))));
|
|
4270
|
+
}
|
|
4271
|
+
else {
|
|
3805
4272
|
pectin.lang.illegalState(target + " must extend PlaceComponent to use the @Place decorator");
|
|
3806
4273
|
}
|
|
3807
|
-
exports.PlaceComponent.injectDefinition((/** @type {?} */ (target)), options);
|
|
3808
4274
|
});
|
|
3809
4275
|
}
|
|
4276
|
+
(function (Place) {
|
|
4277
|
+
/**
|
|
4278
|
+
* @record
|
|
4279
|
+
*/
|
|
4280
|
+
function Options() { }
|
|
4281
|
+
Place.Options = Options;
|
|
4282
|
+
if (false) {
|
|
4283
|
+
/** @type {?} */
|
|
4284
|
+
Options.prototype.path;
|
|
4285
|
+
/** @type {?} */
|
|
4286
|
+
Options.prototype.order;
|
|
4287
|
+
/** @type {?|undefined} */
|
|
4288
|
+
Options.prototype.data;
|
|
4289
|
+
/** @type {?|undefined} */
|
|
4290
|
+
Options.prototype.authenticate;
|
|
4291
|
+
/** @type {?|undefined} */
|
|
4292
|
+
Options.prototype.children;
|
|
4293
|
+
}
|
|
4294
|
+
})(Place || (Place = {}));
|
|
3810
4295
|
|
|
3811
4296
|
/**
|
|
3812
4297
|
* @fileoverview added by tsickle
|
|
@@ -3822,12 +4307,12 @@
|
|
|
3822
4307
|
/**
|
|
3823
4308
|
* @return {?}
|
|
3824
4309
|
*/
|
|
3825
|
-
Visit.prototype.
|
|
4310
|
+
Visit.prototype.getRouteIdValue = function () { };
|
|
3826
4311
|
/**
|
|
3827
4312
|
* @param {?} name
|
|
3828
4313
|
* @return {?}
|
|
3829
4314
|
*/
|
|
3830
|
-
Visit.prototype.
|
|
4315
|
+
Visit.prototype.getParameterValue = function (name) { };
|
|
3831
4316
|
}
|
|
3832
4317
|
|
|
3833
4318
|
/**
|
|
@@ -3857,14 +4342,16 @@
|
|
|
3857
4342
|
// HACK: this will break with child routes...
|
|
3858
4343
|
/** @type {?} */
|
|
3859
4344
|
var path = "/" + component.placeDefinition.path;
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
4345
|
+
// let thisTree = this.router.parseUrl(currentState.url);
|
|
4346
|
+
// let nextTree = this.router.parseUrl(nextState.url);
|
|
4347
|
+
// console.log({
|
|
4348
|
+
// placePath: path,
|
|
4349
|
+
// currentRoute: currentRoute.toString(),
|
|
4350
|
+
// currentStateUrl: currentState.url,
|
|
4351
|
+
// nextStateUrl: nextState.url,
|
|
4352
|
+
// currentStateUrlTree: thisTree.root.children[PRIMARY_OUTLET].segments,
|
|
4353
|
+
// nextStateUrlTree: nextTree.root.children[PRIMARY_OUTLET].segments
|
|
4354
|
+
// });
|
|
3868
4355
|
// nextState is the full path...
|
|
3869
4356
|
if (!nextState.url.startsWith(path)) {
|
|
3870
4357
|
return component.canDeactivate();
|
|
@@ -3904,36 +4391,43 @@
|
|
|
3904
4391
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3905
4392
|
*/
|
|
3906
4393
|
var PlaceRouteGuard = /** @class */ (function () {
|
|
3907
|
-
function PlaceRouteGuard(
|
|
3908
|
-
this.
|
|
3909
|
-
this.
|
|
4394
|
+
function PlaceRouteGuard(placeRouter, injector) {
|
|
4395
|
+
this.placeRouter = placeRouter;
|
|
4396
|
+
this.injector = injector;
|
|
3910
4397
|
}
|
|
3911
4398
|
/**
|
|
3912
|
-
* @param {?}
|
|
4399
|
+
* @param {?} activatedRoute
|
|
3913
4400
|
* @param {?} state
|
|
3914
4401
|
* @return {?}
|
|
3915
4402
|
*/
|
|
3916
4403
|
PlaceRouteGuard.prototype.canActivate = /**
|
|
3917
|
-
* @param {?}
|
|
4404
|
+
* @param {?} activatedRoute
|
|
3918
4405
|
* @param {?} state
|
|
3919
4406
|
* @return {?}
|
|
3920
4407
|
*/
|
|
3921
|
-
function (
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
4408
|
+
function (activatedRoute, state) {
|
|
4409
|
+
var _this = this;
|
|
4410
|
+
if (exports.PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) {
|
|
4411
|
+
/** @type {?} */
|
|
4412
|
+
var placeDefinition = exports.PlaceComponent.getDefinition(activatedRoute.component);
|
|
4413
|
+
/** @type {?} */
|
|
4414
|
+
var snapshot_1 = exports.ParameterSnapshot.create(placeDefinition, activatedRoute.paramMap, activatedRoute.url);
|
|
4415
|
+
return snapshot_1.sanitise(this.injector).then((/**
|
|
4416
|
+
* @param {?} sanitised
|
|
4417
|
+
* @return {?}
|
|
4418
|
+
*/
|
|
4419
|
+
function (sanitised) {
|
|
4420
|
+
if (sanitised.hasChanged(snapshot_1, true)) {
|
|
4421
|
+
return _this.placeRouter.getRedirectUrlTree(activatedRoute, sanitised);
|
|
4422
|
+
}
|
|
4423
|
+
else {
|
|
4424
|
+
return true;
|
|
4425
|
+
}
|
|
4426
|
+
}));
|
|
4427
|
+
}
|
|
4428
|
+
else {
|
|
4429
|
+
return pectin.lang.illegalState("expected component to be an instance of PlaceComponent, got " + activatedRoute.component);
|
|
4430
|
+
}
|
|
3937
4431
|
};
|
|
3938
4432
|
PlaceRouteGuard.decorators = [
|
|
3939
4433
|
{ type: core.Injectable, args: [{
|
|
@@ -3942,10 +4436,10 @@
|
|
|
3942
4436
|
];
|
|
3943
4437
|
/** @nocollapse */
|
|
3944
4438
|
PlaceRouteGuard.ctorParameters = function () { return [
|
|
3945
|
-
{ type:
|
|
3946
|
-
{ type:
|
|
4439
|
+
{ type: PlaceRouter },
|
|
4440
|
+
{ type: core.Injector }
|
|
3947
4441
|
]; };
|
|
3948
|
-
/** @nocollapse */ PlaceRouteGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(core.ɵɵinject(
|
|
4442
|
+
/** @nocollapse */ PlaceRouteGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(core.ɵɵinject(PlaceRouter), core.ɵɵinject(core.INJECTOR)); }, token: PlaceRouteGuard, providedIn: "root" });
|
|
3949
4443
|
return PlaceRouteGuard;
|
|
3950
4444
|
}());
|
|
3951
4445
|
if (false) {
|
|
@@ -3953,93 +4447,12 @@
|
|
|
3953
4447
|
* @type {?}
|
|
3954
4448
|
* @private
|
|
3955
4449
|
*/
|
|
3956
|
-
PlaceRouteGuard.prototype.
|
|
3957
|
-
/**
|
|
3958
|
-
* @type {?}
|
|
3959
|
-
* @private
|
|
3960
|
-
*/
|
|
3961
|
-
PlaceRouteGuard.prototype.router;
|
|
3962
|
-
}
|
|
3963
|
-
|
|
3964
|
-
/**
|
|
3965
|
-
* @fileoverview added by tsickle
|
|
3966
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3967
|
-
*/
|
|
3968
|
-
/**
|
|
3969
|
-
* @template T, S
|
|
3970
|
-
*/
|
|
3971
|
-
var DefaultParameterSanitiser = /** @class */ (function () {
|
|
3972
|
-
function DefaultParameterSanitiser(def, placeService, options) {
|
|
3973
|
-
this.def = def;
|
|
3974
|
-
this.placeService = placeService;
|
|
3975
|
-
this.remember = lodash.isNil(options.remember) ? false : options.remember;
|
|
3976
|
-
this.defaultValue = lodash.isNil(options.defaultValue) ? null : options.defaultValue;
|
|
3977
|
-
}
|
|
3978
|
-
/**
|
|
3979
|
-
* @param {?} value
|
|
3980
|
-
* @param {?} visit
|
|
3981
|
-
* @return {?}
|
|
3982
|
-
*/
|
|
3983
|
-
DefaultParameterSanitiser.prototype.sanitise = /**
|
|
3984
|
-
* @param {?} value
|
|
3985
|
-
* @param {?} visit
|
|
3986
|
-
* @return {?}
|
|
3987
|
-
*/
|
|
3988
|
-
function (value, visit) {
|
|
3989
|
-
if (this.isBlank(value)) {
|
|
3990
|
-
if (this.remember) {
|
|
3991
|
-
// value = null;
|
|
3992
|
-
}
|
|
3993
|
-
return this.isBlank(value) && !lodash.isNil(this.defaultValue) ? this.defaultValue : value;
|
|
3994
|
-
}
|
|
3995
|
-
else {
|
|
3996
|
-
return value;
|
|
3997
|
-
}
|
|
3998
|
-
};
|
|
3999
|
-
/**
|
|
4000
|
-
* @private
|
|
4001
|
-
* @param {?} value
|
|
4002
|
-
* @return {?}
|
|
4003
|
-
*/
|
|
4004
|
-
DefaultParameterSanitiser.prototype.isBlank = /**
|
|
4005
|
-
* @private
|
|
4006
|
-
* @param {?} value
|
|
4007
|
-
* @return {?}
|
|
4008
|
-
*/
|
|
4009
|
-
function (value) {
|
|
4010
|
-
/** @type {?} */
|
|
4011
|
-
var isNil$1 = lodash.isNil(value);
|
|
4012
|
-
return this.def.isArray ? !isNil$1 || value['length'] < 1 : isNil$1;
|
|
4013
|
-
};
|
|
4014
|
-
__decorate([
|
|
4015
|
-
pectin.Trace(),
|
|
4016
|
-
__metadata("design:type", Function),
|
|
4017
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
4018
|
-
__metadata("design:returntype", Object)
|
|
4019
|
-
], DefaultParameterSanitiser.prototype, "sanitise", null);
|
|
4020
|
-
return DefaultParameterSanitiser;
|
|
4021
|
-
}());
|
|
4022
|
-
if (false) {
|
|
4023
|
-
/**
|
|
4024
|
-
* @type {?}
|
|
4025
|
-
* @private
|
|
4026
|
-
*/
|
|
4027
|
-
DefaultParameterSanitiser.prototype.remember;
|
|
4028
|
-
/**
|
|
4029
|
-
* @type {?}
|
|
4030
|
-
* @private
|
|
4031
|
-
*/
|
|
4032
|
-
DefaultParameterSanitiser.prototype.defaultValue;
|
|
4033
|
-
/**
|
|
4034
|
-
* @type {?}
|
|
4035
|
-
* @private
|
|
4036
|
-
*/
|
|
4037
|
-
DefaultParameterSanitiser.prototype.def;
|
|
4450
|
+
PlaceRouteGuard.prototype.placeRouter;
|
|
4038
4451
|
/**
|
|
4039
4452
|
* @type {?}
|
|
4040
4453
|
* @private
|
|
4041
4454
|
*/
|
|
4042
|
-
|
|
4455
|
+
PlaceRouteGuard.prototype.injector;
|
|
4043
4456
|
}
|
|
4044
4457
|
|
|
4045
4458
|
/**
|
|
@@ -4073,8 +4486,6 @@
|
|
|
4073
4486
|
ParameterOptions.prototype.remember;
|
|
4074
4487
|
/** @type {?|undefined} */
|
|
4075
4488
|
ParameterOptions.prototype.defaultValue;
|
|
4076
|
-
/** @type {?|undefined} */
|
|
4077
|
-
ParameterOptions.prototype.sanitiser;
|
|
4078
4489
|
}
|
|
4079
4490
|
/**
|
|
4080
4491
|
* @record
|
|
@@ -4090,8 +4501,6 @@
|
|
|
4090
4501
|
ListParameterOptions.prototype.remember;
|
|
4091
4502
|
/** @type {?|undefined} */
|
|
4092
4503
|
ListParameterOptions.prototype.defaultValue;
|
|
4093
|
-
/** @type {?|undefined} */
|
|
4094
|
-
ListParameterOptions.prototype.sanitiser;
|
|
4095
4504
|
}
|
|
4096
4505
|
/**
|
|
4097
4506
|
* @template T
|
|
@@ -4100,7 +4509,6 @@
|
|
|
4100
4509
|
* @return {?}
|
|
4101
4510
|
*/
|
|
4102
4511
|
function RouteId(type, options) {
|
|
4103
|
-
// assert.isTruthy(type.isValid());
|
|
4104
4512
|
return (/**
|
|
4105
4513
|
* @param {?} prototype
|
|
4106
4514
|
* @param {?} propertyKey
|
|
@@ -4108,7 +4516,7 @@
|
|
|
4108
4516
|
*/
|
|
4109
4517
|
function (prototype, propertyKey) {
|
|
4110
4518
|
/** @type {?} */
|
|
4111
|
-
var param =
|
|
4519
|
+
var param = new exports.ParameterDefinition.RouteId(propertyKey.toString(), type, options);
|
|
4112
4520
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
4113
4521
|
pectin.UseDelegate()(prototype, propertyKey);
|
|
4114
4522
|
});
|
|
@@ -4120,7 +4528,6 @@
|
|
|
4120
4528
|
* @return {?}
|
|
4121
4529
|
*/
|
|
4122
4530
|
function RouteParameter(type, options) {
|
|
4123
|
-
// assert.isTruthy(type.isValid());
|
|
4124
4531
|
return (/**
|
|
4125
4532
|
* @param {?} prototype
|
|
4126
4533
|
* @param {?} propertyKey
|
|
@@ -4128,7 +4535,7 @@
|
|
|
4128
4535
|
*/
|
|
4129
4536
|
function (prototype, propertyKey) {
|
|
4130
4537
|
/** @type {?} */
|
|
4131
|
-
var param =
|
|
4538
|
+
var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), type, options);
|
|
4132
4539
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
4133
4540
|
pectin.UseDelegate()(prototype, propertyKey);
|
|
4134
4541
|
});
|
|
@@ -4140,7 +4547,6 @@
|
|
|
4140
4547
|
* @return {?}
|
|
4141
4548
|
*/
|
|
4142
4549
|
function RouteParameterList(elementType, options) {
|
|
4143
|
-
// assert.isTruthy(type.isValid());
|
|
4144
4550
|
return (/**
|
|
4145
4551
|
* @param {?} prototype
|
|
4146
4552
|
* @param {?} propertyKey
|
|
@@ -4148,82 +4554,11 @@
|
|
|
4148
4554
|
*/
|
|
4149
4555
|
function (prototype, propertyKey) {
|
|
4150
4556
|
/** @type {?} */
|
|
4151
|
-
var param =
|
|
4557
|
+
var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), elementType, options);
|
|
4152
4558
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
4153
4559
|
pectin.UseDelegate()(prototype, propertyKey);
|
|
4154
4560
|
});
|
|
4155
4561
|
}
|
|
4156
|
-
/**
|
|
4157
|
-
* @template T
|
|
4158
|
-
* @param {?} propertyName
|
|
4159
|
-
* @param {?} type
|
|
4160
|
-
* @param {?} options
|
|
4161
|
-
* @param {?} routeId
|
|
4162
|
-
* @return {?}
|
|
4163
|
-
*/
|
|
4164
|
-
function createDefinition(propertyName, type, options, routeId) {
|
|
4165
|
-
/** @type {?} */
|
|
4166
|
-
var opts = typescriptUtilities.Opts.get(options);
|
|
4167
|
-
/** @type {?} */
|
|
4168
|
-
var propertyNameAsString = pectin.assert.notNil(propertyName).toString();
|
|
4169
|
-
/** @type {?} */
|
|
4170
|
-
var def = {
|
|
4171
|
-
name: opts.getOptional('as', propertyNameAsString),
|
|
4172
|
-
propertyName: propertyNameAsString,
|
|
4173
|
-
type: pectin.assert.notNil(type),
|
|
4174
|
-
sanitiser: opts.getOptional('sanitiser', null),
|
|
4175
|
-
isRouteId: routeId,
|
|
4176
|
-
isArray: false
|
|
4177
|
-
};
|
|
4178
|
-
return def;
|
|
4179
|
-
}
|
|
4180
|
-
/**
|
|
4181
|
-
* @template T
|
|
4182
|
-
* @param {?} propertyName
|
|
4183
|
-
* @param {?} type
|
|
4184
|
-
* @param {?} options
|
|
4185
|
-
* @return {?}
|
|
4186
|
-
*/
|
|
4187
|
-
function createArrayDefinition(propertyName, type, options) {
|
|
4188
|
-
/** @type {?} */
|
|
4189
|
-
var opts = typescriptUtilities.Opts.get(options);
|
|
4190
|
-
/** @type {?} */
|
|
4191
|
-
var propertyNameAsString = pectin.assert.notNil(propertyName).toString();
|
|
4192
|
-
/** @type {?} */
|
|
4193
|
-
var def = {
|
|
4194
|
-
name: opts.getOptional('as', propertyNameAsString),
|
|
4195
|
-
propertyName: propertyNameAsString,
|
|
4196
|
-
type: pectin.assert.notNil(type),
|
|
4197
|
-
sanitiser: opts.getOptional('sanitiser', null),
|
|
4198
|
-
isRouteId: false,
|
|
4199
|
-
isArray: true
|
|
4200
|
-
};
|
|
4201
|
-
return def;
|
|
4202
|
-
}
|
|
4203
|
-
|
|
4204
|
-
/**
|
|
4205
|
-
* @fileoverview added by tsickle
|
|
4206
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4207
|
-
*/
|
|
4208
|
-
/**
|
|
4209
|
-
* @record
|
|
4210
|
-
* @template T, S
|
|
4211
|
-
*/
|
|
4212
|
-
function ParameterDefinition() { }
|
|
4213
|
-
if (false) {
|
|
4214
|
-
/** @type {?} */
|
|
4215
|
-
ParameterDefinition.prototype.name;
|
|
4216
|
-
/** @type {?} */
|
|
4217
|
-
ParameterDefinition.prototype.propertyName;
|
|
4218
|
-
/** @type {?} */
|
|
4219
|
-
ParameterDefinition.prototype.type;
|
|
4220
|
-
/** @type {?} */
|
|
4221
|
-
ParameterDefinition.prototype.sanitiser;
|
|
4222
|
-
/** @type {?} */
|
|
4223
|
-
ParameterDefinition.prototype.isRouteId;
|
|
4224
|
-
/** @type {?} */
|
|
4225
|
-
ParameterDefinition.prototype.isArray;
|
|
4226
|
-
}
|
|
4227
4562
|
|
|
4228
4563
|
/**
|
|
4229
4564
|
* @fileoverview added by tsickle
|
|
@@ -4231,31 +4566,18 @@
|
|
|
4231
4566
|
*/
|
|
4232
4567
|
/**
|
|
4233
4568
|
* @record
|
|
4234
|
-
* @template
|
|
4569
|
+
* @template S
|
|
4235
4570
|
*/
|
|
4236
4571
|
function ParameterSanitiser() { }
|
|
4237
4572
|
if (false) {
|
|
4238
4573
|
/**
|
|
4574
|
+
* @param {?} parameterDef
|
|
4239
4575
|
* @param {?} value
|
|
4240
4576
|
* @param {?=} visit
|
|
4241
4577
|
* @return {?}
|
|
4242
4578
|
*/
|
|
4243
|
-
ParameterSanitiser.prototype.sanitise = function (value, visit) { };
|
|
4579
|
+
ParameterSanitiser.prototype.sanitise = function (parameterDef, value, visit) { };
|
|
4244
4580
|
}
|
|
4245
|
-
(function (ParameterSanitiser) {
|
|
4246
|
-
/**
|
|
4247
|
-
* @record
|
|
4248
|
-
* @template T
|
|
4249
|
-
*/
|
|
4250
|
-
function Options() { }
|
|
4251
|
-
ParameterSanitiser.Options = Options;
|
|
4252
|
-
if (false) {
|
|
4253
|
-
/** @type {?|undefined} */
|
|
4254
|
-
Options.prototype.remember;
|
|
4255
|
-
/** @type {?|undefined} */
|
|
4256
|
-
Options.prototype.defaultValue;
|
|
4257
|
-
}
|
|
4258
|
-
})(ParameterSanitiser || (ParameterSanitiser = {}));
|
|
4259
4581
|
|
|
4260
4582
|
/**
|
|
4261
4583
|
* @fileoverview added by tsickle
|
|
@@ -4314,7 +4636,7 @@
|
|
|
4314
4636
|
* @return {?}
|
|
4315
4637
|
*/
|
|
4316
4638
|
function (value) {
|
|
4317
|
-
return
|
|
4639
|
+
return ___default__default.isNil(value) || ___default__default.isEmpty(value) ? null : +value;
|
|
4318
4640
|
};
|
|
4319
4641
|
return NumberType;
|
|
4320
4642
|
}());
|
|
@@ -4380,7 +4702,7 @@
|
|
|
4380
4702
|
* @return {?}
|
|
4381
4703
|
*/
|
|
4382
4704
|
function () {
|
|
4383
|
-
return !
|
|
4705
|
+
return !___default__default.isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
|
|
4384
4706
|
},
|
|
4385
4707
|
enumerable: true,
|
|
4386
4708
|
configurable: true
|
|
@@ -4449,7 +4771,7 @@
|
|
|
4449
4771
|
if (!this.sanitiser) return [3 /*break*/, 2];
|
|
4450
4772
|
this.initialValue = this.readFrom(this.snapshot);
|
|
4451
4773
|
_a = this;
|
|
4452
|
-
return [4 /*yield*/, this.sanitiser.sanitise(this.initialValue)];
|
|
4774
|
+
return [4 /*yield*/, this.sanitiser.sanitise(null, this.initialValue)];
|
|
4453
4775
|
case 1:
|
|
4454
4776
|
_a._sanitisedValue = _b.sent();
|
|
4455
4777
|
if (this.initialValue !== this._sanitisedValue) {
|
|
@@ -4482,11 +4804,10 @@
|
|
|
4482
4804
|
exports.Sanitiser.prototype.sanitiser;
|
|
4483
4805
|
}
|
|
4484
4806
|
var RouteParameterSanitiser = /** @class */ (function () {
|
|
4485
|
-
function RouteParameterSanitiser(parameterDefs, snapshot,
|
|
4807
|
+
function RouteParameterSanitiser(parameterDefs, snapshot, injector) {
|
|
4486
4808
|
var _this = this;
|
|
4487
4809
|
this.parameterDefs = parameterDefs;
|
|
4488
4810
|
this.snapshot = snapshot;
|
|
4489
|
-
this.placeService = placeService;
|
|
4490
4811
|
this.injector = injector;
|
|
4491
4812
|
this.parameterSanitisers = [];
|
|
4492
4813
|
/** @type {?} */
|
|
@@ -4579,17 +4900,7 @@
|
|
|
4579
4900
|
* @return {?}
|
|
4580
4901
|
*/
|
|
4581
4902
|
function (def) {
|
|
4582
|
-
|
|
4583
|
-
if (this.isSanitiserContructor(def.sanitiser)) {
|
|
4584
|
-
return this.injector.get(def.sanitiser, new def.sanitiser());
|
|
4585
|
-
}
|
|
4586
|
-
else {
|
|
4587
|
-
return new DefaultParameterSanitiser(def, this.placeService, def.sanitiser);
|
|
4588
|
-
}
|
|
4589
|
-
}
|
|
4590
|
-
else {
|
|
4591
|
-
return null;
|
|
4592
|
-
}
|
|
4903
|
+
return def.getSanitiser(this.injector);
|
|
4593
4904
|
};
|
|
4594
4905
|
/**
|
|
4595
4906
|
* @return {?}
|
|
@@ -4635,12 +4946,12 @@
|
|
|
4635
4946
|
* @return {?}
|
|
4636
4947
|
*/
|
|
4637
4948
|
function (value) {
|
|
4638
|
-
return
|
|
4949
|
+
return ___default__default.isFunction(value) && pectin.lang.constructorChain((/** @type {?} */ ((/** @type {?} */ (value))))).includes(exports.Sanitiser);
|
|
4639
4950
|
};
|
|
4640
4951
|
__decorate([
|
|
4641
4952
|
src.Memoize(),
|
|
4642
4953
|
__metadata("design:type", Function),
|
|
4643
|
-
__metadata("design:paramtypes", [
|
|
4954
|
+
__metadata("design:paramtypes", [exports.ParameterDefinition]),
|
|
4644
4955
|
__metadata("design:returntype", Object)
|
|
4645
4956
|
], RouteParameterSanitiser.prototype, "getSanitiser", null);
|
|
4646
4957
|
__decorate([
|
|
@@ -4667,8 +4978,6 @@
|
|
|
4667
4978
|
/** @type {?} */
|
|
4668
4979
|
RouteParameterSanitiser.prototype.snapshot;
|
|
4669
4980
|
/** @type {?} */
|
|
4670
|
-
RouteParameterSanitiser.prototype.placeService;
|
|
4671
|
-
/** @type {?} */
|
|
4672
4981
|
RouteParameterSanitiser.prototype.injector;
|
|
4673
4982
|
}
|
|
4674
4983
|
(function (Sanitiser) {
|
|
@@ -4794,15 +5103,14 @@
|
|
|
4794
5103
|
exports.AbstractActivity = AbstractActivity;
|
|
4795
5104
|
exports.AbstractInputComponent = AbstractInputComponent;
|
|
4796
5105
|
exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
|
|
4797
|
-
exports.ActivityContainerComponent = exports.ɵ
|
|
4798
|
-
exports.ActivityOutletComponent = exports.ɵ
|
|
5106
|
+
exports.ActivityContainerComponent = exports.ɵu;
|
|
5107
|
+
exports.ActivityOutletComponent = exports.ɵv;
|
|
4799
5108
|
exports.AlertDialogComponent = AlertDialogComponent;
|
|
4800
5109
|
exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
|
|
4801
5110
|
exports.BusyOverlayComponent = BusyOverlayComponent;
|
|
4802
5111
|
exports.CommandDirective = CommandDirective;
|
|
4803
5112
|
exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
|
|
4804
5113
|
exports.DEFINITION_META_DATA_KEY = DEFINITION_META_DATA_KEY;
|
|
4805
|
-
exports.DefaultParameterSanitiser = DefaultParameterSanitiser;
|
|
4806
5114
|
exports.DialogInteractionService = DialogInteractionService;
|
|
4807
5115
|
exports.Dimension = Dimension;
|
|
4808
5116
|
exports.DisposableComponent = DisposableComponent;
|
|
@@ -4817,10 +5125,12 @@
|
|
|
4817
5125
|
exports.NumberInputComponent = NumberInputComponent;
|
|
4818
5126
|
exports.PasswordInputComponent = PasswordInputComponent;
|
|
4819
5127
|
exports.Place = Place;
|
|
5128
|
+
exports.PlaceDefinition = PlaceDefinition;
|
|
5129
|
+
exports.PlaceHistory = PlaceHistory;
|
|
4820
5130
|
exports.PlaceModule = PlaceModule;
|
|
4821
5131
|
exports.PlaceOutletComponent = PlaceOutletComponent;
|
|
4822
5132
|
exports.PlaceRouteGuard = PlaceRouteGuard;
|
|
4823
|
-
exports.
|
|
5133
|
+
exports.PlaceRouter = PlaceRouter;
|
|
4824
5134
|
exports.Point = Point;
|
|
4825
5135
|
exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
|
|
4826
5136
|
exports.ResizeAwareComponent = ResizeAwareComponent;
|
|
@@ -4835,8 +5145,9 @@
|
|
|
4835
5145
|
exports.slideDownAndUpAnimation = slideDownAndUpAnimation;
|
|
4836
5146
|
exports.ɵa = CommandDirective;
|
|
4837
5147
|
exports.ɵb = FocusBindingDirective;
|
|
4838
|
-
exports.ɵ
|
|
4839
|
-
exports.ɵbc =
|
|
5148
|
+
exports.ɵba = AlertDialogComponent;
|
|
5149
|
+
exports.ɵbc = DialogInteractionService;
|
|
5150
|
+
exports.ɵbd = InteractionContext;
|
|
4840
5151
|
exports.ɵc = DisposableComponent;
|
|
4841
5152
|
exports.ɵd = NumberInputComponent;
|
|
4842
5153
|
exports.ɵe = AbstractInputComponent;
|
|
@@ -4849,15 +5160,15 @@
|
|
|
4849
5160
|
exports.ɵl = PlaceOutletComponent;
|
|
4850
5161
|
exports.ɵm = leftRightPlaceAnimation;
|
|
4851
5162
|
exports.ɵn = LEFT_RIGHT_PLACE_ANIMATION;
|
|
4852
|
-
exports.ɵo =
|
|
4853
|
-
exports.ɵp =
|
|
4854
|
-
exports.ɵq =
|
|
4855
|
-
exports.ɵr =
|
|
4856
|
-
exports.ɵs =
|
|
4857
|
-
exports.ɵ
|
|
4858
|
-
exports.ɵw =
|
|
4859
|
-
exports.ɵx =
|
|
4860
|
-
exports.ɵ
|
|
5163
|
+
exports.ɵo = PlaceRouter;
|
|
5164
|
+
exports.ɵp = PlaceHistory;
|
|
5165
|
+
exports.ɵq = TabbedPlaceNavigationComponent;
|
|
5166
|
+
exports.ɵr = AbstractPlaceNavigationComponent;
|
|
5167
|
+
exports.ɵs = ListPlaceNavComponent;
|
|
5168
|
+
exports.ɵt = InteractionModule;
|
|
5169
|
+
exports.ɵw = ConfirmationDialogComponent;
|
|
5170
|
+
exports.ɵx = AbstractActivity;
|
|
5171
|
+
exports.ɵy = ACTIVITY_DATA;
|
|
4861
5172
|
|
|
4862
5173
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4863
5174
|
|