@coolon/angular-ui-powerups 0.0.32 → 0.0.33
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 +867 -724
- 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.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +2 -2
- package/esm2015/index.js +2 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +33 -4
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +3 -3
- package/esm2015/lib/place/guards/leave-place.guard.js +18 -2
- package/esm2015/lib/place/i-place-component.js +17 -0
- package/esm2015/lib/place/i-place-service.js +16 -0
- package/esm2015/lib/place/index.js +7 -3
- package/esm2015/lib/place/place-component.js +165 -7
- package/esm2015/lib/place/place.decorator.js +7 -87
- package/esm2015/lib/place/place.service.js +47 -8
- package/esm2015/lib/place/route/resolved-parameter.js +16 -0
- package/esm2015/lib/place/route/resolved-route-parameter-snapshot.js +106 -0
- package/esm2015/lib/place/route/route-parameter-bindings.js +14 -158
- package/esm2015/lib/place/route/visit-snapshot.js +7 -0
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +2 -2
- package/esm5/index.js +2 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +40 -4
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +3 -3
- package/esm5/lib/place/guards/leave-place.guard.js +18 -2
- package/esm5/lib/place/i-place-component.js +17 -0
- package/esm5/lib/place/i-place-service.js +16 -0
- package/esm5/lib/place/index.js +7 -3
- package/esm5/lib/place/place-component.js +195 -7
- package/esm5/lib/place/place.decorator.js +7 -97
- package/esm5/lib/place/place.service.js +52 -10
- package/esm5/lib/place/route/resolved-parameter.js +16 -0
- package/esm5/lib/place/route/resolved-route-parameter-snapshot.js +129 -0
- package/esm5/lib/place/route/route-parameter-bindings.js +13 -185
- package/esm5/lib/place/route/visit-snapshot.js +11 -0
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +818 -696
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +863 -722
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -0
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +1 -2
- package/lib/place/i-place-component.d.ts +5 -0
- package/lib/place/i-place-service.d.ts +10 -0
- package/lib/place/index.d.ts +5 -1
- package/lib/place/place-component.d.ts +40 -2
- package/lib/place/place.decorator.d.ts +1 -25
- package/lib/place/place.service.d.ts +13 -2
- package/lib/place/route/resolved-parameter.d.ts +5 -0
- package/lib/place/route/resolved-route-parameter-snapshot.d.ts +12 -0
- package/lib/place/route/route-parameter-bindings.d.ts +3 -4
- package/lib/place/route/visit-snapshot.d.ts +2 -0
- package/package.json +1 -1
- package/esm2015/lib/place/abstract-place-component.js +0 -50
- package/esm5/lib/place/abstract-place-component.js +0 -57
- package/lib/place/abstract-place-component.d.ts +0 -11
|
@@ -5,7 +5,7 @@ import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgress
|
|
|
5
5
|
import { BrowserModule } from '@angular/platform-browser';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
8
|
-
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, assert, UnaryCommand, lang, Dsl, Logger, ListModel, StoreInListModel, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Trace,
|
|
8
|
+
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, assert, UnaryCommand, lang, Dsl, Logger, ListModel, StoreInListModel, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Trace, MutableValueModel, TransactionObserver, Binding, 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';
|
|
@@ -14,12 +14,12 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
14
14
|
import { MatListModule } from '@angular/material/list';
|
|
15
15
|
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
16
16
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { Router, RouterModule, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
18
|
+
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
19
19
|
import { isNil } from 'lodash';
|
|
20
20
|
import 'reflect-metadata';
|
|
21
|
+
import { style, query, group, animate, trigger, transition } from '@angular/animations';
|
|
21
22
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
22
|
-
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
23
23
|
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -1422,214 +1422,338 @@ EmptyStateComponent.ctorParameters = () => [];
|
|
|
1422
1422
|
* @fileoverview added by tsickle
|
|
1423
1423
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1424
1424
|
*/
|
|
1425
|
-
class
|
|
1426
|
-
|
|
1427
|
-
|
|
1425
|
+
class ResolvedRouteParameterSnapshot {
|
|
1426
|
+
/**
|
|
1427
|
+
* @param {?} parameters
|
|
1428
|
+
*/
|
|
1429
|
+
constructor(parameters) {
|
|
1430
|
+
this.parameters = parameters;
|
|
1428
1431
|
}
|
|
1429
1432
|
/**
|
|
1433
|
+
* @template T
|
|
1434
|
+
* @param {?} parameter
|
|
1430
1435
|
* @return {?}
|
|
1431
1436
|
*/
|
|
1432
|
-
get
|
|
1433
|
-
|
|
1437
|
+
get(parameter) {
|
|
1438
|
+
/** @type {?} */
|
|
1439
|
+
const resolved = this.parameters.find((/**
|
|
1440
|
+
* @param {?} p
|
|
1441
|
+
* @return {?}
|
|
1442
|
+
*/
|
|
1443
|
+
p => p.parameterDef === parameter));
|
|
1444
|
+
return resolved ? resolved.resolvedValue : null;
|
|
1434
1445
|
}
|
|
1435
1446
|
/**
|
|
1436
|
-
* @
|
|
1447
|
+
* @template T
|
|
1448
|
+
* @param {?} parameter
|
|
1449
|
+
* @param {?} value
|
|
1437
1450
|
* @return {?}
|
|
1438
1451
|
*/
|
|
1439
|
-
|
|
1440
|
-
this.
|
|
1452
|
+
replace(parameter, value) {
|
|
1453
|
+
return new ResolvedRouteParameterSnapshot(this.parameters.filter((/**
|
|
1454
|
+
* @param {?} p
|
|
1455
|
+
* @return {?}
|
|
1456
|
+
*/
|
|
1457
|
+
p => p.parameterDef !== parameter)).concat({
|
|
1458
|
+
parameterDef: parameter,
|
|
1459
|
+
resolvedValue: value
|
|
1460
|
+
}));
|
|
1441
1461
|
}
|
|
1442
1462
|
/**
|
|
1443
|
-
* @param {?} place
|
|
1444
1463
|
* @return {?}
|
|
1445
1464
|
*/
|
|
1446
|
-
|
|
1447
|
-
|
|
1465
|
+
getFormattedRouteId() {
|
|
1466
|
+
/** @type {?} */
|
|
1467
|
+
const routeIdParam = this.getRouteIdParam();
|
|
1468
|
+
return routeIdParam ? routeIdParam.parameterDef.type.format(routeIdParam.resolvedValue) : null;
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* @private
|
|
1472
|
+
* @return {?}
|
|
1473
|
+
*/
|
|
1474
|
+
getRouteIdParam() {
|
|
1475
|
+
return this.parameters.find((/**
|
|
1476
|
+
* @param {?} p
|
|
1477
|
+
* @return {?}
|
|
1478
|
+
*/
|
|
1479
|
+
p => p.parameterDef.isRouteId));
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* @return {?}
|
|
1483
|
+
*/
|
|
1484
|
+
getFormattedParameters() {
|
|
1485
|
+
/** @type {?} */
|
|
1486
|
+
const params = {};
|
|
1487
|
+
/** @type {?} */
|
|
1488
|
+
const routeIdParam = this.parameters.filter((/**
|
|
1489
|
+
* @param {?} p
|
|
1490
|
+
* @return {?}
|
|
1491
|
+
*/
|
|
1492
|
+
p => !p.parameterDef.isRouteId)).forEach((/**
|
|
1493
|
+
* @param {?} p
|
|
1494
|
+
* @return {?}
|
|
1495
|
+
*/
|
|
1496
|
+
p => {
|
|
1497
|
+
params[p.parameterDef.name] = p.parameterDef.type.format(p.resolvedValue);
|
|
1498
|
+
}));
|
|
1499
|
+
return params;
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* @return {?}
|
|
1503
|
+
*/
|
|
1504
|
+
hasRouteId() {
|
|
1505
|
+
return !!this.getRouteIdParam();
|
|
1448
1506
|
}
|
|
1449
1507
|
}
|
|
1450
|
-
PlaceService.decorators = [
|
|
1451
|
-
{ type: Injectable, args: [{
|
|
1452
|
-
providedIn: 'root'
|
|
1453
|
-
},] }
|
|
1454
|
-
];
|
|
1455
|
-
/** @nocollapse */
|
|
1456
|
-
PlaceService.ctorParameters = () => [];
|
|
1457
|
-
/** @nocollapse */ PlaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(); }, token: PlaceService, providedIn: "root" });
|
|
1458
1508
|
__decorate([
|
|
1459
1509
|
Trace(),
|
|
1460
1510
|
__metadata("design:type", Function),
|
|
1461
|
-
__metadata("design:paramtypes", [
|
|
1511
|
+
__metadata("design:paramtypes", []),
|
|
1462
1512
|
__metadata("design:returntype", void 0)
|
|
1463
|
-
],
|
|
1513
|
+
], ResolvedRouteParameterSnapshot.prototype, "getFormattedRouteId", null);
|
|
1464
1514
|
__decorate([
|
|
1465
1515
|
Trace(),
|
|
1466
1516
|
__metadata("design:type", Function),
|
|
1467
|
-
__metadata("design:paramtypes", [
|
|
1517
|
+
__metadata("design:paramtypes", []),
|
|
1468
1518
|
__metadata("design:returntype", void 0)
|
|
1469
|
-
],
|
|
1519
|
+
], ResolvedRouteParameterSnapshot.prototype, "getFormattedParameters", null);
|
|
1470
1520
|
if (false) {
|
|
1471
|
-
/**
|
|
1472
|
-
|
|
1473
|
-
* @private
|
|
1474
|
-
*/
|
|
1475
|
-
PlaceService.prototype._activePlaces;
|
|
1521
|
+
/** @type {?} */
|
|
1522
|
+
ResolvedRouteParameterSnapshot.prototype.parameters;
|
|
1476
1523
|
}
|
|
1477
1524
|
|
|
1478
1525
|
/**
|
|
1479
1526
|
* @fileoverview added by tsickle
|
|
1480
1527
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1481
1528
|
*/
|
|
1482
|
-
|
|
1483
|
-
/** @type {?} */
|
|
1484
|
-
const animationStartStyle = style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
|
|
1485
|
-
/** @type {?} */
|
|
1486
|
-
const left = [
|
|
1487
|
-
query(':enter, :leave', animationStartStyle, { optional: true }),
|
|
1488
|
-
group([
|
|
1489
|
-
query(':enter', [
|
|
1490
|
-
style({ transform: 'translateX(-100%)' }),
|
|
1491
|
-
animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
|
|
1492
|
-
], {
|
|
1493
|
-
optional: true
|
|
1494
|
-
}),
|
|
1495
|
-
query(':leave', [
|
|
1496
|
-
style({ transform: 'translateX(0%)' }),
|
|
1497
|
-
animate('{{duration}} ease-out', style({ transform: 'translateX(100%)' }))
|
|
1498
|
-
], {
|
|
1499
|
-
optional: true
|
|
1500
|
-
})
|
|
1501
|
-
])
|
|
1502
|
-
];
|
|
1503
|
-
/** @type {?} */
|
|
1504
|
-
const right = [
|
|
1505
|
-
query(':enter, :leave', animationStartStyle, { optional: true }),
|
|
1506
|
-
group([
|
|
1507
|
-
query(':enter', [
|
|
1508
|
-
style({ transform: 'translateX(100%)' }),
|
|
1509
|
-
animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
|
|
1510
|
-
], {
|
|
1511
|
-
optional: true
|
|
1512
|
-
}),
|
|
1513
|
-
query(':leave', [style({ transform: 'translateX(0%)' }), animate('{{duration}} ease-out', style({ transform: 'translateX(-100%)' }))], {
|
|
1514
|
-
optional: true
|
|
1515
|
-
})
|
|
1516
|
-
])
|
|
1517
|
-
];
|
|
1518
|
-
/** @type {?} */
|
|
1519
|
-
const LEFT_RIGHT_PLACE_ANIMATION = trigger('routeAnimations', [
|
|
1520
|
-
transition(':increment', right, { params: { duration: '.3s' } }),
|
|
1521
|
-
transition(':decrement', left, { params: { duration: '.3s' } })
|
|
1522
|
-
]);
|
|
1523
|
-
|
|
1524
|
-
/**
|
|
1525
|
-
* @fileoverview added by tsickle
|
|
1526
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1527
|
-
*/
|
|
1528
|
-
class PlaceOutletComponent {
|
|
1529
|
+
class RouteParameterBindings extends GarbageCollector {
|
|
1529
1530
|
/**
|
|
1531
|
+
* @param {?} component
|
|
1530
1532
|
* @param {?} placeService
|
|
1531
1533
|
*/
|
|
1532
|
-
constructor(placeService) {
|
|
1533
|
-
|
|
1534
|
-
this.
|
|
1534
|
+
constructor(component, placeService) {
|
|
1535
|
+
super();
|
|
1536
|
+
this.component = component;
|
|
1537
|
+
this._incomingRouteChange = new MutableValueModel(false);
|
|
1538
|
+
this.resolvedParameters = new MutableValueModel();
|
|
1539
|
+
const { chain, valueOf, before, when, after, observe } = Dsl.disposeWith(this);
|
|
1540
|
+
this.txo = new TransactionObserver(); //.onEvent(e => console.log(e.toString()));
|
|
1541
|
+
//.onEvent(e => console.log(e.toString()));
|
|
1542
|
+
/** @type {?} */
|
|
1543
|
+
const routeParameterDefs = Klass.get(component).getMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
|
|
1544
|
+
routeParameterDefs.forEach((/**
|
|
1545
|
+
* @param {?} parameter
|
|
1546
|
+
* @return {?}
|
|
1547
|
+
*/
|
|
1548
|
+
parameter => this.installBinding(parameter)));
|
|
1549
|
+
/** @type {?} */
|
|
1550
|
+
const incomingResolvedRouteParameters = observe.valuesFrom(component.activatedRoute.paramMap)
|
|
1551
|
+
.last()
|
|
1552
|
+
.map((/**
|
|
1553
|
+
* @param {?} params
|
|
1554
|
+
* @return {?}
|
|
1555
|
+
*/
|
|
1556
|
+
params => {
|
|
1557
|
+
/** @type {?} */
|
|
1558
|
+
const result = [];
|
|
1559
|
+
routeParameterDefs.forEach((/**
|
|
1560
|
+
* @param {?} parameterDef
|
|
1561
|
+
* @return {?}
|
|
1562
|
+
*/
|
|
1563
|
+
parameterDef => {
|
|
1564
|
+
/** @type {?} */
|
|
1565
|
+
let resolvedValue;
|
|
1566
|
+
if (parameterDef.isArray) {
|
|
1567
|
+
resolvedValue = params.getAll(parameterDef.name).map((/**
|
|
1568
|
+
* @param {?} v
|
|
1569
|
+
* @return {?}
|
|
1570
|
+
*/
|
|
1571
|
+
v => parameterDef.type.parse(v)));
|
|
1572
|
+
}
|
|
1573
|
+
else {
|
|
1574
|
+
resolvedValue = parameterDef.type.parse(params.get(parameterDef.name));
|
|
1575
|
+
}
|
|
1576
|
+
result.push({ parameterDef: parameterDef, resolvedValue: resolvedValue });
|
|
1577
|
+
}));
|
|
1578
|
+
return new ResolvedRouteParameterSnapshot(result);
|
|
1579
|
+
}));
|
|
1580
|
+
incomingResolvedRouteParameters.subscribe((/**
|
|
1581
|
+
* @param {?} resolvedParameters
|
|
1582
|
+
* @return {?}
|
|
1583
|
+
*/
|
|
1584
|
+
resolvedParameters => {
|
|
1585
|
+
this._incomingRouteChange.value = true;
|
|
1586
|
+
this.resolvedParameters.value = resolvedParameters;
|
|
1587
|
+
this._incomingRouteChange.value = false;
|
|
1588
|
+
}));
|
|
1589
|
+
when.valueOf(this.resolvedParameters).changes((/**
|
|
1590
|
+
* @param {?} params
|
|
1591
|
+
* @param {?} previous
|
|
1592
|
+
* @return {?}
|
|
1593
|
+
*/
|
|
1594
|
+
(params, previous) => {
|
|
1595
|
+
placeService.notifyRouteParametersChanged({
|
|
1596
|
+
placeComponent: component,
|
|
1597
|
+
next: params,
|
|
1598
|
+
previous: previous,
|
|
1599
|
+
updateRoute: !this.incomingRouteChange.value // we update the route if it's a component triggered change.
|
|
1600
|
+
});
|
|
1601
|
+
}));
|
|
1602
|
+
this.txo.observe('incomingResolvedRouteParameters', incomingResolvedRouteParameters);
|
|
1603
|
+
this.txo.observe('this.routeIsChanging', this.incomingRouteChange);
|
|
1535
1604
|
}
|
|
1536
1605
|
/**
|
|
1537
1606
|
* @return {?}
|
|
1538
1607
|
*/
|
|
1539
|
-
|
|
1608
|
+
get incomingRouteChange() {
|
|
1609
|
+
return this._incomingRouteChange.readonly;
|
|
1540
1610
|
}
|
|
1541
1611
|
/**
|
|
1542
|
-
* @
|
|
1612
|
+
* @protected
|
|
1613
|
+
* @template T
|
|
1614
|
+
* @param {?} parameter
|
|
1543
1615
|
* @return {?}
|
|
1544
1616
|
*/
|
|
1545
|
-
|
|
1546
|
-
|
|
1617
|
+
installBinding(parameter) {
|
|
1618
|
+
/** @type {?} */
|
|
1619
|
+
const model = this.getModelFor(parameter);
|
|
1620
|
+
// this.txo.observe(parameter.propertyName, model);
|
|
1621
|
+
this.registerDisposable(new Binding(this.resolvedParameters, model, {
|
|
1622
|
+
/**
|
|
1623
|
+
* @param {?} parameters
|
|
1624
|
+
* @return {?}
|
|
1625
|
+
*/
|
|
1626
|
+
toRight(parameters) {
|
|
1627
|
+
return parameters.get(parameter);
|
|
1628
|
+
},
|
|
1629
|
+
/**
|
|
1630
|
+
* @param {?} value
|
|
1631
|
+
* @param {?=} currentParameters
|
|
1632
|
+
* @return {?}
|
|
1633
|
+
*/
|
|
1634
|
+
toLeft(value, currentParameters) {
|
|
1635
|
+
return currentParameters.replace(parameter, value);
|
|
1636
|
+
}
|
|
1637
|
+
}));
|
|
1547
1638
|
}
|
|
1548
1639
|
/**
|
|
1549
|
-
* @
|
|
1640
|
+
* @private
|
|
1641
|
+
* @template T
|
|
1642
|
+
* @param {?} parameter
|
|
1550
1643
|
* @return {?}
|
|
1551
1644
|
*/
|
|
1552
|
-
|
|
1553
|
-
this.
|
|
1645
|
+
getModelFor(parameter) {
|
|
1646
|
+
return this.component[parameter.propertyName];
|
|
1554
1647
|
}
|
|
1648
|
+
}
|
|
1649
|
+
if (false) {
|
|
1650
|
+
/** @type {?} */
|
|
1651
|
+
RouteParameterBindings.prototype._incomingRouteChange;
|
|
1555
1652
|
/**
|
|
1556
|
-
* @
|
|
1557
|
-
* @
|
|
1653
|
+
* @type {?}
|
|
1654
|
+
* @private
|
|
1558
1655
|
*/
|
|
1559
|
-
|
|
1560
|
-
return this.animate && outlet && outlet.activatedRouteData && outlet.activatedRouteData['placeOrder'];
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
PlaceOutletComponent.decorators = [
|
|
1564
|
-
{ type: Component, args: [{
|
|
1565
|
-
selector: 'angular-ui-powerups-place-outlet',
|
|
1566
|
-
template: "<div class=\"router-outlet-container\" [@routeAnimations]=\"getPlaceOrder(routerOutlet)\">\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\">\n </router-outlet>\n</div>\n\n",
|
|
1567
|
-
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
1568
|
-
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}"]
|
|
1569
|
-
}] }
|
|
1570
|
-
];
|
|
1571
|
-
/** @nocollapse */
|
|
1572
|
-
PlaceOutletComponent.ctorParameters = () => [
|
|
1573
|
-
{ type: PlaceService }
|
|
1574
|
-
];
|
|
1575
|
-
PlaceOutletComponent.propDecorators = {
|
|
1576
|
-
animate: [{ type: Input }]
|
|
1577
|
-
};
|
|
1578
|
-
if (false) {
|
|
1579
|
-
/** @type {?} */
|
|
1580
|
-
PlaceOutletComponent.prototype.animate;
|
|
1656
|
+
RouteParameterBindings.prototype.txo;
|
|
1581
1657
|
/**
|
|
1582
1658
|
* @type {?}
|
|
1583
1659
|
* @private
|
|
1584
1660
|
*/
|
|
1585
|
-
|
|
1661
|
+
RouteParameterBindings.prototype.resolvedParameters;
|
|
1662
|
+
/**
|
|
1663
|
+
* @type {?}
|
|
1664
|
+
* @private
|
|
1665
|
+
*/
|
|
1666
|
+
RouteParameterBindings.prototype.component;
|
|
1586
1667
|
}
|
|
1668
|
+
(function (RouteParameterBindings) {
|
|
1669
|
+
RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
1670
|
+
})(RouteParameterBindings || (RouteParameterBindings = {}));
|
|
1587
1671
|
|
|
1588
1672
|
/**
|
|
1589
1673
|
* @fileoverview added by tsickle
|
|
1590
1674
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1591
1675
|
*/
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
* @param {?}
|
|
1676
|
+
// RAKE: making this Symbol(...) broke things.
|
|
1677
|
+
/** @type {?} */
|
|
1678
|
+
const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
1679
|
+
class PlaceComponent extends DisposableComponent {
|
|
1680
|
+
/**
|
|
1681
|
+
* @param {?} activatedRoute
|
|
1682
|
+
* @param {?} placeService
|
|
1683
|
+
*/
|
|
1684
|
+
constructor(activatedRoute, placeService) {
|
|
1685
|
+
super();
|
|
1686
|
+
this.activatedRoute = activatedRoute;
|
|
1687
|
+
this.routeBindingMediator = this.registerDisposable(new RouteParameterBindings(this, placeService));
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1599
1690
|
* @return {?}
|
|
1600
1691
|
*/
|
|
1601
|
-
(
|
|
1602
|
-
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
(function (Place) {
|
|
1692
|
+
get placeConfig() {
|
|
1693
|
+
return PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
1694
|
+
}
|
|
1606
1695
|
/**
|
|
1607
|
-
* @
|
|
1696
|
+
* @param {?=} nextPlace
|
|
1697
|
+
* @param {?=} nextState
|
|
1698
|
+
* @return {?}
|
|
1608
1699
|
*/
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
/** @type {?|undefined} */
|
|
1617
|
-
Options.prototype.data;
|
|
1618
|
-
/** @type {?|undefined} */
|
|
1619
|
-
Options.prototype.authenticate;
|
|
1700
|
+
canDeactivate(nextPlace, nextState) {
|
|
1701
|
+
return true;
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* @return {?}
|
|
1705
|
+
*/
|
|
1706
|
+
onPlaceReady() {
|
|
1620
1707
|
}
|
|
1621
|
-
|
|
1708
|
+
}
|
|
1709
|
+
__decorate([
|
|
1710
|
+
Memoize(),
|
|
1711
|
+
__metadata("design:type", PlaceComponent.Definition),
|
|
1712
|
+
__metadata("design:paramtypes", [])
|
|
1713
|
+
], PlaceComponent.prototype, "placeConfig", null);
|
|
1714
|
+
__decorate([
|
|
1715
|
+
Trace(),
|
|
1716
|
+
__metadata("design:type", Function),
|
|
1717
|
+
__metadata("design:paramtypes", []),
|
|
1718
|
+
__metadata("design:returntype", void 0)
|
|
1719
|
+
], PlaceComponent.prototype, "onPlaceReady", null);
|
|
1720
|
+
if (false) {
|
|
1721
|
+
/**
|
|
1722
|
+
* @type {?}
|
|
1723
|
+
* @private
|
|
1724
|
+
*/
|
|
1725
|
+
PlaceComponent.prototype.routeBindingMediator;
|
|
1726
|
+
/** @type {?} */
|
|
1727
|
+
PlaceComponent.prototype.activatedRoute;
|
|
1728
|
+
}
|
|
1729
|
+
(function (PlaceComponent) {
|
|
1730
|
+
class Definition {
|
|
1622
1731
|
/**
|
|
1623
|
-
* @param {?}
|
|
1732
|
+
* @param {?} component
|
|
1624
1733
|
* @param {?} options
|
|
1625
1734
|
*/
|
|
1626
|
-
constructor(
|
|
1735
|
+
constructor(component, options) {
|
|
1736
|
+
this.component = component;
|
|
1627
1737
|
assert.notNil(options);
|
|
1628
1738
|
this.path = options.path;
|
|
1629
1739
|
this.order = options.order;
|
|
1630
1740
|
this.data = options.data;
|
|
1631
1741
|
this.authenticate = isNil(options.authenticate) || options.authenticate;
|
|
1632
1742
|
}
|
|
1743
|
+
/**
|
|
1744
|
+
* @param {?} construcable
|
|
1745
|
+
* @return {?}
|
|
1746
|
+
*/
|
|
1747
|
+
isDescriptorForType(construcable) {
|
|
1748
|
+
return lang.constructorChain(construcable).includes(PlaceComponent);
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* @param {?} placeComponent
|
|
1752
|
+
* @return {?}
|
|
1753
|
+
*/
|
|
1754
|
+
isDescriptorFor(placeComponent) {
|
|
1755
|
+
return placeComponent.constructor === this.component;
|
|
1756
|
+
}
|
|
1633
1757
|
/**
|
|
1634
1758
|
* @template T
|
|
1635
1759
|
* @param {?} key
|
|
@@ -1662,133 +1786,390 @@ function Place(options) {
|
|
|
1662
1786
|
}
|
|
1663
1787
|
}
|
|
1664
1788
|
}
|
|
1665
|
-
|
|
1789
|
+
PlaceComponent.Definition = Definition;
|
|
1666
1790
|
if (false) {
|
|
1667
1791
|
/** @type {?} */
|
|
1668
|
-
|
|
1792
|
+
Definition.prototype.path;
|
|
1793
|
+
/** @type {?} */
|
|
1794
|
+
Definition.prototype.authenticate;
|
|
1795
|
+
/** @type {?} */
|
|
1796
|
+
Definition.prototype.order;
|
|
1797
|
+
/** @type {?} */
|
|
1798
|
+
Definition.prototype.data;
|
|
1669
1799
|
/** @type {?} */
|
|
1670
|
-
|
|
1800
|
+
Definition.prototype.component;
|
|
1801
|
+
}
|
|
1802
|
+
/**
|
|
1803
|
+
* @record
|
|
1804
|
+
*/
|
|
1805
|
+
function Options() { }
|
|
1806
|
+
PlaceComponent.Options = Options;
|
|
1807
|
+
if (false) {
|
|
1671
1808
|
/** @type {?} */
|
|
1672
|
-
|
|
1809
|
+
Options.prototype.path;
|
|
1673
1810
|
/** @type {?} */
|
|
1674
|
-
|
|
1811
|
+
Options.prototype.order;
|
|
1812
|
+
/** @type {?|undefined} */
|
|
1813
|
+
Options.prototype.data;
|
|
1814
|
+
/** @type {?|undefined} */
|
|
1815
|
+
Options.prototype.authenticate;
|
|
1675
1816
|
}
|
|
1676
1817
|
/**
|
|
1677
1818
|
* @param {?} klass
|
|
1678
1819
|
* @return {?}
|
|
1679
1820
|
*/
|
|
1680
|
-
function
|
|
1821
|
+
function getDefinition(klass) {
|
|
1681
1822
|
/** @type {?} */
|
|
1682
|
-
const placeOptions = Reflect.getMetadata(
|
|
1683
|
-
return new
|
|
1823
|
+
const placeOptions = Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
1824
|
+
return new Definition(klass, placeOptions);
|
|
1684
1825
|
}
|
|
1685
|
-
|
|
1686
|
-
|
|
1826
|
+
PlaceComponent.getDefinition = getDefinition;
|
|
1827
|
+
/**
|
|
1828
|
+
* @param {?} klass
|
|
1829
|
+
* @param {?} options
|
|
1830
|
+
* @return {?}
|
|
1831
|
+
*/
|
|
1832
|
+
function injectDefinition(klass, options) {
|
|
1833
|
+
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, options, klass);
|
|
1834
|
+
}
|
|
1835
|
+
PlaceComponent.injectDefinition = injectDefinition;
|
|
1836
|
+
})(PlaceComponent || (PlaceComponent = {}));
|
|
1687
1837
|
|
|
1688
1838
|
/**
|
|
1689
1839
|
* @fileoverview added by tsickle
|
|
1690
1840
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1691
1841
|
*/
|
|
1692
|
-
class
|
|
1693
|
-
|
|
1842
|
+
class PlaceService extends GarbageCollector {
|
|
1843
|
+
/**
|
|
1844
|
+
* @param {?} router
|
|
1845
|
+
*/
|
|
1846
|
+
constructor(router) {
|
|
1694
1847
|
super();
|
|
1695
|
-
|
|
1696
|
-
this.
|
|
1697
|
-
* @param {?} c
|
|
1698
|
-
* @return {?}
|
|
1699
|
-
*/
|
|
1700
|
-
c => Place.getDescriptor(c))).sortBy('order');
|
|
1848
|
+
this.router = router;
|
|
1849
|
+
this._activePlaces = new MutableListModel();
|
|
1701
1850
|
}
|
|
1702
1851
|
/**
|
|
1703
1852
|
* @return {?}
|
|
1704
1853
|
*/
|
|
1705
|
-
|
|
1854
|
+
get activePlaces() {
|
|
1855
|
+
return this._activePlaces.readonly;
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* @param {?} place
|
|
1859
|
+
* @return {?}
|
|
1860
|
+
*/
|
|
1861
|
+
onActivate(place) {
|
|
1862
|
+
this._activePlaces.push(place);
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
* @param {?} place
|
|
1866
|
+
* @return {?}
|
|
1867
|
+
*/
|
|
1868
|
+
onDeactivate(place) {
|
|
1869
|
+
this._activePlaces.remove(place);
|
|
1870
|
+
}
|
|
1871
|
+
/**
|
|
1872
|
+
* @param {?} params
|
|
1873
|
+
* @return {?}
|
|
1874
|
+
*/
|
|
1875
|
+
notifyRouteParametersChanged(params) {
|
|
1876
|
+
// We update the router state...
|
|
1877
|
+
if (params.updateRoute) {
|
|
1878
|
+
/** @type {?} */
|
|
1879
|
+
const routeId = params.next.getFormattedRouteId();
|
|
1880
|
+
/** @type {?} */
|
|
1881
|
+
const relativePath = !!params.previous.hasRouteId() ? '..' : '.';
|
|
1882
|
+
/** @type {?} */
|
|
1883
|
+
const path = routeId ? [relativePath, routeId, params.next.getFormattedParameters()] : [relativePath, params.next.getFormattedParameters()];
|
|
1884
|
+
this.router.navigate(path, {
|
|
1885
|
+
relativeTo: params.placeComponent.activatedRoute
|
|
1886
|
+
});
|
|
1887
|
+
}
|
|
1706
1888
|
}
|
|
1707
1889
|
}
|
|
1708
|
-
|
|
1709
|
-
{ type:
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
styles: [""]
|
|
1713
|
-
}] }
|
|
1890
|
+
PlaceService.decorators = [
|
|
1891
|
+
{ type: Injectable, args: [{
|
|
1892
|
+
providedIn: 'root'
|
|
1893
|
+
},] }
|
|
1714
1894
|
];
|
|
1715
1895
|
/** @nocollapse */
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
};
|
|
1896
|
+
PlaceService.ctorParameters = () => [
|
|
1897
|
+
{ type: Router }
|
|
1898
|
+
];
|
|
1899
|
+
/** @nocollapse */ PlaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(ɵɵinject(Router)); }, token: PlaceService, providedIn: "root" });
|
|
1721
1900
|
__decorate([
|
|
1722
|
-
|
|
1723
|
-
__metadata("design:type",
|
|
1724
|
-
|
|
1901
|
+
Trace(),
|
|
1902
|
+
__metadata("design:type", Function),
|
|
1903
|
+
__metadata("design:paramtypes", [PlaceComponent]),
|
|
1904
|
+
__metadata("design:returntype", void 0)
|
|
1905
|
+
], PlaceService.prototype, "onActivate", null);
|
|
1725
1906
|
__decorate([
|
|
1726
|
-
|
|
1727
|
-
__metadata("design:type",
|
|
1728
|
-
|
|
1907
|
+
Trace(),
|
|
1908
|
+
__metadata("design:type", Function),
|
|
1909
|
+
__metadata("design:paramtypes", [PlaceComponent]),
|
|
1910
|
+
__metadata("design:returntype", void 0)
|
|
1911
|
+
], PlaceService.prototype, "onDeactivate", null);
|
|
1912
|
+
__decorate([
|
|
1913
|
+
Trace(),
|
|
1914
|
+
__metadata("design:type", Function),
|
|
1915
|
+
__metadata("design:paramtypes", [Object]),
|
|
1916
|
+
__metadata("design:returntype", void 0)
|
|
1917
|
+
], PlaceService.prototype, "notifyRouteParametersChanged", null);
|
|
1729
1918
|
if (false) {
|
|
1730
|
-
/**
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1741
|
-
*/
|
|
1742
|
-
class PlaceModule {
|
|
1919
|
+
/**
|
|
1920
|
+
* @type {?}
|
|
1921
|
+
* @private
|
|
1922
|
+
*/
|
|
1923
|
+
PlaceService.prototype._activePlaces;
|
|
1924
|
+
/**
|
|
1925
|
+
* @type {?}
|
|
1926
|
+
* @protected
|
|
1927
|
+
*/
|
|
1928
|
+
PlaceService.prototype.router;
|
|
1743
1929
|
}
|
|
1744
|
-
PlaceModule.decorators = [
|
|
1745
|
-
{ type: NgModule, args: [{
|
|
1746
|
-
imports: [
|
|
1747
|
-
CommonModule,
|
|
1748
|
-
BrowserAnimationsModule,
|
|
1749
|
-
MatProgressSpinnerModule,
|
|
1750
|
-
RouterModule,
|
|
1751
|
-
MatTabsModule$1,
|
|
1752
|
-
MatListModule,
|
|
1753
|
-
MatTooltipModule,
|
|
1754
|
-
MatIconModule
|
|
1755
|
-
],
|
|
1756
|
-
declarations: [
|
|
1757
|
-
EmptyStateComponent,
|
|
1758
|
-
BusyOverlayComponent,
|
|
1759
|
-
PlaceOutletComponent,
|
|
1760
|
-
TabbedPlaceNavigationComponent
|
|
1761
|
-
],
|
|
1762
|
-
entryComponents: [BusyOverlayComponent],
|
|
1763
|
-
exports: [
|
|
1764
|
-
BusyOverlayComponent,
|
|
1765
|
-
PlaceOutletComponent,
|
|
1766
|
-
EmptyStateComponent,
|
|
1767
|
-
TabbedPlaceNavigationComponent
|
|
1768
|
-
],
|
|
1769
|
-
providers: [
|
|
1770
|
-
PlaceService
|
|
1771
|
-
]
|
|
1772
|
-
},] }
|
|
1773
|
-
];
|
|
1774
1930
|
|
|
1775
1931
|
/**
|
|
1776
1932
|
* @fileoverview added by tsickle
|
|
1777
1933
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1778
1934
|
*/
|
|
1779
|
-
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1935
|
+
// Freezes the state of the components at the start of the animation.
|
|
1936
|
+
/** @type {?} */
|
|
1937
|
+
const animationStartStyle = style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
|
|
1938
|
+
/** @type {?} */
|
|
1939
|
+
const left = [
|
|
1940
|
+
query(':enter, :leave', animationStartStyle, { optional: true }),
|
|
1941
|
+
group([
|
|
1942
|
+
query(':enter', [
|
|
1943
|
+
style({ transform: 'translateX(-100%)' }),
|
|
1944
|
+
animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
|
|
1945
|
+
], {
|
|
1946
|
+
optional: true
|
|
1947
|
+
}),
|
|
1948
|
+
query(':leave', [
|
|
1949
|
+
style({ transform: 'translateX(0%)' }),
|
|
1950
|
+
animate('{{duration}} ease-out', style({ transform: 'translateX(100%)' }))
|
|
1951
|
+
], {
|
|
1952
|
+
optional: true
|
|
1953
|
+
})
|
|
1954
|
+
])
|
|
1955
|
+
];
|
|
1956
|
+
/** @type {?} */
|
|
1957
|
+
const right = [
|
|
1958
|
+
query(':enter, :leave', animationStartStyle, { optional: true }),
|
|
1959
|
+
group([
|
|
1960
|
+
query(':enter', [
|
|
1961
|
+
style({ transform: 'translateX(100%)' }),
|
|
1962
|
+
animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
|
|
1963
|
+
], {
|
|
1964
|
+
optional: true
|
|
1965
|
+
}),
|
|
1966
|
+
query(':leave', [style({ transform: 'translateX(0%)' }), animate('{{duration}} ease-out', style({ transform: 'translateX(-100%)' }))], {
|
|
1967
|
+
optional: true
|
|
1968
|
+
})
|
|
1969
|
+
])
|
|
1970
|
+
];
|
|
1971
|
+
/** @type {?} */
|
|
1972
|
+
const LEFT_RIGHT_PLACE_ANIMATION = trigger('routeAnimations', [
|
|
1973
|
+
transition(':increment', right, { params: { duration: '.3s' } }),
|
|
1974
|
+
transition(':decrement', left, { params: { duration: '.3s' } })
|
|
1975
|
+
]);
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* @fileoverview added by tsickle
|
|
1979
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1980
|
+
*/
|
|
1981
|
+
class PlaceOutletComponent {
|
|
1982
|
+
/**
|
|
1983
|
+
* @param {?} placeService
|
|
1984
|
+
*/
|
|
1985
|
+
constructor(placeService) {
|
|
1986
|
+
this.placeService = placeService;
|
|
1987
|
+
this.animate = true;
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* @return {?}
|
|
1991
|
+
*/
|
|
1992
|
+
ngOnInit() {
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* @param {?} $event
|
|
1996
|
+
* @return {?}
|
|
1997
|
+
*/
|
|
1998
|
+
onActivate($event) {
|
|
1999
|
+
this.currentPlace = $event;
|
|
2000
|
+
this.placeService.onActivate($event);
|
|
2001
|
+
if (!this.animate) {
|
|
2002
|
+
this.notifyPlaceReady();
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
/**
|
|
2006
|
+
* @param {?} $event
|
|
2007
|
+
* @return {?}
|
|
2008
|
+
*/
|
|
2009
|
+
onDeactivate($event) {
|
|
2010
|
+
this.currentPlace = null;
|
|
2011
|
+
this.placeService.onDeactivate($event);
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* @param {?} outlet
|
|
2015
|
+
* @return {?}
|
|
2016
|
+
*/
|
|
2017
|
+
getPlaceOrder(outlet) {
|
|
2018
|
+
return this.animate && outlet && outlet.activatedRouteData && outlet.activatedRouteData['placeOrder'];
|
|
2019
|
+
}
|
|
2020
|
+
/**
|
|
2021
|
+
* @return {?}
|
|
2022
|
+
*/
|
|
2023
|
+
animationDone() {
|
|
2024
|
+
this.notifyPlaceReady();
|
|
2025
|
+
}
|
|
2026
|
+
/**
|
|
2027
|
+
* @private
|
|
2028
|
+
* @return {?}
|
|
2029
|
+
*/
|
|
2030
|
+
notifyPlaceReady() {
|
|
2031
|
+
if (this.currentPlace) {
|
|
2032
|
+
this.currentPlace.onPlaceReady();
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
PlaceOutletComponent.decorators = [
|
|
2037
|
+
{ type: Component, args: [{
|
|
2038
|
+
selector: 'angular-ui-powerups-place-outlet',
|
|
2039
|
+
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\">\n </router-outlet>\n</div>\n\n",
|
|
2040
|
+
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
2041
|
+
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}"]
|
|
2042
|
+
}] }
|
|
2043
|
+
];
|
|
2044
|
+
/** @nocollapse */
|
|
2045
|
+
PlaceOutletComponent.ctorParameters = () => [
|
|
2046
|
+
{ type: PlaceService }
|
|
2047
|
+
];
|
|
2048
|
+
PlaceOutletComponent.propDecorators = {
|
|
2049
|
+
animate: [{ type: Input }],
|
|
2050
|
+
routerOutLet: [{ type: ViewChild, args: ['routerOutlet', { static: false },] }]
|
|
2051
|
+
};
|
|
2052
|
+
if (false) {
|
|
2053
|
+
/** @type {?} */
|
|
2054
|
+
PlaceOutletComponent.prototype.animate;
|
|
2055
|
+
/** @type {?} */
|
|
2056
|
+
PlaceOutletComponent.prototype.routerOutLet;
|
|
2057
|
+
/**
|
|
2058
|
+
* @type {?}
|
|
2059
|
+
* @private
|
|
2060
|
+
*/
|
|
2061
|
+
PlaceOutletComponent.prototype.currentPlace;
|
|
2062
|
+
/**
|
|
2063
|
+
* @type {?}
|
|
2064
|
+
* @private
|
|
2065
|
+
*/
|
|
2066
|
+
PlaceOutletComponent.prototype.placeService;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
/**
|
|
2070
|
+
* @fileoverview added by tsickle
|
|
2071
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2072
|
+
*/
|
|
2073
|
+
class TabbedPlaceNavigationComponent extends DisposableComponent {
|
|
2074
|
+
constructor() {
|
|
2075
|
+
super();
|
|
2076
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2077
|
+
this.orderedPlaces = chain(this.placesModel).map((/**
|
|
2078
|
+
* @param {?} c
|
|
2079
|
+
* @return {?}
|
|
2080
|
+
*/
|
|
2081
|
+
c => PlaceComponent.getDefinition(c))).sortBy('order');
|
|
2082
|
+
}
|
|
2083
|
+
/**
|
|
2084
|
+
* @return {?}
|
|
2085
|
+
*/
|
|
2086
|
+
ngOnInit() {
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
TabbedPlaceNavigationComponent.decorators = [
|
|
2090
|
+
{ type: Component, args: [{
|
|
2091
|
+
selector: 'angular-ui-powerups-tabbed-place-navigation',
|
|
2092
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDescriptor of orderedPlaces.value\"\n [routerLink]='placeDescriptor.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"placeDescriptor.searchData(['navTooltip', 'navTitle'])\">\n <mat-icon *ngIf=\"placeDescriptor.getData('navIcon')\">{{placeDescriptor.getData('navIcon')}}</mat-icon>\n <span>{{placeDescriptor.getData(\"navTitle\", 'missing @Place({data: {navTitle: ??}\\})')}}</span>\n </a>\n</nav>\n",
|
|
2093
|
+
styles: [""]
|
|
2094
|
+
}] }
|
|
2095
|
+
];
|
|
2096
|
+
/** @nocollapse */
|
|
2097
|
+
TabbedPlaceNavigationComponent.ctorParameters = () => [];
|
|
2098
|
+
TabbedPlaceNavigationComponent.propDecorators = {
|
|
2099
|
+
places: [{ type: Input }],
|
|
2100
|
+
placesModel: [{ type: Input }]
|
|
2101
|
+
};
|
|
2102
|
+
__decorate([
|
|
2103
|
+
StoreInListModel('placesModel'),
|
|
2104
|
+
__metadata("design:type", Array)
|
|
2105
|
+
], TabbedPlaceNavigationComponent.prototype, "places", void 0);
|
|
2106
|
+
__decorate([
|
|
2107
|
+
UseDelegate(),
|
|
2108
|
+
__metadata("design:type", ListModel)
|
|
2109
|
+
], TabbedPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
2110
|
+
if (false) {
|
|
2111
|
+
/** @type {?} */
|
|
2112
|
+
TabbedPlaceNavigationComponent.prototype.places;
|
|
2113
|
+
/** @type {?} */
|
|
2114
|
+
TabbedPlaceNavigationComponent.prototype.placesModel;
|
|
2115
|
+
/** @type {?} */
|
|
2116
|
+
TabbedPlaceNavigationComponent.prototype.orderedPlaces;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* @fileoverview added by tsickle
|
|
2121
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2122
|
+
*/
|
|
2123
|
+
class PlaceModule {
|
|
2124
|
+
}
|
|
2125
|
+
PlaceModule.decorators = [
|
|
2126
|
+
{ type: NgModule, args: [{
|
|
2127
|
+
imports: [
|
|
2128
|
+
CommonModule,
|
|
2129
|
+
BrowserAnimationsModule,
|
|
2130
|
+
MatProgressSpinnerModule,
|
|
2131
|
+
RouterModule,
|
|
2132
|
+
MatTabsModule$1,
|
|
2133
|
+
MatListModule,
|
|
2134
|
+
MatTooltipModule,
|
|
2135
|
+
MatIconModule
|
|
2136
|
+
],
|
|
2137
|
+
declarations: [
|
|
2138
|
+
EmptyStateComponent,
|
|
2139
|
+
BusyOverlayComponent,
|
|
2140
|
+
PlaceOutletComponent,
|
|
2141
|
+
TabbedPlaceNavigationComponent
|
|
2142
|
+
],
|
|
2143
|
+
entryComponents: [BusyOverlayComponent],
|
|
2144
|
+
exports: [
|
|
2145
|
+
BusyOverlayComponent,
|
|
2146
|
+
PlaceOutletComponent,
|
|
2147
|
+
EmptyStateComponent,
|
|
2148
|
+
TabbedPlaceNavigationComponent
|
|
2149
|
+
],
|
|
2150
|
+
providers: [
|
|
2151
|
+
PlaceService
|
|
2152
|
+
]
|
|
2153
|
+
},] }
|
|
2154
|
+
];
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* @fileoverview added by tsickle
|
|
2158
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2159
|
+
*/
|
|
2160
|
+
class AngularUiPowerupsModule {
|
|
2161
|
+
}
|
|
2162
|
+
AngularUiPowerupsModule.decorators = [
|
|
2163
|
+
{ type: NgModule, args: [{
|
|
2164
|
+
declarations: [
|
|
2165
|
+
CommandDirective,
|
|
2166
|
+
FocusBindingDirective,
|
|
2167
|
+
NumberInputComponent,
|
|
2168
|
+
StringInputComponent,
|
|
2169
|
+
PasswordInputComponent,
|
|
2170
|
+
SelectInputComponent,
|
|
2171
|
+
],
|
|
2172
|
+
imports: [
|
|
1792
2173
|
CommonModule,
|
|
1793
2174
|
BrowserModule,
|
|
1794
2175
|
BrowserAnimationsModule,
|
|
@@ -1970,518 +2351,200 @@ class ResizeAwareComponent extends DisposableComponent {
|
|
|
1970
2351
|
this.elementRef = elementRef;
|
|
1971
2352
|
this.ngZone = ngZone;
|
|
1972
2353
|
this._boundsModel = new ValueHolder(new Bounds(0, 0, 0, 0));
|
|
1973
|
-
}
|
|
1974
|
-
/**
|
|
1975
|
-
* @return {?}
|
|
1976
|
-
*/
|
|
1977
|
-
ngAfterViewInit() {
|
|
1978
|
-
this.updateBounds();
|
|
1979
|
-
/** @type {?} */
|
|
1980
|
-
const element = this.elementRef.nativeElement;
|
|
1981
|
-
/** @type {?} */
|
|
1982
|
-
const ro = new ResizeObserver((/**
|
|
1983
|
-
* @param {?} entries
|
|
1984
|
-
* @param {?} observer
|
|
1985
|
-
* @return {?}
|
|
1986
|
-
*/
|
|
1987
|
-
(entries, observer) => {
|
|
1988
|
-
this.ngZone.run((/**
|
|
1989
|
-
* @return {?}
|
|
1990
|
-
*/
|
|
1991
|
-
() => this.updateBounds()));
|
|
1992
|
-
}));
|
|
1993
|
-
ro.observe(element);
|
|
1994
|
-
this.onDispose((/**
|
|
1995
|
-
* @return {?}
|
|
1996
|
-
*/
|
|
1997
|
-
() => ro.disconnect()));
|
|
1998
|
-
}
|
|
1999
|
-
/**
|
|
2000
|
-
* @return {?}
|
|
2001
|
-
*/
|
|
2002
|
-
get boundsModel() {
|
|
2003
|
-
return this._boundsModel.readonly;
|
|
2004
|
-
}
|
|
2005
|
-
/**
|
|
2006
|
-
* @return {?}
|
|
2007
|
-
*/
|
|
2008
|
-
get nativeElement() {
|
|
2009
|
-
return this.elementRef.nativeElement;
|
|
2010
|
-
}
|
|
2011
|
-
// TODO: Make this handle body scroll
|
|
2012
|
-
/**
|
|
2013
|
-
* @param {?} point
|
|
2014
|
-
* @return {?}
|
|
2015
|
-
*/
|
|
2016
|
-
relativePositionOf(point) {
|
|
2017
|
-
return this.bounds.relativePositionOf(point);
|
|
2018
|
-
}
|
|
2019
|
-
/**
|
|
2020
|
-
* @return {?}
|
|
2021
|
-
*/
|
|
2022
|
-
get bounds() {
|
|
2023
|
-
return this._boundsModel.value;
|
|
2024
|
-
}
|
|
2025
|
-
/**
|
|
2026
|
-
* @private
|
|
2027
|
-
* @return {?}
|
|
2028
|
-
*/
|
|
2029
|
-
updateBounds() {
|
|
2030
|
-
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
if (false) {
|
|
2034
|
-
/**
|
|
2035
|
-
* @type {?}
|
|
2036
|
-
* @private
|
|
2037
|
-
*/
|
|
2038
|
-
ResizeAwareComponent.prototype._boundsModel;
|
|
2039
|
-
/**
|
|
2040
|
-
* @type {?}
|
|
2041
|
-
* @protected
|
|
2042
|
-
*/
|
|
2043
|
-
ResizeAwareComponent.prototype.elementRef;
|
|
2044
|
-
/**
|
|
2045
|
-
* @type {?}
|
|
2046
|
-
* @protected
|
|
2047
|
-
*/
|
|
2048
|
-
ResizeAwareComponent.prototype.ngZone;
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
/**
|
|
2052
|
-
* @fileoverview added by tsickle
|
|
2053
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2054
|
-
*/
|
|
2055
|
-
|
|
2056
|
-
/**
|
|
2057
|
-
* @fileoverview added by tsickle
|
|
2058
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2059
|
-
*/
|
|
2060
|
-
|
|
2061
|
-
/**
|
|
2062
|
-
* @fileoverview added by tsickle
|
|
2063
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2064
|
-
*/
|
|
2065
|
-
/**
|
|
2066
|
-
* @record
|
|
2067
|
-
*/
|
|
2068
|
-
function Alert() { }
|
|
2069
|
-
if (false) {
|
|
2070
|
-
/**
|
|
2071
|
-
* @return {?}
|
|
2072
|
-
*/
|
|
2073
|
-
Alert.prototype.title = function () { };
|
|
2074
|
-
/**
|
|
2075
|
-
* @return {?}
|
|
2076
|
-
*/
|
|
2077
|
-
Alert.prototype.content = function () { };
|
|
2078
|
-
/**
|
|
2079
|
-
* @return {?}
|
|
2080
|
-
*/
|
|
2081
|
-
Alert.prototype.ok = function () { };
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
/**
|
|
2085
|
-
* @fileoverview added by tsickle
|
|
2086
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2087
|
-
*/
|
|
2088
|
-
/**
|
|
2089
|
-
* @record
|
|
2090
|
-
*/
|
|
2091
|
-
function Confirm() { }
|
|
2092
|
-
if (false) {
|
|
2093
|
-
/** @type {?|undefined} */
|
|
2094
|
-
Confirm.prototype.destructive;
|
|
2095
|
-
/**
|
|
2096
|
-
* @return {?}
|
|
2097
|
-
*/
|
|
2098
|
-
Confirm.prototype.cancel = function () { };
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
/**
|
|
2102
|
-
* @fileoverview added by tsickle
|
|
2103
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2104
|
-
*/
|
|
2105
|
-
/**
|
|
2106
|
-
* @record
|
|
2107
|
-
* @template R, E
|
|
2108
|
-
*/
|
|
2109
|
-
function Result() { }
|
|
2110
|
-
(function (Result) {
|
|
2111
|
-
/**
|
|
2112
|
-
* @record
|
|
2113
|
-
* @template R, E
|
|
2114
|
-
*/
|
|
2115
|
-
function Callback() { }
|
|
2116
|
-
Result.Callback = Callback;
|
|
2117
|
-
if (false) {
|
|
2118
|
-
/** @type {?} */
|
|
2119
|
-
Callback.prototype.then;
|
|
2120
|
-
/** @type {?} */
|
|
2121
|
-
Callback.prototype.catch;
|
|
2122
|
-
}
|
|
2123
|
-
})(Result || (Result = {}));
|
|
2124
|
-
|
|
2125
|
-
/**
|
|
2126
|
-
* @fileoverview added by tsickle
|
|
2127
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2128
|
-
*/
|
|
2129
|
-
/**
|
|
2130
|
-
* @record
|
|
2131
|
-
* @template D, R, E
|
|
2132
|
-
*/
|
|
2133
|
-
function ActivityOutletContext() { }
|
|
2134
|
-
if (false) {
|
|
2135
|
-
/** @type {?} */
|
|
2136
|
-
ActivityOutletContext.prototype.interactionContext;
|
|
2137
|
-
/** @type {?} */
|
|
2138
|
-
ActivityOutletContext.prototype.activityClass;
|
|
2139
|
-
/** @type {?} */
|
|
2140
|
-
ActivityOutletContext.prototype.activityData;
|
|
2141
|
-
/** @type {?} */
|
|
2142
|
-
ActivityOutletContext.prototype.onDone;
|
|
2143
|
-
/** @type {?} */
|
|
2144
|
-
ActivityOutletContext.prototype.onCancel;
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
/**
|
|
2148
|
-
* @fileoverview added by tsickle
|
|
2149
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2150
|
-
*/
|
|
2151
|
-
|
|
2152
|
-
/**
|
|
2153
|
-
* @fileoverview added by tsickle
|
|
2154
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2155
|
-
*/
|
|
2156
|
-
/**
|
|
2157
|
-
* @record
|
|
2158
|
-
* @template T
|
|
2159
|
-
*/
|
|
2160
|
-
function ResolvedParameter() { }
|
|
2161
|
-
if (false) {
|
|
2162
|
-
/** @type {?} */
|
|
2163
|
-
ResolvedParameter.prototype.parameterDef;
|
|
2164
|
-
/** @type {?} */
|
|
2165
|
-
ResolvedParameter.prototype.resolvedValue;
|
|
2166
|
-
}
|
|
2167
|
-
class ResolvedParameters {
|
|
2168
|
-
/**
|
|
2169
|
-
* @param {?} parameters
|
|
2170
|
-
*/
|
|
2171
|
-
constructor(parameters) {
|
|
2172
|
-
this.parameters = parameters;
|
|
2173
|
-
}
|
|
2174
|
-
/**
|
|
2175
|
-
* @template T
|
|
2176
|
-
* @param {?} parameter
|
|
2177
|
-
* @return {?}
|
|
2178
|
-
*/
|
|
2179
|
-
get(parameter) {
|
|
2180
|
-
/** @type {?} */
|
|
2181
|
-
const resolved = this.parameters.find((/**
|
|
2182
|
-
* @param {?} p
|
|
2183
|
-
* @return {?}
|
|
2184
|
-
*/
|
|
2185
|
-
p => p.parameterDef === parameter));
|
|
2186
|
-
return resolved ? resolved.resolvedValue : null;
|
|
2187
|
-
}
|
|
2188
|
-
/**
|
|
2189
|
-
* @template T
|
|
2190
|
-
* @param {?} parameter
|
|
2191
|
-
* @param {?} value
|
|
2192
|
-
* @return {?}
|
|
2193
|
-
*/
|
|
2194
|
-
replace(parameter, value) {
|
|
2195
|
-
return new ResolvedParameters(this.parameters.filter((/**
|
|
2196
|
-
* @param {?} p
|
|
2197
|
-
* @return {?}
|
|
2198
|
-
*/
|
|
2199
|
-
p => p.parameterDef !== parameter)).concat({
|
|
2200
|
-
parameterDef: parameter,
|
|
2201
|
-
resolvedValue: value
|
|
2202
|
-
}));
|
|
2203
|
-
}
|
|
2204
|
-
/**
|
|
2205
|
-
* @protected
|
|
2206
|
-
* @return {?}
|
|
2207
|
-
*/
|
|
2208
|
-
getFormattedRouteId() {
|
|
2209
|
-
/** @type {?} */
|
|
2210
|
-
const routeIdParam = this.getRouteIdParam();
|
|
2211
|
-
return routeIdParam ? routeIdParam.parameterDef.type.format(routeIdParam.resolvedValue) : null;
|
|
2212
|
-
}
|
|
2213
|
-
/**
|
|
2214
|
-
* @private
|
|
2215
|
-
* @return {?}
|
|
2216
|
-
*/
|
|
2217
|
-
getRouteIdParam() {
|
|
2218
|
-
return this.parameters.find((/**
|
|
2219
|
-
* @param {?} p
|
|
2220
|
-
* @return {?}
|
|
2221
|
-
*/
|
|
2222
|
-
p => p.parameterDef.isRouteId));
|
|
2223
|
-
}
|
|
2224
|
-
/**
|
|
2225
|
-
* @protected
|
|
2226
|
-
* @return {?}
|
|
2227
|
-
*/
|
|
2228
|
-
getFormattedParameters() {
|
|
2229
|
-
/** @type {?} */
|
|
2230
|
-
const params = {};
|
|
2231
|
-
/** @type {?} */
|
|
2232
|
-
const routeIdParam = this.parameters.filter((/**
|
|
2233
|
-
* @param {?} p
|
|
2234
|
-
* @return {?}
|
|
2235
|
-
*/
|
|
2236
|
-
p => !p.parameterDef.isRouteId)).forEach((/**
|
|
2237
|
-
* @param {?} p
|
|
2238
|
-
* @return {?}
|
|
2239
|
-
*/
|
|
2240
|
-
p => {
|
|
2241
|
-
params[p.parameterDef.name] = p.parameterDef.type.format(p.resolvedValue);
|
|
2242
|
-
}));
|
|
2243
|
-
return params;
|
|
2244
|
-
}
|
|
2245
|
-
/**
|
|
2246
|
-
* @return {?}
|
|
2247
|
-
*/
|
|
2248
|
-
hasRouteId() {
|
|
2249
|
-
return !!this.getRouteIdParam();
|
|
2250
|
-
}
|
|
2251
|
-
/**
|
|
2252
|
-
* @param {?} previous
|
|
2253
|
-
* @param {?} router
|
|
2254
|
-
* @param {?} activatedRoute
|
|
2255
|
-
* @return {?}
|
|
2256
|
-
*/
|
|
2257
|
-
redirect(previous, router, activatedRoute) {
|
|
2258
|
-
/** @type {?} */
|
|
2259
|
-
const routeId = this.getFormattedRouteId();
|
|
2260
|
-
/** @type {?} */
|
|
2261
|
-
const relativePath = !!previous.hasRouteId() ? '..' : '.';
|
|
2262
|
-
/** @type {?} */
|
|
2263
|
-
const path = routeId ? [relativePath, routeId, this.getFormattedParameters()] : [relativePath, this.getFormattedParameters()];
|
|
2264
|
-
router.navigate(path, {
|
|
2265
|
-
relativeTo: activatedRoute
|
|
2266
|
-
});
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
__decorate([
|
|
2270
|
-
Trace(),
|
|
2271
|
-
__metadata("design:type", Function),
|
|
2272
|
-
__metadata("design:paramtypes", []),
|
|
2273
|
-
__metadata("design:returntype", void 0)
|
|
2274
|
-
], ResolvedParameters.prototype, "getFormattedRouteId", null);
|
|
2275
|
-
__decorate([
|
|
2276
|
-
Trace(),
|
|
2277
|
-
__metadata("design:type", Function),
|
|
2278
|
-
__metadata("design:paramtypes", []),
|
|
2279
|
-
__metadata("design:returntype", void 0)
|
|
2280
|
-
], ResolvedParameters.prototype, "getFormattedParameters", null);
|
|
2281
|
-
__decorate([
|
|
2282
|
-
Trace(),
|
|
2283
|
-
__metadata("design:type", Function),
|
|
2284
|
-
__metadata("design:paramtypes", [ResolvedParameters, Router, ActivatedRoute]),
|
|
2285
|
-
__metadata("design:returntype", void 0)
|
|
2286
|
-
], ResolvedParameters.prototype, "redirect", null);
|
|
2287
|
-
if (false) {
|
|
2288
|
-
/** @type {?} */
|
|
2289
|
-
ResolvedParameters.prototype.parameters;
|
|
2290
|
-
}
|
|
2291
|
-
class RouteParameterBindings extends GarbageCollector {
|
|
2292
|
-
/**
|
|
2293
|
-
* @param {?} component
|
|
2294
|
-
* @param {?} router
|
|
2295
|
-
* @param {?} activatedRoute
|
|
2296
|
-
*/
|
|
2297
|
-
constructor(component, router, activatedRoute) {
|
|
2298
|
-
super();
|
|
2299
|
-
this.component = component;
|
|
2300
|
-
this.router = router;
|
|
2301
|
-
this.activatedRoute = activatedRoute;
|
|
2302
|
-
this._incomingRouteChange = new MutableValueModel(false);
|
|
2303
|
-
this.resolvedParameters = new MutableValueModel();
|
|
2304
|
-
const { chain, valueOf, before, when, after, observe } = Dsl.disposeWith(this);
|
|
2305
|
-
this.txo = new TransactionObserver(); //.onEvent(e => console.log(e.toString()));
|
|
2306
|
-
//.onEvent(e => console.log(e.toString()));
|
|
2307
|
-
/** @type {?} */
|
|
2308
|
-
const routeParameterDefs = Klass.get(component).getMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
|
|
2309
|
-
routeParameterDefs.forEach((/**
|
|
2310
|
-
* @param {?} parameter
|
|
2311
|
-
* @return {?}
|
|
2312
|
-
*/
|
|
2313
|
-
parameter => this.installBinding(parameter)));
|
|
2314
|
-
/** @type {?} */
|
|
2315
|
-
const incomingResolvedRouteParameters = observe.valuesFrom(activatedRoute.paramMap)
|
|
2316
|
-
.last()
|
|
2317
|
-
.map((/**
|
|
2318
|
-
* @param {?} params
|
|
2319
|
-
* @return {?}
|
|
2320
|
-
*/
|
|
2321
|
-
params => {
|
|
2322
|
-
/** @type {?} */
|
|
2323
|
-
const result = [];
|
|
2324
|
-
routeParameterDefs.forEach((/**
|
|
2325
|
-
* @param {?} parameterDef
|
|
2326
|
-
* @return {?}
|
|
2327
|
-
*/
|
|
2328
|
-
parameterDef => {
|
|
2329
|
-
/** @type {?} */
|
|
2330
|
-
let resolvedValue;
|
|
2331
|
-
if (parameterDef.isArray) {
|
|
2332
|
-
resolvedValue = params.getAll(parameterDef.name).map((/**
|
|
2333
|
-
* @param {?} v
|
|
2334
|
-
* @return {?}
|
|
2335
|
-
*/
|
|
2336
|
-
v => parameterDef.type.parse(v)));
|
|
2337
|
-
}
|
|
2338
|
-
else {
|
|
2339
|
-
resolvedValue = parameterDef.type.parse(params.get(parameterDef.name));
|
|
2340
|
-
}
|
|
2341
|
-
result.push({ parameterDef: parameterDef, resolvedValue: resolvedValue });
|
|
2342
|
-
}));
|
|
2343
|
-
return new ResolvedParameters(result);
|
|
2344
|
-
}));
|
|
2345
|
-
incomingResolvedRouteParameters.subscribe((/**
|
|
2346
|
-
* @param {?} resolvedParameters
|
|
2354
|
+
}
|
|
2355
|
+
/**
|
|
2356
|
+
* @return {?}
|
|
2357
|
+
*/
|
|
2358
|
+
ngAfterViewInit() {
|
|
2359
|
+
this.updateBounds();
|
|
2360
|
+
/** @type {?} */
|
|
2361
|
+
const element = this.elementRef.nativeElement;
|
|
2362
|
+
/** @type {?} */
|
|
2363
|
+
const ro = new ResizeObserver((/**
|
|
2364
|
+
* @param {?} entries
|
|
2365
|
+
* @param {?} observer
|
|
2347
2366
|
* @return {?}
|
|
2348
2367
|
*/
|
|
2349
|
-
|
|
2350
|
-
this.
|
|
2351
|
-
|
|
2352
|
-
|
|
2368
|
+
(entries, observer) => {
|
|
2369
|
+
this.ngZone.run((/**
|
|
2370
|
+
* @return {?}
|
|
2371
|
+
*/
|
|
2372
|
+
() => this.updateBounds()));
|
|
2353
2373
|
}));
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
* @param {?} previous
|
|
2374
|
+
ro.observe(element);
|
|
2375
|
+
this.onDispose((/**
|
|
2357
2376
|
* @return {?}
|
|
2358
2377
|
*/
|
|
2359
|
-
(
|
|
2360
|
-
params.redirect(previous, router, activatedRoute);
|
|
2361
|
-
}), { unless: this.incomingRouteChange });
|
|
2362
|
-
this.txo.observe('incomingResolvedRouteParameters', incomingResolvedRouteParameters);
|
|
2363
|
-
this.txo.observe('this.routeIsChanging', this.incomingRouteChange);
|
|
2378
|
+
() => ro.disconnect()));
|
|
2364
2379
|
}
|
|
2365
2380
|
/**
|
|
2366
2381
|
* @return {?}
|
|
2367
2382
|
*/
|
|
2368
|
-
get
|
|
2369
|
-
return this.
|
|
2383
|
+
get boundsModel() {
|
|
2384
|
+
return this._boundsModel.readonly;
|
|
2370
2385
|
}
|
|
2371
2386
|
/**
|
|
2372
|
-
* @protected
|
|
2373
|
-
* @template T
|
|
2374
|
-
* @param {?} parameter
|
|
2375
2387
|
* @return {?}
|
|
2376
2388
|
*/
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
const model = this.getModelFor(parameter);
|
|
2380
|
-
// this.txo.observe(parameter.propertyName, model);
|
|
2381
|
-
this.registerDisposable(new Binding(this.resolvedParameters, model, {
|
|
2382
|
-
/**
|
|
2383
|
-
* @param {?} parameters
|
|
2384
|
-
* @return {?}
|
|
2385
|
-
*/
|
|
2386
|
-
toRight(parameters) {
|
|
2387
|
-
return parameters.get(parameter);
|
|
2388
|
-
},
|
|
2389
|
-
/**
|
|
2390
|
-
* @param {?} value
|
|
2391
|
-
* @param {?=} currentParameters
|
|
2392
|
-
* @return {?}
|
|
2393
|
-
*/
|
|
2394
|
-
toLeft(value, currentParameters) {
|
|
2395
|
-
return currentParameters.replace(parameter, value);
|
|
2396
|
-
}
|
|
2397
|
-
}));
|
|
2389
|
+
get nativeElement() {
|
|
2390
|
+
return this.elementRef.nativeElement;
|
|
2398
2391
|
}
|
|
2392
|
+
// TODO: Make this handle body scroll
|
|
2399
2393
|
/**
|
|
2400
|
-
* @
|
|
2401
|
-
* @template T
|
|
2402
|
-
* @param {?} parameter
|
|
2394
|
+
* @param {?} point
|
|
2403
2395
|
* @return {?}
|
|
2404
2396
|
*/
|
|
2405
|
-
|
|
2406
|
-
return this.
|
|
2397
|
+
relativePositionOf(point) {
|
|
2398
|
+
return this.bounds.relativePositionOf(point);
|
|
2407
2399
|
}
|
|
2408
|
-
}
|
|
2409
|
-
if (false) {
|
|
2410
|
-
/** @type {?} */
|
|
2411
|
-
RouteParameterBindings.prototype._incomingRouteChange;
|
|
2412
2400
|
/**
|
|
2413
|
-
* @
|
|
2414
|
-
* @private
|
|
2401
|
+
* @return {?}
|
|
2415
2402
|
*/
|
|
2416
|
-
|
|
2403
|
+
get bounds() {
|
|
2404
|
+
return this._boundsModel.value;
|
|
2405
|
+
}
|
|
2417
2406
|
/**
|
|
2418
|
-
* @type {?}
|
|
2419
2407
|
* @private
|
|
2408
|
+
* @return {?}
|
|
2420
2409
|
*/
|
|
2421
|
-
|
|
2410
|
+
updateBounds() {
|
|
2411
|
+
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
if (false) {
|
|
2422
2415
|
/**
|
|
2423
2416
|
* @type {?}
|
|
2424
2417
|
* @private
|
|
2425
2418
|
*/
|
|
2426
|
-
|
|
2419
|
+
ResizeAwareComponent.prototype._boundsModel;
|
|
2427
2420
|
/**
|
|
2428
2421
|
* @type {?}
|
|
2429
|
-
* @
|
|
2422
|
+
* @protected
|
|
2430
2423
|
*/
|
|
2431
|
-
|
|
2424
|
+
ResizeAwareComponent.prototype.elementRef;
|
|
2432
2425
|
/**
|
|
2433
2426
|
* @type {?}
|
|
2434
|
-
* @
|
|
2427
|
+
* @protected
|
|
2435
2428
|
*/
|
|
2436
|
-
|
|
2429
|
+
ResizeAwareComponent.prototype.ngZone;
|
|
2437
2430
|
}
|
|
2438
|
-
(function (RouteParameterBindings) {
|
|
2439
|
-
RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
2440
|
-
})(RouteParameterBindings || (RouteParameterBindings = {}));
|
|
2441
2431
|
|
|
2442
2432
|
/**
|
|
2443
2433
|
* @fileoverview added by tsickle
|
|
2444
2434
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2445
2435
|
*/
|
|
2446
|
-
|
|
2436
|
+
|
|
2437
|
+
/**
|
|
2438
|
+
* @fileoverview added by tsickle
|
|
2439
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2440
|
+
*/
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* @fileoverview added by tsickle
|
|
2444
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2445
|
+
*/
|
|
2446
|
+
/**
|
|
2447
|
+
* @record
|
|
2448
|
+
*/
|
|
2449
|
+
function Alert() { }
|
|
2450
|
+
if (false) {
|
|
2447
2451
|
/**
|
|
2448
|
-
* @
|
|
2449
|
-
* @param {?} router
|
|
2452
|
+
* @return {?}
|
|
2450
2453
|
*/
|
|
2451
|
-
|
|
2452
|
-
super();
|
|
2453
|
-
this.activatedRoute = activatedRoute;
|
|
2454
|
-
this.routeBindingMediator = this.registerDisposable(new RouteParameterBindings(this, router, activatedRoute));
|
|
2455
|
-
}
|
|
2454
|
+
Alert.prototype.title = function () { };
|
|
2456
2455
|
/**
|
|
2457
2456
|
* @return {?}
|
|
2458
2457
|
*/
|
|
2459
|
-
|
|
2460
|
-
return Place.getDescriptor((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
2461
|
-
}
|
|
2458
|
+
Alert.prototype.content = function () { };
|
|
2462
2459
|
/**
|
|
2463
2460
|
* @return {?}
|
|
2464
2461
|
*/
|
|
2465
|
-
|
|
2466
|
-
return true;
|
|
2467
|
-
}
|
|
2462
|
+
Alert.prototype.ok = function () { };
|
|
2468
2463
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2464
|
+
|
|
2465
|
+
/**
|
|
2466
|
+
* @fileoverview added by tsickle
|
|
2467
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2468
|
+
*/
|
|
2469
|
+
/**
|
|
2470
|
+
* @record
|
|
2471
|
+
*/
|
|
2472
|
+
function Confirm() { }
|
|
2474
2473
|
if (false) {
|
|
2474
|
+
/** @type {?|undefined} */
|
|
2475
|
+
Confirm.prototype.destructive;
|
|
2475
2476
|
/**
|
|
2476
|
-
* @
|
|
2477
|
-
* @private
|
|
2477
|
+
* @return {?}
|
|
2478
2478
|
*/
|
|
2479
|
-
|
|
2479
|
+
Confirm.prototype.cancel = function () { };
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* @fileoverview added by tsickle
|
|
2484
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2485
|
+
*/
|
|
2486
|
+
/**
|
|
2487
|
+
* @record
|
|
2488
|
+
* @template R, E
|
|
2489
|
+
*/
|
|
2490
|
+
function Result() { }
|
|
2491
|
+
(function (Result) {
|
|
2480
2492
|
/**
|
|
2481
|
-
* @
|
|
2482
|
-
* @
|
|
2493
|
+
* @record
|
|
2494
|
+
* @template R, E
|
|
2495
|
+
*/
|
|
2496
|
+
function Callback() { }
|
|
2497
|
+
Result.Callback = Callback;
|
|
2498
|
+
if (false) {
|
|
2499
|
+
/** @type {?} */
|
|
2500
|
+
Callback.prototype.then;
|
|
2501
|
+
/** @type {?} */
|
|
2502
|
+
Callback.prototype.catch;
|
|
2503
|
+
}
|
|
2504
|
+
})(Result || (Result = {}));
|
|
2505
|
+
|
|
2506
|
+
/**
|
|
2507
|
+
* @fileoverview added by tsickle
|
|
2508
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2509
|
+
*/
|
|
2510
|
+
/**
|
|
2511
|
+
* @record
|
|
2512
|
+
* @template D, R, E
|
|
2513
|
+
*/
|
|
2514
|
+
function ActivityOutletContext() { }
|
|
2515
|
+
if (false) {
|
|
2516
|
+
/** @type {?} */
|
|
2517
|
+
ActivityOutletContext.prototype.interactionContext;
|
|
2518
|
+
/** @type {?} */
|
|
2519
|
+
ActivityOutletContext.prototype.activityClass;
|
|
2520
|
+
/** @type {?} */
|
|
2521
|
+
ActivityOutletContext.prototype.activityData;
|
|
2522
|
+
/** @type {?} */
|
|
2523
|
+
ActivityOutletContext.prototype.onDone;
|
|
2524
|
+
/** @type {?} */
|
|
2525
|
+
ActivityOutletContext.prototype.onCancel;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
/**
|
|
2529
|
+
* @fileoverview added by tsickle
|
|
2530
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2531
|
+
*/
|
|
2532
|
+
|
|
2533
|
+
/**
|
|
2534
|
+
* @fileoverview added by tsickle
|
|
2535
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2536
|
+
*/
|
|
2537
|
+
/**
|
|
2538
|
+
* @record
|
|
2539
|
+
*/
|
|
2540
|
+
function IPlaceComponent() { }
|
|
2541
|
+
if (false) {
|
|
2542
|
+
/** @type {?} */
|
|
2543
|
+
IPlaceComponent.prototype.activatedRoute;
|
|
2544
|
+
/**
|
|
2545
|
+
* @return {?}
|
|
2483
2546
|
*/
|
|
2484
|
-
|
|
2547
|
+
IPlaceComponent.prototype.onPlaceReady = function () { };
|
|
2485
2548
|
}
|
|
2486
2549
|
|
|
2487
2550
|
/**
|
|
@@ -2491,12 +2554,34 @@ if (false) {
|
|
|
2491
2554
|
/**
|
|
2492
2555
|
* @record
|
|
2493
2556
|
*/
|
|
2494
|
-
function
|
|
2557
|
+
function IPlaceService() { }
|
|
2495
2558
|
if (false) {
|
|
2496
2559
|
/**
|
|
2560
|
+
* @param {?} params
|
|
2561
|
+
* @return {?}
|
|
2562
|
+
*/
|
|
2563
|
+
IPlaceService.prototype.notifyRouteParametersChanged = function (params) { };
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
/**
|
|
2567
|
+
* @fileoverview added by tsickle
|
|
2568
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2569
|
+
*/
|
|
2570
|
+
/**
|
|
2571
|
+
* @param {?} options
|
|
2572
|
+
* @return {?}
|
|
2573
|
+
*/
|
|
2574
|
+
function Place(options) {
|
|
2575
|
+
return (/**
|
|
2576
|
+
* @param {?} target
|
|
2497
2577
|
* @return {?}
|
|
2498
2578
|
*/
|
|
2499
|
-
|
|
2579
|
+
(target) => {
|
|
2580
|
+
if (!lang.constructorChain((/** @type {?} */ (target))).includes(PlaceComponent)) {
|
|
2581
|
+
lang.illegalState(`${target} must extend PlaceComponent to use the @Place decorator`);
|
|
2582
|
+
}
|
|
2583
|
+
PlaceComponent.injectDefinition((/** @type {?} */ (target)), options);
|
|
2584
|
+
});
|
|
2500
2585
|
}
|
|
2501
2586
|
|
|
2502
2587
|
/**
|
|
@@ -2520,7 +2605,21 @@ class LeavePlaceGuard {
|
|
|
2520
2605
|
* @return {?}
|
|
2521
2606
|
*/
|
|
2522
2607
|
canDeactivate(component, currentRoute, currentState, nextState) {
|
|
2523
|
-
|
|
2608
|
+
/** @type {?} */
|
|
2609
|
+
const placeComponent = nextState ?
|
|
2610
|
+
(/** @type {?} */ (nextState.root.firstChild.component)) :
|
|
2611
|
+
null;
|
|
2612
|
+
/** @type {?} */
|
|
2613
|
+
const nextPlaceDefinition = lang.constructorChain(placeComponent).includes(PlaceComponent) ?
|
|
2614
|
+
PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (placeComponent))))) :
|
|
2615
|
+
null;
|
|
2616
|
+
if (nextPlaceDefinition.isDescriptorFor(component)) {
|
|
2617
|
+
// console.log("Same place different route. Do we need a place component hook for this??");
|
|
2618
|
+
return true;
|
|
2619
|
+
}
|
|
2620
|
+
else {
|
|
2621
|
+
return component.canDeactivate(nextPlaceDefinition, nextState);
|
|
2622
|
+
}
|
|
2524
2623
|
}
|
|
2525
2624
|
}
|
|
2526
2625
|
LeavePlaceGuard.decorators = [
|
|
@@ -3181,6 +3280,29 @@ var ParameterType;
|
|
|
3181
3280
|
ParameterType.BOOLEAN = new BooleanType();
|
|
3182
3281
|
})(ParameterType || (ParameterType = {}));
|
|
3183
3282
|
|
|
3283
|
+
/**
|
|
3284
|
+
* @fileoverview added by tsickle
|
|
3285
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3286
|
+
*/
|
|
3287
|
+
/**
|
|
3288
|
+
* @record
|
|
3289
|
+
* @template T
|
|
3290
|
+
*/
|
|
3291
|
+
function ResolvedParameter() { }
|
|
3292
|
+
if (false) {
|
|
3293
|
+
/** @type {?} */
|
|
3294
|
+
ResolvedParameter.prototype.parameterDef;
|
|
3295
|
+
/** @type {?} */
|
|
3296
|
+
ResolvedParameter.prototype.resolvedValue;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
/**
|
|
3300
|
+
* @fileoverview added by tsickle
|
|
3301
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3302
|
+
*/
|
|
3303
|
+
class VisitSnapshot {
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3184
3306
|
/**
|
|
3185
3307
|
* @fileoverview added by tsickle
|
|
3186
3308
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3201,5 +3323,5 @@ var ParameterType;
|
|
|
3201
3323
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3202
3324
|
*/
|
|
3203
3325
|
|
|
3204
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent,
|
|
3326
|
+
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, NumberInputComponent, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceService, Point, QueryParameter, QueryParameterList, ResizeAwareComponent, ResolvedRouteParameterSnapshot, RouteId, RouteParameter, RouteParameterBindings, RouteParameterList, RouteParameterSanitiser, Sanitiser, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, VisitSnapshot, slideDownAndUpAnimation, CommandDirective as ɵa, FocusBindingDirective as ɵb, 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, LEFT_RIGHT_PLACE_ANIMATION as ɵm, PlaceService as ɵn, TabbedPlaceNavigationComponent as ɵo, InteractionModule as ɵp, ActivityContainerComponent as ɵq, ConfirmationDialogComponent as ɵr, AbstractActivity as ɵs, ACTIVITY_DATA as ɵt, AlertDialogComponent as ɵv, ActivityOutletComponent as ɵx, DialogInteractionService as ɵy, InteractionContext as ɵz };
|
|
3205
3327
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|