@coolon/angular-ui-powerups 0.0.55 → 0.0.57

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.
@@ -1,5 +1,5 @@
1
1
  import { DOCUMENT, CommonModule } from '@angular/common';
2
- import { EventEmitter, Input, Output, HostListener, Component, Directive, ElementRef, Inject, NgZone, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, ɵɵdefineInjectable, ɵɵinject, NgModule, HostBinding, INJECTOR } from '@angular/core';
2
+ import { EventEmitter, Input, Output, HostListener, Component, Directive, ElementRef, Inject, NgZone, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, Optional, ɵɵdefineInjectable, ɵɵinject, NgModule, HostBinding, INJECTOR } from '@angular/core';
3
3
  import { FormsModule } from '@angular/forms';
4
4
  import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgressSpinnerModule, MatInputModule, MatFormFieldModule, MatSelectModule } from '@angular/material';
5
5
  import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
@@ -8,8 +8,8 @@ import { __extends, __decorate, __metadata, __assign, __awaiter, __generator } f
8
8
  import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Binding, MutableValueModel, Guard, 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
+ import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialog as MatDialog$1 } from '@angular/material/dialog';
11
12
  import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
12
- import { MatDialog as MatDialog$1 } from '@angular/material/dialog';
13
13
  import { MatIconModule } from '@angular/material/icon';
14
14
  import { MatListModule } from '@angular/material/list';
15
15
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -1526,9 +1526,10 @@ if (false) {
1526
1526
  */
1527
1527
  var DialogInteractionService = /** @class */ (function (_super) {
1528
1528
  __extends(DialogInteractionService, _super);
1529
- function DialogInteractionService(dialogService) {
1529
+ function DialogInteractionService(dialogService, matDialogDefaultConfig) {
1530
1530
  var _this = _super.call(this) || this;
1531
1531
  _this.dialogService = dialogService;
1532
+ _this.matDialogDefaultConfig = matDialogDefaultConfig;
1532
1533
  assert$1.notNil(dialogService);
1533
1534
  return _this;
1534
1535
  }
@@ -1567,12 +1568,11 @@ var DialogInteractionService = /** @class */ (function (_super) {
1567
1568
  var _this = this;
1568
1569
  if (disableClose === void 0) { disableClose = true; }
1569
1570
  /** @type {?} */
1570
- var config = {
1571
+ var config = __assign({ autoFocus: false }, this.matDialogDefaultConfig, {
1571
1572
  data: data,
1572
1573
  disableClose: disableClose,
1573
- panelClass: 'dialog-interaction-service',
1574
- autoFocus: false
1575
- };
1574
+ panelClass: 'dialog-interaction-service'
1575
+ });
1576
1576
  /** @type {?} */
1577
1577
  var matDialogRef = (/** @type {?} */ (this.dialogService.open(ActivityContainerComponent, config)));
1578
1578
  return new Promise((/**
@@ -1636,9 +1636,10 @@ var DialogInteractionService = /** @class */ (function (_super) {
1636
1636
  ];
1637
1637
  /** @nocollapse */
1638
1638
  DialogInteractionService.ctorParameters = function () { return [
1639
- { type: MatDialog }
1639
+ { type: MatDialog },
1640
+ { type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
1640
1641
  ]; };
1641
- /** @nocollapse */ DialogInteractionService.ngInjectableDef = ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(ɵɵinject(MatDialog$1)); }, token: DialogInteractionService, providedIn: "root" });
1642
+ /** @nocollapse */ DialogInteractionService.ngInjectableDef = ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(ɵɵinject(MatDialog$1), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionService, providedIn: "root" });
1642
1643
  return DialogInteractionService;
1643
1644
  }(InteractionContext));
1644
1645
  if (false) {
@@ -1647,6 +1648,8 @@ if (false) {
1647
1648
  * @private
1648
1649
  */
1649
1650
  DialogInteractionService.prototype.dialogService;
1651
+ /** @type {?} */
1652
+ DialogInteractionService.prototype.matDialogDefaultConfig;
1650
1653
  }
1651
1654
 
1652
1655
  /**
@@ -2668,9 +2671,16 @@ if (false) {
2668
2671
  */
2669
2672
  function create(def, paramMap) {
2670
2673
  // NOTE: Using undefined is important as it triggers the isMissing flag which is used by defaultValue and remember flags
2671
- return def.isArray ?
2672
- new RouteParameterValue.Array(def, paramMap.has(def.name) ? paramMap.getAll(def.name) : undefined) :
2673
- new RouteParameterValue.Scalar(def, paramMap.has(def.name) ? paramMap.get(def.name) : undefined);
2674
+ if (def.isArray) {
2675
+ return new RouteParameterValue.Array(def, paramMap.has(def.name) ? paramMap.getAll(def.name) : undefined);
2676
+ }
2677
+ else {
2678
+ /** @type {?} */
2679
+ var rawValue = paramMap.has(def.name) ? paramMap.get(def.name) : undefined;
2680
+ // route ids are always present so we have to check if it's empty to flag it as missing..
2681
+ rawValue = def.isRouteId && ___default.isEmpty(rawValue) ? undefined : rawValue;
2682
+ return new RouteParameterValue.Scalar(def, rawValue);
2683
+ }
2674
2684
  }
2675
2685
  RouteParameterValue.create = create;
2676
2686
  /**