@coolon/angular-ui-powerups 0.0.31 → 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 +1056 -901
- 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 +34 -5
- package/esm2015/lib/place/components/place-outlet/route-animations.js +29 -17
- 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 +41 -5
- package/esm5/lib/place/components/place-outlet/route-animations.js +29 -17
- 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 +835 -701
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1054 -901
- 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/styles/styles.scss +10 -0
- 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,202 +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
|
-
const left = [
|
|
1484
|
-
query(':enter, :leave', style({ position: 'fixed', width: '100%' }), { optional: true }),
|
|
1485
|
-
group([
|
|
1486
|
-
query(':enter', [style({ transform: 'translateX(-100%)' }), animate('.3s ease-out', style({ transform: 'translateX(0%)' }))], {
|
|
1487
|
-
optional: true,
|
|
1488
|
-
}),
|
|
1489
|
-
query(':leave', [style({ transform: 'translateX(0%)' }), animate('.3s ease-out', style({ transform: 'translateX(100%)' }))], {
|
|
1490
|
-
optional: true,
|
|
1491
|
-
}),
|
|
1492
|
-
]),
|
|
1493
|
-
];
|
|
1494
|
-
/** @type {?} */
|
|
1495
|
-
const right = [
|
|
1496
|
-
query(':enter, :leave', style({ position: 'fixed', width: '100%' }), { optional: true }),
|
|
1497
|
-
group([
|
|
1498
|
-
query(':enter', [style({ transform: 'translateX(100%)' }), animate('.3s ease-out', style({ transform: 'translateX(0%)' }))], {
|
|
1499
|
-
optional: true,
|
|
1500
|
-
}),
|
|
1501
|
-
query(':leave', [style({ transform: 'translateX(0%)' }), animate('.3s ease-out', style({ transform: 'translateX(-100%)' }))], {
|
|
1502
|
-
optional: true,
|
|
1503
|
-
}),
|
|
1504
|
-
]),
|
|
1505
|
-
];
|
|
1506
|
-
/** @type {?} */
|
|
1507
|
-
const LEFT_RIGHT_PLACE_ANIMATION = trigger('routeAnimations', [
|
|
1508
|
-
transition(':increment', right),
|
|
1509
|
-
transition(':decrement', left),
|
|
1510
|
-
]);
|
|
1511
|
-
|
|
1512
|
-
/**
|
|
1513
|
-
* @fileoverview added by tsickle
|
|
1514
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1515
|
-
*/
|
|
1516
|
-
class PlaceOutletComponent {
|
|
1529
|
+
class RouteParameterBindings extends GarbageCollector {
|
|
1517
1530
|
/**
|
|
1531
|
+
* @param {?} component
|
|
1518
1532
|
* @param {?} placeService
|
|
1519
1533
|
*/
|
|
1520
|
-
constructor(placeService) {
|
|
1521
|
-
|
|
1522
|
-
this.
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
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);
|
|
1528
1604
|
}
|
|
1529
1605
|
/**
|
|
1530
|
-
* @param {?} $event
|
|
1531
1606
|
* @return {?}
|
|
1532
1607
|
*/
|
|
1533
|
-
|
|
1534
|
-
this.
|
|
1608
|
+
get incomingRouteChange() {
|
|
1609
|
+
return this._incomingRouteChange.readonly;
|
|
1535
1610
|
}
|
|
1536
1611
|
/**
|
|
1537
|
-
* @
|
|
1612
|
+
* @protected
|
|
1613
|
+
* @template T
|
|
1614
|
+
* @param {?} parameter
|
|
1538
1615
|
* @return {?}
|
|
1539
1616
|
*/
|
|
1540
|
-
|
|
1541
|
-
|
|
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
|
+
}));
|
|
1542
1638
|
}
|
|
1543
1639
|
/**
|
|
1544
|
-
* @
|
|
1640
|
+
* @private
|
|
1641
|
+
* @template T
|
|
1642
|
+
* @param {?} parameter
|
|
1545
1643
|
* @return {?}
|
|
1546
1644
|
*/
|
|
1547
|
-
|
|
1548
|
-
return this.
|
|
1645
|
+
getModelFor(parameter) {
|
|
1646
|
+
return this.component[parameter.propertyName];
|
|
1549
1647
|
}
|
|
1550
1648
|
}
|
|
1551
|
-
PlaceOutletComponent.decorators = [
|
|
1552
|
-
{ type: Component, args: [{
|
|
1553
|
-
selector: 'angular-ui-powerups-place-outlet',
|
|
1554
|
-
template: "<div container [@routeAnimations]=\"getPlaceOrder(routerOutlet)\">\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\">\n </router-outlet>\n</div>\n\n",
|
|
1555
|
-
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
1556
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0}[container]{flex:1;display:-ms-grid;display:grid;-ms-grid-rows:0 1fr;grid-template-rows:0 1fr;min-height:0}"]
|
|
1557
|
-
}] }
|
|
1558
|
-
];
|
|
1559
|
-
/** @nocollapse */
|
|
1560
|
-
PlaceOutletComponent.ctorParameters = () => [
|
|
1561
|
-
{ type: PlaceService }
|
|
1562
|
-
];
|
|
1563
|
-
PlaceOutletComponent.propDecorators = {
|
|
1564
|
-
animate: [{ type: Input }]
|
|
1565
|
-
};
|
|
1566
1649
|
if (false) {
|
|
1567
1650
|
/** @type {?} */
|
|
1568
|
-
|
|
1651
|
+
RouteParameterBindings.prototype._incomingRouteChange;
|
|
1569
1652
|
/**
|
|
1570
1653
|
* @type {?}
|
|
1571
1654
|
* @private
|
|
1572
1655
|
*/
|
|
1573
|
-
|
|
1656
|
+
RouteParameterBindings.prototype.txo;
|
|
1657
|
+
/**
|
|
1658
|
+
* @type {?}
|
|
1659
|
+
* @private
|
|
1660
|
+
*/
|
|
1661
|
+
RouteParameterBindings.prototype.resolvedParameters;
|
|
1662
|
+
/**
|
|
1663
|
+
* @type {?}
|
|
1664
|
+
* @private
|
|
1665
|
+
*/
|
|
1666
|
+
RouteParameterBindings.prototype.component;
|
|
1574
1667
|
}
|
|
1668
|
+
(function (RouteParameterBindings) {
|
|
1669
|
+
RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
1670
|
+
})(RouteParameterBindings || (RouteParameterBindings = {}));
|
|
1575
1671
|
|
|
1576
1672
|
/**
|
|
1577
1673
|
* @fileoverview added by tsickle
|
|
1578
1674
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1579
1675
|
*/
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
* @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
|
+
/**
|
|
1587
1690
|
* @return {?}
|
|
1588
1691
|
*/
|
|
1589
|
-
(
|
|
1590
|
-
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
(function (Place) {
|
|
1692
|
+
get placeConfig() {
|
|
1693
|
+
return PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
1694
|
+
}
|
|
1594
1695
|
/**
|
|
1595
|
-
* @
|
|
1696
|
+
* @param {?=} nextPlace
|
|
1697
|
+
* @param {?=} nextState
|
|
1698
|
+
* @return {?}
|
|
1596
1699
|
*/
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
/** @type {?|undefined} */
|
|
1605
|
-
Options.prototype.data;
|
|
1606
|
-
/** @type {?|undefined} */
|
|
1607
|
-
Options.prototype.authenticate;
|
|
1700
|
+
canDeactivate(nextPlace, nextState) {
|
|
1701
|
+
return true;
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* @return {?}
|
|
1705
|
+
*/
|
|
1706
|
+
onPlaceReady() {
|
|
1608
1707
|
}
|
|
1609
|
-
|
|
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 {
|
|
1610
1731
|
/**
|
|
1611
|
-
* @param {?}
|
|
1732
|
+
* @param {?} component
|
|
1612
1733
|
* @param {?} options
|
|
1613
1734
|
*/
|
|
1614
|
-
constructor(
|
|
1735
|
+
constructor(component, options) {
|
|
1736
|
+
this.component = component;
|
|
1615
1737
|
assert.notNil(options);
|
|
1616
1738
|
this.path = options.path;
|
|
1617
1739
|
this.order = options.order;
|
|
1618
1740
|
this.data = options.data;
|
|
1619
1741
|
this.authenticate = isNil(options.authenticate) || options.authenticate;
|
|
1620
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
|
+
}
|
|
1621
1757
|
/**
|
|
1622
1758
|
* @template T
|
|
1623
1759
|
* @param {?} key
|
|
@@ -1650,157 +1786,414 @@ function Place(options) {
|
|
|
1650
1786
|
}
|
|
1651
1787
|
}
|
|
1652
1788
|
}
|
|
1653
|
-
|
|
1789
|
+
PlaceComponent.Definition = Definition;
|
|
1654
1790
|
if (false) {
|
|
1655
1791
|
/** @type {?} */
|
|
1656
|
-
|
|
1792
|
+
Definition.prototype.path;
|
|
1793
|
+
/** @type {?} */
|
|
1794
|
+
Definition.prototype.authenticate;
|
|
1795
|
+
/** @type {?} */
|
|
1796
|
+
Definition.prototype.order;
|
|
1657
1797
|
/** @type {?} */
|
|
1658
|
-
|
|
1798
|
+
Definition.prototype.data;
|
|
1799
|
+
/** @type {?} */
|
|
1800
|
+
Definition.prototype.component;
|
|
1801
|
+
}
|
|
1802
|
+
/**
|
|
1803
|
+
* @record
|
|
1804
|
+
*/
|
|
1805
|
+
function Options() { }
|
|
1806
|
+
PlaceComponent.Options = Options;
|
|
1807
|
+
if (false) {
|
|
1659
1808
|
/** @type {?} */
|
|
1660
|
-
|
|
1809
|
+
Options.prototype.path;
|
|
1661
1810
|
/** @type {?} */
|
|
1662
|
-
|
|
1811
|
+
Options.prototype.order;
|
|
1812
|
+
/** @type {?|undefined} */
|
|
1813
|
+
Options.prototype.data;
|
|
1814
|
+
/** @type {?|undefined} */
|
|
1815
|
+
Options.prototype.authenticate;
|
|
1663
1816
|
}
|
|
1664
1817
|
/**
|
|
1665
1818
|
* @param {?} klass
|
|
1666
1819
|
* @return {?}
|
|
1667
1820
|
*/
|
|
1668
|
-
function
|
|
1821
|
+
function getDefinition(klass) {
|
|
1669
1822
|
/** @type {?} */
|
|
1670
|
-
const placeOptions = Reflect.getMetadata(
|
|
1671
|
-
return new
|
|
1823
|
+
const placeOptions = Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
1824
|
+
return new Definition(klass, placeOptions);
|
|
1825
|
+
}
|
|
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);
|
|
1672
1834
|
}
|
|
1673
|
-
|
|
1674
|
-
})(
|
|
1835
|
+
PlaceComponent.injectDefinition = injectDefinition;
|
|
1836
|
+
})(PlaceComponent || (PlaceComponent = {}));
|
|
1675
1837
|
|
|
1676
1838
|
/**
|
|
1677
1839
|
* @fileoverview added by tsickle
|
|
1678
1840
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1679
1841
|
*/
|
|
1680
|
-
class
|
|
1681
|
-
|
|
1842
|
+
class PlaceService extends GarbageCollector {
|
|
1843
|
+
/**
|
|
1844
|
+
* @param {?} router
|
|
1845
|
+
*/
|
|
1846
|
+
constructor(router) {
|
|
1682
1847
|
super();
|
|
1683
|
-
|
|
1684
|
-
this.
|
|
1685
|
-
* @param {?} c
|
|
1686
|
-
* @return {?}
|
|
1687
|
-
*/
|
|
1688
|
-
c => Place.getDescriptor(c))).sortBy('order');
|
|
1848
|
+
this.router = router;
|
|
1849
|
+
this._activePlaces = new MutableListModel();
|
|
1689
1850
|
}
|
|
1690
1851
|
/**
|
|
1691
1852
|
* @return {?}
|
|
1692
1853
|
*/
|
|
1693
|
-
|
|
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
|
+
}
|
|
1694
1888
|
}
|
|
1695
1889
|
}
|
|
1696
|
-
|
|
1697
|
-
{ type:
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
styles: [""]
|
|
1701
|
-
}] }
|
|
1890
|
+
PlaceService.decorators = [
|
|
1891
|
+
{ type: Injectable, args: [{
|
|
1892
|
+
providedIn: 'root'
|
|
1893
|
+
},] }
|
|
1702
1894
|
];
|
|
1703
1895
|
/** @nocollapse */
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
};
|
|
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" });
|
|
1709
1900
|
__decorate([
|
|
1710
|
-
|
|
1711
|
-
__metadata("design:type",
|
|
1712
|
-
|
|
1901
|
+
Trace(),
|
|
1902
|
+
__metadata("design:type", Function),
|
|
1903
|
+
__metadata("design:paramtypes", [PlaceComponent]),
|
|
1904
|
+
__metadata("design:returntype", void 0)
|
|
1905
|
+
], PlaceService.prototype, "onActivate", null);
|
|
1713
1906
|
__decorate([
|
|
1714
|
-
|
|
1715
|
-
__metadata("design:type",
|
|
1716
|
-
|
|
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);
|
|
1717
1918
|
if (false) {
|
|
1718
|
-
/**
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1919
|
+
/**
|
|
1920
|
+
* @type {?}
|
|
1921
|
+
* @private
|
|
1922
|
+
*/
|
|
1923
|
+
PlaceService.prototype._activePlaces;
|
|
1924
|
+
/**
|
|
1925
|
+
* @type {?}
|
|
1926
|
+
* @protected
|
|
1927
|
+
*/
|
|
1928
|
+
PlaceService.prototype.router;
|
|
1724
1929
|
}
|
|
1725
1930
|
|
|
1726
1931
|
/**
|
|
1727
1932
|
* @fileoverview added by tsickle
|
|
1728
1933
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1729
1934
|
*/
|
|
1730
|
-
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
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
|
+
])
|
|
1761
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
|
+
]);
|
|
1762
1976
|
|
|
1763
1977
|
/**
|
|
1764
1978
|
* @fileoverview added by tsickle
|
|
1765
1979
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1766
1980
|
*/
|
|
1767
|
-
class
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
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: [
|
|
2173
|
+
CommonModule,
|
|
2174
|
+
BrowserModule,
|
|
2175
|
+
BrowserAnimationsModule,
|
|
2176
|
+
FormsModule,
|
|
2177
|
+
MatInputModule,
|
|
2178
|
+
MatFormFieldModule,
|
|
2179
|
+
MatSelectModule,
|
|
2180
|
+
PlaceModule,
|
|
2181
|
+
InteractionModule
|
|
2182
|
+
],
|
|
2183
|
+
exports: [
|
|
2184
|
+
CommandDirective,
|
|
2185
|
+
FocusBindingDirective,
|
|
2186
|
+
NumberInputComponent,
|
|
2187
|
+
StringInputComponent,
|
|
2188
|
+
PasswordInputComponent,
|
|
2189
|
+
SelectInputComponent,
|
|
2190
|
+
InteractionModule,
|
|
2191
|
+
PlaceModule,
|
|
2192
|
+
]
|
|
2193
|
+
},] }
|
|
2194
|
+
];
|
|
2195
|
+
|
|
2196
|
+
/**
|
|
1804
2197
|
* @fileoverview added by tsickle
|
|
1805
2198
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1806
2199
|
*/
|
|
@@ -1958,518 +2351,200 @@ class ResizeAwareComponent extends DisposableComponent {
|
|
|
1958
2351
|
this.elementRef = elementRef;
|
|
1959
2352
|
this.ngZone = ngZone;
|
|
1960
2353
|
this._boundsModel = new ValueHolder(new Bounds(0, 0, 0, 0));
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* @return {?}
|
|
1964
|
-
*/
|
|
1965
|
-
ngAfterViewInit() {
|
|
1966
|
-
this.updateBounds();
|
|
1967
|
-
/** @type {?} */
|
|
1968
|
-
const element = this.elementRef.nativeElement;
|
|
1969
|
-
/** @type {?} */
|
|
1970
|
-
const ro = new ResizeObserver((/**
|
|
1971
|
-
* @param {?} entries
|
|
1972
|
-
* @param {?} observer
|
|
1973
|
-
* @return {?}
|
|
1974
|
-
*/
|
|
1975
|
-
(entries, observer) => {
|
|
1976
|
-
this.ngZone.run((/**
|
|
1977
|
-
* @return {?}
|
|
1978
|
-
*/
|
|
1979
|
-
() => this.updateBounds()));
|
|
1980
|
-
}));
|
|
1981
|
-
ro.observe(element);
|
|
1982
|
-
this.onDispose((/**
|
|
1983
|
-
* @return {?}
|
|
1984
|
-
*/
|
|
1985
|
-
() => ro.disconnect()));
|
|
1986
|
-
}
|
|
1987
|
-
/**
|
|
1988
|
-
* @return {?}
|
|
1989
|
-
*/
|
|
1990
|
-
get boundsModel() {
|
|
1991
|
-
return this._boundsModel.readonly;
|
|
1992
|
-
}
|
|
1993
|
-
/**
|
|
1994
|
-
* @return {?}
|
|
1995
|
-
*/
|
|
1996
|
-
get nativeElement() {
|
|
1997
|
-
return this.elementRef.nativeElement;
|
|
1998
|
-
}
|
|
1999
|
-
// TODO: Make this handle body scroll
|
|
2000
|
-
/**
|
|
2001
|
-
* @param {?} point
|
|
2002
|
-
* @return {?}
|
|
2003
|
-
*/
|
|
2004
|
-
relativePositionOf(point) {
|
|
2005
|
-
return this.bounds.relativePositionOf(point);
|
|
2006
|
-
}
|
|
2007
|
-
/**
|
|
2008
|
-
* @return {?}
|
|
2009
|
-
*/
|
|
2010
|
-
get bounds() {
|
|
2011
|
-
return this._boundsModel.value;
|
|
2012
|
-
}
|
|
2013
|
-
/**
|
|
2014
|
-
* @private
|
|
2015
|
-
* @return {?}
|
|
2016
|
-
*/
|
|
2017
|
-
updateBounds() {
|
|
2018
|
-
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
if (false) {
|
|
2022
|
-
/**
|
|
2023
|
-
* @type {?}
|
|
2024
|
-
* @private
|
|
2025
|
-
*/
|
|
2026
|
-
ResizeAwareComponent.prototype._boundsModel;
|
|
2027
|
-
/**
|
|
2028
|
-
* @type {?}
|
|
2029
|
-
* @protected
|
|
2030
|
-
*/
|
|
2031
|
-
ResizeAwareComponent.prototype.elementRef;
|
|
2032
|
-
/**
|
|
2033
|
-
* @type {?}
|
|
2034
|
-
* @protected
|
|
2035
|
-
*/
|
|
2036
|
-
ResizeAwareComponent.prototype.ngZone;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* @fileoverview added by tsickle
|
|
2041
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2042
|
-
*/
|
|
2043
|
-
|
|
2044
|
-
/**
|
|
2045
|
-
* @fileoverview added by tsickle
|
|
2046
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2047
|
-
*/
|
|
2048
|
-
|
|
2049
|
-
/**
|
|
2050
|
-
* @fileoverview added by tsickle
|
|
2051
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2052
|
-
*/
|
|
2053
|
-
/**
|
|
2054
|
-
* @record
|
|
2055
|
-
*/
|
|
2056
|
-
function Alert() { }
|
|
2057
|
-
if (false) {
|
|
2058
|
-
/**
|
|
2059
|
-
* @return {?}
|
|
2060
|
-
*/
|
|
2061
|
-
Alert.prototype.title = function () { };
|
|
2062
|
-
/**
|
|
2063
|
-
* @return {?}
|
|
2064
|
-
*/
|
|
2065
|
-
Alert.prototype.content = function () { };
|
|
2066
|
-
/**
|
|
2067
|
-
* @return {?}
|
|
2068
|
-
*/
|
|
2069
|
-
Alert.prototype.ok = function () { };
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
* @fileoverview added by tsickle
|
|
2074
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2075
|
-
*/
|
|
2076
|
-
/**
|
|
2077
|
-
* @record
|
|
2078
|
-
*/
|
|
2079
|
-
function Confirm() { }
|
|
2080
|
-
if (false) {
|
|
2081
|
-
/** @type {?|undefined} */
|
|
2082
|
-
Confirm.prototype.destructive;
|
|
2083
|
-
/**
|
|
2084
|
-
* @return {?}
|
|
2085
|
-
*/
|
|
2086
|
-
Confirm.prototype.cancel = function () { };
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
/**
|
|
2090
|
-
* @fileoverview added by tsickle
|
|
2091
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2092
|
-
*/
|
|
2093
|
-
/**
|
|
2094
|
-
* @record
|
|
2095
|
-
* @template R, E
|
|
2096
|
-
*/
|
|
2097
|
-
function Result() { }
|
|
2098
|
-
(function (Result) {
|
|
2099
|
-
/**
|
|
2100
|
-
* @record
|
|
2101
|
-
* @template R, E
|
|
2102
|
-
*/
|
|
2103
|
-
function Callback() { }
|
|
2104
|
-
Result.Callback = Callback;
|
|
2105
|
-
if (false) {
|
|
2106
|
-
/** @type {?} */
|
|
2107
|
-
Callback.prototype.then;
|
|
2108
|
-
/** @type {?} */
|
|
2109
|
-
Callback.prototype.catch;
|
|
2110
|
-
}
|
|
2111
|
-
})(Result || (Result = {}));
|
|
2112
|
-
|
|
2113
|
-
/**
|
|
2114
|
-
* @fileoverview added by tsickle
|
|
2115
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2116
|
-
*/
|
|
2117
|
-
/**
|
|
2118
|
-
* @record
|
|
2119
|
-
* @template D, R, E
|
|
2120
|
-
*/
|
|
2121
|
-
function ActivityOutletContext() { }
|
|
2122
|
-
if (false) {
|
|
2123
|
-
/** @type {?} */
|
|
2124
|
-
ActivityOutletContext.prototype.interactionContext;
|
|
2125
|
-
/** @type {?} */
|
|
2126
|
-
ActivityOutletContext.prototype.activityClass;
|
|
2127
|
-
/** @type {?} */
|
|
2128
|
-
ActivityOutletContext.prototype.activityData;
|
|
2129
|
-
/** @type {?} */
|
|
2130
|
-
ActivityOutletContext.prototype.onDone;
|
|
2131
|
-
/** @type {?} */
|
|
2132
|
-
ActivityOutletContext.prototype.onCancel;
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
/**
|
|
2136
|
-
* @fileoverview added by tsickle
|
|
2137
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2138
|
-
*/
|
|
2139
|
-
|
|
2140
|
-
/**
|
|
2141
|
-
* @fileoverview added by tsickle
|
|
2142
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2143
|
-
*/
|
|
2144
|
-
/**
|
|
2145
|
-
* @record
|
|
2146
|
-
* @template T
|
|
2147
|
-
*/
|
|
2148
|
-
function ResolvedParameter() { }
|
|
2149
|
-
if (false) {
|
|
2150
|
-
/** @type {?} */
|
|
2151
|
-
ResolvedParameter.prototype.parameterDef;
|
|
2152
|
-
/** @type {?} */
|
|
2153
|
-
ResolvedParameter.prototype.resolvedValue;
|
|
2154
|
-
}
|
|
2155
|
-
class ResolvedParameters {
|
|
2156
|
-
/**
|
|
2157
|
-
* @param {?} parameters
|
|
2158
|
-
*/
|
|
2159
|
-
constructor(parameters) {
|
|
2160
|
-
this.parameters = parameters;
|
|
2161
|
-
}
|
|
2162
|
-
/**
|
|
2163
|
-
* @template T
|
|
2164
|
-
* @param {?} parameter
|
|
2165
|
-
* @return {?}
|
|
2166
|
-
*/
|
|
2167
|
-
get(parameter) {
|
|
2168
|
-
/** @type {?} */
|
|
2169
|
-
const resolved = this.parameters.find((/**
|
|
2170
|
-
* @param {?} p
|
|
2171
|
-
* @return {?}
|
|
2172
|
-
*/
|
|
2173
|
-
p => p.parameterDef === parameter));
|
|
2174
|
-
return resolved ? resolved.resolvedValue : null;
|
|
2175
|
-
}
|
|
2176
|
-
/**
|
|
2177
|
-
* @template T
|
|
2178
|
-
* @param {?} parameter
|
|
2179
|
-
* @param {?} value
|
|
2180
|
-
* @return {?}
|
|
2181
|
-
*/
|
|
2182
|
-
replace(parameter, value) {
|
|
2183
|
-
return new ResolvedParameters(this.parameters.filter((/**
|
|
2184
|
-
* @param {?} p
|
|
2185
|
-
* @return {?}
|
|
2186
|
-
*/
|
|
2187
|
-
p => p.parameterDef !== parameter)).concat({
|
|
2188
|
-
parameterDef: parameter,
|
|
2189
|
-
resolvedValue: value
|
|
2190
|
-
}));
|
|
2191
|
-
}
|
|
2192
|
-
/**
|
|
2193
|
-
* @protected
|
|
2194
|
-
* @return {?}
|
|
2195
|
-
*/
|
|
2196
|
-
getFormattedRouteId() {
|
|
2197
|
-
/** @type {?} */
|
|
2198
|
-
const routeIdParam = this.getRouteIdParam();
|
|
2199
|
-
return routeIdParam ? routeIdParam.parameterDef.type.format(routeIdParam.resolvedValue) : null;
|
|
2200
|
-
}
|
|
2201
|
-
/**
|
|
2202
|
-
* @private
|
|
2203
|
-
* @return {?}
|
|
2204
|
-
*/
|
|
2205
|
-
getRouteIdParam() {
|
|
2206
|
-
return this.parameters.find((/**
|
|
2207
|
-
* @param {?} p
|
|
2208
|
-
* @return {?}
|
|
2209
|
-
*/
|
|
2210
|
-
p => p.parameterDef.isRouteId));
|
|
2211
|
-
}
|
|
2212
|
-
/**
|
|
2213
|
-
* @protected
|
|
2214
|
-
* @return {?}
|
|
2215
|
-
*/
|
|
2216
|
-
getFormattedParameters() {
|
|
2217
|
-
/** @type {?} */
|
|
2218
|
-
const params = {};
|
|
2219
|
-
/** @type {?} */
|
|
2220
|
-
const routeIdParam = this.parameters.filter((/**
|
|
2221
|
-
* @param {?} p
|
|
2222
|
-
* @return {?}
|
|
2223
|
-
*/
|
|
2224
|
-
p => !p.parameterDef.isRouteId)).forEach((/**
|
|
2225
|
-
* @param {?} p
|
|
2226
|
-
* @return {?}
|
|
2227
|
-
*/
|
|
2228
|
-
p => {
|
|
2229
|
-
params[p.parameterDef.name] = p.parameterDef.type.format(p.resolvedValue);
|
|
2230
|
-
}));
|
|
2231
|
-
return params;
|
|
2232
|
-
}
|
|
2233
|
-
/**
|
|
2234
|
-
* @return {?}
|
|
2235
|
-
*/
|
|
2236
|
-
hasRouteId() {
|
|
2237
|
-
return !!this.getRouteIdParam();
|
|
2238
|
-
}
|
|
2239
|
-
/**
|
|
2240
|
-
* @param {?} previous
|
|
2241
|
-
* @param {?} router
|
|
2242
|
-
* @param {?} activatedRoute
|
|
2243
|
-
* @return {?}
|
|
2244
|
-
*/
|
|
2245
|
-
redirect(previous, router, activatedRoute) {
|
|
2246
|
-
/** @type {?} */
|
|
2247
|
-
const routeId = this.getFormattedRouteId();
|
|
2248
|
-
/** @type {?} */
|
|
2249
|
-
const relativePath = !!previous.hasRouteId() ? '..' : '.';
|
|
2250
|
-
/** @type {?} */
|
|
2251
|
-
const path = routeId ? [relativePath, routeId, this.getFormattedParameters()] : [relativePath, this.getFormattedParameters()];
|
|
2252
|
-
router.navigate(path, {
|
|
2253
|
-
relativeTo: activatedRoute
|
|
2254
|
-
});
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
__decorate([
|
|
2258
|
-
Trace(),
|
|
2259
|
-
__metadata("design:type", Function),
|
|
2260
|
-
__metadata("design:paramtypes", []),
|
|
2261
|
-
__metadata("design:returntype", void 0)
|
|
2262
|
-
], ResolvedParameters.prototype, "getFormattedRouteId", null);
|
|
2263
|
-
__decorate([
|
|
2264
|
-
Trace(),
|
|
2265
|
-
__metadata("design:type", Function),
|
|
2266
|
-
__metadata("design:paramtypes", []),
|
|
2267
|
-
__metadata("design:returntype", void 0)
|
|
2268
|
-
], ResolvedParameters.prototype, "getFormattedParameters", null);
|
|
2269
|
-
__decorate([
|
|
2270
|
-
Trace(),
|
|
2271
|
-
__metadata("design:type", Function),
|
|
2272
|
-
__metadata("design:paramtypes", [ResolvedParameters, Router, ActivatedRoute]),
|
|
2273
|
-
__metadata("design:returntype", void 0)
|
|
2274
|
-
], ResolvedParameters.prototype, "redirect", null);
|
|
2275
|
-
if (false) {
|
|
2276
|
-
/** @type {?} */
|
|
2277
|
-
ResolvedParameters.prototype.parameters;
|
|
2278
|
-
}
|
|
2279
|
-
class RouteParameterBindings extends GarbageCollector {
|
|
2280
|
-
/**
|
|
2281
|
-
* @param {?} component
|
|
2282
|
-
* @param {?} router
|
|
2283
|
-
* @param {?} activatedRoute
|
|
2284
|
-
*/
|
|
2285
|
-
constructor(component, router, activatedRoute) {
|
|
2286
|
-
super();
|
|
2287
|
-
this.component = component;
|
|
2288
|
-
this.router = router;
|
|
2289
|
-
this.activatedRoute = activatedRoute;
|
|
2290
|
-
this._incomingRouteChange = new MutableValueModel(false);
|
|
2291
|
-
this.resolvedParameters = new MutableValueModel();
|
|
2292
|
-
const { chain, valueOf, before, when, after, observe } = Dsl.disposeWith(this);
|
|
2293
|
-
this.txo = new TransactionObserver(); //.onEvent(e => console.log(e.toString()));
|
|
2294
|
-
//.onEvent(e => console.log(e.toString()));
|
|
2295
|
-
/** @type {?} */
|
|
2296
|
-
const routeParameterDefs = Klass.get(component).getMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
|
|
2297
|
-
routeParameterDefs.forEach((/**
|
|
2298
|
-
* @param {?} parameter
|
|
2299
|
-
* @return {?}
|
|
2300
|
-
*/
|
|
2301
|
-
parameter => this.installBinding(parameter)));
|
|
2302
|
-
/** @type {?} */
|
|
2303
|
-
const incomingResolvedRouteParameters = observe.valuesFrom(activatedRoute.paramMap)
|
|
2304
|
-
.last()
|
|
2305
|
-
.map((/**
|
|
2306
|
-
* @param {?} params
|
|
2307
|
-
* @return {?}
|
|
2308
|
-
*/
|
|
2309
|
-
params => {
|
|
2310
|
-
/** @type {?} */
|
|
2311
|
-
const result = [];
|
|
2312
|
-
routeParameterDefs.forEach((/**
|
|
2313
|
-
* @param {?} parameterDef
|
|
2314
|
-
* @return {?}
|
|
2315
|
-
*/
|
|
2316
|
-
parameterDef => {
|
|
2317
|
-
/** @type {?} */
|
|
2318
|
-
let resolvedValue;
|
|
2319
|
-
if (parameterDef.isArray) {
|
|
2320
|
-
resolvedValue = params.getAll(parameterDef.name).map((/**
|
|
2321
|
-
* @param {?} v
|
|
2322
|
-
* @return {?}
|
|
2323
|
-
*/
|
|
2324
|
-
v => parameterDef.type.parse(v)));
|
|
2325
|
-
}
|
|
2326
|
-
else {
|
|
2327
|
-
resolvedValue = parameterDef.type.parse(params.get(parameterDef.name));
|
|
2328
|
-
}
|
|
2329
|
-
result.push({ parameterDef: parameterDef, resolvedValue: resolvedValue });
|
|
2330
|
-
}));
|
|
2331
|
-
return new ResolvedParameters(result);
|
|
2332
|
-
}));
|
|
2333
|
-
incomingResolvedRouteParameters.subscribe((/**
|
|
2334
|
-
* @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
|
|
2335
2366
|
* @return {?}
|
|
2336
2367
|
*/
|
|
2337
|
-
|
|
2338
|
-
this.
|
|
2339
|
-
|
|
2340
|
-
|
|
2368
|
+
(entries, observer) => {
|
|
2369
|
+
this.ngZone.run((/**
|
|
2370
|
+
* @return {?}
|
|
2371
|
+
*/
|
|
2372
|
+
() => this.updateBounds()));
|
|
2341
2373
|
}));
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
* @param {?} previous
|
|
2374
|
+
ro.observe(element);
|
|
2375
|
+
this.onDispose((/**
|
|
2345
2376
|
* @return {?}
|
|
2346
2377
|
*/
|
|
2347
|
-
(
|
|
2348
|
-
params.redirect(previous, router, activatedRoute);
|
|
2349
|
-
}), { unless: this.incomingRouteChange });
|
|
2350
|
-
this.txo.observe('incomingResolvedRouteParameters', incomingResolvedRouteParameters);
|
|
2351
|
-
this.txo.observe('this.routeIsChanging', this.incomingRouteChange);
|
|
2378
|
+
() => ro.disconnect()));
|
|
2352
2379
|
}
|
|
2353
2380
|
/**
|
|
2354
2381
|
* @return {?}
|
|
2355
2382
|
*/
|
|
2356
|
-
get
|
|
2357
|
-
return this.
|
|
2383
|
+
get boundsModel() {
|
|
2384
|
+
return this._boundsModel.readonly;
|
|
2358
2385
|
}
|
|
2359
2386
|
/**
|
|
2360
|
-
* @protected
|
|
2361
|
-
* @template T
|
|
2362
|
-
* @param {?} parameter
|
|
2363
2387
|
* @return {?}
|
|
2364
2388
|
*/
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
const model = this.getModelFor(parameter);
|
|
2368
|
-
// this.txo.observe(parameter.propertyName, model);
|
|
2369
|
-
this.registerDisposable(new Binding(this.resolvedParameters, model, {
|
|
2370
|
-
/**
|
|
2371
|
-
* @param {?} parameters
|
|
2372
|
-
* @return {?}
|
|
2373
|
-
*/
|
|
2374
|
-
toRight(parameters) {
|
|
2375
|
-
return parameters.get(parameter);
|
|
2376
|
-
},
|
|
2377
|
-
/**
|
|
2378
|
-
* @param {?} value
|
|
2379
|
-
* @param {?=} currentParameters
|
|
2380
|
-
* @return {?}
|
|
2381
|
-
*/
|
|
2382
|
-
toLeft(value, currentParameters) {
|
|
2383
|
-
return currentParameters.replace(parameter, value);
|
|
2384
|
-
}
|
|
2385
|
-
}));
|
|
2389
|
+
get nativeElement() {
|
|
2390
|
+
return this.elementRef.nativeElement;
|
|
2386
2391
|
}
|
|
2392
|
+
// TODO: Make this handle body scroll
|
|
2387
2393
|
/**
|
|
2388
|
-
* @
|
|
2389
|
-
* @template T
|
|
2390
|
-
* @param {?} parameter
|
|
2394
|
+
* @param {?} point
|
|
2391
2395
|
* @return {?}
|
|
2392
2396
|
*/
|
|
2393
|
-
|
|
2394
|
-
return this.
|
|
2397
|
+
relativePositionOf(point) {
|
|
2398
|
+
return this.bounds.relativePositionOf(point);
|
|
2395
2399
|
}
|
|
2396
|
-
}
|
|
2397
|
-
if (false) {
|
|
2398
|
-
/** @type {?} */
|
|
2399
|
-
RouteParameterBindings.prototype._incomingRouteChange;
|
|
2400
2400
|
/**
|
|
2401
|
-
* @
|
|
2402
|
-
* @private
|
|
2401
|
+
* @return {?}
|
|
2403
2402
|
*/
|
|
2404
|
-
|
|
2403
|
+
get bounds() {
|
|
2404
|
+
return this._boundsModel.value;
|
|
2405
|
+
}
|
|
2405
2406
|
/**
|
|
2406
|
-
* @type {?}
|
|
2407
2407
|
* @private
|
|
2408
|
+
* @return {?}
|
|
2408
2409
|
*/
|
|
2409
|
-
|
|
2410
|
+
updateBounds() {
|
|
2411
|
+
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
if (false) {
|
|
2410
2415
|
/**
|
|
2411
2416
|
* @type {?}
|
|
2412
2417
|
* @private
|
|
2413
2418
|
*/
|
|
2414
|
-
|
|
2419
|
+
ResizeAwareComponent.prototype._boundsModel;
|
|
2415
2420
|
/**
|
|
2416
2421
|
* @type {?}
|
|
2417
|
-
* @
|
|
2422
|
+
* @protected
|
|
2418
2423
|
*/
|
|
2419
|
-
|
|
2424
|
+
ResizeAwareComponent.prototype.elementRef;
|
|
2420
2425
|
/**
|
|
2421
2426
|
* @type {?}
|
|
2422
|
-
* @
|
|
2427
|
+
* @protected
|
|
2423
2428
|
*/
|
|
2424
|
-
|
|
2429
|
+
ResizeAwareComponent.prototype.ngZone;
|
|
2425
2430
|
}
|
|
2426
|
-
(function (RouteParameterBindings) {
|
|
2427
|
-
RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
2428
|
-
})(RouteParameterBindings || (RouteParameterBindings = {}));
|
|
2429
2431
|
|
|
2430
2432
|
/**
|
|
2431
2433
|
* @fileoverview added by tsickle
|
|
2432
2434
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2433
2435
|
*/
|
|
2434
|
-
|
|
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) {
|
|
2435
2451
|
/**
|
|
2436
|
-
* @
|
|
2437
|
-
* @param {?} router
|
|
2452
|
+
* @return {?}
|
|
2438
2453
|
*/
|
|
2439
|
-
|
|
2440
|
-
super();
|
|
2441
|
-
this.activatedRoute = activatedRoute;
|
|
2442
|
-
this.routeBindingMediator = this.registerDisposable(new RouteParameterBindings(this, router, activatedRoute));
|
|
2443
|
-
}
|
|
2454
|
+
Alert.prototype.title = function () { };
|
|
2444
2455
|
/**
|
|
2445
2456
|
* @return {?}
|
|
2446
2457
|
*/
|
|
2447
|
-
|
|
2448
|
-
return Place.getDescriptor((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
|
|
2449
|
-
}
|
|
2458
|
+
Alert.prototype.content = function () { };
|
|
2450
2459
|
/**
|
|
2451
2460
|
* @return {?}
|
|
2452
2461
|
*/
|
|
2453
|
-
|
|
2454
|
-
return true;
|
|
2455
|
-
}
|
|
2462
|
+
Alert.prototype.ok = function () { };
|
|
2456
2463
|
}
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
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() { }
|
|
2462
2473
|
if (false) {
|
|
2474
|
+
/** @type {?|undefined} */
|
|
2475
|
+
Confirm.prototype.destructive;
|
|
2463
2476
|
/**
|
|
2464
|
-
* @
|
|
2465
|
-
* @private
|
|
2477
|
+
* @return {?}
|
|
2466
2478
|
*/
|
|
2467
|
-
|
|
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) {
|
|
2468
2492
|
/**
|
|
2469
|
-
* @
|
|
2470
|
-
* @
|
|
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 {?}
|
|
2471
2546
|
*/
|
|
2472
|
-
|
|
2547
|
+
IPlaceComponent.prototype.onPlaceReady = function () { };
|
|
2473
2548
|
}
|
|
2474
2549
|
|
|
2475
2550
|
/**
|
|
@@ -2479,12 +2554,34 @@ if (false) {
|
|
|
2479
2554
|
/**
|
|
2480
2555
|
* @record
|
|
2481
2556
|
*/
|
|
2482
|
-
function
|
|
2557
|
+
function IPlaceService() { }
|
|
2483
2558
|
if (false) {
|
|
2484
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
|
|
2485
2577
|
* @return {?}
|
|
2486
2578
|
*/
|
|
2487
|
-
|
|
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
|
+
});
|
|
2488
2585
|
}
|
|
2489
2586
|
|
|
2490
2587
|
/**
|
|
@@ -2508,7 +2605,21 @@ class LeavePlaceGuard {
|
|
|
2508
2605
|
* @return {?}
|
|
2509
2606
|
*/
|
|
2510
2607
|
canDeactivate(component, currentRoute, currentState, nextState) {
|
|
2511
|
-
|
|
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
|
+
}
|
|
2512
2623
|
}
|
|
2513
2624
|
}
|
|
2514
2625
|
LeavePlaceGuard.decorators = [
|
|
@@ -3169,6 +3280,29 @@ var ParameterType;
|
|
|
3169
3280
|
ParameterType.BOOLEAN = new BooleanType();
|
|
3170
3281
|
})(ParameterType || (ParameterType = {}));
|
|
3171
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
|
+
|
|
3172
3306
|
/**
|
|
3173
3307
|
* @fileoverview added by tsickle
|
|
3174
3308
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3189,5 +3323,5 @@ var ParameterType;
|
|
|
3189
3323
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3190
3324
|
*/
|
|
3191
3325
|
|
|
3192
|
-
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 };
|
|
3193
3327
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|