@coolon/angular-ui-powerups 0.0.34 → 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.
@@ -5,7 +5,7 @@ import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgress
5
5
  import { BrowserModule } from '@angular/platform-browser';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { __extends, __decorate, __metadata, __assign, __awaiter, __generator, __values } from 'tslib';
8
- import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, assert, UnaryCommand, lang, Dsl, Logger, ListModel, StoreInListModel, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Trace, MutableValueModel, TransactionObserver, Binding, OptionsHelper, ValueHolder } from '@coolon/pectin';
8
+ import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, assert, UnaryCommand, lang, Dsl, Logger, ListModel, StoreInListModel, EventListenerList, DelegatingValueModel, Trace, MutableListModel, StoreInValueModel, MutableValueModel, TransactionObserver, Binding, OptionsHelper, ValueHolder } from '@coolon/pectin';
9
9
  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';
@@ -841,10 +841,7 @@ if (false) {
841
841
  /**
842
842
  * @template D, R, E
843
843
  */
844
- var /**
845
- * @template D, R, E
846
- */
847
- AbstractActivity = /** @class */ (function (_super) {
844
+ var AbstractActivity = /** @class */ (function (_super) {
848
845
  __extends(AbstractActivity, _super);
849
846
  function AbstractActivity() {
850
847
  var _this = _super !== null && _super.apply(this, arguments) || this;
@@ -918,6 +915,14 @@ AbstractActivity = /** @class */ (function (_super) {
918
915
  */
919
916
  function () { return _this.finalizeAndDispose(); }));
920
917
  };
918
+ /**
919
+ * @return {?}
920
+ */
921
+ AbstractActivity.prototype.onActivityReady = /**
922
+ * @return {?}
923
+ */
924
+ function () {
925
+ };
921
926
  /**
922
927
  * @private
923
928
  * @return {?}
@@ -975,6 +980,12 @@ AbstractActivity = /** @class */ (function (_super) {
975
980
  function () {
976
981
  return this._busyModel.value;
977
982
  };
983
+ __decorate([
984
+ Trace(),
985
+ __metadata("design:type", Function),
986
+ __metadata("design:paramtypes", []),
987
+ __metadata("design:returntype", void 0)
988
+ ], AbstractActivity.prototype, "onActivityReady", null);
978
989
  return AbstractActivity;
979
990
  }(DisposableComponent));
980
991
  if (false) {
@@ -1121,6 +1132,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
1121
1132
  var _this = _super.call(this) || this;
1122
1133
  _this.activityTabs = new MutableListModel();
1123
1134
  _this.obsoleteTabs = [];
1135
+ 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;
1136
+ _this.lastActivityTab = chain(_this.activityTabs).last();
1124
1137
  return _this;
1125
1138
  }
1126
1139
  /**
@@ -1143,7 +1156,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
1143
1156
  observe.valuesFrom(this.tabs.animationDone).subscribe((/**
1144
1157
  * @return {?}
1145
1158
  */
1146
- function () { return _this.cleanUpTabs(); }));
1159
+ function () { return _this.onAnimationFinished(); }));
1147
1160
  };
1148
1161
  /**
1149
1162
  * @template D, R, E
@@ -1218,12 +1231,13 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
1218
1231
  * @private
1219
1232
  * @return {?}
1220
1233
  */
1221
- ActivityContainerComponent.prototype.cleanUpTabs = /**
1234
+ ActivityContainerComponent.prototype.onAnimationFinished = /**
1222
1235
  * @private
1223
1236
  * @return {?}
1224
1237
  */
1225
1238
  function () {
1226
1239
  var _this = this;
1240
+ // TODO: notify selected tab they are ready. activty.afterAnimationComplete
1227
1241
  this.activityTabs.value = this.activityTabs.value.filter((/**
1228
1242
  * @param {?} tab
1229
1243
  * @return {?}
@@ -1231,6 +1245,9 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
1231
1245
  function (tab) {
1232
1246
  return !_this.obsoleteTabs.includes(tab);
1233
1247
  }));
1248
+ if (this.lastActivityTab.value && this.lastActivityTab.value['onActivityReady']) {
1249
+ this.lastActivityTab.value['onActivityReady']();
1250
+ }
1234
1251
  };
1235
1252
  ActivityContainerComponent.decorators = [
1236
1253
  { type: Component, args: [{
@@ -1262,6 +1279,11 @@ if (false) {
1262
1279
  * @private
1263
1280
  */
1264
1281
  ActivityContainerComponent.prototype.obsoleteTabs;
1282
+ /**
1283
+ * @type {?}
1284
+ * @private
1285
+ */
1286
+ ActivityContainerComponent.prototype.lastActivityTab;
1265
1287
  }
1266
1288
  (function (ActivityContainerComponent) {
1267
1289
  /**