@coolon/angular-ui-powerups 0.0.22 → 0.0.24
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 +145 -68
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +14 -13
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +14 -13
- package/esm2015/index.js +2 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +19 -4
- package/esm2015/lib/place/components/place-outlet/route-animations.js +35 -0
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +50 -0
- package/esm2015/lib/place/index.js +3 -2
- package/esm2015/lib/place/place.decorator.js +6 -1
- package/esm2015/lib/place/place.module.js +4 -4
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +14 -13
- package/esm5/index.js +2 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +23 -4
- package/esm5/lib/place/components/place-outlet/route-animations.js +35 -0
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +57 -0
- package/esm5/lib/place/index.js +3 -2
- package/esm5/lib/place/place.decorator.js +6 -1
- package/esm5/lib/place/place.module.js +4 -4
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +105 -36
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +115 -40
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +3 -0
- package/lib/place/components/place-outlet/route-animations.d.ts +1 -0
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +11 -0
- package/lib/place/index.d.ts +2 -1
- package/lib/place/place.decorator.d.ts +2 -0
- package/package.json +1 -1
- package/schematics/place-routes/place-def.d.ts +3 -0
- package/schematics/place-routes/place-def.js +9 -0
- package/schematics/place-routes/place-def.js.map +1 -1
- package/schematics/place-routes/scanner.js +1 -0
- package/schematics/place-routes/scanner.js.map +1 -1
- package/schematics/place-routes/templates/place-routes.ts.template +2 -1
- package/schematics/place-routes/templates/services/place-router.service.ts.template +38 -0
- package/esm2015/lib/place/components/nav/nav.component.js +0 -31
- package/esm5/lib/place/components/nav/nav.component.js +0 -36
- package/lib/place/components/nav/nav.component.d.ts +0 -7
|
@@ -14,7 +14,7 @@ import { MatListModule } from '@angular/material/list';
|
|
|
14
14
|
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
16
|
import { RouterModule, Router, ActivatedRoute, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
17
|
-
import { style, trigger, transition
|
|
17
|
+
import { query, style, group, animate, trigger, transition } from '@angular/animations';
|
|
18
18
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
19
19
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
20
20
|
import { isNil } from 'lodash';
|
|
@@ -1417,36 +1417,6 @@ EmptyStateComponent.decorators = [
|
|
|
1417
1417
|
/** @nocollapse */
|
|
1418
1418
|
EmptyStateComponent.ctorParameters = () => [];
|
|
1419
1419
|
|
|
1420
|
-
/**
|
|
1421
|
-
* @fileoverview added by tsickle
|
|
1422
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1423
|
-
*/
|
|
1424
|
-
class NavComponent {
|
|
1425
|
-
constructor() {
|
|
1426
|
-
}
|
|
1427
|
-
/**
|
|
1428
|
-
* @return {?}
|
|
1429
|
-
*/
|
|
1430
|
-
ngOnInit() {
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
NavComponent.decorators = [
|
|
1434
|
-
{ type: Component, args: [{
|
|
1435
|
-
selector: 'angular-ui-powerups-nav',
|
|
1436
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDescriptor of places\" [routerLink]='placeDescriptor.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"placeDescriptor.title\">{{placeDescriptor.title}}</a>\n</nav>\n\n",
|
|
1437
|
-
styles: [""]
|
|
1438
|
-
}] }
|
|
1439
|
-
];
|
|
1440
|
-
/** @nocollapse */
|
|
1441
|
-
NavComponent.ctorParameters = () => [];
|
|
1442
|
-
NavComponent.propDecorators = {
|
|
1443
|
-
places: [{ type: Input }]
|
|
1444
|
-
};
|
|
1445
|
-
if (false) {
|
|
1446
|
-
/** @type {?} */
|
|
1447
|
-
NavComponent.prototype.places;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
1420
|
/**
|
|
1451
1421
|
* @fileoverview added by tsickle
|
|
1452
1422
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1504,6 +1474,40 @@ if (false) {
|
|
|
1504
1474
|
PlaceService.prototype._activePlaces;
|
|
1505
1475
|
}
|
|
1506
1476
|
|
|
1477
|
+
/**
|
|
1478
|
+
* @fileoverview added by tsickle
|
|
1479
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1480
|
+
*/
|
|
1481
|
+
/** @type {?} */
|
|
1482
|
+
const left = [
|
|
1483
|
+
query(':enter, :leave', style({ position: 'fixed', width: '100%' }), { optional: true }),
|
|
1484
|
+
group([
|
|
1485
|
+
query(':enter', [style({ transform: 'translateX(-100%)' }), animate('.3s ease-out', style({ transform: 'translateX(0%)' }))], {
|
|
1486
|
+
optional: true,
|
|
1487
|
+
}),
|
|
1488
|
+
query(':leave', [style({ transform: 'translateX(0%)' }), animate('.3s ease-out', style({ transform: 'translateX(100%)' }))], {
|
|
1489
|
+
optional: true,
|
|
1490
|
+
}),
|
|
1491
|
+
]),
|
|
1492
|
+
];
|
|
1493
|
+
/** @type {?} */
|
|
1494
|
+
const right = [
|
|
1495
|
+
query(':enter, :leave', style({ position: 'fixed', width: '100%' }), { optional: true }),
|
|
1496
|
+
group([
|
|
1497
|
+
query(':enter', [style({ transform: 'translateX(100%)' }), animate('.3s ease-out', style({ transform: 'translateX(0%)' }))], {
|
|
1498
|
+
optional: true,
|
|
1499
|
+
}),
|
|
1500
|
+
query(':leave', [style({ transform: 'translateX(0%)' }), animate('.3s ease-out', style({ transform: 'translateX(-100%)' }))], {
|
|
1501
|
+
optional: true,
|
|
1502
|
+
}),
|
|
1503
|
+
]),
|
|
1504
|
+
];
|
|
1505
|
+
/** @type {?} */
|
|
1506
|
+
const LEFT_RIGHT_PLACE_ANIMATION = trigger('routeAnimations', [
|
|
1507
|
+
transition(':increment', right),
|
|
1508
|
+
transition(':decrement', left),
|
|
1509
|
+
]);
|
|
1510
|
+
|
|
1507
1511
|
/**
|
|
1508
1512
|
* @fileoverview added by tsickle
|
|
1509
1513
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1514,6 +1518,7 @@ class PlaceOutletComponent {
|
|
|
1514
1518
|
*/
|
|
1515
1519
|
constructor(placeService) {
|
|
1516
1520
|
this.placeService = placeService;
|
|
1521
|
+
this.animate = true;
|
|
1517
1522
|
}
|
|
1518
1523
|
/**
|
|
1519
1524
|
* @return {?}
|
|
@@ -1534,19 +1539,32 @@ class PlaceOutletComponent {
|
|
|
1534
1539
|
onDeactivate($event) {
|
|
1535
1540
|
this.placeService.onDeactivate($event);
|
|
1536
1541
|
}
|
|
1542
|
+
/**
|
|
1543
|
+
* @param {?} outlet
|
|
1544
|
+
* @return {?}
|
|
1545
|
+
*/
|
|
1546
|
+
getPlaceOrder(outlet) {
|
|
1547
|
+
return this.animate && outlet && outlet.activatedRouteData && outlet.activatedRouteData['placeOrder'];
|
|
1548
|
+
}
|
|
1537
1549
|
}
|
|
1538
1550
|
PlaceOutletComponent.decorators = [
|
|
1539
1551
|
{ type: Component, args: [{
|
|
1540
1552
|
selector: 'angular-ui-powerups-place-outlet',
|
|
1541
|
-
template: "<router-outlet (activate)=\"onActivate($event)\"
|
|
1542
|
-
|
|
1553
|
+
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",
|
|
1554
|
+
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
1555
|
+
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}"]
|
|
1543
1556
|
}] }
|
|
1544
1557
|
];
|
|
1545
1558
|
/** @nocollapse */
|
|
1546
1559
|
PlaceOutletComponent.ctorParameters = () => [
|
|
1547
1560
|
{ type: PlaceService }
|
|
1548
1561
|
];
|
|
1562
|
+
PlaceOutletComponent.propDecorators = {
|
|
1563
|
+
animate: [{ type: Input }]
|
|
1564
|
+
};
|
|
1549
1565
|
if (false) {
|
|
1566
|
+
/** @type {?} */
|
|
1567
|
+
PlaceOutletComponent.prototype.animate;
|
|
1550
1568
|
/**
|
|
1551
1569
|
* @type {?}
|
|
1552
1570
|
* @private
|
|
@@ -1554,6 +1572,52 @@ if (false) {
|
|
|
1554
1572
|
PlaceOutletComponent.prototype.placeService;
|
|
1555
1573
|
}
|
|
1556
1574
|
|
|
1575
|
+
/**
|
|
1576
|
+
* @fileoverview added by tsickle
|
|
1577
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1578
|
+
*/
|
|
1579
|
+
class TabbedPlaceNavigationComponent extends DisposableComponent {
|
|
1580
|
+
constructor() {
|
|
1581
|
+
super();
|
|
1582
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1583
|
+
this.orderedPlaces = chain(this.placesModel).sortBy('order');
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* @return {?}
|
|
1587
|
+
*/
|
|
1588
|
+
ngOnInit() {
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
TabbedPlaceNavigationComponent.decorators = [
|
|
1592
|
+
{ type: Component, args: [{
|
|
1593
|
+
selector: 'angular-ui-powerups-tabbed-place-navigation',
|
|
1594
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDescriptor of orderedPlaces.value\" [routerLink]='placeDescriptor.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"placeDescriptor.title\">{{placeDescriptor.title}}</a>\n</nav>\n\n",
|
|
1595
|
+
styles: [""]
|
|
1596
|
+
}] }
|
|
1597
|
+
];
|
|
1598
|
+
/** @nocollapse */
|
|
1599
|
+
TabbedPlaceNavigationComponent.ctorParameters = () => [];
|
|
1600
|
+
TabbedPlaceNavigationComponent.propDecorators = {
|
|
1601
|
+
places: [{ type: Input }],
|
|
1602
|
+
placesModel: [{ type: Input }]
|
|
1603
|
+
};
|
|
1604
|
+
__decorate([
|
|
1605
|
+
StoreInListModel('placesModel'),
|
|
1606
|
+
__metadata("design:type", Array)
|
|
1607
|
+
], TabbedPlaceNavigationComponent.prototype, "places", void 0);
|
|
1608
|
+
__decorate([
|
|
1609
|
+
UseDelegate(),
|
|
1610
|
+
__metadata("design:type", ListModel)
|
|
1611
|
+
], TabbedPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
1612
|
+
if (false) {
|
|
1613
|
+
/** @type {?} */
|
|
1614
|
+
TabbedPlaceNavigationComponent.prototype.places;
|
|
1615
|
+
/** @type {?} */
|
|
1616
|
+
TabbedPlaceNavigationComponent.prototype.placesModel;
|
|
1617
|
+
/** @type {?} */
|
|
1618
|
+
TabbedPlaceNavigationComponent.prototype.orderedPlaces;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1557
1621
|
/**
|
|
1558
1622
|
* @fileoverview added by tsickle
|
|
1559
1623
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1575,14 +1639,14 @@ PlaceModule.decorators = [
|
|
|
1575
1639
|
EmptyStateComponent,
|
|
1576
1640
|
BusyOverlayComponent,
|
|
1577
1641
|
PlaceOutletComponent,
|
|
1578
|
-
|
|
1642
|
+
TabbedPlaceNavigationComponent
|
|
1579
1643
|
],
|
|
1580
1644
|
entryComponents: [BusyOverlayComponent],
|
|
1581
1645
|
exports: [
|
|
1582
1646
|
BusyOverlayComponent,
|
|
1583
1647
|
PlaceOutletComponent,
|
|
1584
1648
|
EmptyStateComponent,
|
|
1585
|
-
|
|
1649
|
+
TabbedPlaceNavigationComponent
|
|
1586
1650
|
],
|
|
1587
1651
|
providers: [
|
|
1588
1652
|
PlaceService
|
|
@@ -1995,6 +2059,8 @@ function Place(options) {
|
|
|
1995
2059
|
Options.prototype.path;
|
|
1996
2060
|
/** @type {?} */
|
|
1997
2061
|
Options.prototype.title;
|
|
2062
|
+
/** @type {?} */
|
|
2063
|
+
Options.prototype.order;
|
|
1998
2064
|
/** @type {?|undefined} */
|
|
1999
2065
|
Options.prototype.authenticate;
|
|
2000
2066
|
}
|
|
@@ -2007,6 +2073,7 @@ function Place(options) {
|
|
|
2007
2073
|
assert.notNil(options);
|
|
2008
2074
|
this.path = options.path;
|
|
2009
2075
|
this.title = options.title;
|
|
2076
|
+
this.order = options.order;
|
|
2010
2077
|
this.authenticate = isNil(options.authenticate) || options.authenticate;
|
|
2011
2078
|
}
|
|
2012
2079
|
}
|
|
@@ -2018,6 +2085,8 @@ function Place(options) {
|
|
|
2018
2085
|
Descriptor.prototype.authenticate;
|
|
2019
2086
|
/** @type {?} */
|
|
2020
2087
|
Descriptor.prototype.title;
|
|
2088
|
+
/** @type {?} */
|
|
2089
|
+
Descriptor.prototype.order;
|
|
2021
2090
|
}
|
|
2022
2091
|
/**
|
|
2023
2092
|
* @param {?} klass
|
|
@@ -3072,5 +3141,5 @@ var ParameterType;
|
|
|
3072
3141
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3073
3142
|
*/
|
|
3074
3143
|
|
|
3075
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule,
|
|
3144
|
+
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, NumberInputComponent, ParameterType, PasswordInputComponent, Place, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceService, Point, QueryParameter, QueryParameterList, ResizeAwareComponent, RouteId, RouteParameter, RouteParameterBindings, RouteParameterList, RouteParameterSanitiser, Sanitiser, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, 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 };
|
|
3076
3145
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|