@paperless/angular 0.1.0-alpha.284 → 0.1.0-alpha.286

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.
@@ -553,11 +553,11 @@ let PDrawer = class PDrawer {
553
553
  }
554
554
  };
555
555
  PDrawer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PDrawer, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
556
- PDrawer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: PDrawer, selector: "p-drawer", inputs: { applyBlur: "applyBlur", backdropClickClose: "backdropClickClose", header: "header", show: "show", showClose: "showClose" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
556
+ PDrawer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: PDrawer, selector: "p-drawer", inputs: { applyBlur: "applyBlur", backdropClickClose: "backdropClickClose", canClose: "canClose", header: "header", show: "show", showClose: "showClose" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
557
557
  PDrawer = __decorate([
558
558
  ProxyCmp({
559
559
  defineCustomElementFn: undefined,
560
- inputs: ['applyBlur', 'backdropClickClose', 'header', 'show', 'showClose']
560
+ inputs: ['applyBlur', 'backdropClickClose', 'canClose', 'header', 'show', 'showClose']
561
561
  })
562
562
  ], PDrawer);
563
563
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PDrawer, decorators: [{
@@ -566,7 +566,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
566
566
  selector: 'p-drawer',
567
567
  changeDetection: ChangeDetectionStrategy.OnPush,
568
568
  template: '<ng-content></ng-content>',
569
- inputs: ['applyBlur', 'backdropClickClose', 'header', 'show', 'showClose']
569
+ inputs: ['applyBlur', 'backdropClickClose', 'canClose', 'header', 'show', 'showClose']
570
570
  }]
571
571
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
572
572
  let PDrawerBody = class PDrawerBody {
@@ -1672,22 +1672,24 @@ class OverlayService {
1672
1672
  }
1673
1673
  open(component, options = {}) {
1674
1674
  var _a;
1675
- const overlay = this.createOverlay();
1675
+ const overlay = this._createOverlay();
1676
1676
  const overlayRef = new OverlayRef(overlay);
1677
- this.attachModalContainer(overlay, overlayRef, component, (_a = options.providers) !== null && _a !== void 0 ? _a : []);
1677
+ this._attachModalContainer(overlay, overlayRef, component, (_a = options.providers) !== null && _a !== void 0 ? _a : []);
1678
+ this._attachData(overlayRef, options);
1678
1679
  this.overlayRef = overlayRef;
1679
1680
  return overlayRef;
1680
1681
  }
1681
1682
  // tslint:disable-next-line:max-line-length
1682
- attachModalContainer(overlay, overlayRef, component, providers) {
1683
- const injector = this.createInjector(overlayRef, providers);
1683
+ _attachModalContainer(overlay, overlayRef, component, providers) {
1684
+ const injector = this._createInjector(overlayRef, providers);
1684
1685
  const containerPortal = component instanceof CdkPortal
1685
1686
  ? component
1686
1687
  : new ComponentPortal(component, null, injector);
1687
1688
  const containerRef = overlay.attach(containerPortal);
1689
+ overlayRef.instance = containerRef.instance;
1688
1690
  return containerRef.instance;
1689
1691
  }
1690
- createInjector(overlayRef, providers) {
1692
+ _createInjector(overlayRef, providers) {
1691
1693
  return Injector.create({
1692
1694
  providers: [
1693
1695
  {
@@ -1699,7 +1701,7 @@ class OverlayService {
1699
1701
  parent: this.injector,
1700
1702
  });
1701
1703
  }
1702
- getOverlayConfig() {
1704
+ _getOverlayConfig() {
1703
1705
  const positionStrategy = this.overlay
1704
1706
  .position()
1705
1707
  .global()
@@ -1712,12 +1714,19 @@ class OverlayService {
1712
1714
  });
1713
1715
  return overlayConfig;
1714
1716
  }
1715
- createOverlay() {
1717
+ _createOverlay() {
1716
1718
  // Returns an OverlayConfig
1717
- const overlayConfig = this.getOverlayConfig();
1719
+ const overlayConfig = this._getOverlayConfig();
1718
1720
  // Returns an OverlayRef
1719
1721
  return this.overlay.create(overlayConfig);
1720
1722
  }
1723
+ _attachData(overlayRef, options) {
1724
+ if (options.data && typeof options.data === 'object') {
1725
+ for (const key of Object.keys(options.data)) {
1726
+ overlayRef.instance[key] = options.data[key];
1727
+ }
1728
+ }
1729
+ }
1721
1730
  }
1722
1731
  OverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: OverlayService, deps: [{ token: i0.Injector }, { token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
1723
1732
  OverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: OverlayService });