@coolon/angular-ui-powerups 0.0.87 → 0.0.89

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 { MatInputModule, MatFormFieldModule, MatSelectModule, MatDialog, MatButt
5
5
  import { MatTabsModule } from '@angular/material/tabs';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { __extends, __decorate, __metadata, __assign, __awaiter, __generator, __spread } from 'tslib';
8
- import { assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel, StoreInValueModel, Binding, MutableValueModel, Trace, Guard as Guard$1, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
8
+ import { assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel, Binding, MutableValueModel, Trace, Guard as Guard$1, Command, StoreInValueModel, OptionsHelper, ValueHolder } from '@coolon/pectin';
9
9
  import { PortalModule } from '@angular/cdk/portal';
10
10
  import { Router, RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, ActivatedRouteSnapshot, RouterStateSnapshot, UrlSerializer } from '@angular/router';
11
11
  import ___default, { last, isNil, isEqual } from 'lodash';
@@ -2477,78 +2477,6 @@ var InteractionModule = /** @class */ (function () {
2477
2477
  return InteractionModule;
2478
2478
  }());
2479
2479
 
2480
- /**
2481
- * @fileoverview added by tsickle
2482
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2483
- */
2484
- var BusyOverlayComponent = /** @class */ (function () {
2485
- function BusyOverlayComponent() {
2486
- }
2487
- /**
2488
- * @return {?}
2489
- */
2490
- BusyOverlayComponent.prototype.ngOnInit = /**
2491
- * @return {?}
2492
- */
2493
- function () {
2494
- };
2495
- BusyOverlayComponent.decorators = [
2496
- { type: Component, args: [{
2497
- selector: 'aup-busy-overlay',
2498
- template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
2499
- styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
2500
- }] }
2501
- ];
2502
- /** @nocollapse */
2503
- BusyOverlayComponent.ctorParameters = function () { return []; };
2504
- BusyOverlayComponent.propDecorators = {
2505
- busyModel: [{ type: Input }],
2506
- busy: [{ type: Input }]
2507
- };
2508
- __decorate([
2509
- UseDelegate(),
2510
- __metadata("design:type", ValueModel)
2511
- ], BusyOverlayComponent.prototype, "busyModel", void 0);
2512
- __decorate([
2513
- StoreInValueModel('busyModel'),
2514
- __metadata("design:type", Boolean)
2515
- ], BusyOverlayComponent.prototype, "busy", void 0);
2516
- return BusyOverlayComponent;
2517
- }());
2518
- if (false) {
2519
- /** @type {?} */
2520
- BusyOverlayComponent.prototype.busyModel;
2521
- /** @type {?} */
2522
- BusyOverlayComponent.prototype.busy;
2523
- }
2524
-
2525
- /**
2526
- * @fileoverview added by tsickle
2527
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2528
- */
2529
- var EmptyStateComponent = /** @class */ (function () {
2530
- function EmptyStateComponent() {
2531
- }
2532
- /**
2533
- * @return {?}
2534
- */
2535
- EmptyStateComponent.prototype.ngOnInit = /**
2536
- * @return {?}
2537
- */
2538
- function () {
2539
- };
2540
- EmptyStateComponent.decorators = [
2541
- { type: Component, args: [{
2542
- selector: 'aup-empty-state',
2543
- template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
2544
- styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
2545
- }] }
2546
- ];
2547
- /** @nocollapse */
2548
- EmptyStateComponent.ctorParameters = function () { return []; };
2549
- return EmptyStateComponent;
2550
- }());
2551
-
2552
2480
  /**
2553
2481
  * @fileoverview added by tsickle
2554
2482
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -4069,12 +3997,16 @@ var PlaceRouter = /** @class */ (function (_super) {
4069
3997
  [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
4070
3998
  [def.getFormattedRouteParameters(visit)];
4071
3999
  };
4000
+ // @Trace()
4001
+ // @Trace()
4072
4002
  /**
4073
4003
  * @private
4074
4004
  * @param {?} event
4075
4005
  * @return {?}
4076
4006
  */
4077
- PlaceRouter.prototype.onAngularRouterStarted = /**
4007
+ PlaceRouter.prototype.onAngularRouterStarted =
4008
+ // @Trace()
4009
+ /**
4078
4010
  * @private
4079
4011
  * @param {?} event
4080
4012
  * @return {?}
@@ -4091,11 +4023,15 @@ var PlaceRouter = /** @class */ (function (_super) {
4091
4023
  }
4092
4024
  this.firstRoute = false;
4093
4025
  };
4026
+ // @Trace()
4027
+ // @Trace()
4094
4028
  /**
4095
4029
  * @private
4096
4030
  * @return {?}
4097
4031
  */
4098
- PlaceRouter.prototype.onAngularRouterFinished = /**
4032
+ PlaceRouter.prototype.onAngularRouterFinished =
4033
+ // @Trace()
4034
+ /**
4099
4035
  * @private
4100
4036
  * @return {?}
4101
4037
  */
@@ -4150,18 +4086,6 @@ var PlaceRouter = /** @class */ (function (_super) {
4150
4086
  __metadata("design:paramtypes", [Visit, Object]),
4151
4087
  __metadata("design:returntype", Promise)
4152
4088
  ], PlaceRouter.prototype, "navigate", null);
4153
- __decorate([
4154
- Trace(),
4155
- __metadata("design:type", Function),
4156
- __metadata("design:paramtypes", [NavigationStart]),
4157
- __metadata("design:returntype", void 0)
4158
- ], PlaceRouter.prototype, "onAngularRouterStarted", null);
4159
- __decorate([
4160
- Trace(),
4161
- __metadata("design:type", Function),
4162
- __metadata("design:paramtypes", []),
4163
- __metadata("design:returntype", void 0)
4164
- ], PlaceRouter.prototype, "onAngularRouterFinished", null);
4165
4089
  return PlaceRouter;
4166
4090
  }(GarbageCollector));
4167
4091
  if (false) {
@@ -4431,12 +4355,12 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4431
4355
  var _this = this;
4432
4356
  /** @type {?} */
4433
4357
  var visit = this.routerVisit.value;
4434
- console.log({
4435
- visit: visit,
4436
- place: visit ? visit.placeDefinition.component : null,
4437
- inOutletActivation: this._inOutletActivation.value,
4438
- inRoutingSession: this.placeRouter.navigationSessionActive.value
4439
- });
4358
+ // console.log({
4359
+ // visit,
4360
+ // place: visit ? visit.placeDefinition.component : null,
4361
+ // inOutletActivation: this._inOutletActivation.value,
4362
+ // inRoutingSession: this.placeRouter.navigationSessionActive.value
4363
+ // });
4440
4364
  if (visit) { // can be null while the place and index sync up
4441
4365
  this._inRouteVisitUpdate.whileTrue((/**
4442
4366
  * @return {?}
@@ -4552,7 +4476,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4552
4476
  * @return {?}
4553
4477
  */
4554
4478
  function () {
4555
- console.log({ activePlace: this._activePlace.value });
4479
+ // console.log({ activePlace: this._activePlace.value });
4556
4480
  };
4557
4481
  // @Trace()
4558
4482
  // @Trace()
@@ -4756,6 +4680,13 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
4756
4680
  */
4757
4681
  function () {
4758
4682
  };
4683
+ AbstractPlaceNavigationComponent.decorators = [
4684
+ { type: Component, args: [{
4685
+ template: ''
4686
+ }] }
4687
+ ];
4688
+ /** @nocollapse */
4689
+ AbstractPlaceNavigationComponent.ctorParameters = function () { return []; };
4759
4690
  AbstractPlaceNavigationComponent.propDecorators = {
4760
4691
  places: [{ type: Input }],
4761
4692
  placesModel: [{ type: Input }],
@@ -4803,6 +4734,78 @@ if (false) {
4803
4734
  AbstractPlaceNavigationComponent.prototype.activePlaceDefinition;
4804
4735
  }
4805
4736
 
4737
+ /**
4738
+ * @fileoverview added by tsickle
4739
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4740
+ */
4741
+ var BusyOverlayComponent = /** @class */ (function () {
4742
+ function BusyOverlayComponent() {
4743
+ }
4744
+ /**
4745
+ * @return {?}
4746
+ */
4747
+ BusyOverlayComponent.prototype.ngOnInit = /**
4748
+ * @return {?}
4749
+ */
4750
+ function () {
4751
+ };
4752
+ BusyOverlayComponent.decorators = [
4753
+ { type: Component, args: [{
4754
+ selector: 'aup-busy-overlay',
4755
+ template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
4756
+ styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
4757
+ }] }
4758
+ ];
4759
+ /** @nocollapse */
4760
+ BusyOverlayComponent.ctorParameters = function () { return []; };
4761
+ BusyOverlayComponent.propDecorators = {
4762
+ busyModel: [{ type: Input }],
4763
+ busy: [{ type: Input }]
4764
+ };
4765
+ __decorate([
4766
+ UseDelegate(),
4767
+ __metadata("design:type", ValueModel)
4768
+ ], BusyOverlayComponent.prototype, "busyModel", void 0);
4769
+ __decorate([
4770
+ StoreInValueModel('busyModel'),
4771
+ __metadata("design:type", Boolean)
4772
+ ], BusyOverlayComponent.prototype, "busy", void 0);
4773
+ return BusyOverlayComponent;
4774
+ }());
4775
+ if (false) {
4776
+ /** @type {?} */
4777
+ BusyOverlayComponent.prototype.busyModel;
4778
+ /** @type {?} */
4779
+ BusyOverlayComponent.prototype.busy;
4780
+ }
4781
+
4782
+ /**
4783
+ * @fileoverview added by tsickle
4784
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4785
+ */
4786
+ var EmptyStateComponent = /** @class */ (function () {
4787
+ function EmptyStateComponent() {
4788
+ }
4789
+ /**
4790
+ * @return {?}
4791
+ */
4792
+ EmptyStateComponent.prototype.ngOnInit = /**
4793
+ * @return {?}
4794
+ */
4795
+ function () {
4796
+ };
4797
+ EmptyStateComponent.decorators = [
4798
+ { type: Component, args: [{
4799
+ selector: 'aup-empty-state',
4800
+ template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
4801
+ styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
4802
+ }] }
4803
+ ];
4804
+ /** @nocollapse */
4805
+ EmptyStateComponent.ctorParameters = function () { return []; };
4806
+ return EmptyStateComponent;
4807
+ }());
4808
+
4806
4809
  /**
4807
4810
  * @fileoverview added by tsickle
4808
4811
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -4906,7 +4909,8 @@ var PlaceModule = /** @class */ (function () {
4906
4909
  BusyOverlayComponent,
4907
4910
  PlaceOutletComponent,
4908
4911
  TabbedPlaceNavigationComponent,
4909
- ListPlaceNavComponent
4912
+ ListPlaceNavComponent,
4913
+ AbstractPlaceNavigationComponent
4910
4914
  ],
4911
4915
  entryComponents: [BusyOverlayComponent],
4912
4916
  exports: [
@@ -4914,7 +4918,8 @@ var PlaceModule = /** @class */ (function () {
4914
4918
  PlaceOutletComponent,
4915
4919
  EmptyStateComponent,
4916
4920
  TabbedPlaceNavigationComponent,
4917
- ListPlaceNavComponent
4921
+ ListPlaceNavComponent,
4922
+ AbstractPlaceNavigationComponent
4918
4923
  ],
4919
4924
  providers: [
4920
4925
  // {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: "2000ms"}}
@@ -6144,11 +6149,11 @@ if (false) {
6144
6149
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6145
6150
  */
6146
6151
  var LeavePlaceGuard = /** @class */ (function () {
6147
- function LeavePlaceGuard(router, injector, placeRouter, interactionContext, angularLocation) {
6152
+ function LeavePlaceGuard(router, injector, placeRouter, dialogInteractionContext, angularLocation) {
6148
6153
  this.router = router;
6149
6154
  this.injector = injector;
6150
6155
  this.placeRouter = placeRouter;
6151
- this.interactionContext = interactionContext;
6156
+ this.dialogInteractionContext = dialogInteractionContext;
6152
6157
  this.angularLocation = angularLocation;
6153
6158
  }
6154
6159
  // @Trace()
@@ -6260,19 +6265,22 @@ var LeavePlaceGuard = /** @class */ (function () {
6260
6265
  // we check the dialog interaction first, so that components that don't need to check if they're in an
6261
6266
  // interaction during the canDeactivate cycle.
6262
6267
  // TODO: Add tests: show dialog -> hit back -> same route
6263
- if (this.interactionContext.isActive()) {
6264
- console.log('cancelling', { activity: this.interactionContext.currentActivity });
6265
- this.interactionContext.currentActivity.cancel(null);
6268
+ if (this.dialogInteractionContext.isActive()) {
6269
+ console.log('cancelling', { activity: this.dialogInteractionContext.currentActivity });
6270
+ this.dialogInteractionContext.currentActivity.cancel(null);
6266
6271
  canLeave = false;
6267
6272
  }
6268
6273
  else {
6269
6274
  canLeave = true;
6270
6275
  }
6271
- // now check if the component has an active interaction context
6272
- if (canLeave && component.interactionContext && component.interactionContext.isActive()) {
6273
- canLeave = false;
6274
- console.log('cancelling', { activity: component.interactionContext.currentActivity });
6275
- component.interactionContext.currentActivity.cancel(null);
6276
+ if (canLeave) {
6277
+ // now check if the component has an active interaction. This will handle
6278
+ // an inplace interaction contexts
6279
+ if (component.interactionContext && component.interactionContext.isActive()) {
6280
+ canLeave = false;
6281
+ console.log('cancelling', { activity: component.interactionContext.currentActivity });
6282
+ component.interactionContext.currentActivity.cancel(null);
6283
+ }
6276
6284
  }
6277
6285
  if (!canLeave) return [3 /*break*/, 3];
6278
6286
  return [4 /*yield*/, component.canDeactivate()];
@@ -6282,9 +6290,9 @@ var LeavePlaceGuard = /** @class */ (function () {
6282
6290
  _a.label = 3;
6283
6291
  case 3: return [3 /*break*/, 5];
6284
6292
  case 4:
6285
- if (this.interactionContext.isActive()) {
6286
- console.log('cancelling', { activity: this.interactionContext.currentActivity });
6287
- this.interactionContext.currentActivity.cancel(null);
6293
+ if (this.dialogInteractionContext.isActive()) {
6294
+ console.log('cancelling', { activity: this.dialogInteractionContext.currentActivity });
6295
+ this.dialogInteractionContext.currentActivity.cancel(null);
6288
6296
  canLeave = false;
6289
6297
  }
6290
6298
  else {
@@ -6343,7 +6351,7 @@ if (false) {
6343
6351
  */
6344
6352
  LeavePlaceGuard.prototype.placeRouter;
6345
6353
  /** @type {?} */
6346
- LeavePlaceGuard.prototype.interactionContext;
6354
+ LeavePlaceGuard.prototype.dialogInteractionContext;
6347
6355
  /** @type {?} */
6348
6356
  LeavePlaceGuard.prototype.angularLocation;
6349
6357
  }