@coolon/angular-ui-powerups 0.0.28 → 0.0.29
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 +95 -83
- 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/lib/place/abstract-place-component.js +1 -10
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +8 -3
- package/esm2015/lib/place/place-component.js +1 -3
- package/esm2015/lib/place/place.decorator.js +17 -6
- package/esm2015/lib/place/place.module.js +4 -2
- package/esm5/lib/place/abstract-place-component.js +1 -10
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +8 -3
- package/esm5/lib/place/place-component.js +1 -3
- package/esm5/lib/place/place.decorator.js +23 -6
- package/esm5/lib/place/place.module.js +4 -2
- package/fesm2015/coolon-angular-ui-powerups.js +91 -84
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +94 -81
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/abstract-place-component.d.ts +0 -2
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +4 -3
- package/lib/place/place-component.d.ts +0 -2
- package/lib/place/place.decorator.d.ts +7 -2
- package/package.json +1 -1
- package/schematics/place-routes/index.js +19 -13
- package/schematics/place-routes/index.js.map +1 -1
- package/schematics/place-routes/place-def.d.ts +1 -1
- 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
|
@@ -10,15 +10,16 @@ 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';
|
|
12
12
|
import { MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
|
13
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
13
14
|
import { MatListModule } from '@angular/material/list';
|
|
14
15
|
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
15
16
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
17
|
import { RouterModule, Router, ActivatedRoute, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
17
18
|
import { query, style, group, animate, trigger, transition } from '@angular/animations';
|
|
18
|
-
import ResizeObserver from 'resize-observer-polyfill';
|
|
19
|
-
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
20
19
|
import { isNil } from 'lodash';
|
|
21
20
|
import 'reflect-metadata';
|
|
21
|
+
import ResizeObserver from 'resize-observer-polyfill';
|
|
22
|
+
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
22
23
|
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -1899,6 +1900,89 @@ if (false) {
|
|
|
1899
1900
|
PlaceOutletComponent.prototype.placeService;
|
|
1900
1901
|
}
|
|
1901
1902
|
|
|
1903
|
+
/**
|
|
1904
|
+
* @fileoverview added by tsickle
|
|
1905
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1906
|
+
*/
|
|
1907
|
+
/**
|
|
1908
|
+
* @param {?} options
|
|
1909
|
+
* @return {?}
|
|
1910
|
+
*/
|
|
1911
|
+
function Place(options) {
|
|
1912
|
+
return (/**
|
|
1913
|
+
* @param {?} target
|
|
1914
|
+
* @return {?}
|
|
1915
|
+
*/
|
|
1916
|
+
function (target) {
|
|
1917
|
+
Reflect.defineMetadata('place.options', options, target);
|
|
1918
|
+
});
|
|
1919
|
+
}
|
|
1920
|
+
(function (Place) {
|
|
1921
|
+
/**
|
|
1922
|
+
* @record
|
|
1923
|
+
*/
|
|
1924
|
+
function Options() { }
|
|
1925
|
+
Place.Options = Options;
|
|
1926
|
+
if (false) {
|
|
1927
|
+
/** @type {?} */
|
|
1928
|
+
Options.prototype.path;
|
|
1929
|
+
/** @type {?} */
|
|
1930
|
+
Options.prototype.order;
|
|
1931
|
+
/** @type {?|undefined} */
|
|
1932
|
+
Options.prototype.data;
|
|
1933
|
+
/** @type {?|undefined} */
|
|
1934
|
+
Options.prototype.authenticate;
|
|
1935
|
+
}
|
|
1936
|
+
var Descriptor = /** @class */ (function () {
|
|
1937
|
+
function Descriptor(placeClass, options) {
|
|
1938
|
+
assert.notNil(options);
|
|
1939
|
+
this.path = options.path;
|
|
1940
|
+
this.order = options.order;
|
|
1941
|
+
this.data = options.data;
|
|
1942
|
+
this.authenticate = isNil(options.authenticate) || options.authenticate;
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* @template T
|
|
1946
|
+
* @param {?} key
|
|
1947
|
+
* @param {?=} defaultValue
|
|
1948
|
+
* @return {?}
|
|
1949
|
+
*/
|
|
1950
|
+
Descriptor.prototype.getData = /**
|
|
1951
|
+
* @template T
|
|
1952
|
+
* @param {?} key
|
|
1953
|
+
* @param {?=} defaultValue
|
|
1954
|
+
* @return {?}
|
|
1955
|
+
*/
|
|
1956
|
+
function (key, defaultValue) {
|
|
1957
|
+
return this.data ?
|
|
1958
|
+
isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
1959
|
+
defaultValue;
|
|
1960
|
+
};
|
|
1961
|
+
return Descriptor;
|
|
1962
|
+
}());
|
|
1963
|
+
Place.Descriptor = Descriptor;
|
|
1964
|
+
if (false) {
|
|
1965
|
+
/** @type {?} */
|
|
1966
|
+
Descriptor.prototype.path;
|
|
1967
|
+
/** @type {?} */
|
|
1968
|
+
Descriptor.prototype.authenticate;
|
|
1969
|
+
/** @type {?} */
|
|
1970
|
+
Descriptor.prototype.order;
|
|
1971
|
+
/** @type {?} */
|
|
1972
|
+
Descriptor.prototype.data;
|
|
1973
|
+
}
|
|
1974
|
+
/**
|
|
1975
|
+
* @param {?} klass
|
|
1976
|
+
* @return {?}
|
|
1977
|
+
*/
|
|
1978
|
+
function getDescriptor(klass) {
|
|
1979
|
+
/** @type {?} */
|
|
1980
|
+
var placeOptions = Reflect.getMetadata('place.options', klass);
|
|
1981
|
+
return new Descriptor(klass, placeOptions);
|
|
1982
|
+
}
|
|
1983
|
+
Place.getDescriptor = getDescriptor;
|
|
1984
|
+
})(Place || (Place = {}));
|
|
1985
|
+
|
|
1902
1986
|
/**
|
|
1903
1987
|
* @fileoverview added by tsickle
|
|
1904
1988
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1908,7 +1992,11 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
1908
1992
|
function TabbedPlaceNavigationComponent() {
|
|
1909
1993
|
var _this = _super.call(this) || this;
|
|
1910
1994
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1911
|
-
_this.orderedPlaces = chain(_this.placesModel).
|
|
1995
|
+
_this.orderedPlaces = chain(_this.placesModel).map((/**
|
|
1996
|
+
* @param {?} c
|
|
1997
|
+
* @return {?}
|
|
1998
|
+
*/
|
|
1999
|
+
function (c) { return Place.getDescriptor(c); })).sortBy('order');
|
|
1912
2000
|
return _this;
|
|
1913
2001
|
}
|
|
1914
2002
|
/**
|
|
@@ -1922,7 +2010,7 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
1922
2010
|
TabbedPlaceNavigationComponent.decorators = [
|
|
1923
2011
|
{ type: Component, args: [{
|
|
1924
2012
|
selector: 'angular-ui-powerups-tabbed-place-navigation',
|
|
1925
|
-
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.title\">{{placeDescriptor.
|
|
2013
|
+
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.title\">\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",
|
|
1926
2014
|
styles: [""]
|
|
1927
2015
|
}] }
|
|
1928
2016
|
];
|
|
@@ -1967,7 +2055,8 @@ var PlaceModule = /** @class */ (function () {
|
|
|
1967
2055
|
RouterModule,
|
|
1968
2056
|
MatTabsModule$1,
|
|
1969
2057
|
MatListModule,
|
|
1970
|
-
MatTooltipModule
|
|
2058
|
+
MatTooltipModule,
|
|
2059
|
+
MatIconModule
|
|
1971
2060
|
],
|
|
1972
2061
|
declarations: [
|
|
1973
2062
|
EmptyStateComponent,
|
|
@@ -2400,72 +2489,6 @@ if (false) {
|
|
|
2400
2489
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2401
2490
|
*/
|
|
2402
2491
|
|
|
2403
|
-
/**
|
|
2404
|
-
* @fileoverview added by tsickle
|
|
2405
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2406
|
-
*/
|
|
2407
|
-
/**
|
|
2408
|
-
* @param {?} options
|
|
2409
|
-
* @return {?}
|
|
2410
|
-
*/
|
|
2411
|
-
function Place(options) {
|
|
2412
|
-
return (/**
|
|
2413
|
-
* @param {?} target
|
|
2414
|
-
* @return {?}
|
|
2415
|
-
*/
|
|
2416
|
-
function (target) {
|
|
2417
|
-
Reflect.defineMetadata('place.options', options, target);
|
|
2418
|
-
});
|
|
2419
|
-
}
|
|
2420
|
-
(function (Place) {
|
|
2421
|
-
/**
|
|
2422
|
-
* @record
|
|
2423
|
-
*/
|
|
2424
|
-
function Options() { }
|
|
2425
|
-
Place.Options = Options;
|
|
2426
|
-
if (false) {
|
|
2427
|
-
/** @type {?} */
|
|
2428
|
-
Options.prototype.path;
|
|
2429
|
-
/** @type {?} */
|
|
2430
|
-
Options.prototype.title;
|
|
2431
|
-
/** @type {?} */
|
|
2432
|
-
Options.prototype.order;
|
|
2433
|
-
/** @type {?|undefined} */
|
|
2434
|
-
Options.prototype.authenticate;
|
|
2435
|
-
}
|
|
2436
|
-
var Descriptor = /** @class */ (function () {
|
|
2437
|
-
function Descriptor(placeClass, options) {
|
|
2438
|
-
assert.notNil(options);
|
|
2439
|
-
this.path = options.path;
|
|
2440
|
-
this.title = options.title;
|
|
2441
|
-
this.order = options.order;
|
|
2442
|
-
this.authenticate = isNil(options.authenticate) || options.authenticate;
|
|
2443
|
-
}
|
|
2444
|
-
return Descriptor;
|
|
2445
|
-
}());
|
|
2446
|
-
Place.Descriptor = Descriptor;
|
|
2447
|
-
if (false) {
|
|
2448
|
-
/** @type {?} */
|
|
2449
|
-
Descriptor.prototype.path;
|
|
2450
|
-
/** @type {?} */
|
|
2451
|
-
Descriptor.prototype.authenticate;
|
|
2452
|
-
/** @type {?} */
|
|
2453
|
-
Descriptor.prototype.title;
|
|
2454
|
-
/** @type {?} */
|
|
2455
|
-
Descriptor.prototype.order;
|
|
2456
|
-
}
|
|
2457
|
-
/**
|
|
2458
|
-
* @param {?} klass
|
|
2459
|
-
* @return {?}
|
|
2460
|
-
*/
|
|
2461
|
-
function getDescriptor(klass) {
|
|
2462
|
-
/** @type {?} */
|
|
2463
|
-
var placeOptions = Reflect.getMetadata('place.options', klass);
|
|
2464
|
-
return new Descriptor(klass, placeOptions);
|
|
2465
|
-
}
|
|
2466
|
-
Place.getDescriptor = getDescriptor;
|
|
2467
|
-
})(Place || (Place = {}));
|
|
2468
|
-
|
|
2469
2492
|
/**
|
|
2470
2493
|
* @fileoverview added by tsickle
|
|
2471
2494
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -2810,8 +2833,6 @@ var AbstractPlaceComponent = /** @class */ (function (_super) {
|
|
|
2810
2833
|
var _this = _super.call(this) || this;
|
|
2811
2834
|
_this.activatedRoute = activatedRoute;
|
|
2812
2835
|
_this.routeBindingMediator = _this.registerDisposable(new RouteParameterBindings(_this, router, activatedRoute));
|
|
2813
|
-
// See https://coolon.atlassian.net/browse/PEC-59
|
|
2814
|
-
((/** @type {?} */ ((/** @type {?} */ (_this.titleModel))))).setDefault(_this.placeConfig.title);
|
|
2815
2836
|
return _this;
|
|
2816
2837
|
}
|
|
2817
2838
|
Object.defineProperty(AbstractPlaceComponent.prototype, "placeConfig", {
|
|
@@ -2833,10 +2854,6 @@ var AbstractPlaceComponent = /** @class */ (function (_super) {
|
|
|
2833
2854
|
function () {
|
|
2834
2855
|
return true;
|
|
2835
2856
|
};
|
|
2836
|
-
__decorate([
|
|
2837
|
-
UseDelegate(),
|
|
2838
|
-
__metadata("design:type", MutableValueModel)
|
|
2839
|
-
], AbstractPlaceComponent.prototype, "titleModel", void 0);
|
|
2840
2857
|
__decorate([
|
|
2841
2858
|
Memoize(),
|
|
2842
2859
|
__metadata("design:type", Place.Descriptor),
|
|
@@ -2845,8 +2862,6 @@ var AbstractPlaceComponent = /** @class */ (function (_super) {
|
|
|
2845
2862
|
return AbstractPlaceComponent;
|
|
2846
2863
|
}(DisposableComponent));
|
|
2847
2864
|
if (false) {
|
|
2848
|
-
/** @type {?} */
|
|
2849
|
-
AbstractPlaceComponent.prototype.titleModel;
|
|
2850
2865
|
/**
|
|
2851
2866
|
* @type {?}
|
|
2852
2867
|
* @private
|
|
@@ -2868,8 +2883,6 @@ if (false) {
|
|
|
2868
2883
|
*/
|
|
2869
2884
|
function PlaceComponent() { }
|
|
2870
2885
|
if (false) {
|
|
2871
|
-
/** @type {?} */
|
|
2872
|
-
PlaceComponent.prototype.titleModel;
|
|
2873
2886
|
/**
|
|
2874
2887
|
* @return {?}
|
|
2875
2888
|
*/
|