@coolon/angular-ui-powerups 0.0.32 → 0.0.34
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 +847 -765
- 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 +1 -1
- 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 +8 -4
- package/esm2015/lib/place/place-component.js +163 -7
- package/esm2015/lib/place/place.decorator.js +7 -87
- package/esm2015/lib/place/place.service.js +47 -8
- package/esm2015/lib/place/route/parameter-decorators.js +1 -42
- 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 +1 -1
- 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 +8 -4
- package/esm5/lib/place/place-component.js +191 -7
- package/esm5/lib/place/place.decorator.js +7 -97
- package/esm5/lib/place/place.service.js +52 -10
- package/esm5/lib/place/route/parameter-decorators.js +1 -42
- 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 +777 -712
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +843 -761
- 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 +39 -1
- package/lib/place/place.decorator.d.ts +1 -25
- package/lib/place/place.service.d.ts +13 -2
- package/lib/place/route/parameter-decorators.d.ts +0 -12
- 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,336 @@ 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
|
+
* @return {?}
|
|
1608
1697
|
*/
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
/** @type {?|undefined} */
|
|
1617
|
-
Options.prototype.data;
|
|
1618
|
-
/** @type {?|undefined} */
|
|
1619
|
-
Options.prototype.authenticate;
|
|
1698
|
+
canDeactivate() {
|
|
1699
|
+
return true;
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* @return {?}
|
|
1703
|
+
*/
|
|
1704
|
+
onPlaceReady() {
|
|
1620
1705
|
}
|
|
1621
|
-
|
|
1706
|
+
}
|
|
1707
|
+
__decorate([
|
|
1708
|
+
Memoize(),
|
|
1709
|
+
__metadata("design:type", PlaceComponent.Definition),
|
|
1710
|
+
__metadata("design:paramtypes", [])
|
|
1711
|
+
], PlaceComponent.prototype, "placeConfig", null);
|
|
1712
|
+
__decorate([
|
|
1713
|
+
Trace(),
|
|
1714
|
+
__metadata("design:type", Function),
|
|
1715
|
+
__metadata("design:paramtypes", []),
|
|
1716
|
+
__metadata("design:returntype", void 0)
|
|
1717
|
+
], PlaceComponent.prototype, "onPlaceReady", null);
|
|
1718
|
+
if (false) {
|
|
1719
|
+
/**
|
|
1720
|
+
* @type {?}
|
|
1721
|
+
* @private
|
|
1722
|
+
*/
|
|
1723
|
+
PlaceComponent.prototype.routeBindingMediator;
|
|
1724
|
+
/** @type {?} */
|
|
1725
|
+
PlaceComponent.prototype.activatedRoute;
|
|
1726
|
+
}
|
|
1727
|
+
(function (PlaceComponent) {
|
|
1728
|
+
class Definition {
|
|
1622
1729
|
/**
|
|
1623
|
-
* @param {?}
|
|
1730
|
+
* @param {?} component
|
|
1624
1731
|
* @param {?} options
|
|
1625
1732
|
*/
|
|
1626
|
-
constructor(
|
|
1733
|
+
constructor(component, options) {
|
|
1734
|
+
this.component = component;
|
|
1627
1735
|
assert.notNil(options);
|
|
1628
1736
|
this.path = options.path;
|
|
1629
1737
|
this.order = options.order;
|
|
1630
1738
|
this.data = options.data;
|
|
1631
1739
|
this.authenticate = isNil(options.authenticate) || options.authenticate;
|
|
1632
1740
|
}
|
|
1741
|
+
/**
|
|
1742
|
+
* @param {?} construcable
|
|
1743
|
+
* @return {?}
|
|
1744
|
+
*/
|
|
1745
|
+
isDescriptorForType(construcable) {
|
|
1746
|
+
return lang.constructorChain(construcable).includes(PlaceComponent);
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* @param {?} placeComponent
|
|
1750
|
+
* @return {?}
|
|
1751
|
+
*/
|
|
1752
|
+
isDescriptorFor(placeComponent) {
|
|
1753
|
+
return placeComponent.constructor === this.component;
|
|
1754
|
+
}
|
|
1633
1755
|
/**
|
|
1634
1756
|
* @template T
|
|
1635
1757
|
* @param {?} key
|
|
@@ -1662,133 +1784,390 @@ function Place(options) {
|
|
|
1662
1784
|
}
|
|
1663
1785
|
}
|
|
1664
1786
|
}
|
|
1665
|
-
|
|
1787
|
+
PlaceComponent.Definition = Definition;
|
|
1666
1788
|
if (false) {
|
|
1667
1789
|
/** @type {?} */
|
|
1668
|
-
|
|
1790
|
+
Definition.prototype.path;
|
|
1791
|
+
/** @type {?} */
|
|
1792
|
+
Definition.prototype.authenticate;
|
|
1793
|
+
/** @type {?} */
|
|
1794
|
+
Definition.prototype.order;
|
|
1795
|
+
/** @type {?} */
|
|
1796
|
+
Definition.prototype.data;
|
|
1669
1797
|
/** @type {?} */
|
|
1670
|
-
|
|
1798
|
+
Definition.prototype.component;
|
|
1799
|
+
}
|
|
1800
|
+
/**
|
|
1801
|
+
* @record
|
|
1802
|
+
*/
|
|
1803
|
+
function Options() { }
|
|
1804
|
+
PlaceComponent.Options = Options;
|
|
1805
|
+
if (false) {
|
|
1671
1806
|
/** @type {?} */
|
|
1672
|
-
|
|
1807
|
+
Options.prototype.path;
|
|
1673
1808
|
/** @type {?} */
|
|
1674
|
-
|
|
1809
|
+
Options.prototype.order;
|
|
1810
|
+
/** @type {?|undefined} */
|
|
1811
|
+
Options.prototype.data;
|
|
1812
|
+
/** @type {?|undefined} */
|
|
1813
|
+
Options.prototype.authenticate;
|
|
1675
1814
|
}
|
|
1676
1815
|
/**
|
|
1677
1816
|
* @param {?} klass
|
|
1678
1817
|
* @return {?}
|
|
1679
1818
|
*/
|
|
1680
|
-
function
|
|
1819
|
+
function getDefinition(klass) {
|
|
1681
1820
|
/** @type {?} */
|
|
1682
|
-
const placeOptions = Reflect.getMetadata(
|
|
1683
|
-
return new
|
|
1821
|
+
const placeOptions = Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
1822
|
+
return new Definition(klass, placeOptions);
|
|
1684
1823
|
}
|
|
1685
|
-
|
|
1686
|
-
|
|
1824
|
+
PlaceComponent.getDefinition = getDefinition;
|
|
1825
|
+
/**
|
|
1826
|
+
* @param {?} klass
|
|
1827
|
+
* @param {?} options
|
|
1828
|
+
* @return {?}
|
|
1829
|
+
*/
|
|
1830
|
+
function injectDefinition(klass, options) {
|
|
1831
|
+
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, options, klass);
|
|
1832
|
+
}
|
|
1833
|
+
PlaceComponent.injectDefinition = injectDefinition;
|
|
1834
|
+
})(PlaceComponent || (PlaceComponent = {}));
|
|
1687
1835
|
|
|
1688
1836
|
/**
|
|
1689
1837
|
* @fileoverview added by tsickle
|
|
1690
1838
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1691
1839
|
*/
|
|
1692
|
-
class
|
|
1693
|
-
|
|
1840
|
+
class PlaceService extends GarbageCollector {
|
|
1841
|
+
/**
|
|
1842
|
+
* @param {?} router
|
|
1843
|
+
*/
|
|
1844
|
+
constructor(router) {
|
|
1694
1845
|
super();
|
|
1695
|
-
|
|
1696
|
-
this.
|
|
1697
|
-
* @param {?} c
|
|
1698
|
-
* @return {?}
|
|
1699
|
-
*/
|
|
1700
|
-
c => Place.getDescriptor(c))).sortBy('order');
|
|
1846
|
+
this.router = router;
|
|
1847
|
+
this._activePlaces = new MutableListModel();
|
|
1701
1848
|
}
|
|
1702
1849
|
/**
|
|
1703
1850
|
* @return {?}
|
|
1704
1851
|
*/
|
|
1705
|
-
|
|
1852
|
+
get activePlaces() {
|
|
1853
|
+
return this._activePlaces.readonly;
|
|
1854
|
+
}
|
|
1855
|
+
/**
|
|
1856
|
+
* @param {?} place
|
|
1857
|
+
* @return {?}
|
|
1858
|
+
*/
|
|
1859
|
+
onActivate(place) {
|
|
1860
|
+
this._activePlaces.push(place);
|
|
1861
|
+
}
|
|
1862
|
+
/**
|
|
1863
|
+
* @param {?} place
|
|
1864
|
+
* @return {?}
|
|
1865
|
+
*/
|
|
1866
|
+
onDeactivate(place) {
|
|
1867
|
+
this._activePlaces.remove(place);
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* @param {?} params
|
|
1871
|
+
* @return {?}
|
|
1872
|
+
*/
|
|
1873
|
+
notifyRouteParametersChanged(params) {
|
|
1874
|
+
// We update the router state...
|
|
1875
|
+
if (params.updateRoute) {
|
|
1876
|
+
/** @type {?} */
|
|
1877
|
+
const routeId = params.next.getFormattedRouteId();
|
|
1878
|
+
/** @type {?} */
|
|
1879
|
+
const relativePath = !!params.previous.hasRouteId() ? '..' : '.';
|
|
1880
|
+
/** @type {?} */
|
|
1881
|
+
const path = routeId ? [relativePath, routeId, params.next.getFormattedParameters()] : [relativePath, params.next.getFormattedParameters()];
|
|
1882
|
+
this.router.navigate(path, {
|
|
1883
|
+
relativeTo: params.placeComponent.activatedRoute
|
|
1884
|
+
});
|
|
1885
|
+
}
|
|
1706
1886
|
}
|
|
1707
1887
|
}
|
|
1708
|
-
|
|
1709
|
-
{ type:
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
styles: [""]
|
|
1713
|
-
}] }
|
|
1888
|
+
PlaceService.decorators = [
|
|
1889
|
+
{ type: Injectable, args: [{
|
|
1890
|
+
providedIn: 'root'
|
|
1891
|
+
},] }
|
|
1714
1892
|
];
|
|
1715
1893
|
/** @nocollapse */
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
};
|
|
1894
|
+
PlaceService.ctorParameters = () => [
|
|
1895
|
+
{ type: Router }
|
|
1896
|
+
];
|
|
1897
|
+
/** @nocollapse */ PlaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(ɵɵinject(Router)); }, token: PlaceService, providedIn: "root" });
|
|
1721
1898
|
__decorate([
|
|
1722
|
-
|
|
1723
|
-
__metadata("design:type",
|
|
1724
|
-
|
|
1899
|
+
Trace(),
|
|
1900
|
+
__metadata("design:type", Function),
|
|
1901
|
+
__metadata("design:paramtypes", [PlaceComponent]),
|
|
1902
|
+
__metadata("design:returntype", void 0)
|
|
1903
|
+
], PlaceService.prototype, "onActivate", null);
|
|
1725
1904
|
__decorate([
|
|
1726
|
-
|
|
1727
|
-
__metadata("design:type",
|
|
1728
|
-
|
|
1905
|
+
Trace(),
|
|
1906
|
+
__metadata("design:type", Function),
|
|
1907
|
+
__metadata("design:paramtypes", [PlaceComponent]),
|
|
1908
|
+
__metadata("design:returntype", void 0)
|
|
1909
|
+
], PlaceService.prototype, "onDeactivate", null);
|
|
1910
|
+
__decorate([
|
|
1911
|
+
Trace(),
|
|
1912
|
+
__metadata("design:type", Function),
|
|
1913
|
+
__metadata("design:paramtypes", [Object]),
|
|
1914
|
+
__metadata("design:returntype", void 0)
|
|
1915
|
+
], PlaceService.prototype, "notifyRouteParametersChanged", null);
|
|
1729
1916
|
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 {
|
|
1917
|
+
/**
|
|
1918
|
+
* @type {?}
|
|
1919
|
+
* @private
|
|
1920
|
+
*/
|
|
1921
|
+
PlaceService.prototype._activePlaces;
|
|
1922
|
+
/**
|
|
1923
|
+
* @type {?}
|
|
1924
|
+
* @protected
|
|
1925
|
+
*/
|
|
1926
|
+
PlaceService.prototype.router;
|
|
1743
1927
|
}
|
|
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
1928
|
|
|
1775
1929
|
/**
|
|
1776
1930
|
* @fileoverview added by tsickle
|
|
1777
1931
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1778
1932
|
*/
|
|
1779
|
-
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1933
|
+
// Freezes the state of the components at the start of the animation.
|
|
1934
|
+
/** @type {?} */
|
|
1935
|
+
const animationStartStyle = style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
|
|
1936
|
+
/** @type {?} */
|
|
1937
|
+
const left = [
|
|
1938
|
+
query(':enter, :leave', animationStartStyle, { optional: true }),
|
|
1939
|
+
group([
|
|
1940
|
+
query(':enter', [
|
|
1941
|
+
style({ transform: 'translateX(-100%)' }),
|
|
1942
|
+
animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
|
|
1943
|
+
], {
|
|
1944
|
+
optional: true
|
|
1945
|
+
}),
|
|
1946
|
+
query(':leave', [
|
|
1947
|
+
style({ transform: 'translateX(0%)' }),
|
|
1948
|
+
animate('{{duration}} ease-out', style({ transform: 'translateX(100%)' }))
|
|
1949
|
+
], {
|
|
1950
|
+
optional: true
|
|
1951
|
+
})
|
|
1952
|
+
])
|
|
1953
|
+
];
|
|
1954
|
+
/** @type {?} */
|
|
1955
|
+
const right = [
|
|
1956
|
+
query(':enter, :leave', animationStartStyle, { optional: true }),
|
|
1957
|
+
group([
|
|
1958
|
+
query(':enter', [
|
|
1959
|
+
style({ transform: 'translateX(100%)' }),
|
|
1960
|
+
animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
|
|
1961
|
+
], {
|
|
1962
|
+
optional: true
|
|
1963
|
+
}),
|
|
1964
|
+
query(':leave', [style({ transform: 'translateX(0%)' }), animate('{{duration}} ease-out', style({ transform: 'translateX(-100%)' }))], {
|
|
1965
|
+
optional: true
|
|
1966
|
+
})
|
|
1967
|
+
])
|
|
1968
|
+
];
|
|
1969
|
+
/** @type {?} */
|
|
1970
|
+
const LEFT_RIGHT_PLACE_ANIMATION = trigger('routeAnimations', [
|
|
1971
|
+
transition(':increment', right, { params: { duration: '.3s' } }),
|
|
1972
|
+
transition(':decrement', left, { params: { duration: '.3s' } })
|
|
1973
|
+
]);
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* @fileoverview added by tsickle
|
|
1977
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1978
|
+
*/
|
|
1979
|
+
class PlaceOutletComponent {
|
|
1980
|
+
/**
|
|
1981
|
+
* @param {?} placeService
|
|
1982
|
+
*/
|
|
1983
|
+
constructor(placeService) {
|
|
1984
|
+
this.placeService = placeService;
|
|
1985
|
+
this.animate = true;
|
|
1986
|
+
}
|
|
1987
|
+
/**
|
|
1988
|
+
* @return {?}
|
|
1989
|
+
*/
|
|
1990
|
+
ngOnInit() {
|
|
1991
|
+
}
|
|
1992
|
+
/**
|
|
1993
|
+
* @param {?} $event
|
|
1994
|
+
* @return {?}
|
|
1995
|
+
*/
|
|
1996
|
+
onActivate($event) {
|
|
1997
|
+
this.currentPlace = $event;
|
|
1998
|
+
this.placeService.onActivate($event);
|
|
1999
|
+
if (!this.animate) {
|
|
2000
|
+
this.notifyPlaceReady();
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
/**
|
|
2004
|
+
* @param {?} $event
|
|
2005
|
+
* @return {?}
|
|
2006
|
+
*/
|
|
2007
|
+
onDeactivate($event) {
|
|
2008
|
+
this.currentPlace = null;
|
|
2009
|
+
this.placeService.onDeactivate($event);
|
|
2010
|
+
}
|
|
2011
|
+
/**
|
|
2012
|
+
* @param {?} outlet
|
|
2013
|
+
* @return {?}
|
|
2014
|
+
*/
|
|
2015
|
+
getPlaceOrder(outlet) {
|
|
2016
|
+
return this.animate && outlet && outlet.activatedRouteData && outlet.activatedRouteData['placeOrder'];
|
|
2017
|
+
}
|
|
2018
|
+
/**
|
|
2019
|
+
* @return {?}
|
|
2020
|
+
*/
|
|
2021
|
+
animationDone() {
|
|
2022
|
+
this.notifyPlaceReady();
|
|
2023
|
+
}
|
|
2024
|
+
/**
|
|
2025
|
+
* @private
|
|
2026
|
+
* @return {?}
|
|
2027
|
+
*/
|
|
2028
|
+
notifyPlaceReady() {
|
|
2029
|
+
if (this.currentPlace) {
|
|
2030
|
+
this.currentPlace.onPlaceReady();
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
PlaceOutletComponent.decorators = [
|
|
2035
|
+
{ type: Component, args: [{
|
|
2036
|
+
selector: 'angular-ui-powerups-place-outlet',
|
|
2037
|
+
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",
|
|
2038
|
+
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
2039
|
+
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}"]
|
|
2040
|
+
}] }
|
|
2041
|
+
];
|
|
2042
|
+
/** @nocollapse */
|
|
2043
|
+
PlaceOutletComponent.ctorParameters = () => [
|
|
2044
|
+
{ type: PlaceService }
|
|
2045
|
+
];
|
|
2046
|
+
PlaceOutletComponent.propDecorators = {
|
|
2047
|
+
animate: [{ type: Input }],
|
|
2048
|
+
routerOutLet: [{ type: ViewChild, args: ['routerOutlet', { static: false },] }]
|
|
2049
|
+
};
|
|
2050
|
+
if (false) {
|
|
2051
|
+
/** @type {?} */
|
|
2052
|
+
PlaceOutletComponent.prototype.animate;
|
|
2053
|
+
/** @type {?} */
|
|
2054
|
+
PlaceOutletComponent.prototype.routerOutLet;
|
|
2055
|
+
/**
|
|
2056
|
+
* @type {?}
|
|
2057
|
+
* @private
|
|
2058
|
+
*/
|
|
2059
|
+
PlaceOutletComponent.prototype.currentPlace;
|
|
2060
|
+
/**
|
|
2061
|
+
* @type {?}
|
|
2062
|
+
* @private
|
|
2063
|
+
*/
|
|
2064
|
+
PlaceOutletComponent.prototype.placeService;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* @fileoverview added by tsickle
|
|
2069
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2070
|
+
*/
|
|
2071
|
+
class TabbedPlaceNavigationComponent extends DisposableComponent {
|
|
2072
|
+
constructor() {
|
|
2073
|
+
super();
|
|
2074
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2075
|
+
this.orderedPlaces = chain(this.placesModel).map((/**
|
|
2076
|
+
* @param {?} c
|
|
2077
|
+
* @return {?}
|
|
2078
|
+
*/
|
|
2079
|
+
c => PlaceComponent.getDefinition(c))).sortBy('order');
|
|
2080
|
+
}
|
|
2081
|
+
/**
|
|
2082
|
+
* @return {?}
|
|
2083
|
+
*/
|
|
2084
|
+
ngOnInit() {
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
TabbedPlaceNavigationComponent.decorators = [
|
|
2088
|
+
{ type: Component, args: [{
|
|
2089
|
+
selector: 'angular-ui-powerups-tabbed-place-navigation',
|
|
2090
|
+
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",
|
|
2091
|
+
styles: [""]
|
|
2092
|
+
}] }
|
|
2093
|
+
];
|
|
2094
|
+
/** @nocollapse */
|
|
2095
|
+
TabbedPlaceNavigationComponent.ctorParameters = () => [];
|
|
2096
|
+
TabbedPlaceNavigationComponent.propDecorators = {
|
|
2097
|
+
places: [{ type: Input }],
|
|
2098
|
+
placesModel: [{ type: Input }]
|
|
2099
|
+
};
|
|
2100
|
+
__decorate([
|
|
2101
|
+
StoreInListModel('placesModel'),
|
|
2102
|
+
__metadata("design:type", Array)
|
|
2103
|
+
], TabbedPlaceNavigationComponent.prototype, "places", void 0);
|
|
2104
|
+
__decorate([
|
|
2105
|
+
UseDelegate(),
|
|
2106
|
+
__metadata("design:type", ListModel)
|
|
2107
|
+
], TabbedPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
2108
|
+
if (false) {
|
|
2109
|
+
/** @type {?} */
|
|
2110
|
+
TabbedPlaceNavigationComponent.prototype.places;
|
|
2111
|
+
/** @type {?} */
|
|
2112
|
+
TabbedPlaceNavigationComponent.prototype.placesModel;
|
|
2113
|
+
/** @type {?} */
|
|
2114
|
+
TabbedPlaceNavigationComponent.prototype.orderedPlaces;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
/**
|
|
2118
|
+
* @fileoverview added by tsickle
|
|
2119
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2120
|
+
*/
|
|
2121
|
+
class PlaceModule {
|
|
2122
|
+
}
|
|
2123
|
+
PlaceModule.decorators = [
|
|
2124
|
+
{ type: NgModule, args: [{
|
|
2125
|
+
imports: [
|
|
2126
|
+
CommonModule,
|
|
2127
|
+
BrowserAnimationsModule,
|
|
2128
|
+
MatProgressSpinnerModule,
|
|
2129
|
+
RouterModule,
|
|
2130
|
+
MatTabsModule$1,
|
|
2131
|
+
MatListModule,
|
|
2132
|
+
MatTooltipModule,
|
|
2133
|
+
MatIconModule
|
|
2134
|
+
],
|
|
2135
|
+
declarations: [
|
|
2136
|
+
EmptyStateComponent,
|
|
2137
|
+
BusyOverlayComponent,
|
|
2138
|
+
PlaceOutletComponent,
|
|
2139
|
+
TabbedPlaceNavigationComponent
|
|
2140
|
+
],
|
|
2141
|
+
entryComponents: [BusyOverlayComponent],
|
|
2142
|
+
exports: [
|
|
2143
|
+
BusyOverlayComponent,
|
|
2144
|
+
PlaceOutletComponent,
|
|
2145
|
+
EmptyStateComponent,
|
|
2146
|
+
TabbedPlaceNavigationComponent
|
|
2147
|
+
],
|
|
2148
|
+
providers: [
|
|
2149
|
+
PlaceService
|
|
2150
|
+
]
|
|
2151
|
+
},] }
|
|
2152
|
+
];
|
|
2153
|
+
|
|
2154
|
+
/**
|
|
2155
|
+
* @fileoverview added by tsickle
|
|
2156
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2157
|
+
*/
|
|
2158
|
+
class AngularUiPowerupsModule {
|
|
2159
|
+
}
|
|
2160
|
+
AngularUiPowerupsModule.decorators = [
|
|
2161
|
+
{ type: NgModule, args: [{
|
|
2162
|
+
declarations: [
|
|
2163
|
+
CommandDirective,
|
|
2164
|
+
FocusBindingDirective,
|
|
2165
|
+
NumberInputComponent,
|
|
2166
|
+
StringInputComponent,
|
|
2167
|
+
PasswordInputComponent,
|
|
2168
|
+
SelectInputComponent,
|
|
2169
|
+
],
|
|
2170
|
+
imports: [
|
|
1792
2171
|
CommonModule,
|
|
1793
2172
|
BrowserModule,
|
|
1794
2173
|
BrowserAnimationsModule,
|
|
@@ -2005,483 +2384,165 @@ class ResizeAwareComponent extends DisposableComponent {
|
|
|
2005
2384
|
/**
|
|
2006
2385
|
* @return {?}
|
|
2007
2386
|
*/
|
|
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
|
|
2347
|
-
* @return {?}
|
|
2348
|
-
*/
|
|
2349
|
-
resolvedParameters => {
|
|
2350
|
-
this._incomingRouteChange.value = true;
|
|
2351
|
-
this.resolvedParameters.value = resolvedParameters;
|
|
2352
|
-
this._incomingRouteChange.value = false;
|
|
2353
|
-
}));
|
|
2354
|
-
when.valueOf(this.resolvedParameters).changes((/**
|
|
2355
|
-
* @param {?} params
|
|
2356
|
-
* @param {?} previous
|
|
2357
|
-
* @return {?}
|
|
2358
|
-
*/
|
|
2359
|
-
(params, previous) => {
|
|
2360
|
-
params.redirect(previous, router, activatedRoute);
|
|
2361
|
-
}), { unless: this.incomingRouteChange });
|
|
2362
|
-
this.txo.observe('incomingResolvedRouteParameters', incomingResolvedRouteParameters);
|
|
2363
|
-
this.txo.observe('this.routeIsChanging', this.incomingRouteChange);
|
|
2364
|
-
}
|
|
2365
|
-
/**
|
|
2366
|
-
* @return {?}
|
|
2367
|
-
*/
|
|
2368
|
-
get incomingRouteChange() {
|
|
2369
|
-
return this._incomingRouteChange.readonly;
|
|
2387
|
+
get nativeElement() {
|
|
2388
|
+
return this.elementRef.nativeElement;
|
|
2370
2389
|
}
|
|
2390
|
+
// TODO: Make this handle body scroll
|
|
2371
2391
|
/**
|
|
2372
|
-
* @
|
|
2373
|
-
* @template T
|
|
2374
|
-
* @param {?} parameter
|
|
2392
|
+
* @param {?} point
|
|
2375
2393
|
* @return {?}
|
|
2376
2394
|
*/
|
|
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
|
-
}));
|
|
2395
|
+
relativePositionOf(point) {
|
|
2396
|
+
return this.bounds.relativePositionOf(point);
|
|
2398
2397
|
}
|
|
2399
2398
|
/**
|
|
2400
|
-
* @private
|
|
2401
|
-
* @template T
|
|
2402
|
-
* @param {?} parameter
|
|
2403
2399
|
* @return {?}
|
|
2404
2400
|
*/
|
|
2405
|
-
|
|
2406
|
-
return this.
|
|
2401
|
+
get bounds() {
|
|
2402
|
+
return this._boundsModel.value;
|
|
2407
2403
|
}
|
|
2408
|
-
}
|
|
2409
|
-
if (false) {
|
|
2410
|
-
/** @type {?} */
|
|
2411
|
-
RouteParameterBindings.prototype._incomingRouteChange;
|
|
2412
|
-
/**
|
|
2413
|
-
* @type {?}
|
|
2414
|
-
* @private
|
|
2415
|
-
*/
|
|
2416
|
-
RouteParameterBindings.prototype.txo;
|
|
2417
2404
|
/**
|
|
2418
|
-
* @type {?}
|
|
2419
2405
|
* @private
|
|
2406
|
+
* @return {?}
|
|
2420
2407
|
*/
|
|
2421
|
-
|
|
2408
|
+
updateBounds() {
|
|
2409
|
+
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
if (false) {
|
|
2422
2413
|
/**
|
|
2423
2414
|
* @type {?}
|
|
2424
2415
|
* @private
|
|
2425
2416
|
*/
|
|
2426
|
-
|
|
2417
|
+
ResizeAwareComponent.prototype._boundsModel;
|
|
2427
2418
|
/**
|
|
2428
2419
|
* @type {?}
|
|
2429
|
-
* @
|
|
2420
|
+
* @protected
|
|
2430
2421
|
*/
|
|
2431
|
-
|
|
2422
|
+
ResizeAwareComponent.prototype.elementRef;
|
|
2432
2423
|
/**
|
|
2433
2424
|
* @type {?}
|
|
2434
|
-
* @
|
|
2425
|
+
* @protected
|
|
2435
2426
|
*/
|
|
2436
|
-
|
|
2427
|
+
ResizeAwareComponent.prototype.ngZone;
|
|
2437
2428
|
}
|
|
2438
|
-
(function (RouteParameterBindings) {
|
|
2439
|
-
RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
2440
|
-
})(RouteParameterBindings || (RouteParameterBindings = {}));
|
|
2441
2429
|
|
|
2442
2430
|
/**
|
|
2443
2431
|
* @fileoverview added by tsickle
|
|
2444
2432
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2445
2433
|
*/
|
|
2446
|
-
|
|
2434
|
+
|
|
2435
|
+
/**
|
|
2436
|
+
* @fileoverview added by tsickle
|
|
2437
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2438
|
+
*/
|
|
2439
|
+
|
|
2440
|
+
/**
|
|
2441
|
+
* @fileoverview added by tsickle
|
|
2442
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2443
|
+
*/
|
|
2444
|
+
/**
|
|
2445
|
+
* @record
|
|
2446
|
+
*/
|
|
2447
|
+
function Alert() { }
|
|
2448
|
+
if (false) {
|
|
2447
2449
|
/**
|
|
2448
|
-
* @
|
|
2449
|
-
* @param {?} router
|
|
2450
|
+
* @return {?}
|
|
2450
2451
|
*/
|
|
2451
|
-
|
|
2452
|
-
super();
|
|
2453
|
-
this.activatedRoute = activatedRoute;
|
|
2454
|
-
this.routeBindingMediator = this.registerDisposable(new RouteParameterBindings(this, router, activatedRoute));
|
|
2455
|
-
}
|
|
2452
|
+
Alert.prototype.title = function () { };
|
|
2456
2453
|
/**
|
|
2457
2454
|
* @return {?}
|
|
2458
2455
|
*/
|
|
2459
|
-
|
|
2460
|
-
return Place.getDescriptor((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
2461
|
-
}
|
|
2456
|
+
Alert.prototype.content = function () { };
|
|
2462
2457
|
/**
|
|
2463
2458
|
* @return {?}
|
|
2464
2459
|
*/
|
|
2465
|
-
|
|
2466
|
-
return true;
|
|
2467
|
-
}
|
|
2460
|
+
Alert.prototype.ok = function () { };
|
|
2468
2461
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2462
|
+
|
|
2463
|
+
/**
|
|
2464
|
+
* @fileoverview added by tsickle
|
|
2465
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2466
|
+
*/
|
|
2467
|
+
/**
|
|
2468
|
+
* @record
|
|
2469
|
+
*/
|
|
2470
|
+
function Confirm() { }
|
|
2474
2471
|
if (false) {
|
|
2472
|
+
/** @type {?|undefined} */
|
|
2473
|
+
Confirm.prototype.destructive;
|
|
2475
2474
|
/**
|
|
2476
|
-
* @
|
|
2477
|
-
* @private
|
|
2475
|
+
* @return {?}
|
|
2478
2476
|
*/
|
|
2479
|
-
|
|
2477
|
+
Confirm.prototype.cancel = function () { };
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
/**
|
|
2481
|
+
* @fileoverview added by tsickle
|
|
2482
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2483
|
+
*/
|
|
2484
|
+
/**
|
|
2485
|
+
* @record
|
|
2486
|
+
* @template R, E
|
|
2487
|
+
*/
|
|
2488
|
+
function Result() { }
|
|
2489
|
+
(function (Result) {
|
|
2480
2490
|
/**
|
|
2481
|
-
* @
|
|
2482
|
-
* @
|
|
2491
|
+
* @record
|
|
2492
|
+
* @template R, E
|
|
2493
|
+
*/
|
|
2494
|
+
function Callback() { }
|
|
2495
|
+
Result.Callback = Callback;
|
|
2496
|
+
if (false) {
|
|
2497
|
+
/** @type {?} */
|
|
2498
|
+
Callback.prototype.then;
|
|
2499
|
+
/** @type {?} */
|
|
2500
|
+
Callback.prototype.catch;
|
|
2501
|
+
}
|
|
2502
|
+
})(Result || (Result = {}));
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* @fileoverview added by tsickle
|
|
2506
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2507
|
+
*/
|
|
2508
|
+
/**
|
|
2509
|
+
* @record
|
|
2510
|
+
* @template D, R, E
|
|
2511
|
+
*/
|
|
2512
|
+
function ActivityOutletContext() { }
|
|
2513
|
+
if (false) {
|
|
2514
|
+
/** @type {?} */
|
|
2515
|
+
ActivityOutletContext.prototype.interactionContext;
|
|
2516
|
+
/** @type {?} */
|
|
2517
|
+
ActivityOutletContext.prototype.activityClass;
|
|
2518
|
+
/** @type {?} */
|
|
2519
|
+
ActivityOutletContext.prototype.activityData;
|
|
2520
|
+
/** @type {?} */
|
|
2521
|
+
ActivityOutletContext.prototype.onDone;
|
|
2522
|
+
/** @type {?} */
|
|
2523
|
+
ActivityOutletContext.prototype.onCancel;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
/**
|
|
2527
|
+
* @fileoverview added by tsickle
|
|
2528
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2529
|
+
*/
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* @fileoverview added by tsickle
|
|
2533
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2534
|
+
*/
|
|
2535
|
+
/**
|
|
2536
|
+
* @record
|
|
2537
|
+
*/
|
|
2538
|
+
function IPlaceComponent() { }
|
|
2539
|
+
if (false) {
|
|
2540
|
+
/** @type {?} */
|
|
2541
|
+
IPlaceComponent.prototype.activatedRoute;
|
|
2542
|
+
/**
|
|
2543
|
+
* @return {?}
|
|
2483
2544
|
*/
|
|
2484
|
-
|
|
2545
|
+
IPlaceComponent.prototype.onPlaceReady = function () { };
|
|
2485
2546
|
}
|
|
2486
2547
|
|
|
2487
2548
|
/**
|
|
@@ -2491,12 +2552,34 @@ if (false) {
|
|
|
2491
2552
|
/**
|
|
2492
2553
|
* @record
|
|
2493
2554
|
*/
|
|
2494
|
-
function
|
|
2555
|
+
function IPlaceService() { }
|
|
2495
2556
|
if (false) {
|
|
2496
2557
|
/**
|
|
2558
|
+
* @param {?} params
|
|
2559
|
+
* @return {?}
|
|
2560
|
+
*/
|
|
2561
|
+
IPlaceService.prototype.notifyRouteParametersChanged = function (params) { };
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* @fileoverview added by tsickle
|
|
2566
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2567
|
+
*/
|
|
2568
|
+
/**
|
|
2569
|
+
* @param {?} options
|
|
2570
|
+
* @return {?}
|
|
2571
|
+
*/
|
|
2572
|
+
function Place(options) {
|
|
2573
|
+
return (/**
|
|
2574
|
+
* @param {?} target
|
|
2497
2575
|
* @return {?}
|
|
2498
2576
|
*/
|
|
2499
|
-
|
|
2577
|
+
(target) => {
|
|
2578
|
+
if (!lang.constructorChain((/** @type {?} */ (target))).includes(PlaceComponent)) {
|
|
2579
|
+
lang.illegalState(`${target} must extend PlaceComponent to use the @Place decorator`);
|
|
2580
|
+
}
|
|
2581
|
+
PlaceComponent.injectDefinition((/** @type {?} */ (target)), options);
|
|
2582
|
+
});
|
|
2500
2583
|
}
|
|
2501
2584
|
|
|
2502
2585
|
/**
|
|
@@ -2951,26 +3034,6 @@ function RouteId(type, options) {
|
|
|
2951
3034
|
UseDelegate()(prototype, propertyKey);
|
|
2952
3035
|
});
|
|
2953
3036
|
}
|
|
2954
|
-
/**
|
|
2955
|
-
* @deprecated use RouteParameter instead.
|
|
2956
|
-
* @template T
|
|
2957
|
-
* @param {?} type
|
|
2958
|
-
* @param {?=} options
|
|
2959
|
-
* @return {?}
|
|
2960
|
-
*/
|
|
2961
|
-
function QueryParameter(type, options) {
|
|
2962
|
-
return (/**
|
|
2963
|
-
* @param {?} prototype
|
|
2964
|
-
* @param {?} propertyKey
|
|
2965
|
-
* @return {?}
|
|
2966
|
-
*/
|
|
2967
|
-
(prototype, propertyKey) => {
|
|
2968
|
-
/** @type {?} */
|
|
2969
|
-
const param = createDefinition(propertyKey, type, options, false);
|
|
2970
|
-
Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
|
|
2971
|
-
UseDelegate()(prototype, propertyKey);
|
|
2972
|
-
});
|
|
2973
|
-
}
|
|
2974
3037
|
/**
|
|
2975
3038
|
* @template T
|
|
2976
3039
|
* @param {?} type
|
|
@@ -2991,27 +3054,6 @@ function RouteParameter(type, options) {
|
|
|
2991
3054
|
UseDelegate()(prototype, propertyKey);
|
|
2992
3055
|
});
|
|
2993
3056
|
}
|
|
2994
|
-
/**
|
|
2995
|
-
* @deprecated use RouteParameterList instead
|
|
2996
|
-
* @template E
|
|
2997
|
-
* @param {?} elementType
|
|
2998
|
-
* @param {?=} options
|
|
2999
|
-
* @return {?}
|
|
3000
|
-
*/
|
|
3001
|
-
function QueryParameterList(elementType, options) {
|
|
3002
|
-
// assert.isTruthy(type.isValid());
|
|
3003
|
-
return (/**
|
|
3004
|
-
* @param {?} prototype
|
|
3005
|
-
* @param {?} propertyKey
|
|
3006
|
-
* @return {?}
|
|
3007
|
-
*/
|
|
3008
|
-
(prototype, propertyKey) => {
|
|
3009
|
-
/** @type {?} */
|
|
3010
|
-
const param = createArrayDefinition(propertyKey, elementType, options);
|
|
3011
|
-
Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
|
|
3012
|
-
UseDelegate()(prototype, propertyKey);
|
|
3013
|
-
});
|
|
3014
|
-
}
|
|
3015
3057
|
/**
|
|
3016
3058
|
* @template E
|
|
3017
3059
|
* @param {?} elementType
|
|
@@ -3181,6 +3223,29 @@ var ParameterType;
|
|
|
3181
3223
|
ParameterType.BOOLEAN = new BooleanType();
|
|
3182
3224
|
})(ParameterType || (ParameterType = {}));
|
|
3183
3225
|
|
|
3226
|
+
/**
|
|
3227
|
+
* @fileoverview added by tsickle
|
|
3228
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3229
|
+
*/
|
|
3230
|
+
/**
|
|
3231
|
+
* @record
|
|
3232
|
+
* @template T
|
|
3233
|
+
*/
|
|
3234
|
+
function ResolvedParameter() { }
|
|
3235
|
+
if (false) {
|
|
3236
|
+
/** @type {?} */
|
|
3237
|
+
ResolvedParameter.prototype.parameterDef;
|
|
3238
|
+
/** @type {?} */
|
|
3239
|
+
ResolvedParameter.prototype.resolvedValue;
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3242
|
+
/**
|
|
3243
|
+
* @fileoverview added by tsickle
|
|
3244
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3245
|
+
*/
|
|
3246
|
+
class VisitSnapshot {
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3184
3249
|
/**
|
|
3185
3250
|
* @fileoverview added by tsickle
|
|
3186
3251
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3201,5 +3266,5 @@ var ParameterType;
|
|
|
3201
3266
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3202
3267
|
*/
|
|
3203
3268
|
|
|
3204
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent,
|
|
3269
|
+
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, 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
3270
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|