@coolon/angular-ui-powerups 0.0.33 → 0.0.35

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 (32) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +30 -69
  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/coolon-angular-ui-powerups.js +2 -2
  7. package/esm2015/index.js +2 -2
  8. package/esm2015/lib/interaction/abstract-activity.js +14 -2
  9. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +14 -3
  10. package/esm2015/lib/place/guards/leave-place.guard.js +2 -18
  11. package/esm2015/lib/place/index.js +2 -2
  12. package/esm2015/lib/place/place-component.js +2 -4
  13. package/esm2015/lib/place/route/parameter-decorators.js +1 -42
  14. package/esm2015/public_api.js +2 -2
  15. package/esm5/coolon-angular-ui-powerups.js +2 -2
  16. package/esm5/index.js +2 -2
  17. package/esm5/lib/interaction/abstract-activity.js +17 -9
  18. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +14 -3
  19. package/esm5/lib/place/guards/leave-place.guard.js +2 -18
  20. package/esm5/lib/place/index.js +2 -2
  21. package/esm5/lib/place/place-component.js +2 -6
  22. package/esm5/lib/place/route/parameter-decorators.js +1 -42
  23. package/esm5/public_api.js +2 -2
  24. package/fesm2015/coolon-angular-ui-powerups.js +28 -63
  25. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  26. package/fesm5/coolon-angular-ui-powerups.js +32 -69
  27. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  28. package/lib/interaction/abstract-activity.d.ts +1 -0
  29. package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -1
  30. package/lib/place/place-component.d.ts +2 -2
  31. package/lib/place/route/parameter-decorators.d.ts +0 -12
  32. package/package.json +1 -1
@@ -1022,10 +1022,7 @@
1022
1022
  /**
1023
1023
  * @template D, R, E
1024
1024
  */
1025
- var /**
1026
- * @template D, R, E
1027
- */
1028
- AbstractActivity = /** @class */ (function (_super) {
1025
+ var AbstractActivity = /** @class */ (function (_super) {
1029
1026
  __extends(AbstractActivity, _super);
1030
1027
  function AbstractActivity() {
1031
1028
  var _this = _super !== null && _super.apply(this, arguments) || this;
@@ -1099,6 +1096,14 @@
1099
1096
  */
1100
1097
  function () { return _this.finalizeAndDispose(); }));
1101
1098
  };
1099
+ /**
1100
+ * @return {?}
1101
+ */
1102
+ AbstractActivity.prototype.onActivityReady = /**
1103
+ * @return {?}
1104
+ */
1105
+ function () {
1106
+ };
1102
1107
  /**
1103
1108
  * @private
1104
1109
  * @return {?}
@@ -1156,6 +1161,12 @@
1156
1161
  function () {
1157
1162
  return this._busyModel.value;
1158
1163
  };
1164
+ __decorate([
1165
+ pectin.Trace(),
1166
+ __metadata("design:type", Function),
1167
+ __metadata("design:paramtypes", []),
1168
+ __metadata("design:returntype", void 0)
1169
+ ], AbstractActivity.prototype, "onActivityReady", null);
1159
1170
  return AbstractActivity;
1160
1171
  }(DisposableComponent));
1161
1172
  if (false) {
@@ -1302,6 +1313,8 @@
1302
1313
  var _this = _super.call(this) || this;
1303
1314
  _this.activityTabs = new pectin.MutableListModel();
1304
1315
  _this.obsoleteTabs = [];
1316
+ 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;
1317
+ _this.lastActivityTab = chain(_this.activityTabs).last();
1305
1318
  return _this;
1306
1319
  }
1307
1320
  /**
@@ -1324,7 +1337,7 @@
1324
1337
  observe.valuesFrom(this.tabs.animationDone).subscribe((/**
1325
1338
  * @return {?}
1326
1339
  */
1327
- function () { return _this.cleanUpTabs(); }));
1340
+ function () { return _this.onAnimationFinished(); }));
1328
1341
  };
1329
1342
  /**
1330
1343
  * @template D, R, E
@@ -1399,12 +1412,13 @@
1399
1412
  * @private
1400
1413
  * @return {?}
1401
1414
  */
1402
- ActivityContainerComponent.prototype.cleanUpTabs = /**
1415
+ ActivityContainerComponent.prototype.onAnimationFinished = /**
1403
1416
  * @private
1404
1417
  * @return {?}
1405
1418
  */
1406
1419
  function () {
1407
1420
  var _this = this;
1421
+ // TODO: notify selected tab they are ready. activty.afterAnimationComplete
1408
1422
  this.activityTabs.value = this.activityTabs.value.filter((/**
1409
1423
  * @param {?} tab
1410
1424
  * @return {?}
@@ -1412,6 +1426,9 @@
1412
1426
  function (tab) {
1413
1427
  return !_this.obsoleteTabs.includes(tab);
1414
1428
  }));
1429
+ if (this.lastActivityTab.value && this.lastActivityTab.value['onActivityReady']) {
1430
+ this.lastActivityTab.value['onActivityReady']();
1431
+ }
1415
1432
  };
1416
1433
  ActivityContainerComponent.decorators = [
1417
1434
  { type: core.Component, args: [{
@@ -1443,6 +1460,11 @@
1443
1460
  * @private
1444
1461
  */
1445
1462
  exports.ɵq.prototype.obsoleteTabs;
1463
+ /**
1464
+ * @type {?}
1465
+ * @private
1466
+ */
1467
+ exports.ɵq.prototype.lastActivityTab;
1446
1468
  }
1447
1469
  (function (ActivityContainerComponent) {
1448
1470
  /**
@@ -2214,16 +2236,12 @@
2214
2236
  configurable: true
2215
2237
  });
2216
2238
  /**
2217
- * @param {?=} nextPlace
2218
- * @param {?=} nextState
2219
2239
  * @return {?}
2220
2240
  */
2221
2241
  PlaceComponent.prototype.canDeactivate = /**
2222
- * @param {?=} nextPlace
2223
- * @param {?=} nextState
2224
2242
  * @return {?}
2225
2243
  */
2226
- function (nextPlace, nextState) {
2244
+ function () {
2227
2245
  return true;
2228
2246
  };
2229
2247
  /**
@@ -3234,21 +3252,7 @@
3234
3252
  * @return {?}
3235
3253
  */
3236
3254
  function (component, currentRoute, currentState, nextState) {
3237
- /** @type {?} */
3238
- var placeComponent = nextState ?
3239
- (/** @type {?} */ (nextState.root.firstChild.component)) :
3240
- null;
3241
- /** @type {?} */
3242
- var nextPlaceDefinition = pectin.lang.constructorChain(placeComponent).includes(exports.PlaceComponent) ?
3243
- exports.PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (placeComponent))))) :
3244
- null;
3245
- if (nextPlaceDefinition.isDescriptorFor(component)) {
3246
- // console.log("Same place different route. Do we need a place component hook for this??");
3247
- return true;
3248
- }
3249
- else {
3250
- return component.canDeactivate(nextPlaceDefinition, nextState);
3251
- }
3255
+ return component.canDeactivate();
3252
3256
  };
3253
3257
  LeavePlaceGuard.decorators = [
3254
3258
  { type: core.Injectable, args: [{
@@ -3792,26 +3796,6 @@
3792
3796
  pectin.UseDelegate()(prototype, propertyKey);
3793
3797
  });
3794
3798
  }
3795
- /**
3796
- * @deprecated use RouteParameter instead.
3797
- * @template T
3798
- * @param {?} type
3799
- * @param {?=} options
3800
- * @return {?}
3801
- */
3802
- function QueryParameter(type, options) {
3803
- return (/**
3804
- * @param {?} prototype
3805
- * @param {?} propertyKey
3806
- * @return {?}
3807
- */
3808
- function (prototype, propertyKey) {
3809
- /** @type {?} */
3810
- var param = createDefinition(propertyKey, type, options, false);
3811
- typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3812
- pectin.UseDelegate()(prototype, propertyKey);
3813
- });
3814
- }
3815
3799
  /**
3816
3800
  * @template T
3817
3801
  * @param {?} type
@@ -3832,27 +3816,6 @@
3832
3816
  pectin.UseDelegate()(prototype, propertyKey);
3833
3817
  });
3834
3818
  }
3835
- /**
3836
- * @deprecated use RouteParameterList instead
3837
- * @template E
3838
- * @param {?} elementType
3839
- * @param {?=} options
3840
- * @return {?}
3841
- */
3842
- function QueryParameterList(elementType, options) {
3843
- // assert.isTruthy(type.isValid());
3844
- return (/**
3845
- * @param {?} prototype
3846
- * @param {?} propertyKey
3847
- * @return {?}
3848
- */
3849
- function (prototype, propertyKey) {
3850
- /** @type {?} */
3851
- var param = createArrayDefinition(propertyKey, elementType, options);
3852
- typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3853
- pectin.UseDelegate()(prototype, propertyKey);
3854
- });
3855
- }
3856
3819
  /**
3857
3820
  * @template E
3858
3821
  * @param {?} elementType
@@ -4110,8 +4073,6 @@
4110
4073
  exports.PlaceRouteGuard = PlaceRouteGuard;
4111
4074
  exports.PlaceService = PlaceService;
4112
4075
  exports.Point = Point;
4113
- exports.QueryParameter = QueryParameter;
4114
- exports.QueryParameterList = QueryParameterList;
4115
4076
  exports.ResizeAwareComponent = ResizeAwareComponent;
4116
4077
  exports.ResolvedRouteParameterSnapshot = ResolvedRouteParameterSnapshot;
4117
4078
  exports.RouteId = RouteId;