@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
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/platform-browser'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/list'), require('@angular/material/tabs'), require('@angular/material/tooltip'), require('@angular/router'), require('@angular/animations'), require('resize-observer-polyfill'), require('@typescript-plus/fast-memoize-decorator'), require('lodash'), require('reflect-metadata'), require('@typescript-plus/fast-memoize-decorator/dist/src')) :
3
- typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/platform-browser', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/list', '@angular/material/tabs', '@angular/material/tooltip', '@angular/router', '@angular/animations', 'resize-observer-polyfill', '@typescript-plus/fast-memoize-decorator', 'lodash', 'reflect-metadata', '@typescript-plus/fast-memoize-decorator/dist/src'], factory) :
4
- (global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.platformBrowser, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.list, global.ng.material.tabs, global.ng.material.tooltip, global.ng.router, global.ng.animations, global.ResizeObserver, global.fastMemoizeDecorator, global.lodash, null, global.src));
5
- }(this, function (exports, common, core, forms, material, platformBrowser, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, list, tabs, tooltip, router, animations$1, ResizeObserver, fastMemoizeDecorator, lodash, reflectMetadata, src) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/platform-browser'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tabs'), require('@angular/material/tooltip'), require('@angular/router'), require('@angular/animations'), require('lodash'), require('reflect-metadata'), require('resize-observer-polyfill'), require('@typescript-plus/fast-memoize-decorator'), require('@typescript-plus/fast-memoize-decorator/dist/src')) :
3
+ typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/platform-browser', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/tabs', '@angular/material/tooltip', '@angular/router', '@angular/animations', 'lodash', 'reflect-metadata', 'resize-observer-polyfill', '@typescript-plus/fast-memoize-decorator', '@typescript-plus/fast-memoize-decorator/dist/src'], factory) :
4
+ (global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.platformBrowser, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.tabs, global.ng.material.tooltip, global.ng.router, global.ng.animations, global.lodash, null, global.ResizeObserver, global.fastMemoizeDecorator, global.src));
5
+ }(this, function (exports, common, core, forms, material, platformBrowser, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, icon, list, tabs, tooltip, router, animations$1, lodash, reflectMetadata, ResizeObserver, fastMemoizeDecorator, src) { 'use strict';
6
6
 
7
7
  ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
8
8
 
@@ -2081,6 +2081,116 @@
2081
2081
  PlaceOutletComponent.prototype.placeService;
2082
2082
  }
2083
2083
 
2084
+ /**
2085
+ * @fileoverview added by tsickle
2086
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2087
+ */
2088
+ /**
2089
+ * @param {?} options
2090
+ * @return {?}
2091
+ */
2092
+ function Place(options) {
2093
+ return (/**
2094
+ * @param {?} target
2095
+ * @return {?}
2096
+ */
2097
+ function (target) {
2098
+ Reflect.defineMetadata('place.options', options, target);
2099
+ });
2100
+ }
2101
+ (function (Place) {
2102
+ /**
2103
+ * @record
2104
+ */
2105
+ function Options() { }
2106
+ Place.Options = Options;
2107
+ if (false) {
2108
+ /** @type {?} */
2109
+ Options.prototype.path;
2110
+ /** @type {?} */
2111
+ Options.prototype.order;
2112
+ /** @type {?|undefined} */
2113
+ Options.prototype.data;
2114
+ /** @type {?|undefined} */
2115
+ Options.prototype.authenticate;
2116
+ }
2117
+ var Descriptor = /** @class */ (function () {
2118
+ function Descriptor(placeClass, options) {
2119
+ pectin.assert.notNil(options);
2120
+ this.path = options.path;
2121
+ this.order = options.order;
2122
+ this.data = options.data;
2123
+ this.authenticate = lodash.isNil(options.authenticate) || options.authenticate;
2124
+ }
2125
+ /**
2126
+ * @template T
2127
+ * @param {?} key
2128
+ * @param {?=} defaultValue
2129
+ * @return {?}
2130
+ */
2131
+ Descriptor.prototype.getData = /**
2132
+ * @template T
2133
+ * @param {?} key
2134
+ * @param {?=} defaultValue
2135
+ * @return {?}
2136
+ */
2137
+ function (key, defaultValue) {
2138
+ return this.data ?
2139
+ lodash.isNil(this.data[key]) ? defaultValue : this.data[key] :
2140
+ defaultValue;
2141
+ };
2142
+ /**
2143
+ * @template T
2144
+ * @param {?} keys
2145
+ * @param {?=} defaultValue
2146
+ * @return {?}
2147
+ */
2148
+ Descriptor.prototype.searchData = /**
2149
+ * @template T
2150
+ * @param {?} keys
2151
+ * @param {?=} defaultValue
2152
+ * @return {?}
2153
+ */
2154
+ function (keys, defaultValue) {
2155
+ var _this = this;
2156
+ if (this.data) {
2157
+ /** @type {?} */
2158
+ var found = keys.find((/**
2159
+ * @param {?} key
2160
+ * @return {?}
2161
+ */
2162
+ function (key) { return !lodash.isNil(_this.data[key]); }));
2163
+ return found ? this.data[found] : defaultValue;
2164
+ }
2165
+ else {
2166
+ return defaultValue;
2167
+ }
2168
+ };
2169
+ return Descriptor;
2170
+ }());
2171
+ Place.Descriptor = Descriptor;
2172
+ if (false) {
2173
+ /** @type {?} */
2174
+ Descriptor.prototype.path;
2175
+ /** @type {?} */
2176
+ Descriptor.prototype.authenticate;
2177
+ /** @type {?} */
2178
+ Descriptor.prototype.order;
2179
+ /** @type {?} */
2180
+ Descriptor.prototype.data;
2181
+ }
2182
+ /**
2183
+ * @param {?} klass
2184
+ * @return {?}
2185
+ */
2186
+ function getDescriptor(klass) {
2187
+ /** @type {?} */
2188
+ var placeOptions = Reflect.getMetadata('place.options', klass);
2189
+ return new Descriptor(klass, placeOptions);
2190
+ }
2191
+ Place.getDescriptor = getDescriptor;
2192
+ })(Place || (Place = {}));
2193
+
2084
2194
  /**
2085
2195
  * @fileoverview added by tsickle
2086
2196
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -2090,7 +2200,11 @@
2090
2200
  function TabbedPlaceNavigationComponent() {
2091
2201
  var _this = _super.call(this) || this;
2092
2202
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2093
- _this.orderedPlaces = chain(_this.placesModel).sortBy('order');
2203
+ _this.orderedPlaces = chain(_this.placesModel).map((/**
2204
+ * @param {?} c
2205
+ * @return {?}
2206
+ */
2207
+ function (c) { return Place.getDescriptor(c); })).sortBy('order');
2094
2208
  return _this;
2095
2209
  }
2096
2210
  /**
@@ -2104,7 +2218,7 @@
2104
2218
  TabbedPlaceNavigationComponent.decorators = [
2105
2219
  { type: core.Component, args: [{
2106
2220
  selector: 'angular-ui-powerups-tabbed-place-navigation',
2107
- 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",
2221
+ 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",
2108
2222
  styles: [""]
2109
2223
  }] }
2110
2224
  ];
@@ -2149,7 +2263,8 @@
2149
2263
  router.RouterModule,
2150
2264
  tabs.MatTabsModule,
2151
2265
  list.MatListModule,
2152
- tooltip.MatTooltipModule
2266
+ tooltip.MatTooltipModule,
2267
+ icon.MatIconModule
2153
2268
  ],
2154
2269
  declarations: [
2155
2270
  EmptyStateComponent,
@@ -2582,72 +2697,6 @@
2582
2697
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2583
2698
  */
2584
2699
 
2585
- /**
2586
- * @fileoverview added by tsickle
2587
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2588
- */
2589
- /**
2590
- * @param {?} options
2591
- * @return {?}
2592
- */
2593
- function Place(options) {
2594
- return (/**
2595
- * @param {?} target
2596
- * @return {?}
2597
- */
2598
- function (target) {
2599
- Reflect.defineMetadata('place.options', options, target);
2600
- });
2601
- }
2602
- (function (Place) {
2603
- /**
2604
- * @record
2605
- */
2606
- function Options() { }
2607
- Place.Options = Options;
2608
- if (false) {
2609
- /** @type {?} */
2610
- Options.prototype.path;
2611
- /** @type {?} */
2612
- Options.prototype.title;
2613
- /** @type {?} */
2614
- Options.prototype.order;
2615
- /** @type {?|undefined} */
2616
- Options.prototype.authenticate;
2617
- }
2618
- var Descriptor = /** @class */ (function () {
2619
- function Descriptor(placeClass, options) {
2620
- pectin.assert.notNil(options);
2621
- this.path = options.path;
2622
- this.title = options.title;
2623
- this.order = options.order;
2624
- this.authenticate = lodash.isNil(options.authenticate) || options.authenticate;
2625
- }
2626
- return Descriptor;
2627
- }());
2628
- Place.Descriptor = Descriptor;
2629
- if (false) {
2630
- /** @type {?} */
2631
- Descriptor.prototype.path;
2632
- /** @type {?} */
2633
- Descriptor.prototype.authenticate;
2634
- /** @type {?} */
2635
- Descriptor.prototype.title;
2636
- /** @type {?} */
2637
- Descriptor.prototype.order;
2638
- }
2639
- /**
2640
- * @param {?} klass
2641
- * @return {?}
2642
- */
2643
- function getDescriptor(klass) {
2644
- /** @type {?} */
2645
- var placeOptions = Reflect.getMetadata('place.options', klass);
2646
- return new Descriptor(klass, placeOptions);
2647
- }
2648
- Place.getDescriptor = getDescriptor;
2649
- })(Place || (Place = {}));
2650
-
2651
2700
  /**
2652
2701
  * @fileoverview added by tsickle
2653
2702
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -2992,8 +3041,6 @@
2992
3041
  var _this = _super.call(this) || this;
2993
3042
  _this.activatedRoute = activatedRoute;
2994
3043
  _this.routeBindingMediator = _this.registerDisposable(new exports.RouteParameterBindings(_this, router, activatedRoute));
2995
- // See https://coolon.atlassian.net/browse/PEC-59
2996
- ((/** @type {?} */ ((/** @type {?} */ (_this.titleModel))))).setDefault(_this.placeConfig.title);
2997
3044
  return _this;
2998
3045
  }
2999
3046
  Object.defineProperty(AbstractPlaceComponent.prototype, "placeConfig", {
@@ -3015,10 +3062,6 @@
3015
3062
  function () {
3016
3063
  return true;
3017
3064
  };
3018
- __decorate([
3019
- pectin.UseDelegate(),
3020
- __metadata("design:type", pectin.MutableValueModel)
3021
- ], AbstractPlaceComponent.prototype, "titleModel", void 0);
3022
3065
  __decorate([
3023
3066
  fastMemoizeDecorator.Memoize(),
3024
3067
  __metadata("design:type", Place.Descriptor),
@@ -3027,8 +3070,6 @@
3027
3070
  return AbstractPlaceComponent;
3028
3071
  }(DisposableComponent));
3029
3072
  if (false) {
3030
- /** @type {?} */
3031
- AbstractPlaceComponent.prototype.titleModel;
3032
3073
  /**
3033
3074
  * @type {?}
3034
3075
  * @private
@@ -3050,8 +3091,6 @@
3050
3091
  */
3051
3092
  function PlaceComponent() { }
3052
3093
  if (false) {
3053
- /** @type {?} */
3054
- PlaceComponent.prototype.titleModel;
3055
3094
  /**
3056
3095
  * @return {?}
3057
3096
  */