@coolon/angular-ui-powerups 0.0.76 → 0.0.78

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 (26) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +28 -30
  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/interaction/components/activity-container/activity-container.component.js +3 -5
  7. package/esm2015/lib/place/components/abstract-place-navigation.component.js +15 -11
  8. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +3 -3
  9. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +1 -1
  10. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +2 -2
  11. package/esm2015/lib/place/place-history.js +5 -18
  12. package/esm2015/lib/place/route/guards/leave-place.guard.js +1 -2
  13. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +3 -5
  14. package/esm5/lib/place/components/abstract-place-navigation.component.js +19 -11
  15. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +3 -3
  16. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +1 -1
  17. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +2 -2
  18. package/esm5/lib/place/place-history.js +5 -15
  19. package/esm5/lib/place/route/guards/leave-place.guard.js +1 -1
  20. package/fesm2015/coolon-angular-ui-powerups.js +24 -34
  21. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  22. package/fesm5/coolon-angular-ui-powerups.js +28 -30
  23. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  24. package/lib/place/components/abstract-place-navigation.component.d.ts +3 -3
  25. package/lib/place/place-history.d.ts +1 -3
  26. package/package.json +1 -1
@@ -1860,6 +1860,7 @@
1860
1860
  */
1861
1861
  function (activityType, data) {
1862
1862
  var _this = this;
1863
+ this.cleanupStaleNestedActivities();
1863
1864
  /** @type {?} */
1864
1865
  var self = this;
1865
1866
  return new Promise((/**
@@ -1961,10 +1962,7 @@
1961
1962
  * @return {?}
1962
1963
  */
1963
1964
  function () {
1964
- // don't do anything if job already queued up.
1965
- if (this.synchroniseSelectedTabIndex()) {
1966
- this.cleanupStaleNestedActivities();
1967
- }
1965
+ this.synchroniseSelectedTabIndex();
1968
1966
  this.updateActivityList();
1969
1967
  };
1970
1968
  // @Trace()
@@ -3913,8 +3911,7 @@
3913
3911
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3914
3912
  */
3915
3913
  var PlaceHistory = /** @class */ (function () {
3916
- function PlaceHistory(router) {
3917
- this.router = router;
3914
+ function PlaceHistory() {
3918
3915
  this._history = new Map();
3919
3916
  }
3920
3917
  // @Trace()
@@ -3933,7 +3930,7 @@
3933
3930
  /** @type {?} */
3934
3931
  var history = this.getHistory(state.placeDefinition);
3935
3932
  /** @type {?} */
3936
- var previousState = ___default__default.last(history);
3933
+ var previousState = ___default__default.first(history);
3937
3934
  if (!previousState || state.hasChangedFrom(previousState)) {
3938
3935
  history.unshift(state); // LIFO
3939
3936
  this.setHistory(state.placeDefinition, history.slice(0, 3)); // limit our history to 4 visits
@@ -3977,10 +3974,8 @@
3977
3974
  },] }
3978
3975
  ];
3979
3976
  /** @nocollapse */
3980
- PlaceHistory.ctorParameters = function () { return [
3981
- { type: router.Router }
3982
- ]; };
3983
- /** @nocollapse */ PlaceHistory.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(core.ɵɵinject(router.Router)); }, token: PlaceHistory, providedIn: "root" });
3977
+ PlaceHistory.ctorParameters = function () { return []; };
3978
+ /** @nocollapse */ PlaceHistory.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(); }, token: PlaceHistory, providedIn: "root" });
3984
3979
  return PlaceHistory;
3985
3980
  }());
3986
3981
  if (false) {
@@ -3989,11 +3984,6 @@
3989
3984
  * @private
3990
3985
  */
3991
3986
  PlaceHistory.prototype._history;
3992
- /**
3993
- * @type {?}
3994
- * @private
3995
- */
3996
- PlaceHistory.prototype.router;
3997
3987
  }
3998
3988
 
3999
3989
  /**
@@ -4650,7 +4640,7 @@
4650
4640
  selector: 'aup-place-outlet',
4651
4641
  template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"placeAnimationOrder.value\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated(routerOutlet, $event)\">\n </router-outlet>\n</div>\n\n",
4652
4642
  animations: [LEFT_RIGHT_PLACE_ANIMATION],
4653
- 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}"]
4643
+ styles: [":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
4654
4644
  }] }
4655
4645
  ];
4656
4646
  /** @nocollapse */
@@ -4756,11 +4746,6 @@
4756
4746
  * @return {?}
4757
4747
  */
4758
4748
  function (c) { return exports.PlaceComponent.getDefinition(c); }));
4759
- _this.relativeToModel = chain(_this.placeOutletModel).pullValueModel((/**
4760
- * @param {?} o
4761
- * @return {?}
4762
- */
4763
- function (o) { return o.activatedRouteModel; }));
4764
4749
  _this.commandFactory = pectin.Command.createFactory((/**
4765
4750
  * @param {?} placeDefinition
4766
4751
  * @return {?}
@@ -4768,6 +4753,11 @@
4768
4753
  function (placeDefinition) {
4769
4754
  _this.placeOutlet.navigate(new Visit(placeDefinition));
4770
4755
  }));
4756
+ _this.activePlaceDefinition = chain(_this.placeOutletModel).pullValueModel((/**
4757
+ * @param {?} o
4758
+ * @return {?}
4759
+ */
4760
+ function (o) { return o.activePlaceModel; })).pluck("placeDefinition");
4771
4761
  return _this;
4772
4762
  }
4773
4763
  /**
@@ -4796,6 +4786,17 @@
4796
4786
  function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); })
4797
4787
  };
4798
4788
  };
4789
+ /**
4790
+ * @param {?} place
4791
+ * @return {?}
4792
+ */
4793
+ AbstractPlaceNavigationComponent.prototype.isActive = /**
4794
+ * @param {?} place
4795
+ * @return {?}
4796
+ */
4797
+ function (place) {
4798
+ return this.activePlaceDefinition.query().equals(place);
4799
+ };
4799
4800
  /**
4800
4801
  * @return {?}
4801
4802
  */
@@ -4845,13 +4846,10 @@
4845
4846
  AbstractPlaceNavigationComponent.prototype.placeOutletModel;
4846
4847
  /** @type {?} */
4847
4848
  AbstractPlaceNavigationComponent.prototype.placeDefinitions;
4848
- /**
4849
- * @type {?}
4850
- * @protected
4851
- */
4852
- AbstractPlaceNavigationComponent.prototype.relativeToModel;
4853
4849
  /** @type {?} */
4854
4850
  AbstractPlaceNavigationComponent.prototype.commandFactory;
4851
+ /** @type {?} */
4852
+ AbstractPlaceNavigationComponent.prototype.activePlaceDefinition;
4855
4853
  }
4856
4854
 
4857
4855
  /**
@@ -4895,8 +4893,8 @@
4895
4893
  ListPlaceNavComponent.decorators = [
4896
4894
  { type: core.Component, args: [{
4897
4895
  selector: 'aup-list-place-nav',
4898
- template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(place)\"\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n",
4899
- styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
4896
+ template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <mat-icon *ngIf=\"getNav(placeDefinition).icon()\">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n",
4897
+ styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
4900
4898
  }] }
4901
4899
  ];
4902
4900
  /** @nocollapse */
@@ -4923,7 +4921,7 @@
4923
4921
  TabbedPlaceNavigationComponent.decorators = [
4924
4922
  { type: core.Component, args: [{
4925
4923
  selector: 'aup-tabbed-place-navigation',
4926
- template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let place of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(place)\"\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n",
4924
+ template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <mat-icon *ngIf=\"getNav(placeDefinition).icon()\">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n",
4927
4925
  styles: [""]
4928
4926
  }] }
4929
4927
  ];