@coolon/angular-ui-powerups 0.0.42 → 0.0.44
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 +1173 -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 +12 -12
- 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 +3 -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 +132 -86
- 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 -5
- package/esm2015/lib/place/nav-item.js +1 -1
- package/esm2015/lib/place/place-component.js +38 -168
- package/esm2015/lib/place/place-definition.js +79 -0
- package/esm2015/lib/place/place-history.js +54 -0
- package/esm2015/lib/place/place-router.js +83 -0
- package/esm2015/lib/place/place.decorator.js +30 -3
- package/esm2015/lib/place/place.module.js +2 -5
- package/esm2015/lib/place/route/default-parameter-sanitiser.js +10 -22
- 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 +103 -8
- package/esm2015/lib/place/route/parameter-sanitiser.js +1 -15
- package/esm2015/lib/place/route/parameter-snapshot.js +13 -55
- package/esm2015/lib/place/route/parameter-type.js +2 -2
- package/esm2015/lib/place/route/route-parameter-sanitiser.js +6 -20
- package/esm2015/lib/place/visit.js +1 -1
- 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 +12 -12
- 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 +3 -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 +150 -115
- 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 -5
- package/esm5/lib/place/nav-item.js +1 -1
- package/esm5/lib/place/place-component.js +52 -198
- package/esm5/lib/place/place-definition.js +88 -0
- package/esm5/lib/place/place-history.js +57 -0
- package/esm5/lib/place/place-router.js +101 -0
- package/esm5/lib/place/place.decorator.js +30 -3
- package/esm5/lib/place/place.module.js +2 -5
- package/esm5/lib/place/route/default-parameter-sanitiser.js +8 -20
- 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 +131 -8
- package/esm5/lib/place/route/parameter-sanitiser.js +1 -15
- package/esm5/lib/place/route/parameter-snapshot.js +25 -63
- package/esm5/lib/place/route/parameter-type.js +2 -2
- package/esm5/lib/place/route/route-parameter-sanitiser.js +6 -19
- package/esm5/lib/place/visit.js +1 -1
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +955 -969
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1158 -1177
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/index.d.ts +1 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
- 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 +31 -19
- package/lib/place/guards/place-route.guard.d.ts +7 -6
- package/lib/place/index.d.ts +3 -3
- 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 +10 -0
- package/lib/place/place-router.d.ts +9 -0
- package/lib/place/place.decorator.d.ts +13 -1
- package/lib/place/route/default-parameter-sanitiser.d.ts +3 -5
- package/lib/place/route/parameter-decorators.d.ts +0 -4
- package/lib/place/route/parameter-definition.class.d.ts +29 -6
- package/lib/place/route/parameter-sanitiser.d.ts +0 -6
- package/lib/place/route/parameter-snapshot.d.ts +7 -7
- package/lib/place/route/route-parameter-sanitiser.d.ts +1 -3
- package/lib/place/visit.d.ts +2 -2
- 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/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/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
|
@@ -5,7 +5,7 @@ import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgress
|
|
|
5
5
|
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator, __values } from 'tslib';
|
|
8
|
-
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, Trace, MutableListModel, StoreInValueModel,
|
|
8
|
+
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, Trace, MutableListModel, StoreInValueModel, Binding, Guard, MutableValueModel, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
10
|
import { Deferred } from '@coolon/pectin/lib/promise/deferred.class';
|
|
11
11
|
import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
|
|
@@ -13,11 +13,11 @@ import { MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
|
|
13
13
|
import { MatIconModule } from '@angular/material/icon';
|
|
14
14
|
import { MatListModule } from '@angular/material/list';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { Router,
|
|
17
|
-
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
18
|
-
import { Memoize
|
|
19
|
-
import { isNil, isEqual, isEmpty, isFunction } from 'lodash';
|
|
16
|
+
import { Router, RouterModule } from '@angular/router';
|
|
17
|
+
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
18
|
+
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
20
19
|
import 'reflect-metadata';
|
|
20
|
+
import ___default, { isNil } from 'lodash';
|
|
21
21
|
import { style, query, group, animate, trigger, transition } from '@angular/animations';
|
|
22
22
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
23
23
|
|
|
@@ -634,7 +634,7 @@ var FocusBindingDirective = /** @class */ (function (_super) {
|
|
|
634
634
|
}));
|
|
635
635
|
}
|
|
636
636
|
else {
|
|
637
|
-
Logger.get(this).warn(
|
|
637
|
+
Logger.get(this).warn('pectinFocusBinding was nil');
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
640
|
/**
|
|
@@ -864,6 +864,11 @@ if (false) {
|
|
|
864
864
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
865
865
|
*/
|
|
866
866
|
/**
|
|
867
|
+
* ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an
|
|
868
|
+
* external service.
|
|
869
|
+
*
|
|
870
|
+
* It might be nice to have wrapper component that allows more declarative use, i.e.
|
|
871
|
+
* <activity-view [activityClass]="...", [activityData]="..." (done)=".." (cancel)="..."></activity-view>
|
|
867
872
|
* @template D, R, E
|
|
868
873
|
*/
|
|
869
874
|
var ActivityOutletComponent = /** @class */ (function () {
|
|
@@ -1317,7 +1322,7 @@ var ConfirmationDialogComponent = /** @class */ (function (_super) {
|
|
|
1317
1322
|
ConfirmationDialogComponent.decorators = [
|
|
1318
1323
|
{ type: Component, args: [{
|
|
1319
1324
|
selector: 'angular-ui-powerups-confirmation-dialog',
|
|
1320
|
-
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'\"
|
|
1325
|
+
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",
|
|
1321
1326
|
styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1322
1327
|
}] }
|
|
1323
1328
|
];
|
|
@@ -1340,10 +1345,10 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1340
1345
|
__extends(ActivityContainerComponent, _super);
|
|
1341
1346
|
function ActivityContainerComponent() {
|
|
1342
1347
|
var _this = _super.call(this) || this;
|
|
1343
|
-
_this.
|
|
1348
|
+
_this.activityOutletTabs = new MutableListModel();
|
|
1344
1349
|
_this.obsoleteTabs = [];
|
|
1345
1350
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1346
|
-
_this.lastActivityTab = chain(_this.
|
|
1351
|
+
_this.lastActivityTab = chain(_this.activityOutletTabs).last().otherwise(_this.initialActivityOutlet);
|
|
1347
1352
|
return _this;
|
|
1348
1353
|
}
|
|
1349
1354
|
/**
|
|
@@ -1379,7 +1384,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1379
1384
|
* @return {?}
|
|
1380
1385
|
*/
|
|
1381
1386
|
function (options) {
|
|
1382
|
-
this.
|
|
1387
|
+
this.initialActivityOutlet = __assign({}, options, { interactionContext: this });
|
|
1383
1388
|
};
|
|
1384
1389
|
/**
|
|
1385
1390
|
* @template D, R, E
|
|
@@ -1405,14 +1410,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1405
1410
|
onDone: deferred.resolve,
|
|
1406
1411
|
onCancel: deferred.reject
|
|
1407
1412
|
};
|
|
1408
|
-
this.
|
|
1409
|
-
this.tabs.selectedIndex = this.
|
|
1413
|
+
this.activityOutletTabs.push(context);
|
|
1414
|
+
this.tabs.selectedIndex = this.activityOutletTabs.length;
|
|
1410
1415
|
return deferred.promise.finally((/**
|
|
1411
1416
|
* @return {?}
|
|
1412
1417
|
*/
|
|
1413
1418
|
function () {
|
|
1414
1419
|
_this.obsoleteTabs.push(context);
|
|
1415
|
-
_this.tabs.selectedIndex = _this.
|
|
1420
|
+
_this.tabs.selectedIndex = _this.activityOutletTabs.length - 1;
|
|
1416
1421
|
}));
|
|
1417
1422
|
};
|
|
1418
1423
|
/**
|
|
@@ -1447,7 +1452,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1447
1452
|
*/
|
|
1448
1453
|
function () {
|
|
1449
1454
|
var _this = this;
|
|
1450
|
-
this.
|
|
1455
|
+
this.activityOutletTabs.value = this.activityOutletTabs.value.filter((/**
|
|
1451
1456
|
* @param {?} tab
|
|
1452
1457
|
* @return {?}
|
|
1453
1458
|
*/
|
|
@@ -1459,7 +1464,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1459
1464
|
ActivityContainerComponent.decorators = [
|
|
1460
1465
|
{ type: Component, args: [{
|
|
1461
1466
|
selector: 'angular-ui-powerups-activity-container',
|
|
1462
|
-
template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"
|
|
1467
|
+
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",
|
|
1463
1468
|
styles: [":host{display:block}"]
|
|
1464
1469
|
}] }
|
|
1465
1470
|
];
|
|
@@ -1467,7 +1472,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1467
1472
|
ActivityContainerComponent.ctorParameters = function () { return []; };
|
|
1468
1473
|
ActivityContainerComponent.propDecorators = {
|
|
1469
1474
|
parentInteractionContext: [{ type: Input }],
|
|
1470
|
-
|
|
1475
|
+
initialActivityOutlet: [{ type: Input }],
|
|
1471
1476
|
tabs: [{ type: ViewChild, args: ['tabs', { static: true },] }],
|
|
1472
1477
|
outlets: [{ type: ViewChildren, args: [ActivityOutletComponent,] }]
|
|
1473
1478
|
};
|
|
@@ -1477,13 +1482,13 @@ if (false) {
|
|
|
1477
1482
|
/** @type {?} */
|
|
1478
1483
|
ActivityContainerComponent.prototype.parentInteractionContext;
|
|
1479
1484
|
/** @type {?} */
|
|
1480
|
-
ActivityContainerComponent.prototype.
|
|
1485
|
+
ActivityContainerComponent.prototype.initialActivityOutlet;
|
|
1481
1486
|
/** @type {?} */
|
|
1482
1487
|
ActivityContainerComponent.prototype.tabs;
|
|
1483
1488
|
/** @type {?} */
|
|
1484
1489
|
ActivityContainerComponent.prototype.outlets;
|
|
1485
1490
|
/** @type {?} */
|
|
1486
|
-
ActivityContainerComponent.prototype.
|
|
1491
|
+
ActivityContainerComponent.prototype.activityOutletTabs;
|
|
1487
1492
|
/**
|
|
1488
1493
|
* @type {?}
|
|
1489
1494
|
* @private
|
|
@@ -1667,6 +1672,7 @@ var InteractionModule = /** @class */ (function () {
|
|
|
1667
1672
|
],
|
|
1668
1673
|
exports: [
|
|
1669
1674
|
ActivityContainerComponent,
|
|
1675
|
+
ActivityOutletComponent
|
|
1670
1676
|
],
|
|
1671
1677
|
entryComponents: [
|
|
1672
1678
|
ActivityContainerComponent,
|
|
@@ -1757,1040 +1763,1100 @@ var EmptyStateComponent = /** @class */ (function () {
|
|
|
1757
1763
|
* @fileoverview added by tsickle
|
|
1758
1764
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1759
1765
|
*/
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
this.
|
|
1767
|
-
this.
|
|
1766
|
+
var PlaceDefinition = /** @class */ (function () {
|
|
1767
|
+
function PlaceDefinition(component, path, authenticate, order, data, routeParameters, children) {
|
|
1768
|
+
this.component = component;
|
|
1769
|
+
this.path = path;
|
|
1770
|
+
this.authenticate = authenticate;
|
|
1771
|
+
this.order = order;
|
|
1772
|
+
this.data = data;
|
|
1773
|
+
this.routeParameters = routeParameters;
|
|
1774
|
+
this.children = children;
|
|
1768
1775
|
}
|
|
1769
1776
|
/**
|
|
1770
|
-
* @param {?} other
|
|
1771
1777
|
* @return {?}
|
|
1772
1778
|
*/
|
|
1773
|
-
|
|
1774
|
-
* @param {?} other
|
|
1779
|
+
PlaceDefinition.prototype.getRouteParameters = /**
|
|
1775
1780
|
* @return {?}
|
|
1776
1781
|
*/
|
|
1777
|
-
function (
|
|
1778
|
-
|
|
1779
|
-
var changed = this.resolved.find((/**
|
|
1780
|
-
* @param {?} r
|
|
1781
|
-
* @return {?}
|
|
1782
|
-
*/
|
|
1783
|
-
function (r) {
|
|
1784
|
-
return !r.isSame(other.getResolvedParameterValue(r.parameterDef));
|
|
1785
|
-
}));
|
|
1786
|
-
if (changed) {
|
|
1787
|
-
console.log({ mine: changed, theirs: other.getResolvedParameter(changed.parameterDef) });
|
|
1788
|
-
}
|
|
1789
|
-
return !!changed;
|
|
1782
|
+
function () {
|
|
1783
|
+
return this.routeParameters;
|
|
1790
1784
|
};
|
|
1791
1785
|
/**
|
|
1792
|
-
* @
|
|
1786
|
+
* @template T
|
|
1787
|
+
* @param {?} key
|
|
1788
|
+
* @param {?=} defaultValue
|
|
1793
1789
|
* @return {?}
|
|
1794
1790
|
*/
|
|
1795
|
-
|
|
1796
|
-
* @
|
|
1791
|
+
PlaceDefinition.prototype.getData = /**
|
|
1792
|
+
* @template T
|
|
1793
|
+
* @param {?} key
|
|
1794
|
+
* @param {?=} defaultValue
|
|
1797
1795
|
* @return {?}
|
|
1798
1796
|
*/
|
|
1799
|
-
function (
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1797
|
+
function (key, defaultValue) {
|
|
1798
|
+
return this.data ?
|
|
1799
|
+
___default.isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
1800
|
+
defaultValue;
|
|
1801
|
+
};
|
|
1802
|
+
/**
|
|
1803
|
+
* @template T
|
|
1804
|
+
* @param {?} keys
|
|
1805
|
+
* @param {?=} defaultValue
|
|
1806
|
+
* @return {?}
|
|
1807
|
+
*/
|
|
1808
|
+
PlaceDefinition.prototype.searchData = /**
|
|
1809
|
+
* @template T
|
|
1810
|
+
* @param {?} keys
|
|
1811
|
+
* @param {?=} defaultValue
|
|
1812
|
+
* @return {?}
|
|
1813
|
+
*/
|
|
1814
|
+
function (keys, defaultValue) {
|
|
1815
|
+
var _this = this;
|
|
1816
|
+
if (this.data) {
|
|
1817
|
+
/** @type {?} */
|
|
1818
|
+
var found = keys.find((/**
|
|
1819
|
+
* @param {?} key
|
|
1820
|
+
* @return {?}
|
|
1821
|
+
*/
|
|
1822
|
+
function (key) { return !___default.isNil(_this.data[key]); }));
|
|
1823
|
+
return found ? this.data[found] : defaultValue;
|
|
1816
1824
|
}
|
|
1817
1825
|
else {
|
|
1818
|
-
|
|
1826
|
+
return defaultValue;
|
|
1819
1827
|
}
|
|
1820
|
-
routeParts.push(this.getFormattedParameters());
|
|
1821
|
-
return routeParts;
|
|
1822
1828
|
};
|
|
1829
|
+
return PlaceDefinition;
|
|
1830
|
+
}());
|
|
1831
|
+
if (false) {
|
|
1832
|
+
/** @type {?} */
|
|
1833
|
+
PlaceDefinition.prototype.component;
|
|
1834
|
+
/** @type {?} */
|
|
1835
|
+
PlaceDefinition.prototype.path;
|
|
1836
|
+
/** @type {?} */
|
|
1837
|
+
PlaceDefinition.prototype.authenticate;
|
|
1838
|
+
/** @type {?} */
|
|
1839
|
+
PlaceDefinition.prototype.order;
|
|
1840
|
+
/** @type {?} */
|
|
1841
|
+
PlaceDefinition.prototype.data;
|
|
1842
|
+
/** @type {?} */
|
|
1843
|
+
PlaceDefinition.prototype.routeParameters;
|
|
1844
|
+
/** @type {?} */
|
|
1845
|
+
PlaceDefinition.prototype.children;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* @fileoverview added by tsickle
|
|
1850
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1851
|
+
*/
|
|
1852
|
+
// RAKE: making this Symbol(...) broke things.
|
|
1853
|
+
/** @type {?} */
|
|
1854
|
+
var DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
1855
|
+
// this one seems ok.
|
|
1856
|
+
/** @type {?} */
|
|
1857
|
+
var ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
1858
|
+
var PlaceComponent = /** @class */ (function (_super) {
|
|
1859
|
+
__extends(PlaceComponent, _super);
|
|
1860
|
+
function PlaceComponent() {
|
|
1861
|
+
return _super.call(this) || this;
|
|
1862
|
+
}
|
|
1823
1863
|
/**
|
|
1824
|
-
* @
|
|
1825
|
-
* @param {?} parameterDef
|
|
1864
|
+
* @param {?} resolvedParameters
|
|
1826
1865
|
* @return {?}
|
|
1827
1866
|
*/
|
|
1828
|
-
|
|
1829
|
-
* @
|
|
1830
|
-
* @param {?} parameterDef
|
|
1867
|
+
PlaceComponent.prototype.initialiseBindings = /**
|
|
1868
|
+
* @param {?} resolvedParameters
|
|
1831
1869
|
* @return {?}
|
|
1832
1870
|
*/
|
|
1833
|
-
function (
|
|
1834
|
-
|
|
1835
|
-
|
|
1871
|
+
function (resolvedParameters) {
|
|
1872
|
+
var _this = this;
|
|
1873
|
+
assert.isNil(this.resolvedParameters);
|
|
1874
|
+
this.resolvedParameters = resolvedParameters;
|
|
1875
|
+
this.placeDefinition.getRouteParameters().forEach((/**
|
|
1876
|
+
* @param {?} parameterDef
|
|
1836
1877
|
* @return {?}
|
|
1837
1878
|
*/
|
|
1838
|
-
function (
|
|
1879
|
+
function (parameterDef) {
|
|
1880
|
+
_this.installBinding(parameterDef);
|
|
1881
|
+
}));
|
|
1839
1882
|
};
|
|
1840
1883
|
/**
|
|
1884
|
+
* @private
|
|
1841
1885
|
* @template T, S
|
|
1842
1886
|
* @param {?} parameterDef
|
|
1843
1887
|
* @return {?}
|
|
1844
1888
|
*/
|
|
1845
|
-
|
|
1889
|
+
PlaceComponent.prototype.installBinding = /**
|
|
1890
|
+
* @private
|
|
1846
1891
|
* @template T, S
|
|
1847
1892
|
* @param {?} parameterDef
|
|
1848
1893
|
* @return {?}
|
|
1849
1894
|
*/
|
|
1850
1895
|
function (parameterDef) {
|
|
1851
1896
|
/** @type {?} */
|
|
1852
|
-
var
|
|
1853
|
-
|
|
1897
|
+
var model = (/** @type {?} */ (this[parameterDef.propertyName]));
|
|
1898
|
+
// this.txo.observe(parameterDef.propertyName, model);
|
|
1899
|
+
this.registerDisposable(new Binding(this.resolvedParameters, model, {
|
|
1900
|
+
toRight: /**
|
|
1901
|
+
* @param {?} parameters
|
|
1902
|
+
* @return {?}
|
|
1903
|
+
*/
|
|
1904
|
+
function (parameters) {
|
|
1905
|
+
return parameters.getResolvedParameterValue(parameterDef);
|
|
1906
|
+
},
|
|
1907
|
+
toLeft: /**
|
|
1908
|
+
* @param {?} value
|
|
1909
|
+
* @param {?=} currentParameters
|
|
1910
|
+
* @return {?}
|
|
1911
|
+
*/
|
|
1912
|
+
function (value, currentParameters) {
|
|
1913
|
+
return currentParameters.replace(parameterDef, value);
|
|
1914
|
+
}
|
|
1915
|
+
}));
|
|
1854
1916
|
};
|
|
1917
|
+
Object.defineProperty(PlaceComponent.prototype, "placeDefinition", {
|
|
1918
|
+
get: /**
|
|
1919
|
+
* @return {?}
|
|
1920
|
+
*/
|
|
1921
|
+
function () {
|
|
1922
|
+
return PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
1923
|
+
},
|
|
1924
|
+
enumerable: true,
|
|
1925
|
+
configurable: true
|
|
1926
|
+
});
|
|
1927
|
+
Object.defineProperty(PlaceComponent.prototype, "childPlaces", {
|
|
1928
|
+
get: /**
|
|
1929
|
+
* @return {?}
|
|
1930
|
+
*/
|
|
1931
|
+
function () {
|
|
1932
|
+
return this.placeDefinition.children.map((/**
|
|
1933
|
+
* @param {?} d
|
|
1934
|
+
* @return {?}
|
|
1935
|
+
*/
|
|
1936
|
+
function (d) { return d.component; }));
|
|
1937
|
+
},
|
|
1938
|
+
enumerable: true,
|
|
1939
|
+
configurable: true
|
|
1940
|
+
});
|
|
1855
1941
|
/**
|
|
1856
1942
|
* @return {?}
|
|
1857
1943
|
*/
|
|
1858
|
-
|
|
1944
|
+
PlaceComponent.prototype.canDeactivate = /**
|
|
1859
1945
|
* @return {?}
|
|
1860
1946
|
*/
|
|
1861
1947
|
function () {
|
|
1862
|
-
return
|
|
1948
|
+
return true;
|
|
1863
1949
|
};
|
|
1864
1950
|
/**
|
|
1865
|
-
* @param {?} name
|
|
1866
1951
|
* @return {?}
|
|
1867
1952
|
*/
|
|
1868
|
-
|
|
1869
|
-
* @param {?} name
|
|
1953
|
+
PlaceComponent.prototype.onPlaceReady = /**
|
|
1870
1954
|
* @return {?}
|
|
1871
1955
|
*/
|
|
1872
|
-
function (
|
|
1873
|
-
/** @type {?} */
|
|
1874
|
-
var resolvedParameter = this.resolved.find((/**
|
|
1875
|
-
* @param {?} r
|
|
1876
|
-
* @return {?}
|
|
1877
|
-
*/
|
|
1878
|
-
function (r) { return r.parameterDef.name === name; }));
|
|
1879
|
-
return resolvedParameter ? resolvedParameter.value : null;
|
|
1956
|
+
function () {
|
|
1880
1957
|
};
|
|
1958
|
+
__decorate([
|
|
1959
|
+
Memoize(),
|
|
1960
|
+
__metadata("design:type", PlaceDefinition),
|
|
1961
|
+
__metadata("design:paramtypes", [])
|
|
1962
|
+
], PlaceComponent.prototype, "placeDefinition", null);
|
|
1963
|
+
return PlaceComponent;
|
|
1964
|
+
}(DisposableComponent));
|
|
1965
|
+
if (false) {
|
|
1881
1966
|
/**
|
|
1967
|
+
* @type {?}
|
|
1882
1968
|
* @private
|
|
1883
|
-
* @return {?}
|
|
1884
|
-
*/
|
|
1885
|
-
ParameterSnapshot.prototype.getResolvedRouteId = /**
|
|
1886
|
-
* @private
|
|
1887
|
-
* @return {?}
|
|
1888
1969
|
*/
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
return (/** @type {?} */ (this.resolved.find((/**
|
|
1893
|
-
* @param {?} p
|
|
1894
|
-
* @return {?}
|
|
1895
|
-
*/
|
|
1896
|
-
function (p) { return p.parameterDef.isRouteId; }))));
|
|
1897
|
-
};
|
|
1970
|
+
PlaceComponent.prototype.resolvedParameters;
|
|
1971
|
+
}
|
|
1972
|
+
(function (PlaceComponent) {
|
|
1898
1973
|
/**
|
|
1974
|
+
* @param {?} target
|
|
1899
1975
|
* @return {?}
|
|
1900
1976
|
*/
|
|
1901
|
-
|
|
1977
|
+
function isPlaceComponentConstructor(target) {
|
|
1978
|
+
return lang.constructorChain((/** @type {?} */ (target))).includes(PlaceComponent);
|
|
1979
|
+
}
|
|
1980
|
+
PlaceComponent.isPlaceComponentConstructor = isPlaceComponentConstructor;
|
|
1981
|
+
/**
|
|
1982
|
+
* @param {?} klass
|
|
1902
1983
|
* @return {?}
|
|
1903
1984
|
*/
|
|
1904
|
-
function () {
|
|
1905
|
-
return
|
|
1906
|
-
}
|
|
1985
|
+
function getRouteParameters(klass) {
|
|
1986
|
+
return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY);
|
|
1987
|
+
}
|
|
1988
|
+
PlaceComponent.getRouteParameters = getRouteParameters;
|
|
1907
1989
|
/**
|
|
1990
|
+
* @param {?} klass
|
|
1908
1991
|
* @return {?}
|
|
1909
1992
|
*/
|
|
1910
|
-
|
|
1993
|
+
function getDefinition(klass) {
|
|
1994
|
+
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
1995
|
+
}
|
|
1996
|
+
PlaceComponent.getDefinition = getDefinition;
|
|
1997
|
+
/**
|
|
1998
|
+
* @param {?} klass
|
|
1999
|
+
* @param {?} definition
|
|
1911
2000
|
* @return {?}
|
|
1912
2001
|
*/
|
|
1913
|
-
function () {
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2002
|
+
function injectDefinition(klass, definition) {
|
|
2003
|
+
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);
|
|
2004
|
+
}
|
|
2005
|
+
PlaceComponent.injectDefinition = injectDefinition;
|
|
2006
|
+
})(PlaceComponent || (PlaceComponent = {}));
|
|
2007
|
+
|
|
2008
|
+
/**
|
|
2009
|
+
* @fileoverview added by tsickle
|
|
2010
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2011
|
+
*/
|
|
2012
|
+
var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
2013
|
+
__extends(AbstractPlaceNavigationComponent, _super);
|
|
2014
|
+
function AbstractPlaceNavigationComponent() {
|
|
2015
|
+
var _this = _super.call(this) || this;
|
|
2016
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2017
|
+
_this.placeDefinitions = chain(_this.placesModel).map((/**
|
|
2018
|
+
* @param {?} c
|
|
2019
|
+
* @return {?}
|
|
2020
|
+
*/
|
|
2021
|
+
function (c) { return PlaceComponent.getDefinition(c); }));
|
|
2022
|
+
return _this;
|
|
2023
|
+
}
|
|
1918
2024
|
/**
|
|
2025
|
+
* @param {?} placeDef
|
|
1919
2026
|
* @return {?}
|
|
1920
2027
|
*/
|
|
1921
|
-
|
|
2028
|
+
AbstractPlaceNavigationComponent.prototype.getNav = /**
|
|
2029
|
+
* @param {?} placeDef
|
|
1922
2030
|
* @return {?}
|
|
1923
2031
|
*/
|
|
1924
|
-
function () {
|
|
1925
|
-
/** @type {?} */
|
|
1926
|
-
var params = {};
|
|
2032
|
+
function (placeDef) {
|
|
1927
2033
|
/** @type {?} */
|
|
1928
|
-
var
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2034
|
+
var navItem = (/** @type {?} */ (placeDef.getData('nav')));
|
|
2035
|
+
return {
|
|
2036
|
+
title: (/**
|
|
2037
|
+
* @return {?}
|
|
2038
|
+
*/
|
|
2039
|
+
function () { return navItem ? navItem.title() : placeDef.searchData(['navTitle', 'title']); }),
|
|
2040
|
+
tooltip: (/**
|
|
2041
|
+
* @return {?}
|
|
2042
|
+
*/
|
|
2043
|
+
function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getData('navTooltip', null); }),
|
|
2044
|
+
icon: (/**
|
|
2045
|
+
* @return {?}
|
|
2046
|
+
*/
|
|
2047
|
+
function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getData('navIcon', null); })
|
|
2048
|
+
};
|
|
1940
2049
|
};
|
|
1941
2050
|
/**
|
|
1942
|
-
* @template T, S
|
|
1943
|
-
* @param {?} parameter
|
|
1944
|
-
* @param {?} value
|
|
1945
2051
|
* @return {?}
|
|
1946
2052
|
*/
|
|
1947
|
-
|
|
1948
|
-
* @template T, S
|
|
1949
|
-
* @param {?} parameter
|
|
1950
|
-
* @param {?} value
|
|
2053
|
+
AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
|
|
1951
2054
|
* @return {?}
|
|
1952
2055
|
*/
|
|
1953
|
-
function (
|
|
1954
|
-
return new ParameterSnapshot(this.placeDefinition, this.resolved.map((/**
|
|
1955
|
-
* @param {?} p
|
|
1956
|
-
* @return {?}
|
|
1957
|
-
*/
|
|
1958
|
-
function (p) {
|
|
1959
|
-
return p.parameterDef === parameter ? p.replace(value) : p;
|
|
1960
|
-
})));
|
|
2056
|
+
function () {
|
|
1961
2057
|
};
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
*/
|
|
1966
|
-
ParameterSnapshot.prototype.updateUrl = /**
|
|
1967
|
-
* @param {?} url
|
|
1968
|
-
* @return {?}
|
|
1969
|
-
*/
|
|
1970
|
-
function (url) {
|
|
1971
|
-
return url;
|
|
2058
|
+
AbstractPlaceNavigationComponent.propDecorators = {
|
|
2059
|
+
places: [{ type: Input }],
|
|
2060
|
+
placesModel: [{ type: Input }]
|
|
1972
2061
|
};
|
|
1973
|
-
var _a;
|
|
1974
2062
|
__decorate([
|
|
1975
|
-
|
|
1976
|
-
__metadata("design:type",
|
|
1977
|
-
|
|
1978
|
-
__metadata("design:returntype", ParameterSnapshot.ResolvedParameter)
|
|
1979
|
-
], ParameterSnapshot.prototype, "getResolvedParameter", null);
|
|
2063
|
+
StoreInListModel('placesModel'),
|
|
2064
|
+
__metadata("design:type", Array)
|
|
2065
|
+
], AbstractPlaceNavigationComponent.prototype, "places", void 0);
|
|
1980
2066
|
__decorate([
|
|
1981
|
-
|
|
1982
|
-
__metadata("design:type",
|
|
1983
|
-
|
|
1984
|
-
__metadata("design:returntype", typeof (_a = typeof S !== "undefined" && S) === "function" ? _a : Object)
|
|
1985
|
-
], ParameterSnapshot.prototype, "getResolvedParameterValue", null);
|
|
2067
|
+
UseDelegate(),
|
|
2068
|
+
__metadata("design:type", ListModel)
|
|
2069
|
+
], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
1986
2070
|
__decorate([
|
|
1987
|
-
Memoize(),
|
|
2071
|
+
Memoize$1(),
|
|
1988
2072
|
__metadata("design:type", Function),
|
|
1989
|
-
__metadata("design:paramtypes", [
|
|
2073
|
+
__metadata("design:paramtypes", [PlaceDefinition]),
|
|
1990
2074
|
__metadata("design:returntype", Object)
|
|
1991
|
-
],
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
__metadata("design:type", Function),
|
|
1995
|
-
__metadata("design:paramtypes", []),
|
|
1996
|
-
__metadata("design:returntype", ParameterSnapshot.ResolvedValueParameter)
|
|
1997
|
-
], ParameterSnapshot.prototype, "getResolvedRouteId", null);
|
|
1998
|
-
return ParameterSnapshot;
|
|
1999
|
-
}());
|
|
2075
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2076
|
+
return AbstractPlaceNavigationComponent;
|
|
2077
|
+
}(DisposableComponent));
|
|
2000
2078
|
if (false) {
|
|
2001
2079
|
/** @type {?} */
|
|
2002
|
-
|
|
2080
|
+
AbstractPlaceNavigationComponent.prototype.places;
|
|
2081
|
+
/** @type {?} */
|
|
2082
|
+
AbstractPlaceNavigationComponent.prototype.placesModel;
|
|
2083
|
+
/** @type {?} */
|
|
2084
|
+
AbstractPlaceNavigationComponent.prototype.placeDefinitions;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
/**
|
|
2088
|
+
* @fileoverview added by tsickle
|
|
2089
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2090
|
+
*/
|
|
2091
|
+
var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
2092
|
+
__extends(ListPlaceNavComponent, _super);
|
|
2093
|
+
function ListPlaceNavComponent() {
|
|
2094
|
+
var _this = _super.call(this) || this;
|
|
2095
|
+
_this.expanded = true;
|
|
2096
|
+
return _this;
|
|
2097
|
+
}
|
|
2003
2098
|
/**
|
|
2004
|
-
* @
|
|
2005
|
-
* @private
|
|
2099
|
+
* @return {?}
|
|
2006
2100
|
*/
|
|
2007
|
-
|
|
2101
|
+
ListPlaceNavComponent.prototype.expandMenu = /**
|
|
2102
|
+
* @return {?}
|
|
2103
|
+
*/
|
|
2104
|
+
function () {
|
|
2105
|
+
this.expanded = true;
|
|
2106
|
+
};
|
|
2107
|
+
/**
|
|
2108
|
+
* @return {?}
|
|
2109
|
+
*/
|
|
2110
|
+
ListPlaceNavComponent.prototype.collapseMenu = /**
|
|
2111
|
+
* @return {?}
|
|
2112
|
+
*/
|
|
2113
|
+
function () {
|
|
2114
|
+
this.expanded = false;
|
|
2115
|
+
};
|
|
2116
|
+
/**
|
|
2117
|
+
* @return {?}
|
|
2118
|
+
*/
|
|
2119
|
+
ListPlaceNavComponent.prototype.toggleMenu = /**
|
|
2120
|
+
* @return {?}
|
|
2121
|
+
*/
|
|
2122
|
+
function () {
|
|
2123
|
+
this.expanded = !this.expanded;
|
|
2124
|
+
};
|
|
2125
|
+
ListPlaceNavComponent.decorators = [
|
|
2126
|
+
{ type: Component, args: [{
|
|
2127
|
+
selector: 'angular-ui-powerups-list-place-nav',
|
|
2128
|
+
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",
|
|
2129
|
+
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}"]
|
|
2130
|
+
}] }
|
|
2131
|
+
];
|
|
2132
|
+
/** @nocollapse */
|
|
2133
|
+
ListPlaceNavComponent.ctorParameters = function () { return []; };
|
|
2134
|
+
ListPlaceNavComponent.propDecorators = {
|
|
2135
|
+
expanded: [{ type: HostBinding, args: ['class.expanded',] }]
|
|
2136
|
+
};
|
|
2137
|
+
return ListPlaceNavComponent;
|
|
2138
|
+
}(AbstractPlaceNavigationComponent));
|
|
2139
|
+
if (false) {
|
|
2140
|
+
/** @type {?} */
|
|
2141
|
+
ListPlaceNavComponent.prototype.expanded;
|
|
2008
2142
|
}
|
|
2009
|
-
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* @fileoverview added by tsickle
|
|
2146
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2147
|
+
*/
|
|
2148
|
+
var PlaceHistory = /** @class */ (function () {
|
|
2149
|
+
function PlaceHistory(router) {
|
|
2150
|
+
this.router = router;
|
|
2151
|
+
this._history = [];
|
|
2152
|
+
}
|
|
2010
2153
|
/**
|
|
2011
|
-
* @param {?}
|
|
2012
|
-
* @param {?} paramMap
|
|
2154
|
+
* @param {?} state
|
|
2013
2155
|
* @return {?}
|
|
2014
2156
|
*/
|
|
2015
|
-
|
|
2157
|
+
PlaceHistory.prototype.add = /**
|
|
2158
|
+
* @param {?} state
|
|
2159
|
+
* @return {?}
|
|
2160
|
+
*/
|
|
2161
|
+
function (state) {
|
|
2016
2162
|
/** @type {?} */
|
|
2017
|
-
var
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2163
|
+
var previousState = ___default.last(this._history);
|
|
2164
|
+
if (!previousState || state.hasChanged(previousState)) {
|
|
2165
|
+
this._history.push(state);
|
|
2166
|
+
// limit our history to 100 visits
|
|
2167
|
+
this._history = this._history.slice(-100);
|
|
2168
|
+
}
|
|
2169
|
+
};
|
|
2170
|
+
PlaceHistory.decorators = [
|
|
2171
|
+
{ type: Injectable, args: [{
|
|
2172
|
+
providedIn: 'root'
|
|
2173
|
+
},] }
|
|
2174
|
+
];
|
|
2175
|
+
/** @nocollapse */
|
|
2176
|
+
PlaceHistory.ctorParameters = function () { return [
|
|
2177
|
+
{ type: Router }
|
|
2178
|
+
]; };
|
|
2179
|
+
/** @nocollapse */ PlaceHistory.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(ɵɵinject(Router)); }, token: PlaceHistory, providedIn: "root" });
|
|
2180
|
+
return PlaceHistory;
|
|
2181
|
+
}());
|
|
2182
|
+
if (false) {
|
|
2183
|
+
/**
|
|
2184
|
+
* @type {?}
|
|
2185
|
+
* @private
|
|
2186
|
+
*/
|
|
2187
|
+
PlaceHistory.prototype._history;
|
|
2188
|
+
/**
|
|
2189
|
+
* @type {?}
|
|
2190
|
+
* @private
|
|
2191
|
+
*/
|
|
2192
|
+
PlaceHistory.prototype.router;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* @fileoverview added by tsickle
|
|
2197
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2198
|
+
*/
|
|
2199
|
+
var PlaceRouter = /** @class */ (function () {
|
|
2200
|
+
function PlaceRouter(router) {
|
|
2201
|
+
this.router = router;
|
|
2039
2202
|
}
|
|
2040
|
-
ParameterSnapshot.create = create;
|
|
2041
2203
|
/**
|
|
2042
|
-
* @
|
|
2043
|
-
* @
|
|
2204
|
+
* @param {?} activatedRoute
|
|
2205
|
+
* @param {?} previous
|
|
2206
|
+
* @param {?} next
|
|
2207
|
+
* @return {?}
|
|
2044
2208
|
*/
|
|
2045
|
-
|
|
2046
|
-
* @
|
|
2047
|
-
* @
|
|
2209
|
+
PlaceRouter.prototype.pushParameterChangesToRoute = /**
|
|
2210
|
+
* @param {?} activatedRoute
|
|
2211
|
+
* @param {?} previous
|
|
2212
|
+
* @param {?} next
|
|
2213
|
+
* @return {?}
|
|
2048
2214
|
*/
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2215
|
+
function (activatedRoute, previous, next) {
|
|
2216
|
+
this.router.navigate(this.redirect(activatedRoute.snapshot, previous, next), {
|
|
2217
|
+
relativeTo: activatedRoute
|
|
2218
|
+
});
|
|
2219
|
+
};
|
|
2220
|
+
/**
|
|
2221
|
+
* @param {?} activatedRoute
|
|
2222
|
+
* @param {?} sanitised
|
|
2223
|
+
* @param {?} snapshot
|
|
2224
|
+
* @return {?}
|
|
2225
|
+
*/
|
|
2226
|
+
PlaceRouter.prototype.createUrlTree = /**
|
|
2227
|
+
* @param {?} activatedRoute
|
|
2228
|
+
* @param {?} sanitised
|
|
2229
|
+
* @param {?} snapshot
|
|
2230
|
+
* @return {?}
|
|
2231
|
+
*/
|
|
2232
|
+
function (activatedRoute, sanitised, snapshot) {
|
|
2233
|
+
return this.router.createUrlTree(this.redirect(activatedRoute, snapshot, sanitised));
|
|
2234
|
+
};
|
|
2235
|
+
/**
|
|
2236
|
+
* @protected
|
|
2237
|
+
* @param {?} activatedRoute
|
|
2238
|
+
* @param {?} previous
|
|
2239
|
+
* @param {?} next
|
|
2240
|
+
* @return {?}
|
|
2241
|
+
*/
|
|
2242
|
+
PlaceRouter.prototype.redirect = /**
|
|
2243
|
+
* @protected
|
|
2244
|
+
* @param {?} activatedRoute
|
|
2245
|
+
* @param {?} previous
|
|
2246
|
+
* @param {?} next
|
|
2247
|
+
* @return {?}
|
|
2248
|
+
*/
|
|
2249
|
+
function (activatedRoute, previous, next) {
|
|
2250
|
+
/** @type {?} */
|
|
2251
|
+
var childSegments = ___default.flatten(activatedRoute.children.map((/**
|
|
2252
|
+
* @param {?} child
|
|
2058
2253
|
* @return {?}
|
|
2059
2254
|
*/
|
|
2060
|
-
function () {
|
|
2061
|
-
return this.parameterDef.isRouteId;
|
|
2062
|
-
};
|
|
2063
|
-
return ResolvedParameter;
|
|
2064
|
-
}());
|
|
2065
|
-
ParameterSnapshot.ResolvedParameter = ResolvedParameter;
|
|
2066
|
-
if (false) {
|
|
2255
|
+
function (child) { return child.url; })));
|
|
2067
2256
|
/** @type {?} */
|
|
2068
|
-
|
|
2257
|
+
var relativePath = !!previous.hasRouteId() ? '..' : '.';
|
|
2069
2258
|
/** @type {?} */
|
|
2070
|
-
|
|
2071
|
-
/**
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
/**
|
|
2078
|
-
* @abstract
|
|
2079
|
-
* @param {?} otherValue
|
|
2080
|
-
* @return {?}
|
|
2081
|
-
*/
|
|
2082
|
-
ResolvedParameter.prototype.isSame = function (otherValue) { };
|
|
2083
|
-
/**
|
|
2084
|
-
* @abstract
|
|
2085
|
-
* @return {?}
|
|
2086
|
-
*/
|
|
2087
|
-
ResolvedParameter.prototype.formattedValue = function () { };
|
|
2088
|
-
/**
|
|
2089
|
-
* @abstract
|
|
2090
|
-
* @param {?} value
|
|
2259
|
+
var routeId = next.getFormattedRouteId();
|
|
2260
|
+
/** @type {?} */
|
|
2261
|
+
var path = routeId ?
|
|
2262
|
+
[relativePath, routeId, next.getFormattedParameters()] :
|
|
2263
|
+
[relativePath, next.getFormattedParameters()];
|
|
2264
|
+
return path.concat(childSegments.map((/**
|
|
2265
|
+
* @param {?} s
|
|
2091
2266
|
* @return {?}
|
|
2092
2267
|
*/
|
|
2093
|
-
|
|
2094
|
-
}
|
|
2268
|
+
function (s) { return s.path; })));
|
|
2269
|
+
};
|
|
2270
|
+
PlaceRouter.decorators = [
|
|
2271
|
+
{ type: Injectable, args: [{
|
|
2272
|
+
providedIn: 'root'
|
|
2273
|
+
},] }
|
|
2274
|
+
];
|
|
2275
|
+
/** @nocollapse */
|
|
2276
|
+
PlaceRouter.ctorParameters = function () { return [
|
|
2277
|
+
{ type: Router }
|
|
2278
|
+
]; };
|
|
2279
|
+
/** @nocollapse */ PlaceRouter.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router)); }, token: PlaceRouter, providedIn: "root" });
|
|
2280
|
+
return PlaceRouter;
|
|
2281
|
+
}());
|
|
2282
|
+
if (false) {
|
|
2095
2283
|
/**
|
|
2096
|
-
* @
|
|
2284
|
+
* @type {?}
|
|
2285
|
+
* @private
|
|
2097
2286
|
*/
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2287
|
+
PlaceRouter.prototype.router;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
/**
|
|
2291
|
+
* @fileoverview added by tsickle
|
|
2292
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2293
|
+
*/
|
|
2294
|
+
/**
|
|
2295
|
+
* @abstract
|
|
2296
|
+
* @template T, S
|
|
2297
|
+
*/
|
|
2298
|
+
var /**
|
|
2299
|
+
* @abstract
|
|
2300
|
+
* @template T, S
|
|
2301
|
+
*/
|
|
2302
|
+
ParameterDefinition = /** @class */ (function () {
|
|
2303
|
+
function ParameterDefinition(propertyName, type, options) {
|
|
2304
|
+
this.propertyName = propertyName;
|
|
2305
|
+
this.type = type;
|
|
2306
|
+
/** @type {?} */
|
|
2307
|
+
var opts = Opts.get(options);
|
|
2308
|
+
this.name = opts.getOptional('as', propertyName);
|
|
2309
|
+
// this.sanitiser = new DefaultParameterSanitiser(
|
|
2310
|
+
// this,
|
|
2311
|
+
// opts.getOptional('remember', false),
|
|
2312
|
+
// opts.getOptional('defaultValue', null)
|
|
2313
|
+
// );
|
|
2314
|
+
}
|
|
2315
|
+
/**
|
|
2316
|
+
* @param {?} injector
|
|
2317
|
+
* @return {?}
|
|
2318
|
+
*/
|
|
2319
|
+
ParameterDefinition.prototype.getSanitiser = /**
|
|
2320
|
+
* @param {?} injector
|
|
2321
|
+
* @return {?}
|
|
2322
|
+
*/
|
|
2323
|
+
function (injector) {
|
|
2324
|
+
return this.sanitiser;
|
|
2325
|
+
};
|
|
2326
|
+
return ParameterDefinition;
|
|
2327
|
+
}());
|
|
2328
|
+
if (false) {
|
|
2329
|
+
/** @type {?} */
|
|
2330
|
+
ParameterDefinition.prototype.isRouteId;
|
|
2331
|
+
/** @type {?} */
|
|
2332
|
+
ParameterDefinition.prototype.isArray;
|
|
2333
|
+
/** @type {?} */
|
|
2334
|
+
ParameterDefinition.prototype.name;
|
|
2335
|
+
/** @type {?} */
|
|
2336
|
+
ParameterDefinition.prototype.sanitiser;
|
|
2337
|
+
/** @type {?} */
|
|
2338
|
+
ParameterDefinition.prototype.propertyName;
|
|
2339
|
+
/** @type {?} */
|
|
2340
|
+
ParameterDefinition.prototype.type;
|
|
2341
|
+
}
|
|
2342
|
+
(function (ParameterDefinition) {
|
|
2154
2343
|
/**
|
|
2344
|
+
* @record
|
|
2155
2345
|
* @template T
|
|
2156
2346
|
*/
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2347
|
+
function Options() { }
|
|
2348
|
+
ParameterDefinition.Options = Options;
|
|
2349
|
+
if (false) {
|
|
2350
|
+
/** @type {?|undefined} */
|
|
2351
|
+
Options.prototype.as;
|
|
2352
|
+
/** @type {?|undefined} */
|
|
2353
|
+
Options.prototype.optional;
|
|
2354
|
+
/** @type {?|undefined} */
|
|
2355
|
+
Options.prototype.remember;
|
|
2356
|
+
/** @type {?|undefined} */
|
|
2357
|
+
Options.prototype.defaultValue;
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* @template T
|
|
2361
|
+
*/
|
|
2362
|
+
var /**
|
|
2363
|
+
* @template T
|
|
2364
|
+
*/
|
|
2365
|
+
RouteId = /** @class */ (function (_super) {
|
|
2366
|
+
__extends(RouteId, _super);
|
|
2367
|
+
function RouteId() {
|
|
2368
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2369
|
+
_this.isRouteId = true;
|
|
2370
|
+
_this.isArray = false;
|
|
2371
|
+
return _this;
|
|
2161
2372
|
}
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
/**
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
__metadata("design:returntype", Boolean)
|
|
2219
|
-
], ResolvedArrayParameter.prototype, "isSame", null);
|
|
2220
|
-
return ResolvedArrayParameter;
|
|
2221
|
-
}(ResolvedParameter));
|
|
2222
|
-
ParameterSnapshot.ResolvedArrayParameter = ResolvedArrayParameter;
|
|
2223
|
-
})(ParameterSnapshot || (ParameterSnapshot = {}));
|
|
2373
|
+
return RouteId;
|
|
2374
|
+
}(ParameterDefinition));
|
|
2375
|
+
ParameterDefinition.RouteId = RouteId;
|
|
2376
|
+
if (false) {
|
|
2377
|
+
/** @type {?} */
|
|
2378
|
+
RouteId.prototype.isRouteId;
|
|
2379
|
+
/** @type {?} */
|
|
2380
|
+
RouteId.prototype.isArray;
|
|
2381
|
+
}
|
|
2382
|
+
/**
|
|
2383
|
+
* @template T
|
|
2384
|
+
*/
|
|
2385
|
+
var /**
|
|
2386
|
+
* @template T
|
|
2387
|
+
*/
|
|
2388
|
+
ValueParameter = /** @class */ (function (_super) {
|
|
2389
|
+
__extends(ValueParameter, _super);
|
|
2390
|
+
function ValueParameter() {
|
|
2391
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2392
|
+
_this.isRouteId = false;
|
|
2393
|
+
_this.isArray = false;
|
|
2394
|
+
return _this;
|
|
2395
|
+
}
|
|
2396
|
+
return ValueParameter;
|
|
2397
|
+
}(ParameterDefinition));
|
|
2398
|
+
ParameterDefinition.ValueParameter = ValueParameter;
|
|
2399
|
+
if (false) {
|
|
2400
|
+
/** @type {?} */
|
|
2401
|
+
ValueParameter.prototype.isRouteId;
|
|
2402
|
+
/** @type {?} */
|
|
2403
|
+
ValueParameter.prototype.isArray;
|
|
2404
|
+
}
|
|
2405
|
+
/**
|
|
2406
|
+
* @template T
|
|
2407
|
+
*/
|
|
2408
|
+
var /**
|
|
2409
|
+
* @template T
|
|
2410
|
+
*/
|
|
2411
|
+
ArrayParameter = /** @class */ (function (_super) {
|
|
2412
|
+
__extends(ArrayParameter, _super);
|
|
2413
|
+
function ArrayParameter() {
|
|
2414
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2415
|
+
_this.isRouteId = false;
|
|
2416
|
+
_this.isArray = true;
|
|
2417
|
+
return _this;
|
|
2418
|
+
}
|
|
2419
|
+
return ArrayParameter;
|
|
2420
|
+
}(ParameterDefinition));
|
|
2421
|
+
ParameterDefinition.ArrayParameter = ArrayParameter;
|
|
2422
|
+
if (false) {
|
|
2423
|
+
/** @type {?} */
|
|
2424
|
+
ArrayParameter.prototype.isRouteId;
|
|
2425
|
+
/** @type {?} */
|
|
2426
|
+
ArrayParameter.prototype.isArray;
|
|
2427
|
+
}
|
|
2428
|
+
})(ParameterDefinition || (ParameterDefinition = {}));
|
|
2224
2429
|
|
|
2225
2430
|
/**
|
|
2226
2431
|
* @fileoverview added by tsickle
|
|
2227
2432
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2228
2433
|
*/
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
* @
|
|
2246
|
-
*/
|
|
2247
|
-
function (p) { return _this.installBinding(p); }));
|
|
2248
|
-
observe.valuesFrom(activatedRoute.paramMap)
|
|
2249
|
-
.last()
|
|
2250
|
-
.map((/**
|
|
2251
|
-
* @param {?} params
|
|
2252
|
-
* @return {?}
|
|
2253
|
-
*/
|
|
2254
|
-
function (params) { return ParameterSnapshot.create(_this.placeDefinition, params); }))
|
|
2255
|
-
.subscribe((/**
|
|
2256
|
-
* @param {?} resolvedParameters
|
|
2257
|
-
* @return {?}
|
|
2258
|
-
*/
|
|
2259
|
-
function (resolvedParameters) {
|
|
2260
|
-
_this._incomingRouteChange.value = true;
|
|
2261
|
-
_this.resolvedParameters.value = resolvedParameters;
|
|
2262
|
-
_this._incomingRouteChange.value = false;
|
|
2263
|
-
}));
|
|
2264
|
-
when.valueOf(_this.resolvedParameters).changes((/**
|
|
2265
|
-
* @param {?} params
|
|
2266
|
-
* @param {?} previous
|
|
2434
|
+
var ParameterSnapshot = /** @class */ (function () {
|
|
2435
|
+
function ParameterSnapshot(placeDefinition, resolved) {
|
|
2436
|
+
this.placeDefinition = placeDefinition;
|
|
2437
|
+
this.resolved = resolved;
|
|
2438
|
+
}
|
|
2439
|
+
/**
|
|
2440
|
+
* @param {?} other
|
|
2441
|
+
* @return {?}
|
|
2442
|
+
*/
|
|
2443
|
+
ParameterSnapshot.prototype.hasChanged = /**
|
|
2444
|
+
* @param {?} other
|
|
2445
|
+
* @return {?}
|
|
2446
|
+
*/
|
|
2447
|
+
function (other) {
|
|
2448
|
+
/** @type {?} */
|
|
2449
|
+
var changed = this.resolved.find((/**
|
|
2450
|
+
* @param {?} r
|
|
2267
2451
|
* @return {?}
|
|
2268
2452
|
*/
|
|
2269
|
-
function (
|
|
2270
|
-
|
|
2271
|
-
activatedRoute: _this.activatedRoute,
|
|
2272
|
-
next: params,
|
|
2273
|
-
previous: previous,
|
|
2274
|
-
updateRoute: !_this.incomingRouteChange.value // we update the route if it's a component triggered change.
|
|
2275
|
-
});
|
|
2453
|
+
function (r) {
|
|
2454
|
+
return !r.isSame(other.getResolvedParameterValue(r.parameterDef));
|
|
2276
2455
|
}));
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2456
|
+
// if (changed) {
|
|
2457
|
+
// console.log({ mine: changed, theirs: other.getResolvedParameter(changed.parameterDef) });
|
|
2458
|
+
// }
|
|
2459
|
+
return !!changed;
|
|
2460
|
+
};
|
|
2461
|
+
/**
|
|
2462
|
+
* @template T, S
|
|
2463
|
+
* @param {?} parameterDef
|
|
2464
|
+
* @return {?}
|
|
2465
|
+
*/
|
|
2466
|
+
ParameterSnapshot.prototype.getResolvedParameter = /**
|
|
2467
|
+
* @template T, S
|
|
2468
|
+
* @param {?} parameterDef
|
|
2469
|
+
* @return {?}
|
|
2470
|
+
*/
|
|
2471
|
+
function (parameterDef) {
|
|
2472
|
+
return this.resolved.find((/**
|
|
2473
|
+
* @param {?} r
|
|
2281
2474
|
* @return {?}
|
|
2282
2475
|
*/
|
|
2283
|
-
function () {
|
|
2284
|
-
|
|
2285
|
-
},
|
|
2286
|
-
enumerable: true,
|
|
2287
|
-
configurable: true
|
|
2288
|
-
});
|
|
2476
|
+
function (r) { return r.parameterDef === parameterDef; }));
|
|
2477
|
+
};
|
|
2289
2478
|
/**
|
|
2290
|
-
* @private
|
|
2291
2479
|
* @template T, S
|
|
2292
2480
|
* @param {?} parameterDef
|
|
2293
2481
|
* @return {?}
|
|
2294
2482
|
*/
|
|
2295
|
-
|
|
2296
|
-
* @private
|
|
2483
|
+
ParameterSnapshot.prototype.getResolvedParameterValue = /**
|
|
2297
2484
|
* @template T, S
|
|
2298
2485
|
* @param {?} parameterDef
|
|
2299
2486
|
* @return {?}
|
|
2300
2487
|
*/
|
|
2301
2488
|
function (parameterDef) {
|
|
2302
2489
|
/** @type {?} */
|
|
2303
|
-
var
|
|
2304
|
-
|
|
2305
|
-
this.registerDisposable(new Binding(this.resolvedParameters, model, {
|
|
2306
|
-
toRight: /**
|
|
2307
|
-
* @param {?} parameters
|
|
2308
|
-
* @return {?}
|
|
2309
|
-
*/
|
|
2310
|
-
function (parameters) {
|
|
2311
|
-
return parameters.getResolvedParameterValue(parameterDef);
|
|
2312
|
-
},
|
|
2313
|
-
toLeft: /**
|
|
2314
|
-
* @param {?} value
|
|
2315
|
-
* @param {?=} currentParameters
|
|
2316
|
-
* @return {?}
|
|
2317
|
-
*/
|
|
2318
|
-
function (value, currentParameters) {
|
|
2319
|
-
return currentParameters.replace(parameterDef, value);
|
|
2320
|
-
}
|
|
2321
|
-
}));
|
|
2490
|
+
var resolvedParameter = this.getResolvedParameter(parameterDef);
|
|
2491
|
+
return resolvedParameter ? resolvedParameter.value : null;
|
|
2322
2492
|
};
|
|
2323
|
-
|
|
2324
|
-
|
|
2493
|
+
/**
|
|
2494
|
+
* @return {?}
|
|
2495
|
+
*/
|
|
2496
|
+
ParameterSnapshot.prototype.getRouteId = /**
|
|
2497
|
+
* @return {?}
|
|
2498
|
+
*/
|
|
2499
|
+
function () {
|
|
2500
|
+
return this.getResolvedRouteId() ? this.getResolvedRouteId().value : null;
|
|
2501
|
+
};
|
|
2502
|
+
/**
|
|
2503
|
+
* @param {?} name
|
|
2504
|
+
* @return {?}
|
|
2505
|
+
*/
|
|
2506
|
+
ParameterSnapshot.prototype.getRouteParameter = /**
|
|
2507
|
+
* @param {?} name
|
|
2508
|
+
* @return {?}
|
|
2509
|
+
*/
|
|
2510
|
+
function (name) {
|
|
2511
|
+
/** @type {?} */
|
|
2512
|
+
var resolvedParameter = this.resolved.find((/**
|
|
2513
|
+
* @param {?} r
|
|
2325
2514
|
* @return {?}
|
|
2326
2515
|
*/
|
|
2327
|
-
function () {
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
enumerable: true,
|
|
2331
|
-
configurable: true
|
|
2332
|
-
});
|
|
2516
|
+
function (r) { return r.parameterDef.name === name; }));
|
|
2517
|
+
return resolvedParameter ? resolvedParameter.value : null;
|
|
2518
|
+
};
|
|
2333
2519
|
/**
|
|
2520
|
+
* @private
|
|
2334
2521
|
* @return {?}
|
|
2335
2522
|
*/
|
|
2336
|
-
|
|
2523
|
+
ParameterSnapshot.prototype.getResolvedRouteId = /**
|
|
2524
|
+
* @private
|
|
2337
2525
|
* @return {?}
|
|
2338
2526
|
*/
|
|
2339
2527
|
function () {
|
|
2340
|
-
|
|
2528
|
+
// RouteId's are never arrays: see parameter-decorators.ts createDefinition methods. It would be nice to
|
|
2529
|
+
// capture this in the type system though
|
|
2530
|
+
return (/** @type {?} */ (this.resolved.find((/**
|
|
2531
|
+
* @param {?} p
|
|
2532
|
+
* @return {?}
|
|
2533
|
+
*/
|
|
2534
|
+
function (p) { return p.parameterDef.isRouteId; }))));
|
|
2535
|
+
};
|
|
2536
|
+
/**
|
|
2537
|
+
* @return {?}
|
|
2538
|
+
*/
|
|
2539
|
+
ParameterSnapshot.prototype.hasRouteId = /**
|
|
2540
|
+
* @return {?}
|
|
2541
|
+
*/
|
|
2542
|
+
function () {
|
|
2543
|
+
return !!this.getResolvedRouteId();
|
|
2341
2544
|
};
|
|
2342
|
-
// @Trace()
|
|
2343
|
-
// @Trace()
|
|
2344
2545
|
/**
|
|
2345
2546
|
* @return {?}
|
|
2346
2547
|
*/
|
|
2347
|
-
|
|
2348
|
-
|
|
2548
|
+
ParameterSnapshot.prototype.getFormattedRouteId = /**
|
|
2549
|
+
* @return {?}
|
|
2550
|
+
*/
|
|
2551
|
+
function () {
|
|
2552
|
+
/** @type {?} */
|
|
2553
|
+
var routeIdParam = this.getResolvedRouteId();
|
|
2554
|
+
return routeIdParam ? routeIdParam.formattedValue() : null;
|
|
2555
|
+
};
|
|
2349
2556
|
/**
|
|
2350
2557
|
* @return {?}
|
|
2351
2558
|
*/
|
|
2559
|
+
ParameterSnapshot.prototype.getFormattedParameters = /**
|
|
2560
|
+
* @return {?}
|
|
2561
|
+
*/
|
|
2352
2562
|
function () {
|
|
2563
|
+
/** @type {?} */
|
|
2564
|
+
var params = {};
|
|
2565
|
+
/** @type {?} */
|
|
2566
|
+
var routeIdParam = this.resolved.filter((/**
|
|
2567
|
+
* @param {?} p
|
|
2568
|
+
* @return {?}
|
|
2569
|
+
*/
|
|
2570
|
+
function (p) { return !p.parameterDef.isRouteId; })).forEach((/**
|
|
2571
|
+
* @param {?} p
|
|
2572
|
+
* @return {?}
|
|
2573
|
+
*/
|
|
2574
|
+
function (p) {
|
|
2575
|
+
params[p.parameterDef.name] = p.formattedValue();
|
|
2576
|
+
}));
|
|
2577
|
+
return params;
|
|
2578
|
+
};
|
|
2579
|
+
/**
|
|
2580
|
+
* @template T, S
|
|
2581
|
+
* @param {?} parameter
|
|
2582
|
+
* @param {?} value
|
|
2583
|
+
* @return {?}
|
|
2584
|
+
*/
|
|
2585
|
+
ParameterSnapshot.prototype.replace = /**
|
|
2586
|
+
* @template T, S
|
|
2587
|
+
* @param {?} parameter
|
|
2588
|
+
* @param {?} value
|
|
2589
|
+
* @return {?}
|
|
2590
|
+
*/
|
|
2591
|
+
function (parameter, value) {
|
|
2592
|
+
return new ParameterSnapshot(this.placeDefinition, this.resolved.map((/**
|
|
2593
|
+
* @param {?} p
|
|
2594
|
+
* @return {?}
|
|
2595
|
+
*/
|
|
2596
|
+
function (p) {
|
|
2597
|
+
return p.parameterDef === parameter ? p.replace(value) : p;
|
|
2598
|
+
})));
|
|
2599
|
+
};
|
|
2600
|
+
/**
|
|
2601
|
+
* @param {?} injector
|
|
2602
|
+
* @return {?}
|
|
2603
|
+
*/
|
|
2604
|
+
ParameterSnapshot.prototype.sanitise = /**
|
|
2605
|
+
* @param {?} injector
|
|
2606
|
+
* @return {?}
|
|
2607
|
+
*/
|
|
2608
|
+
function (injector) {
|
|
2609
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2610
|
+
return __generator(this, function (_a) {
|
|
2611
|
+
return [2 /*return*/, this];
|
|
2612
|
+
});
|
|
2613
|
+
});
|
|
2353
2614
|
};
|
|
2615
|
+
var _a;
|
|
2354
2616
|
__decorate([
|
|
2355
2617
|
Memoize$1(),
|
|
2356
|
-
__metadata("design:type",
|
|
2357
|
-
__metadata("design:paramtypes", [])
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2618
|
+
__metadata("design:type", Function),
|
|
2619
|
+
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
2620
|
+
__metadata("design:returntype", ParameterSnapshot.ResolvedParameter)
|
|
2621
|
+
], ParameterSnapshot.prototype, "getResolvedParameter", null);
|
|
2622
|
+
__decorate([
|
|
2623
|
+
Memoize$1(),
|
|
2624
|
+
__metadata("design:type", Function),
|
|
2625
|
+
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
2626
|
+
__metadata("design:returntype", typeof (_a = typeof S !== "undefined" && S) === "function" ? _a : Object)
|
|
2627
|
+
], ParameterSnapshot.prototype, "getResolvedParameterValue", null);
|
|
2628
|
+
__decorate([
|
|
2629
|
+
Memoize$1(),
|
|
2630
|
+
__metadata("design:type", Function),
|
|
2631
|
+
__metadata("design:paramtypes", [String]),
|
|
2632
|
+
__metadata("design:returntype", Object)
|
|
2633
|
+
], ParameterSnapshot.prototype, "getRouteParameter", null);
|
|
2634
|
+
__decorate([
|
|
2635
|
+
Memoize$1(),
|
|
2636
|
+
__metadata("design:type", Function),
|
|
2637
|
+
__metadata("design:paramtypes", []),
|
|
2638
|
+
__metadata("design:returntype", ParameterSnapshot.ResolvedValueParameter)
|
|
2639
|
+
], ParameterSnapshot.prototype, "getResolvedRouteId", null);
|
|
2640
|
+
return ParameterSnapshot;
|
|
2641
|
+
}());
|
|
2361
2642
|
if (false) {
|
|
2362
2643
|
/** @type {?} */
|
|
2363
|
-
|
|
2644
|
+
ParameterSnapshot.prototype.placeDefinition;
|
|
2364
2645
|
/**
|
|
2365
2646
|
* @type {?}
|
|
2366
2647
|
* @private
|
|
2367
2648
|
*/
|
|
2368
|
-
|
|
2369
|
-
/** @type {?} */
|
|
2370
|
-
PlaceComponent.prototype.activatedRoute;
|
|
2649
|
+
ParameterSnapshot.prototype.resolved;
|
|
2371
2650
|
}
|
|
2372
|
-
(function (
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2651
|
+
(function (ParameterSnapshot) {
|
|
2652
|
+
/**
|
|
2653
|
+
* @param {?} placeDef
|
|
2654
|
+
* @param {?} paramMap
|
|
2655
|
+
* @return {?}
|
|
2656
|
+
*/
|
|
2657
|
+
function create(placeDef, paramMap) {
|
|
2658
|
+
/** @type {?} */
|
|
2659
|
+
var resolvedParameters = placeDef.getRouteParameters()
|
|
2660
|
+
.map((/**
|
|
2661
|
+
* @param {?} def
|
|
2662
|
+
* @return {?}
|
|
2663
|
+
*/
|
|
2664
|
+
function (def) {
|
|
2665
|
+
if (def.isArray) {
|
|
2666
|
+
/** @type {?} */
|
|
2667
|
+
var value = paramMap.has(def.name) ? paramMap.getAll(def.name).map((/**
|
|
2668
|
+
* @param {?} raw
|
|
2669
|
+
* @return {?}
|
|
2670
|
+
*/
|
|
2671
|
+
function (raw) { return def.type.parse(raw); })) : null;
|
|
2672
|
+
return new ResolvedArrayParameter(def, value);
|
|
2673
|
+
}
|
|
2674
|
+
else {
|
|
2675
|
+
/** @type {?} */
|
|
2676
|
+
var value = paramMap.has(def.name) ? def.type.parse(paramMap.get(def.name)) : null;
|
|
2677
|
+
return new ResolvedValueParameter(def, value);
|
|
2678
|
+
}
|
|
2679
|
+
}));
|
|
2680
|
+
return new ParameterSnapshot(placeDef, resolvedParameters);
|
|
2681
|
+
}
|
|
2682
|
+
ParameterSnapshot.create = create;
|
|
2683
|
+
/**
|
|
2684
|
+
* @abstract
|
|
2685
|
+
* @template T, S
|
|
2686
|
+
*/
|
|
2687
|
+
var /**
|
|
2688
|
+
* @abstract
|
|
2689
|
+
* @template T, S
|
|
2690
|
+
*/
|
|
2691
|
+
ResolvedParameter = /** @class */ (function () {
|
|
2692
|
+
function ResolvedParameter(parameterDef, value) {
|
|
2693
|
+
this.parameterDef = parameterDef;
|
|
2694
|
+
this.value = value;
|
|
2386
2695
|
}
|
|
2387
2696
|
/**
|
|
2388
2697
|
* @return {?}
|
|
2389
2698
|
*/
|
|
2390
|
-
|
|
2699
|
+
ResolvedParameter.prototype.isRouteId = /**
|
|
2391
2700
|
* @return {?}
|
|
2392
2701
|
*/
|
|
2393
2702
|
function () {
|
|
2394
|
-
return
|
|
2703
|
+
return this.parameterDef.isRouteId;
|
|
2395
2704
|
};
|
|
2705
|
+
return ResolvedParameter;
|
|
2706
|
+
}());
|
|
2707
|
+
ParameterSnapshot.ResolvedParameter = ResolvedParameter;
|
|
2708
|
+
if (false) {
|
|
2709
|
+
/** @type {?} */
|
|
2710
|
+
ResolvedParameter.prototype.parameterDef;
|
|
2711
|
+
/** @type {?} */
|
|
2712
|
+
ResolvedParameter.prototype.value;
|
|
2396
2713
|
/**
|
|
2397
|
-
* @
|
|
2714
|
+
* @abstract
|
|
2715
|
+
* @param {?} dest
|
|
2398
2716
|
* @return {?}
|
|
2399
2717
|
*/
|
|
2400
|
-
|
|
2401
|
-
|
|
2718
|
+
ResolvedParameter.prototype.injectRouteParam = function (dest) { };
|
|
2719
|
+
/**
|
|
2720
|
+
* @abstract
|
|
2721
|
+
* @param {?} otherValue
|
|
2402
2722
|
* @return {?}
|
|
2403
2723
|
*/
|
|
2404
|
-
function (
|
|
2405
|
-
return lang.constructorChain(constructable).includes(PlaceComponent);
|
|
2406
|
-
};
|
|
2724
|
+
ResolvedParameter.prototype.isSame = function (otherValue) { };
|
|
2407
2725
|
/**
|
|
2408
|
-
* @
|
|
2726
|
+
* @abstract
|
|
2409
2727
|
* @return {?}
|
|
2410
2728
|
*/
|
|
2411
|
-
|
|
2412
|
-
|
|
2729
|
+
ResolvedParameter.prototype.formattedValue = function () { };
|
|
2730
|
+
/**
|
|
2731
|
+
* @abstract
|
|
2732
|
+
* @param {?} value
|
|
2413
2733
|
* @return {?}
|
|
2414
2734
|
*/
|
|
2415
|
-
function (
|
|
2416
|
-
|
|
2417
|
-
|
|
2735
|
+
ResolvedParameter.prototype.replace = function (value) { };
|
|
2736
|
+
}
|
|
2737
|
+
/**
|
|
2738
|
+
* @template T
|
|
2739
|
+
*/
|
|
2740
|
+
var /**
|
|
2741
|
+
* @template T
|
|
2742
|
+
*/
|
|
2743
|
+
ResolvedValueParameter = /** @class */ (function (_super) {
|
|
2744
|
+
__extends(ResolvedValueParameter, _super);
|
|
2745
|
+
function ResolvedValueParameter() {
|
|
2746
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2747
|
+
}
|
|
2418
2748
|
/**
|
|
2419
|
-
* @
|
|
2420
|
-
* @param {?} key
|
|
2421
|
-
* @param {?=} defaultValue
|
|
2749
|
+
* @param {?} otherValue
|
|
2422
2750
|
* @return {?}
|
|
2423
2751
|
*/
|
|
2424
|
-
|
|
2425
|
-
* @
|
|
2426
|
-
* @param {?} key
|
|
2427
|
-
* @param {?=} defaultValue
|
|
2752
|
+
ResolvedValueParameter.prototype.isSame = /**
|
|
2753
|
+
* @param {?} otherValue
|
|
2428
2754
|
* @return {?}
|
|
2429
2755
|
*/
|
|
2430
|
-
function (
|
|
2431
|
-
return this.
|
|
2432
|
-
isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
2433
|
-
defaultValue;
|
|
2756
|
+
function (otherValue) {
|
|
2757
|
+
return this.value === otherValue;
|
|
2434
2758
|
};
|
|
2435
2759
|
/**
|
|
2436
|
-
* @
|
|
2437
|
-
* @param {?} keys
|
|
2438
|
-
* @param {?=} defaultValue
|
|
2760
|
+
* @param {?} dest
|
|
2439
2761
|
* @return {?}
|
|
2440
2762
|
*/
|
|
2441
|
-
|
|
2442
|
-
* @
|
|
2443
|
-
* @param {?} keys
|
|
2444
|
-
* @param {?=} defaultValue
|
|
2763
|
+
ResolvedValueParameter.prototype.injectRouteParam = /**
|
|
2764
|
+
* @param {?} dest
|
|
2445
2765
|
* @return {?}
|
|
2446
2766
|
*/
|
|
2447
|
-
function (
|
|
2448
|
-
|
|
2449
|
-
if (this.data) {
|
|
2450
|
-
/** @type {?} */
|
|
2451
|
-
var found = keys.find((/**
|
|
2452
|
-
* @param {?} key
|
|
2453
|
-
* @return {?}
|
|
2454
|
-
*/
|
|
2455
|
-
function (key) { return !isNil(_this.data[key]); }));
|
|
2456
|
-
return found ? this.data[found] : defaultValue;
|
|
2457
|
-
}
|
|
2458
|
-
else {
|
|
2459
|
-
return defaultValue;
|
|
2460
|
-
}
|
|
2767
|
+
function (dest) {
|
|
2768
|
+
dest[this.parameterDef.name] = this.parameterDef.type.format(this.value);
|
|
2461
2769
|
};
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
__metadata("design:type", Function),
|
|
2465
|
-
__metadata("design:paramtypes", []),
|
|
2466
|
-
__metadata("design:returntype", Array)
|
|
2467
|
-
], Definition.prototype, "getRouteParameters", null);
|
|
2468
|
-
return Definition;
|
|
2469
|
-
}());
|
|
2470
|
-
PlaceComponent.Definition = Definition;
|
|
2471
|
-
if (false) {
|
|
2472
|
-
/** @type {?} */
|
|
2473
|
-
Definition.prototype.path;
|
|
2474
|
-
/** @type {?} */
|
|
2475
|
-
Definition.prototype.authenticate;
|
|
2476
|
-
/** @type {?} */
|
|
2477
|
-
Definition.prototype.order;
|
|
2478
|
-
/** @type {?} */
|
|
2479
|
-
Definition.prototype.data;
|
|
2480
|
-
/** @type {?} */
|
|
2481
|
-
Definition.prototype.children;
|
|
2482
|
-
/** @type {?} */
|
|
2483
|
-
Definition.prototype.component;
|
|
2484
|
-
}
|
|
2485
|
-
/**
|
|
2486
|
-
* @record
|
|
2487
|
-
*/
|
|
2488
|
-
function Options() { }
|
|
2489
|
-
PlaceComponent.Options = Options;
|
|
2490
|
-
if (false) {
|
|
2491
|
-
/** @type {?} */
|
|
2492
|
-
Options.prototype.path;
|
|
2493
|
-
/** @type {?} */
|
|
2494
|
-
Options.prototype.order;
|
|
2495
|
-
/** @type {?|undefined} */
|
|
2496
|
-
Options.prototype.data;
|
|
2497
|
-
/** @type {?|undefined} */
|
|
2498
|
-
Options.prototype.authenticate;
|
|
2499
|
-
/** @type {?|undefined} */
|
|
2500
|
-
Options.prototype.children;
|
|
2501
|
-
}
|
|
2502
|
-
/**
|
|
2503
|
-
* @record
|
|
2504
|
-
*/
|
|
2505
|
-
function ChildOptions() { }
|
|
2506
|
-
PlaceComponent.ChildOptions = ChildOptions;
|
|
2507
|
-
if (false) {
|
|
2508
|
-
/** @type {?} */
|
|
2509
|
-
ChildOptions.prototype.parent;
|
|
2510
|
-
}
|
|
2511
|
-
/**
|
|
2512
|
-
* @param {?} klass
|
|
2513
|
-
* @return {?}
|
|
2514
|
-
*/
|
|
2515
|
-
function getDefinition(klass) {
|
|
2516
|
-
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
2517
|
-
}
|
|
2518
|
-
PlaceComponent.getDefinition = getDefinition;
|
|
2519
|
-
/**
|
|
2520
|
-
* @param {?} klass
|
|
2521
|
-
* @param {?} options
|
|
2522
|
-
* @return {?}
|
|
2523
|
-
*/
|
|
2524
|
-
function injectDefinition(klass, options) {
|
|
2525
|
-
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, new Definition(klass, options), klass);
|
|
2526
|
-
}
|
|
2527
|
-
PlaceComponent.injectDefinition = injectDefinition;
|
|
2528
|
-
})(PlaceComponent || (PlaceComponent = {}));
|
|
2529
|
-
|
|
2530
|
-
/**
|
|
2531
|
-
* @fileoverview added by tsickle
|
|
2532
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2533
|
-
*/
|
|
2534
|
-
var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
2535
|
-
__extends(AbstractPlaceNavigationComponent, _super);
|
|
2536
|
-
function AbstractPlaceNavigationComponent() {
|
|
2537
|
-
var _this = _super.call(this) || this;
|
|
2538
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2539
|
-
_this.placeDefinitions = chain(_this.placesModel).map((/**
|
|
2540
|
-
* @param {?} c
|
|
2770
|
+
/**
|
|
2771
|
+
* @param {?} value
|
|
2541
2772
|
* @return {?}
|
|
2542
2773
|
*/
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2774
|
+
ResolvedValueParameter.prototype.replace = /**
|
|
2775
|
+
* @param {?} value
|
|
2776
|
+
* @return {?}
|
|
2777
|
+
*/
|
|
2778
|
+
function (value) {
|
|
2779
|
+
return new ResolvedValueParameter(this.parameterDef, value);
|
|
2780
|
+
};
|
|
2781
|
+
/**
|
|
2782
|
+
* @return {?}
|
|
2783
|
+
*/
|
|
2784
|
+
ResolvedValueParameter.prototype.formattedValue = /**
|
|
2785
|
+
* @return {?}
|
|
2786
|
+
*/
|
|
2787
|
+
function () {
|
|
2788
|
+
return !___default.isNil(this.value) ? this.parameterDef.type.format(this.value) : null;
|
|
2789
|
+
};
|
|
2790
|
+
return ResolvedValueParameter;
|
|
2791
|
+
}(ResolvedParameter));
|
|
2792
|
+
ParameterSnapshot.ResolvedValueParameter = ResolvedValueParameter;
|
|
2546
2793
|
/**
|
|
2547
|
-
* @
|
|
2548
|
-
* @return {?}
|
|
2794
|
+
* @template T
|
|
2549
2795
|
*/
|
|
2550
|
-
|
|
2551
|
-
* @
|
|
2552
|
-
* @return {?}
|
|
2796
|
+
var /**
|
|
2797
|
+
* @template T
|
|
2553
2798
|
*/
|
|
2554
|
-
function (
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2799
|
+
ResolvedArrayParameter = /** @class */ (function (_super) {
|
|
2800
|
+
__extends(ResolvedArrayParameter, _super);
|
|
2801
|
+
function ResolvedArrayParameter() {
|
|
2802
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2803
|
+
}
|
|
2804
|
+
/**
|
|
2805
|
+
* @param {?} otherValue
|
|
2806
|
+
* @return {?}
|
|
2807
|
+
*/
|
|
2808
|
+
ResolvedArrayParameter.prototype.isSame = /**
|
|
2809
|
+
* @param {?} otherValue
|
|
2810
|
+
* @return {?}
|
|
2811
|
+
*/
|
|
2812
|
+
function (otherValue) {
|
|
2813
|
+
return ___default.isEqual(this.value, otherValue);
|
|
2814
|
+
};
|
|
2815
|
+
/**
|
|
2816
|
+
* @param {?} dest
|
|
2817
|
+
* @return {?}
|
|
2818
|
+
*/
|
|
2819
|
+
ResolvedArrayParameter.prototype.injectRouteParam = /**
|
|
2820
|
+
* @param {?} dest
|
|
2821
|
+
* @return {?}
|
|
2822
|
+
*/
|
|
2823
|
+
function (dest) {
|
|
2824
|
+
var _this = this;
|
|
2825
|
+
dest[this.parameterDef.name] = this.value.map((/**
|
|
2826
|
+
* @param {?} v
|
|
2567
2827
|
* @return {?}
|
|
2568
2828
|
*/
|
|
2569
|
-
function () { return
|
|
2829
|
+
function (v) { return _this.parameterDef.type.format(v); }));
|
|
2570
2830
|
};
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
__metadata("design:type", Array)
|
|
2587
|
-
], AbstractPlaceNavigationComponent.prototype, "places", void 0);
|
|
2588
|
-
__decorate([
|
|
2589
|
-
UseDelegate(),
|
|
2590
|
-
__metadata("design:type", ListModel)
|
|
2591
|
-
], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
2592
|
-
__decorate([
|
|
2593
|
-
Memoize(),
|
|
2594
|
-
__metadata("design:type", Function),
|
|
2595
|
-
__metadata("design:paramtypes", [PlaceComponent.Definition]),
|
|
2596
|
-
__metadata("design:returntype", Object)
|
|
2597
|
-
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2598
|
-
return AbstractPlaceNavigationComponent;
|
|
2599
|
-
}(DisposableComponent));
|
|
2600
|
-
if (false) {
|
|
2601
|
-
/** @type {?} */
|
|
2602
|
-
AbstractPlaceNavigationComponent.prototype.places;
|
|
2603
|
-
/** @type {?} */
|
|
2604
|
-
AbstractPlaceNavigationComponent.prototype.placesModel;
|
|
2605
|
-
/** @type {?} */
|
|
2606
|
-
AbstractPlaceNavigationComponent.prototype.placeDefinitions;
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
/**
|
|
2610
|
-
* @fileoverview added by tsickle
|
|
2611
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2612
|
-
*/
|
|
2613
|
-
var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
2614
|
-
__extends(ListPlaceNavComponent, _super);
|
|
2615
|
-
function ListPlaceNavComponent() {
|
|
2616
|
-
var _this = _super.call(this) || this;
|
|
2617
|
-
_this.expanded = true;
|
|
2618
|
-
return _this;
|
|
2619
|
-
}
|
|
2620
|
-
/**
|
|
2621
|
-
* @return {?}
|
|
2622
|
-
*/
|
|
2623
|
-
ListPlaceNavComponent.prototype.expandMenu = /**
|
|
2624
|
-
* @return {?}
|
|
2625
|
-
*/
|
|
2626
|
-
function () {
|
|
2627
|
-
this.expanded = true;
|
|
2628
|
-
};
|
|
2629
|
-
/**
|
|
2630
|
-
* @return {?}
|
|
2631
|
-
*/
|
|
2632
|
-
ListPlaceNavComponent.prototype.collapseMenu = /**
|
|
2633
|
-
* @return {?}
|
|
2634
|
-
*/
|
|
2635
|
-
function () {
|
|
2636
|
-
this.expanded = false;
|
|
2637
|
-
};
|
|
2638
|
-
/**
|
|
2639
|
-
* @return {?}
|
|
2640
|
-
*/
|
|
2641
|
-
ListPlaceNavComponent.prototype.toggleMenu = /**
|
|
2642
|
-
* @return {?}
|
|
2643
|
-
*/
|
|
2644
|
-
function () {
|
|
2645
|
-
this.expanded = !this.expanded;
|
|
2646
|
-
};
|
|
2647
|
-
ListPlaceNavComponent.decorators = [
|
|
2648
|
-
{ type: Component, args: [{
|
|
2649
|
-
selector: 'angular-ui-powerups-list-place-nav',
|
|
2650
|
-
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",
|
|
2651
|
-
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}"]
|
|
2652
|
-
}] }
|
|
2653
|
-
];
|
|
2654
|
-
/** @nocollapse */
|
|
2655
|
-
ListPlaceNavComponent.ctorParameters = function () { return []; };
|
|
2656
|
-
ListPlaceNavComponent.propDecorators = {
|
|
2657
|
-
expanded: [{ type: HostBinding, args: ['class.expanded',] }]
|
|
2658
|
-
};
|
|
2659
|
-
return ListPlaceNavComponent;
|
|
2660
|
-
}(AbstractPlaceNavigationComponent));
|
|
2661
|
-
if (false) {
|
|
2662
|
-
/** @type {?} */
|
|
2663
|
-
ListPlaceNavComponent.prototype.expanded;
|
|
2664
|
-
}
|
|
2665
|
-
|
|
2666
|
-
/**
|
|
2667
|
-
* @fileoverview added by tsickle
|
|
2668
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2669
|
-
*/
|
|
2670
|
-
var PlaceService = /** @class */ (function (_super) {
|
|
2671
|
-
__extends(PlaceService, _super);
|
|
2672
|
-
function PlaceService(router, injector) {
|
|
2673
|
-
var _this = _super.call(this) || this;
|
|
2674
|
-
_this.router = router;
|
|
2675
|
-
_this.injector = injector;
|
|
2676
|
-
_this._activePlaces = new MutableListModel();
|
|
2677
|
-
return _this;
|
|
2678
|
-
}
|
|
2679
|
-
Object.defineProperty(PlaceService.prototype, "activePlaces", {
|
|
2680
|
-
get: /**
|
|
2831
|
+
/**
|
|
2832
|
+
* @param {?} value
|
|
2833
|
+
* @return {?}
|
|
2834
|
+
*/
|
|
2835
|
+
ResolvedArrayParameter.prototype.replace = /**
|
|
2836
|
+
* @param {?} value
|
|
2837
|
+
* @return {?}
|
|
2838
|
+
*/
|
|
2839
|
+
function (value) {
|
|
2840
|
+
return new ResolvedArrayParameter(this.parameterDef, value);
|
|
2841
|
+
};
|
|
2842
|
+
/**
|
|
2843
|
+
* @return {?}
|
|
2844
|
+
*/
|
|
2845
|
+
ResolvedArrayParameter.prototype.formattedValue = /**
|
|
2681
2846
|
* @return {?}
|
|
2682
2847
|
*/
|
|
2683
2848
|
function () {
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
PlaceService.prototype.onActivate =
|
|
2696
|
-
// @Trace()
|
|
2697
|
-
/**
|
|
2698
|
-
* @param {?} place
|
|
2699
|
-
* @return {?}
|
|
2700
|
-
*/
|
|
2701
|
-
function (place) {
|
|
2702
|
-
this._activePlaces.push(place);
|
|
2703
|
-
};
|
|
2704
|
-
// @Trace()
|
|
2705
|
-
// @Trace()
|
|
2706
|
-
/**
|
|
2707
|
-
* @param {?} place
|
|
2708
|
-
* @return {?}
|
|
2709
|
-
*/
|
|
2710
|
-
PlaceService.prototype.onDeactivate =
|
|
2711
|
-
// @Trace()
|
|
2712
|
-
/**
|
|
2713
|
-
* @param {?} place
|
|
2714
|
-
* @return {?}
|
|
2715
|
-
*/
|
|
2716
|
-
function (place) {
|
|
2717
|
-
this._activePlaces.remove(place);
|
|
2718
|
-
};
|
|
2719
|
-
// @Trace()
|
|
2720
|
-
// @Trace()
|
|
2721
|
-
/**
|
|
2722
|
-
* @param {?} params
|
|
2723
|
-
* @return {?}
|
|
2724
|
-
*/
|
|
2725
|
-
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2726
|
-
// @Trace()
|
|
2727
|
-
/**
|
|
2728
|
-
* @param {?} params
|
|
2729
|
-
* @return {?}
|
|
2730
|
-
*/
|
|
2731
|
-
function (params) {
|
|
2732
|
-
// We update the router state...
|
|
2733
|
-
if (params.updateRoute) {
|
|
2734
|
-
/** @type {?} */
|
|
2735
|
-
var routeId = params.next.getFormattedRouteId();
|
|
2736
|
-
/** @type {?} */
|
|
2737
|
-
var relativePath = !!params.previous.hasRouteId() ? '..' : '.';
|
|
2738
|
-
/** @type {?} */
|
|
2739
|
-
var path = routeId ? [relativePath, routeId, params.next.getFormattedParameters()] : [relativePath, params.next.getFormattedParameters()];
|
|
2740
|
-
this.router.navigate(path, {
|
|
2741
|
-
relativeTo: params.activatedRoute
|
|
2742
|
-
});
|
|
2743
|
-
}
|
|
2744
|
-
};
|
|
2745
|
-
// @Trace()
|
|
2746
|
-
// @Trace()
|
|
2747
|
-
/**
|
|
2748
|
-
* @param {?} snapshot
|
|
2749
|
-
* @return {?}
|
|
2750
|
-
*/
|
|
2751
|
-
PlaceService.prototype.sanitise =
|
|
2752
|
-
// @Trace()
|
|
2753
|
-
/**
|
|
2754
|
-
* @param {?} snapshot
|
|
2755
|
-
* @return {?}
|
|
2756
|
-
*/
|
|
2757
|
-
function (snapshot) {
|
|
2758
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2759
|
-
return __generator(this, function (_a) {
|
|
2760
|
-
return [2 /*return*/, snapshot];
|
|
2761
|
-
});
|
|
2762
|
-
});
|
|
2763
|
-
};
|
|
2764
|
-
PlaceService.decorators = [
|
|
2765
|
-
{ type: Injectable, args: [{
|
|
2766
|
-
providedIn: 'root'
|
|
2767
|
-
},] }
|
|
2768
|
-
];
|
|
2769
|
-
/** @nocollapse */
|
|
2770
|
-
PlaceService.ctorParameters = function () { return [
|
|
2771
|
-
{ type: Router },
|
|
2772
|
-
{ type: Injector }
|
|
2773
|
-
]; };
|
|
2774
|
-
/** @nocollapse */ PlaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(ɵɵinject(Router), ɵɵinject(INJECTOR)); }, token: PlaceService, providedIn: "root" });
|
|
2775
|
-
return PlaceService;
|
|
2776
|
-
}(GarbageCollector));
|
|
2777
|
-
if (false) {
|
|
2778
|
-
/**
|
|
2779
|
-
* @type {?}
|
|
2780
|
-
* @private
|
|
2781
|
-
*/
|
|
2782
|
-
PlaceService.prototype._activePlaces;
|
|
2783
|
-
/**
|
|
2784
|
-
* @type {?}
|
|
2785
|
-
* @protected
|
|
2786
|
-
*/
|
|
2787
|
-
PlaceService.prototype.router;
|
|
2788
|
-
/**
|
|
2789
|
-
* @type {?}
|
|
2790
|
-
* @protected
|
|
2791
|
-
*/
|
|
2792
|
-
PlaceService.prototype.injector;
|
|
2793
|
-
}
|
|
2849
|
+
var _this = this;
|
|
2850
|
+
return this.value ? this.value.map((/**
|
|
2851
|
+
* @param {?} v
|
|
2852
|
+
* @return {?}
|
|
2853
|
+
*/
|
|
2854
|
+
function (v) { return _this.parameterDef.type.format(v); })) : [];
|
|
2855
|
+
};
|
|
2856
|
+
return ResolvedArrayParameter;
|
|
2857
|
+
}(ResolvedParameter));
|
|
2858
|
+
ParameterSnapshot.ResolvedArrayParameter = ResolvedArrayParameter;
|
|
2859
|
+
})(ParameterSnapshot || (ParameterSnapshot = {}));
|
|
2794
2860
|
|
|
2795
2861
|
/**
|
|
2796
2862
|
* @fileoverview added by tsickle
|
|
@@ -2843,56 +2909,88 @@ function leftRightPlaceAnimation(duration) {
|
|
|
2843
2909
|
]);
|
|
2844
2910
|
}
|
|
2845
2911
|
/** @type {?} */
|
|
2846
|
-
var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation(
|
|
2912
|
+
var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
|
|
2847
2913
|
|
|
2848
2914
|
/**
|
|
2849
2915
|
* @fileoverview added by tsickle
|
|
2850
2916
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2851
2917
|
*/
|
|
2918
|
+
/**
|
|
2919
|
+
* @record
|
|
2920
|
+
*/
|
|
2921
|
+
function PlaceRef() { }
|
|
2922
|
+
if (false) {
|
|
2923
|
+
/** @type {?} */
|
|
2924
|
+
PlaceRef.prototype.placeDefinition;
|
|
2925
|
+
/**
|
|
2926
|
+
* @param {?} param
|
|
2927
|
+
* @return {?}
|
|
2928
|
+
*/
|
|
2929
|
+
PlaceRef.prototype.initialiseBindings = function (param) { };
|
|
2930
|
+
/**
|
|
2931
|
+
* @return {?}
|
|
2932
|
+
*/
|
|
2933
|
+
PlaceRef.prototype.onPlaceReady = function () { };
|
|
2934
|
+
}
|
|
2852
2935
|
var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
2853
2936
|
__extends(PlaceOutletComponent, _super);
|
|
2854
|
-
function PlaceOutletComponent(
|
|
2937
|
+
function PlaceOutletComponent(router, placeHistory) {
|
|
2855
2938
|
var _this = _super.call(this) || this;
|
|
2856
|
-
_this.
|
|
2857
|
-
_this.
|
|
2939
|
+
_this.router = router;
|
|
2940
|
+
_this.placeHistory = placeHistory;
|
|
2858
2941
|
_this.animate = true;
|
|
2859
|
-
_this.
|
|
2942
|
+
_this._incomingRouteChange = new Guard();
|
|
2943
|
+
_this._inOutletUpdate = new Guard();
|
|
2944
|
+
_this._activatedRouteModel = new MutableValueModel();
|
|
2945
|
+
_this._placeDefinition = new MutableValueModel();
|
|
2946
|
+
_this._resolvedParameters = new MutableValueModel();
|
|
2860
2947
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2861
|
-
_this.
|
|
2862
|
-
* @param {?}
|
|
2863
|
-
* @return {?}
|
|
2864
|
-
*/
|
|
2865
|
-
function (s) { return s.toString(); })).reduce((/**
|
|
2866
|
-
* @param {?} bits
|
|
2867
|
-
* @return {?}
|
|
2868
|
-
*/
|
|
2869
|
-
function (bits) { return bits.join(','); }));
|
|
2870
|
-
console.log("new outlet@(" + _this.myPath.value + ")");
|
|
2871
|
-
_this.outletChildPath = chain(_this.outletUrlSegment).map((/**
|
|
2872
|
-
* @param {?} s
|
|
2948
|
+
_this._paramMap = chain(_this._activatedRouteModel).pullObservableValue((/**
|
|
2949
|
+
* @param {?} ar
|
|
2873
2950
|
* @return {?}
|
|
2874
2951
|
*/
|
|
2875
|
-
function (
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
function (bits) { return bits.join(","); }));
|
|
2880
|
-
_this.state = chain(_this.myPath).map((/**
|
|
2881
|
-
* @param {?} path
|
|
2952
|
+
function (ar) { return ar.paramMap; }));
|
|
2953
|
+
_this.placeConfigured = valueOf.all(chain(_this._inOutletUpdate).isFalsey(), _this._placeDefinition, _this._paramMap).areTruthy();
|
|
2954
|
+
when.valueOf(_this._paramMap).changes((/**
|
|
2955
|
+
* @param {?} params
|
|
2882
2956
|
* @return {?}
|
|
2883
2957
|
*/
|
|
2884
|
-
function (
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2958
|
+
function (params) {
|
|
2959
|
+
/** @type {?} */
|
|
2960
|
+
var snapshot = ParameterSnapshot.create(_this._placeDefinition.value, params);
|
|
2961
|
+
_this._incomingRouteChange.whileTrue((/**
|
|
2962
|
+
* @return {?}
|
|
2963
|
+
*/
|
|
2964
|
+
function () {
|
|
2965
|
+
_this._resolvedParameters.value = snapshot;
|
|
2966
|
+
_this.placeHistory.add(snapshot);
|
|
2967
|
+
}));
|
|
2968
|
+
}), {
|
|
2969
|
+
postponeUntil: _this.placeConfigured
|
|
2970
|
+
});
|
|
2971
|
+
when.valueOf(_this._resolvedParameters).changes((/**
|
|
2972
|
+
* @param {?} next
|
|
2973
|
+
* @param {?} previous
|
|
2889
2974
|
* @return {?}
|
|
2890
2975
|
*/
|
|
2891
|
-
function (
|
|
2892
|
-
|
|
2893
|
-
|
|
2976
|
+
function (next, previous) {
|
|
2977
|
+
_this.pushChangesToRoute(next, previous);
|
|
2978
|
+
_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.
|
|
2979
|
+
}), {
|
|
2980
|
+
unless: _this.incomingRouteChange
|
|
2981
|
+
});
|
|
2894
2982
|
return _this;
|
|
2895
2983
|
}
|
|
2984
|
+
Object.defineProperty(PlaceOutletComponent.prototype, "incomingRouteChange", {
|
|
2985
|
+
get: /**
|
|
2986
|
+
* @return {?}
|
|
2987
|
+
*/
|
|
2988
|
+
function () {
|
|
2989
|
+
return this._incomingRouteChange;
|
|
2990
|
+
},
|
|
2991
|
+
enumerable: true,
|
|
2992
|
+
configurable: true
|
|
2993
|
+
});
|
|
2896
2994
|
/**
|
|
2897
2995
|
* @return {?}
|
|
2898
2996
|
*/
|
|
@@ -2902,76 +3000,56 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
2902
3000
|
function () {
|
|
2903
3001
|
};
|
|
2904
3002
|
/**
|
|
3003
|
+
* @param {?} routerOutlet
|
|
3004
|
+
* @param {?} place
|
|
2905
3005
|
* @return {?}
|
|
2906
3006
|
*/
|
|
2907
|
-
PlaceOutletComponent.prototype.
|
|
2908
|
-
* @
|
|
2909
|
-
|
|
2910
|
-
function () {
|
|
2911
|
-
// this.routerOutLetQuery.changes.subscribe(() => {
|
|
2912
|
-
// this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
2913
|
-
// });
|
|
2914
|
-
};
|
|
2915
|
-
/**
|
|
2916
|
-
* @return {?}
|
|
2917
|
-
*/
|
|
2918
|
-
PlaceOutletComponent.prototype.ngAfterViewChecked = /**
|
|
2919
|
-
* @return {?}
|
|
2920
|
-
*/
|
|
2921
|
-
function () {
|
|
2922
|
-
// console.log(`@AfterViewChecked: ${this.state.value}`);
|
|
2923
|
-
this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
2924
|
-
};
|
|
2925
|
-
// @Trace()
|
|
2926
|
-
// ngOnDestroy(): void {
|
|
2927
|
-
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2928
|
-
// console.log('mySegments', this.myPath.value);
|
|
2929
|
-
// super.ngOnDestroy();
|
|
2930
|
-
// }
|
|
2931
|
-
// @Trace()
|
|
2932
|
-
// @Trace()
|
|
2933
|
-
// ngOnDestroy(): void {
|
|
2934
|
-
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2935
|
-
// console.log('mySegments', this.myPath.value);
|
|
2936
|
-
// super.ngOnDestroy();
|
|
2937
|
-
// }
|
|
2938
|
-
// @Trace()
|
|
2939
|
-
/**
|
|
2940
|
-
* @param {?} $event
|
|
2941
|
-
* @return {?}
|
|
2942
|
-
*/
|
|
2943
|
-
PlaceOutletComponent.prototype.onOutletActivated =
|
|
2944
|
-
// @Trace()
|
|
2945
|
-
// ngOnDestroy(): void {
|
|
2946
|
-
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2947
|
-
// console.log('mySegments', this.myPath.value);
|
|
2948
|
-
// super.ngOnDestroy();
|
|
2949
|
-
// }
|
|
2950
|
-
// @Trace()
|
|
2951
|
-
/**
|
|
2952
|
-
* @param {?} $event
|
|
3007
|
+
PlaceOutletComponent.prototype.onOutletActivated = /**
|
|
3008
|
+
* @param {?} routerOutlet
|
|
3009
|
+
* @param {?} place
|
|
2953
3010
|
* @return {?}
|
|
2954
3011
|
*/
|
|
2955
|
-
function (
|
|
2956
|
-
|
|
2957
|
-
this.
|
|
2958
|
-
|
|
3012
|
+
function (routerOutlet, place) {
|
|
3013
|
+
var _this = this;
|
|
3014
|
+
this._inOutletUpdate.whileTrue((/**
|
|
3015
|
+
* @return {?}
|
|
3016
|
+
*/
|
|
3017
|
+
function () {
|
|
3018
|
+
try {
|
|
3019
|
+
_this._currentPlace = place;
|
|
3020
|
+
_this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
3021
|
+
_this._placeDefinition.value = place.placeDefinition;
|
|
3022
|
+
place.initialiseBindings(_this._resolvedParameters);
|
|
3023
|
+
}
|
|
3024
|
+
catch (error) {
|
|
3025
|
+
console.error(error);
|
|
3026
|
+
}
|
|
3027
|
+
}));
|
|
2959
3028
|
if (!this.animate) {
|
|
2960
3029
|
// we're not animating so trigger any post animation callbacks now.
|
|
2961
3030
|
this.animationDone();
|
|
2962
3031
|
}
|
|
2963
3032
|
};
|
|
2964
3033
|
/**
|
|
3034
|
+
* @param {?} routerOutlet
|
|
2965
3035
|
* @param {?} $event
|
|
2966
3036
|
* @return {?}
|
|
2967
3037
|
*/
|
|
2968
3038
|
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
3039
|
+
* @param {?} routerOutlet
|
|
2969
3040
|
* @param {?} $event
|
|
2970
3041
|
* @return {?}
|
|
2971
3042
|
*/
|
|
2972
|
-
function ($event) {
|
|
2973
|
-
|
|
2974
|
-
this.
|
|
3043
|
+
function (routerOutlet, $event) {
|
|
3044
|
+
var _this = this;
|
|
3045
|
+
this._inOutletUpdate.whileTrue((/**
|
|
3046
|
+
* @return {?}
|
|
3047
|
+
*/
|
|
3048
|
+
function () {
|
|
3049
|
+
_this._currentPlace = null;
|
|
3050
|
+
_this._activatedRouteModel.value = null;
|
|
3051
|
+
_this._placeDefinition.value = null;
|
|
3052
|
+
}));
|
|
2975
3053
|
};
|
|
2976
3054
|
/**
|
|
2977
3055
|
* @param {?} outlet
|
|
@@ -2991,45 +3069,54 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
2991
3069
|
* @return {?}
|
|
2992
3070
|
*/
|
|
2993
3071
|
function () {
|
|
2994
|
-
if (this.
|
|
2995
|
-
this.
|
|
3072
|
+
if (this._currentPlace) {
|
|
3073
|
+
this._currentPlace.onPlaceReady();
|
|
2996
3074
|
}
|
|
2997
3075
|
};
|
|
2998
|
-
// @Trace()
|
|
2999
|
-
// @Trace()
|
|
3000
3076
|
/**
|
|
3001
|
-
* @
|
|
3002
|
-
* @param {?}
|
|
3077
|
+
* @param {?} next
|
|
3078
|
+
* @param {?} previous
|
|
3079
|
+
* @return {?}
|
|
3080
|
+
*/
|
|
3081
|
+
PlaceOutletComponent.prototype.pushChangesToRoute = /**
|
|
3082
|
+
* @param {?} next
|
|
3083
|
+
* @param {?} previous
|
|
3003
3084
|
* @return {?}
|
|
3004
3085
|
*/
|
|
3005
|
-
|
|
3006
|
-
|
|
3086
|
+
function (next, previous) {
|
|
3087
|
+
/** @type {?} */
|
|
3088
|
+
var activatedRoute = this._activatedRouteModel.value;
|
|
3089
|
+
this.router.pushParameterChangesToRoute(activatedRoute, previous, next);
|
|
3090
|
+
};
|
|
3007
3091
|
/**
|
|
3008
|
-
* @
|
|
3009
|
-
* @param {?}
|
|
3092
|
+
* @param {?} snapshot
|
|
3093
|
+
* @param {?} callback
|
|
3010
3094
|
* @return {?}
|
|
3011
3095
|
*/
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3096
|
+
PlaceOutletComponent.prototype.sanitise = /**
|
|
3097
|
+
* @param {?} snapshot
|
|
3098
|
+
* @param {?} callback
|
|
3099
|
+
* @return {?}
|
|
3100
|
+
*/
|
|
3101
|
+
function (snapshot, callback) {
|
|
3102
|
+
return snapshot;
|
|
3016
3103
|
};
|
|
3017
3104
|
PlaceOutletComponent.decorators = [
|
|
3018
3105
|
{ type: Component, args: [{
|
|
3019
3106
|
selector: 'angular-ui-powerups-place-outlet',
|
|
3020
|
-
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",
|
|
3107
|
+
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",
|
|
3021
3108
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
3022
3109
|
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}"]
|
|
3023
3110
|
}] }
|
|
3024
3111
|
];
|
|
3025
3112
|
/** @nocollapse */
|
|
3026
3113
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
3027
|
-
{ type:
|
|
3028
|
-
{ type:
|
|
3114
|
+
{ type: PlaceRouter },
|
|
3115
|
+
{ type: PlaceHistory }
|
|
3029
3116
|
]; };
|
|
3030
3117
|
PlaceOutletComponent.propDecorators = {
|
|
3031
3118
|
animate: [{ type: Input }],
|
|
3032
|
-
|
|
3119
|
+
routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }]
|
|
3033
3120
|
};
|
|
3034
3121
|
return PlaceOutletComponent;
|
|
3035
3122
|
}(DisposableComponent));
|
|
@@ -3037,42 +3124,54 @@ if (false) {
|
|
|
3037
3124
|
/** @type {?} */
|
|
3038
3125
|
PlaceOutletComponent.prototype.animate;
|
|
3039
3126
|
/** @type {?} */
|
|
3040
|
-
PlaceOutletComponent.prototype.
|
|
3127
|
+
PlaceOutletComponent.prototype.routerOut;
|
|
3128
|
+
/**
|
|
3129
|
+
* @type {?}
|
|
3130
|
+
* @private
|
|
3131
|
+
*/
|
|
3132
|
+
PlaceOutletComponent.prototype._currentPlace;
|
|
3133
|
+
/**
|
|
3134
|
+
* @type {?}
|
|
3135
|
+
* @private
|
|
3136
|
+
*/
|
|
3137
|
+
PlaceOutletComponent.prototype._incomingRouteChange;
|
|
3041
3138
|
/**
|
|
3042
3139
|
* @type {?}
|
|
3043
3140
|
* @private
|
|
3044
3141
|
*/
|
|
3045
|
-
PlaceOutletComponent.prototype.
|
|
3142
|
+
PlaceOutletComponent.prototype._inOutletUpdate;
|
|
3046
3143
|
/**
|
|
3047
3144
|
* @type {?}
|
|
3048
3145
|
* @private
|
|
3049
3146
|
*/
|
|
3050
|
-
PlaceOutletComponent.prototype.
|
|
3147
|
+
PlaceOutletComponent.prototype._activatedRouteModel;
|
|
3051
3148
|
/**
|
|
3052
3149
|
* @type {?}
|
|
3053
3150
|
* @private
|
|
3054
3151
|
*/
|
|
3055
|
-
PlaceOutletComponent.prototype.
|
|
3152
|
+
PlaceOutletComponent.prototype._placeDefinition;
|
|
3056
3153
|
/**
|
|
3057
3154
|
* @type {?}
|
|
3058
3155
|
* @private
|
|
3059
3156
|
*/
|
|
3060
|
-
PlaceOutletComponent.prototype.
|
|
3157
|
+
PlaceOutletComponent.prototype._paramMap;
|
|
3158
|
+
/** @type {?} */
|
|
3159
|
+
PlaceOutletComponent.prototype._resolvedParameters;
|
|
3061
3160
|
/**
|
|
3062
3161
|
* @type {?}
|
|
3063
3162
|
* @private
|
|
3064
3163
|
*/
|
|
3065
|
-
PlaceOutletComponent.prototype.
|
|
3164
|
+
PlaceOutletComponent.prototype.placeConfigured;
|
|
3066
3165
|
/**
|
|
3067
3166
|
* @type {?}
|
|
3068
3167
|
* @private
|
|
3069
3168
|
*/
|
|
3070
|
-
PlaceOutletComponent.prototype.
|
|
3169
|
+
PlaceOutletComponent.prototype.router;
|
|
3071
3170
|
/**
|
|
3072
3171
|
* @type {?}
|
|
3073
3172
|
* @private
|
|
3074
3173
|
*/
|
|
3075
|
-
PlaceOutletComponent.prototype.
|
|
3174
|
+
PlaceOutletComponent.prototype.placeHistory;
|
|
3076
3175
|
}
|
|
3077
3176
|
|
|
3078
3177
|
/**
|
|
@@ -3130,9 +3229,7 @@ var PlaceModule = /** @class */ (function () {
|
|
|
3130
3229
|
TabbedPlaceNavigationComponent,
|
|
3131
3230
|
ListPlaceNavComponent
|
|
3132
3231
|
],
|
|
3133
|
-
providers: [
|
|
3134
|
-
PlaceService
|
|
3135
|
-
]
|
|
3232
|
+
providers: []
|
|
3136
3233
|
},] }
|
|
3137
3234
|
];
|
|
3138
3235
|
return PlaceModule;
|
|
@@ -3571,39 +3668,6 @@ if (false) {
|
|
|
3571
3668
|
NavItem.prototype.tooltip = function () { };
|
|
3572
3669
|
}
|
|
3573
3670
|
|
|
3574
|
-
/**
|
|
3575
|
-
* @fileoverview added by tsickle
|
|
3576
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3577
|
-
*/
|
|
3578
|
-
/**
|
|
3579
|
-
* @record
|
|
3580
|
-
*/
|
|
3581
|
-
function PlaceComponentLike() { }
|
|
3582
|
-
if (false) {
|
|
3583
|
-
/** @type {?} */
|
|
3584
|
-
PlaceComponentLike.prototype.activatedRoute;
|
|
3585
|
-
/**
|
|
3586
|
-
* @return {?}
|
|
3587
|
-
*/
|
|
3588
|
-
PlaceComponentLike.prototype.onPlaceReady = function () { };
|
|
3589
|
-
}
|
|
3590
|
-
|
|
3591
|
-
/**
|
|
3592
|
-
* @fileoverview added by tsickle
|
|
3593
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3594
|
-
*/
|
|
3595
|
-
/**
|
|
3596
|
-
* @record
|
|
3597
|
-
*/
|
|
3598
|
-
function PlaceUpdatesService() { }
|
|
3599
|
-
if (false) {
|
|
3600
|
-
/**
|
|
3601
|
-
* @param {?} params
|
|
3602
|
-
* @return {?}
|
|
3603
|
-
*/
|
|
3604
|
-
PlaceUpdatesService.prototype.notifyRouteParametersChanged = function (params) { };
|
|
3605
|
-
}
|
|
3606
|
-
|
|
3607
3671
|
/**
|
|
3608
3672
|
* @fileoverview added by tsickle
|
|
3609
3673
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3618,12 +3682,37 @@ function Place(options) {
|
|
|
3618
3682
|
* @return {?}
|
|
3619
3683
|
*/
|
|
3620
3684
|
function (target) {
|
|
3621
|
-
if (
|
|
3685
|
+
if (PlaceComponent.isPlaceComponentConstructor(target)) {
|
|
3686
|
+
PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, isNil(options.authenticate) ? false : options.authenticate, options.order, options.data, PlaceComponent.getRouteParameters(target), (options.children || []).map((/**
|
|
3687
|
+
* @param {?} c
|
|
3688
|
+
* @return {?}
|
|
3689
|
+
*/
|
|
3690
|
+
function (c) { return PlaceComponent.getDefinition(c); }))));
|
|
3691
|
+
}
|
|
3692
|
+
else {
|
|
3622
3693
|
lang.illegalState(target + " must extend PlaceComponent to use the @Place decorator");
|
|
3623
3694
|
}
|
|
3624
|
-
PlaceComponent.injectDefinition((/** @type {?} */ (target)), options);
|
|
3625
3695
|
});
|
|
3626
3696
|
}
|
|
3697
|
+
(function (Place) {
|
|
3698
|
+
/**
|
|
3699
|
+
* @record
|
|
3700
|
+
*/
|
|
3701
|
+
function Options() { }
|
|
3702
|
+
Place.Options = Options;
|
|
3703
|
+
if (false) {
|
|
3704
|
+
/** @type {?} */
|
|
3705
|
+
Options.prototype.path;
|
|
3706
|
+
/** @type {?} */
|
|
3707
|
+
Options.prototype.order;
|
|
3708
|
+
/** @type {?|undefined} */
|
|
3709
|
+
Options.prototype.data;
|
|
3710
|
+
/** @type {?|undefined} */
|
|
3711
|
+
Options.prototype.authenticate;
|
|
3712
|
+
/** @type {?|undefined} */
|
|
3713
|
+
Options.prototype.children;
|
|
3714
|
+
}
|
|
3715
|
+
})(Place || (Place = {}));
|
|
3627
3716
|
|
|
3628
3717
|
/**
|
|
3629
3718
|
* @fileoverview added by tsickle
|
|
@@ -3674,14 +3763,16 @@ var LeavePlaceGuard = /** @class */ (function () {
|
|
|
3674
3763
|
// HACK: this will break with child routes...
|
|
3675
3764
|
/** @type {?} */
|
|
3676
3765
|
var path = "/" + component.placeDefinition.path;
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3766
|
+
// let thisTree = this.router.parseUrl(currentState.url);
|
|
3767
|
+
// let nextTree = this.router.parseUrl(nextState.url);
|
|
3768
|
+
// console.log({
|
|
3769
|
+
// placePath: path,
|
|
3770
|
+
// currentRoute: currentRoute.toString(),
|
|
3771
|
+
// currentStateUrl: currentState.url,
|
|
3772
|
+
// nextStateUrl: nextState.url,
|
|
3773
|
+
// currentStateUrlTree: thisTree.root.children[PRIMARY_OUTLET].segments,
|
|
3774
|
+
// nextStateUrlTree: nextTree.root.children[PRIMARY_OUTLET].segments
|
|
3775
|
+
// });
|
|
3685
3776
|
// nextState is the full path...
|
|
3686
3777
|
if (!nextState.url.startsWith(path)) {
|
|
3687
3778
|
return component.canDeactivate();
|
|
@@ -3721,36 +3812,43 @@ if (false) {
|
|
|
3721
3812
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3722
3813
|
*/
|
|
3723
3814
|
var PlaceRouteGuard = /** @class */ (function () {
|
|
3724
|
-
function PlaceRouteGuard(
|
|
3725
|
-
this.
|
|
3726
|
-
this.
|
|
3815
|
+
function PlaceRouteGuard(placeRouter, injector) {
|
|
3816
|
+
this.placeRouter = placeRouter;
|
|
3817
|
+
this.injector = injector;
|
|
3727
3818
|
}
|
|
3728
3819
|
/**
|
|
3729
|
-
* @param {?}
|
|
3820
|
+
* @param {?} activatedRoute
|
|
3730
3821
|
* @param {?} state
|
|
3731
3822
|
* @return {?}
|
|
3732
3823
|
*/
|
|
3733
3824
|
PlaceRouteGuard.prototype.canActivate = /**
|
|
3734
|
-
* @param {?}
|
|
3825
|
+
* @param {?} activatedRoute
|
|
3735
3826
|
* @param {?} state
|
|
3736
3827
|
* @return {?}
|
|
3737
3828
|
*/
|
|
3738
|
-
function (
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3829
|
+
function (activatedRoute, state) {
|
|
3830
|
+
var _this = this;
|
|
3831
|
+
if (PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) {
|
|
3832
|
+
/** @type {?} */
|
|
3833
|
+
var placeDefinition = PlaceComponent.getDefinition(activatedRoute.component);
|
|
3834
|
+
/** @type {?} */
|
|
3835
|
+
var snapshot_1 = ParameterSnapshot.create(placeDefinition, activatedRoute.paramMap);
|
|
3836
|
+
return snapshot_1.sanitise(this.injector).then((/**
|
|
3837
|
+
* @param {?} sanitised
|
|
3838
|
+
* @return {?}
|
|
3839
|
+
*/
|
|
3840
|
+
function (sanitised) {
|
|
3841
|
+
if (sanitised.hasChanged(snapshot_1)) {
|
|
3842
|
+
return _this.placeRouter.createUrlTree(activatedRoute, snapshot_1, sanitised);
|
|
3843
|
+
}
|
|
3844
|
+
else {
|
|
3845
|
+
return true;
|
|
3846
|
+
}
|
|
3847
|
+
}));
|
|
3848
|
+
}
|
|
3849
|
+
else {
|
|
3850
|
+
return lang.illegalState("expected component to be an instance of PlaceComponent, got " + activatedRoute.component);
|
|
3851
|
+
}
|
|
3754
3852
|
};
|
|
3755
3853
|
PlaceRouteGuard.decorators = [
|
|
3756
3854
|
{ type: Injectable, args: [{
|
|
@@ -3759,10 +3857,10 @@ var PlaceRouteGuard = /** @class */ (function () {
|
|
|
3759
3857
|
];
|
|
3760
3858
|
/** @nocollapse */
|
|
3761
3859
|
PlaceRouteGuard.ctorParameters = function () { return [
|
|
3762
|
-
{ type:
|
|
3763
|
-
{ type:
|
|
3860
|
+
{ type: PlaceRouter },
|
|
3861
|
+
{ type: Injector }
|
|
3764
3862
|
]; };
|
|
3765
|
-
/** @nocollapse */ PlaceRouteGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(ɵɵinject(
|
|
3863
|
+
/** @nocollapse */ PlaceRouteGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(ɵɵinject(PlaceRouter), ɵɵinject(INJECTOR)); }, token: PlaceRouteGuard, providedIn: "root" });
|
|
3766
3864
|
return PlaceRouteGuard;
|
|
3767
3865
|
}());
|
|
3768
3866
|
if (false) {
|
|
@@ -3770,12 +3868,12 @@ if (false) {
|
|
|
3770
3868
|
* @type {?}
|
|
3771
3869
|
* @private
|
|
3772
3870
|
*/
|
|
3773
|
-
PlaceRouteGuard.prototype.
|
|
3871
|
+
PlaceRouteGuard.prototype.placeRouter;
|
|
3774
3872
|
/**
|
|
3775
3873
|
* @type {?}
|
|
3776
3874
|
* @private
|
|
3777
3875
|
*/
|
|
3778
|
-
PlaceRouteGuard.prototype.
|
|
3876
|
+
PlaceRouteGuard.prototype.injector;
|
|
3779
3877
|
}
|
|
3780
3878
|
|
|
3781
3879
|
/**
|
|
@@ -3786,11 +3884,10 @@ if (false) {
|
|
|
3786
3884
|
* @template T, S
|
|
3787
3885
|
*/
|
|
3788
3886
|
var DefaultParameterSanitiser = /** @class */ (function () {
|
|
3789
|
-
function DefaultParameterSanitiser(def,
|
|
3887
|
+
function DefaultParameterSanitiser(def, remember, defaultValue) {
|
|
3790
3888
|
this.def = def;
|
|
3791
|
-
this.
|
|
3792
|
-
this.
|
|
3793
|
-
this.defaultValue = isNil(options.defaultValue) ? null : options.defaultValue;
|
|
3889
|
+
this.remember = remember;
|
|
3890
|
+
this.defaultValue = defaultValue;
|
|
3794
3891
|
}
|
|
3795
3892
|
/**
|
|
3796
3893
|
* @param {?} value
|
|
@@ -3807,7 +3904,7 @@ var DefaultParameterSanitiser = /** @class */ (function () {
|
|
|
3807
3904
|
if (this.remember) {
|
|
3808
3905
|
// value = null;
|
|
3809
3906
|
}
|
|
3810
|
-
return this.isBlank(value) && !isNil(this.defaultValue) ? this.defaultValue : value;
|
|
3907
|
+
return this.isBlank(value) && !___default.isNil(this.defaultValue) ? this.defaultValue : value;
|
|
3811
3908
|
}
|
|
3812
3909
|
else {
|
|
3813
3910
|
return value;
|
|
@@ -3825,8 +3922,8 @@ var DefaultParameterSanitiser = /** @class */ (function () {
|
|
|
3825
3922
|
*/
|
|
3826
3923
|
function (value) {
|
|
3827
3924
|
/** @type {?} */
|
|
3828
|
-
var isNil
|
|
3829
|
-
return this.def.isArray ? !isNil
|
|
3925
|
+
var isNil = ___default.isNil(value);
|
|
3926
|
+
return this.def.isArray ? !isNil || value['length'] < 1 : isNil;
|
|
3830
3927
|
};
|
|
3831
3928
|
__decorate([
|
|
3832
3929
|
Trace(),
|
|
@@ -3841,22 +3938,11 @@ if (false) {
|
|
|
3841
3938
|
* @type {?}
|
|
3842
3939
|
* @private
|
|
3843
3940
|
*/
|
|
3941
|
+
DefaultParameterSanitiser.prototype.def;
|
|
3942
|
+
/** @type {?} */
|
|
3844
3943
|
DefaultParameterSanitiser.prototype.remember;
|
|
3845
|
-
/**
|
|
3846
|
-
* @type {?}
|
|
3847
|
-
* @private
|
|
3848
|
-
*/
|
|
3944
|
+
/** @type {?} */
|
|
3849
3945
|
DefaultParameterSanitiser.prototype.defaultValue;
|
|
3850
|
-
/**
|
|
3851
|
-
* @type {?}
|
|
3852
|
-
* @private
|
|
3853
|
-
*/
|
|
3854
|
-
DefaultParameterSanitiser.prototype.def;
|
|
3855
|
-
/**
|
|
3856
|
-
* @type {?}
|
|
3857
|
-
* @private
|
|
3858
|
-
*/
|
|
3859
|
-
DefaultParameterSanitiser.prototype.placeService;
|
|
3860
3946
|
}
|
|
3861
3947
|
|
|
3862
3948
|
/**
|
|
@@ -3890,8 +3976,6 @@ if (false) {
|
|
|
3890
3976
|
ParameterOptions.prototype.remember;
|
|
3891
3977
|
/** @type {?|undefined} */
|
|
3892
3978
|
ParameterOptions.prototype.defaultValue;
|
|
3893
|
-
/** @type {?|undefined} */
|
|
3894
|
-
ParameterOptions.prototype.sanitiser;
|
|
3895
3979
|
}
|
|
3896
3980
|
/**
|
|
3897
3981
|
* @record
|
|
@@ -3907,8 +3991,6 @@ if (false) {
|
|
|
3907
3991
|
ListParameterOptions.prototype.remember;
|
|
3908
3992
|
/** @type {?|undefined} */
|
|
3909
3993
|
ListParameterOptions.prototype.defaultValue;
|
|
3910
|
-
/** @type {?|undefined} */
|
|
3911
|
-
ListParameterOptions.prototype.sanitiser;
|
|
3912
3994
|
}
|
|
3913
3995
|
/**
|
|
3914
3996
|
* @template T
|
|
@@ -3917,7 +3999,6 @@ if (false) {
|
|
|
3917
3999
|
* @return {?}
|
|
3918
4000
|
*/
|
|
3919
4001
|
function RouteId(type, options) {
|
|
3920
|
-
// assert.isTruthy(type.isValid());
|
|
3921
4002
|
return (/**
|
|
3922
4003
|
* @param {?} prototype
|
|
3923
4004
|
* @param {?} propertyKey
|
|
@@ -3925,7 +4006,7 @@ function RouteId(type, options) {
|
|
|
3925
4006
|
*/
|
|
3926
4007
|
function (prototype, propertyKey) {
|
|
3927
4008
|
/** @type {?} */
|
|
3928
|
-
var param =
|
|
4009
|
+
var param = new ParameterDefinition.RouteId(propertyKey.toString(), type, options);
|
|
3929
4010
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
3930
4011
|
UseDelegate()(prototype, propertyKey);
|
|
3931
4012
|
});
|
|
@@ -3937,7 +4018,6 @@ function RouteId(type, options) {
|
|
|
3937
4018
|
* @return {?}
|
|
3938
4019
|
*/
|
|
3939
4020
|
function RouteParameter(type, options) {
|
|
3940
|
-
// assert.isTruthy(type.isValid());
|
|
3941
4021
|
return (/**
|
|
3942
4022
|
* @param {?} prototype
|
|
3943
4023
|
* @param {?} propertyKey
|
|
@@ -3945,7 +4025,7 @@ function RouteParameter(type, options) {
|
|
|
3945
4025
|
*/
|
|
3946
4026
|
function (prototype, propertyKey) {
|
|
3947
4027
|
/** @type {?} */
|
|
3948
|
-
var param =
|
|
4028
|
+
var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), type, options);
|
|
3949
4029
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
3950
4030
|
UseDelegate()(prototype, propertyKey);
|
|
3951
4031
|
});
|
|
@@ -3957,7 +4037,6 @@ function RouteParameter(type, options) {
|
|
|
3957
4037
|
* @return {?}
|
|
3958
4038
|
*/
|
|
3959
4039
|
function RouteParameterList(elementType, options) {
|
|
3960
|
-
// assert.isTruthy(type.isValid());
|
|
3961
4040
|
return (/**
|
|
3962
4041
|
* @param {?} prototype
|
|
3963
4042
|
* @param {?} propertyKey
|
|
@@ -3965,82 +4044,11 @@ function RouteParameterList(elementType, options) {
|
|
|
3965
4044
|
*/
|
|
3966
4045
|
function (prototype, propertyKey) {
|
|
3967
4046
|
/** @type {?} */
|
|
3968
|
-
var param =
|
|
4047
|
+
var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), elementType, options);
|
|
3969
4048
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
3970
4049
|
UseDelegate()(prototype, propertyKey);
|
|
3971
4050
|
});
|
|
3972
4051
|
}
|
|
3973
|
-
/**
|
|
3974
|
-
* @template T
|
|
3975
|
-
* @param {?} propertyName
|
|
3976
|
-
* @param {?} type
|
|
3977
|
-
* @param {?} options
|
|
3978
|
-
* @param {?} routeId
|
|
3979
|
-
* @return {?}
|
|
3980
|
-
*/
|
|
3981
|
-
function createDefinition(propertyName, type, options, routeId) {
|
|
3982
|
-
/** @type {?} */
|
|
3983
|
-
var opts = Opts.get(options);
|
|
3984
|
-
/** @type {?} */
|
|
3985
|
-
var propertyNameAsString = assert.notNil(propertyName).toString();
|
|
3986
|
-
/** @type {?} */
|
|
3987
|
-
var def = {
|
|
3988
|
-
name: opts.getOptional('as', propertyNameAsString),
|
|
3989
|
-
propertyName: propertyNameAsString,
|
|
3990
|
-
type: assert.notNil(type),
|
|
3991
|
-
sanitiser: opts.getOptional('sanitiser', null),
|
|
3992
|
-
isRouteId: routeId,
|
|
3993
|
-
isArray: false
|
|
3994
|
-
};
|
|
3995
|
-
return def;
|
|
3996
|
-
}
|
|
3997
|
-
/**
|
|
3998
|
-
* @template T
|
|
3999
|
-
* @param {?} propertyName
|
|
4000
|
-
* @param {?} type
|
|
4001
|
-
* @param {?} options
|
|
4002
|
-
* @return {?}
|
|
4003
|
-
*/
|
|
4004
|
-
function createArrayDefinition(propertyName, type, options) {
|
|
4005
|
-
/** @type {?} */
|
|
4006
|
-
var opts = Opts.get(options);
|
|
4007
|
-
/** @type {?} */
|
|
4008
|
-
var propertyNameAsString = assert.notNil(propertyName).toString();
|
|
4009
|
-
/** @type {?} */
|
|
4010
|
-
var def = {
|
|
4011
|
-
name: opts.getOptional('as', propertyNameAsString),
|
|
4012
|
-
propertyName: propertyNameAsString,
|
|
4013
|
-
type: assert.notNil(type),
|
|
4014
|
-
sanitiser: opts.getOptional('sanitiser', null),
|
|
4015
|
-
isRouteId: false,
|
|
4016
|
-
isArray: true
|
|
4017
|
-
};
|
|
4018
|
-
return def;
|
|
4019
|
-
}
|
|
4020
|
-
|
|
4021
|
-
/**
|
|
4022
|
-
* @fileoverview added by tsickle
|
|
4023
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4024
|
-
*/
|
|
4025
|
-
/**
|
|
4026
|
-
* @record
|
|
4027
|
-
* @template T, S
|
|
4028
|
-
*/
|
|
4029
|
-
function ParameterDefinition() { }
|
|
4030
|
-
if (false) {
|
|
4031
|
-
/** @type {?} */
|
|
4032
|
-
ParameterDefinition.prototype.name;
|
|
4033
|
-
/** @type {?} */
|
|
4034
|
-
ParameterDefinition.prototype.propertyName;
|
|
4035
|
-
/** @type {?} */
|
|
4036
|
-
ParameterDefinition.prototype.type;
|
|
4037
|
-
/** @type {?} */
|
|
4038
|
-
ParameterDefinition.prototype.sanitiser;
|
|
4039
|
-
/** @type {?} */
|
|
4040
|
-
ParameterDefinition.prototype.isRouteId;
|
|
4041
|
-
/** @type {?} */
|
|
4042
|
-
ParameterDefinition.prototype.isArray;
|
|
4043
|
-
}
|
|
4044
4052
|
|
|
4045
4053
|
/**
|
|
4046
4054
|
* @fileoverview added by tsickle
|
|
@@ -4059,20 +4067,6 @@ if (false) {
|
|
|
4059
4067
|
*/
|
|
4060
4068
|
ParameterSanitiser.prototype.sanitise = function (value, visit) { };
|
|
4061
4069
|
}
|
|
4062
|
-
(function (ParameterSanitiser) {
|
|
4063
|
-
/**
|
|
4064
|
-
* @record
|
|
4065
|
-
* @template T
|
|
4066
|
-
*/
|
|
4067
|
-
function Options() { }
|
|
4068
|
-
ParameterSanitiser.Options = Options;
|
|
4069
|
-
if (false) {
|
|
4070
|
-
/** @type {?|undefined} */
|
|
4071
|
-
Options.prototype.remember;
|
|
4072
|
-
/** @type {?|undefined} */
|
|
4073
|
-
Options.prototype.defaultValue;
|
|
4074
|
-
}
|
|
4075
|
-
})(ParameterSanitiser || (ParameterSanitiser = {}));
|
|
4076
4070
|
|
|
4077
4071
|
/**
|
|
4078
4072
|
* @fileoverview added by tsickle
|
|
@@ -4131,7 +4125,7 @@ var ParameterType;
|
|
|
4131
4125
|
* @return {?}
|
|
4132
4126
|
*/
|
|
4133
4127
|
function (value) {
|
|
4134
|
-
return isNil(value) || isEmpty(value) ? null : +value;
|
|
4128
|
+
return ___default.isNil(value) || ___default.isEmpty(value) ? null : +value;
|
|
4135
4129
|
};
|
|
4136
4130
|
return NumberType;
|
|
4137
4131
|
}());
|
|
@@ -4197,7 +4191,7 @@ Sanitiser = /** @class */ (function () {
|
|
|
4197
4191
|
* @return {?}
|
|
4198
4192
|
*/
|
|
4199
4193
|
function () {
|
|
4200
|
-
return !isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
|
|
4194
|
+
return !___default.isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
|
|
4201
4195
|
},
|
|
4202
4196
|
enumerable: true,
|
|
4203
4197
|
configurable: true
|
|
@@ -4299,11 +4293,10 @@ if (false) {
|
|
|
4299
4293
|
Sanitiser.prototype.sanitiser;
|
|
4300
4294
|
}
|
|
4301
4295
|
var RouteParameterSanitiser = /** @class */ (function () {
|
|
4302
|
-
function RouteParameterSanitiser(parameterDefs, snapshot,
|
|
4296
|
+
function RouteParameterSanitiser(parameterDefs, snapshot, injector) {
|
|
4303
4297
|
var _this = this;
|
|
4304
4298
|
this.parameterDefs = parameterDefs;
|
|
4305
4299
|
this.snapshot = snapshot;
|
|
4306
|
-
this.placeService = placeService;
|
|
4307
4300
|
this.injector = injector;
|
|
4308
4301
|
this.parameterSanitisers = [];
|
|
4309
4302
|
/** @type {?} */
|
|
@@ -4396,17 +4389,7 @@ var RouteParameterSanitiser = /** @class */ (function () {
|
|
|
4396
4389
|
* @return {?}
|
|
4397
4390
|
*/
|
|
4398
4391
|
function (def) {
|
|
4399
|
-
|
|
4400
|
-
if (this.isSanitiserContructor(def.sanitiser)) {
|
|
4401
|
-
return this.injector.get(def.sanitiser, new def.sanitiser());
|
|
4402
|
-
}
|
|
4403
|
-
else {
|
|
4404
|
-
return new DefaultParameterSanitiser(def, this.placeService, def.sanitiser);
|
|
4405
|
-
}
|
|
4406
|
-
}
|
|
4407
|
-
else {
|
|
4408
|
-
return null;
|
|
4409
|
-
}
|
|
4392
|
+
return def.getSanitiser(this.injector);
|
|
4410
4393
|
};
|
|
4411
4394
|
/**
|
|
4412
4395
|
* @return {?}
|
|
@@ -4452,12 +4435,12 @@ var RouteParameterSanitiser = /** @class */ (function () {
|
|
|
4452
4435
|
* @return {?}
|
|
4453
4436
|
*/
|
|
4454
4437
|
function (value) {
|
|
4455
|
-
return isFunction(value) && lang.constructorChain((/** @type {?} */ ((/** @type {?} */ (value))))).includes(Sanitiser);
|
|
4438
|
+
return ___default.isFunction(value) && lang.constructorChain((/** @type {?} */ ((/** @type {?} */ (value))))).includes(Sanitiser);
|
|
4456
4439
|
};
|
|
4457
4440
|
__decorate([
|
|
4458
|
-
Memoize(),
|
|
4441
|
+
Memoize$1(),
|
|
4459
4442
|
__metadata("design:type", Function),
|
|
4460
|
-
__metadata("design:paramtypes", [
|
|
4443
|
+
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
4461
4444
|
__metadata("design:returntype", Object)
|
|
4462
4445
|
], RouteParameterSanitiser.prototype, "getSanitiser", null);
|
|
4463
4446
|
__decorate([
|
|
@@ -4484,8 +4467,6 @@ if (false) {
|
|
|
4484
4467
|
/** @type {?} */
|
|
4485
4468
|
RouteParameterSanitiser.prototype.snapshot;
|
|
4486
4469
|
/** @type {?} */
|
|
4487
|
-
RouteParameterSanitiser.prototype.placeService;
|
|
4488
|
-
/** @type {?} */
|
|
4489
4470
|
RouteParameterSanitiser.prototype.injector;
|
|
4490
4471
|
}
|
|
4491
4472
|
(function (Sanitiser) {
|
|
@@ -4627,5 +4608,5 @@ if (false) {
|
|
|
4627
4608
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4628
4609
|
*/
|
|
4629
4610
|
|
|
4630
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DefaultParameterSanitiser, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NumberInputComponent, ParameterSnapshot, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceModule, PlaceOutletComponent, PlaceRouteGuard,
|
|
4611
|
+
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DefaultParameterSanitiser, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NumberInputComponent, ParameterDefinition, ParameterSnapshot, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, RouteParameter, RouteParameterList, RouteParameterSanitiser, Sanitiser, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, leftRightPlaceAnimation, slideDownAndUpAnimation, CommandDirective as ɵa, FocusBindingDirective as ɵb, AlertDialogComponent as ɵba, DialogInteractionService as ɵbc, InteractionContext as ɵbd, DisposableComponent as ɵc, NumberInputComponent as ɵd, AbstractInputComponent as ɵe, StringInputComponent as ɵf, PasswordInputComponent as ɵg, SelectInputComponent as ɵh, PlaceModule as ɵi, EmptyStateComponent as ɵj, BusyOverlayComponent as ɵk, PlaceOutletComponent as ɵl, leftRightPlaceAnimation as ɵm, LEFT_RIGHT_PLACE_ANIMATION as ɵn, PlaceRouter as ɵo, PlaceHistory as ɵp, TabbedPlaceNavigationComponent as ɵq, AbstractPlaceNavigationComponent as ɵr, ListPlaceNavComponent as ɵs, InteractionModule as ɵt, ActivityContainerComponent as ɵu, ActivityOutletComponent as ɵv, ConfirmationDialogComponent as ɵw, AbstractActivity as ɵx, ACTIVITY_DATA as ɵy };
|
|
4631
4612
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|