@coolon/angular-ui-powerups 0.0.28 → 0.0.30

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.
Files changed (30) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +122 -83
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/esm2015/lib/place/abstract-place-component.js +1 -10
  7. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +8 -3
  8. package/esm2015/lib/place/place-component.js +1 -3
  9. package/esm2015/lib/place/place.decorator.js +37 -6
  10. package/esm2015/lib/place/place.module.js +4 -2
  11. package/esm5/lib/place/abstract-place-component.js +1 -10
  12. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +8 -3
  13. package/esm5/lib/place/place-component.js +1 -3
  14. package/esm5/lib/place/place.decorator.js +50 -6
  15. package/esm5/lib/place/place.module.js +4 -2
  16. package/fesm2015/coolon-angular-ui-powerups.js +111 -84
  17. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  18. package/fesm5/coolon-angular-ui-powerups.js +121 -81
  19. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  20. package/lib/place/abstract-place-component.d.ts +0 -2
  21. package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +4 -3
  22. package/lib/place/place-component.d.ts +0 -2
  23. package/lib/place/place.decorator.d.ts +8 -2
  24. package/package.json +1 -1
  25. package/schematics/place-routes/index.js +19 -13
  26. package/schematics/place-routes/index.js.map +1 -1
  27. package/schematics/place-routes/place-def.d.ts +1 -1
  28. package/schematics/place-routes/place-def.js.map +1 -1
  29. package/schematics/place-routes/scanner.js +1 -0
  30. 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,116 @@ 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
+ /**
1962
+ * @template T
1963
+ * @param {?} keys
1964
+ * @param {?=} defaultValue
1965
+ * @return {?}
1966
+ */
1967
+ Descriptor.prototype.searchData = /**
1968
+ * @template T
1969
+ * @param {?} keys
1970
+ * @param {?=} defaultValue
1971
+ * @return {?}
1972
+ */
1973
+ function (keys, defaultValue) {
1974
+ var _this = this;
1975
+ if (this.data) {
1976
+ /** @type {?} */
1977
+ var found = keys.find((/**
1978
+ * @param {?} key
1979
+ * @return {?}
1980
+ */
1981
+ function (key) { return !isNil(_this.data[key]); }));
1982
+ return found ? this.data[found] : defaultValue;
1983
+ }
1984
+ else {
1985
+ return defaultValue;
1986
+ }
1987
+ };
1988
+ return Descriptor;
1989
+ }());
1990
+ Place.Descriptor = Descriptor;
1991
+ if (false) {
1992
+ /** @type {?} */
1993
+ Descriptor.prototype.path;
1994
+ /** @type {?} */
1995
+ Descriptor.prototype.authenticate;
1996
+ /** @type {?} */
1997
+ Descriptor.prototype.order;
1998
+ /** @type {?} */
1999
+ Descriptor.prototype.data;
2000
+ }
2001
+ /**
2002
+ * @param {?} klass
2003
+ * @return {?}
2004
+ */
2005
+ function getDescriptor(klass) {
2006
+ /** @type {?} */
2007
+ var placeOptions = Reflect.getMetadata('place.options', klass);
2008
+ return new Descriptor(klass, placeOptions);
2009
+ }
2010
+ Place.getDescriptor = getDescriptor;
2011
+ })(Place || (Place = {}));
2012
+
1902
2013
  /**
1903
2014
  * @fileoverview added by tsickle
1904
2015
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -1908,7 +2019,11 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
1908
2019
  function TabbedPlaceNavigationComponent() {
1909
2020
  var _this = _super.call(this) || this;
1910
2021
  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).sortBy('order');
2022
+ _this.orderedPlaces = chain(_this.placesModel).map((/**
2023
+ * @param {?} c
2024
+ * @return {?}
2025
+ */
2026
+ function (c) { return Place.getDescriptor(c); })).sortBy('order');
1912
2027
  return _this;
1913
2028
  }
1914
2029
  /**
@@ -1922,7 +2037,7 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
1922
2037
  TabbedPlaceNavigationComponent.decorators = [
1923
2038
  { type: Component, args: [{
1924
2039
  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.title}}</a>\n</nav>\n",
2040
+ 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",
1926
2041
  styles: [""]
1927
2042
  }] }
1928
2043
  ];
@@ -1967,7 +2082,8 @@ var PlaceModule = /** @class */ (function () {
1967
2082
  RouterModule,
1968
2083
  MatTabsModule$1,
1969
2084
  MatListModule,
1970
- MatTooltipModule
2085
+ MatTooltipModule,
2086
+ MatIconModule
1971
2087
  ],
1972
2088
  declarations: [
1973
2089
  EmptyStateComponent,
@@ -2400,72 +2516,6 @@ if (false) {
2400
2516
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2401
2517
  */
2402
2518
 
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
2519
  /**
2470
2520
  * @fileoverview added by tsickle
2471
2521
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -2810,8 +2860,6 @@ var AbstractPlaceComponent = /** @class */ (function (_super) {
2810
2860
  var _this = _super.call(this) || this;
2811
2861
  _this.activatedRoute = activatedRoute;
2812
2862
  _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
2863
  return _this;
2816
2864
  }
2817
2865
  Object.defineProperty(AbstractPlaceComponent.prototype, "placeConfig", {
@@ -2833,10 +2881,6 @@ var AbstractPlaceComponent = /** @class */ (function (_super) {
2833
2881
  function () {
2834
2882
  return true;
2835
2883
  };
2836
- __decorate([
2837
- UseDelegate(),
2838
- __metadata("design:type", MutableValueModel)
2839
- ], AbstractPlaceComponent.prototype, "titleModel", void 0);
2840
2884
  __decorate([
2841
2885
  Memoize(),
2842
2886
  __metadata("design:type", Place.Descriptor),
@@ -2845,8 +2889,6 @@ var AbstractPlaceComponent = /** @class */ (function (_super) {
2845
2889
  return AbstractPlaceComponent;
2846
2890
  }(DisposableComponent));
2847
2891
  if (false) {
2848
- /** @type {?} */
2849
- AbstractPlaceComponent.prototype.titleModel;
2850
2892
  /**
2851
2893
  * @type {?}
2852
2894
  * @private
@@ -2868,8 +2910,6 @@ if (false) {
2868
2910
  */
2869
2911
  function PlaceComponent() { }
2870
2912
  if (false) {
2871
- /** @type {?} */
2872
- PlaceComponent.prototype.titleModel;
2873
2913
  /**
2874
2914
  * @return {?}
2875
2915
  */