@coolon/angular-ui-powerups 0.0.56 → 0.0.58

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,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@angular/router'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('lodash'), require('@angular/animations'), require('resize-observer-polyfill')) :
3
- typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/tooltip', '@angular/router', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', 'lodash', '@angular/animations', 'resize-observer-polyfill'], factory) :
4
- (global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.tooltip, global.ng.router, global.src, global.fastMemoizeDecorator, null, global.___default, global.ng.animations, global.ResizeObserver));
5
- }(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, icon, list, tooltip, router, src, fastMemoizeDecorator, reflectMetadata, ___default, animations$1, ResizeObserver) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@angular/material/dialog'), require('@coolon/typescript-utilities'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@angular/router'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('lodash'), require('@angular/animations'), require('resize-observer-polyfill')) :
3
+ typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@angular/material/dialog', '@coolon/typescript-utilities', '@angular/material/icon', '@angular/material/list', '@angular/material/tooltip', '@angular/router', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', 'lodash', '@angular/animations', 'resize-observer-polyfill'], factory) :
4
+ (global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.ng.material.dialog, global.typescriptUtilities, global.ng.material.icon, global.ng.material.list, global.ng.material.tooltip, global.ng.router, global.src, global.fastMemoizeDecorator, null, global.___default, global.ng.animations, global.ResizeObserver));
5
+ }(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal, deferred_class, dialog, typescriptUtilities, icon, list, tooltip, router, src, fastMemoizeDecorator, reflectMetadata, ___default, animations$1, ResizeObserver) { 'use strict';
6
6
 
7
7
  var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
8
8
  ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
@@ -1707,11 +1707,15 @@
1707
1707
  * @fileoverview added by tsickle
1708
1708
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1709
1709
  */
1710
+ /** @type {?} */
1711
+ var DIALOG_INTERACTION_SERVICE_DEFAULTS = new core.InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
1710
1712
  var DialogInteractionService = /** @class */ (function (_super) {
1711
1713
  __extends(DialogInteractionService, _super);
1712
- function DialogInteractionService(dialogService) {
1714
+ function DialogInteractionService(dialogService, dialogDefaults, matDialogDefaultConfig) {
1713
1715
  var _this = _super.call(this) || this;
1714
1716
  _this.dialogService = dialogService;
1717
+ _this.dialogDefaults = dialogDefaults;
1718
+ _this.matDialogDefaultConfig = matDialogDefaultConfig;
1715
1719
  typescriptUtilities.assert.notNil(dialogService);
1716
1720
  return _this;
1717
1721
  }
@@ -1750,12 +1754,11 @@
1750
1754
  var _this = this;
1751
1755
  if (disableClose === void 0) { disableClose = true; }
1752
1756
  /** @type {?} */
1753
- var config = {
1757
+ var config = __assign({ autoFocus: false }, this.matDialogDefaultConfig, this.dialogDefaults, {
1754
1758
  data: data,
1755
1759
  disableClose: disableClose,
1756
- panelClass: 'dialog-interaction-service',
1757
- autoFocus: false
1758
- };
1760
+ panelClass: 'dialog-interaction-service'
1761
+ });
1759
1762
  /** @type {?} */
1760
1763
  var matDialogRef = (/** @type {?} */ (this.dialogService.open(exports.ɵu, config)));
1761
1764
  return new Promise((/**
@@ -1775,6 +1778,7 @@
1775
1778
  * @return {?}
1776
1779
  */
1777
1780
  function (result) {
1781
+ // TODO: should I be calling resolve after close?
1778
1782
  resolve(result);
1779
1783
  matDialogRef.close(result);
1780
1784
  },
@@ -1783,6 +1787,7 @@
1783
1787
  * @return {?}
1784
1788
  */
1785
1789
  function (error) {
1790
+ // TODO: should I be calling reject after close?
1786
1791
  reject(error);
1787
1792
  matDialogRef.close(error);
1788
1793
  }
@@ -1819,9 +1824,11 @@
1819
1824
  ];
1820
1825
  /** @nocollapse */
1821
1826
  DialogInteractionService.ctorParameters = function () { return [
1822
- { type: material.MatDialog }
1827
+ { type: material.MatDialog },
1828
+ { type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
1829
+ { type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [dialog.MAT_DIALOG_DEFAULT_OPTIONS,] }] }
1823
1830
  ]; };
1824
- /** @nocollapse */ DialogInteractionService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(core.ɵɵinject(dialog.MatDialog)); }, token: DialogInteractionService, providedIn: "root" });
1831
+ /** @nocollapse */ DialogInteractionService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(core.ɵɵinject(dialog.MatDialog), core.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), core.ɵɵinject(dialog.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionService, providedIn: "root" });
1825
1832
  return DialogInteractionService;
1826
1833
  }(InteractionContext));
1827
1834
  if (false) {
@@ -1830,6 +1837,10 @@
1830
1837
  * @private
1831
1838
  */
1832
1839
  DialogInteractionService.prototype.dialogService;
1840
+ /** @type {?} */
1841
+ DialogInteractionService.prototype.dialogDefaults;
1842
+ /** @type {?} */
1843
+ DialogInteractionService.prototype.matDialogDefaultConfig;
1833
1844
  }
1834
1845
 
1835
1846
  /**
@@ -4769,6 +4780,7 @@
4769
4780
  exports.CommandDirective = CommandDirective;
4770
4781
  exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
4771
4782
  exports.DEFINITION_META_DATA_KEY = DEFINITION_META_DATA_KEY;
4783
+ exports.DIALOG_INTERACTION_SERVICE_DEFAULTS = DIALOG_INTERACTION_SERVICE_DEFAULTS;
4772
4784
  exports.DialogInteractionService = DialogInteractionService;
4773
4785
  exports.Dimension = Dimension;
4774
4786
  exports.DisposableComponent = DisposableComponent;
@@ -4803,8 +4815,9 @@
4803
4815
  exports.ɵa = CommandDirective;
4804
4816
  exports.ɵb = FocusBindingDirective;
4805
4817
  exports.ɵba = AlertDialogComponent;
4806
- exports.ɵbc = DialogInteractionService;
4807
- exports.ɵbd = InteractionContext;
4818
+ exports.ɵbc = DIALOG_INTERACTION_SERVICE_DEFAULTS;
4819
+ exports.ɵbd = DialogInteractionService;
4820
+ exports.ɵbe = InteractionContext;
4808
4821
  exports.ɵc = DisposableComponent;
4809
4822
  exports.ɵd = NumberInputComponent;
4810
4823
  exports.ɵe = AbstractInputComponent;