@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.
- package/esm2020/lib/modules/overlay/overlay.ref.mjs +1 -1
- package/esm2020/lib/modules/overlay/services/overlay.service.mjs +18 -9
- package/esm2020/lib/stencil/components.mjs +4 -4
- package/fesm2015/paperless-angular.mjs +20 -11
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +20 -11
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/lib/modules/overlay/overlay.ref.d.ts +2 -1
- package/lib/modules/overlay/services/overlay.service.d.ts +8 -6
- package/lib/stencil/components.d.ts +5 -2
- package/package.json +1 -1
|
@@ -551,11 +551,11 @@ let PDrawer = class PDrawer {
|
|
|
551
551
|
}
|
|
552
552
|
};
|
|
553
553
|
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 });
|
|
554
|
-
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 });
|
|
554
|
+
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 });
|
|
555
555
|
PDrawer = __decorate([
|
|
556
556
|
ProxyCmp({
|
|
557
557
|
defineCustomElementFn: undefined,
|
|
558
|
-
inputs: ['applyBlur', 'backdropClickClose', 'header', 'show', 'showClose']
|
|
558
|
+
inputs: ['applyBlur', 'backdropClickClose', 'canClose', 'header', 'show', 'showClose']
|
|
559
559
|
})
|
|
560
560
|
], PDrawer);
|
|
561
561
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PDrawer, decorators: [{
|
|
@@ -564,7 +564,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
|
|
|
564
564
|
selector: 'p-drawer',
|
|
565
565
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
566
566
|
template: '<ng-content></ng-content>',
|
|
567
|
-
inputs: ['applyBlur', 'backdropClickClose', 'header', 'show', 'showClose']
|
|
567
|
+
inputs: ['applyBlur', 'backdropClickClose', 'canClose', 'header', 'show', 'showClose']
|
|
568
568
|
}]
|
|
569
569
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
570
570
|
let PDrawerBody = class PDrawerBody {
|
|
@@ -1669,22 +1669,24 @@ class OverlayService {
|
|
|
1669
1669
|
this.overlay = overlay;
|
|
1670
1670
|
}
|
|
1671
1671
|
open(component, options = {}) {
|
|
1672
|
-
const overlay = this.
|
|
1672
|
+
const overlay = this._createOverlay();
|
|
1673
1673
|
const overlayRef = new OverlayRef(overlay);
|
|
1674
|
-
this.
|
|
1674
|
+
this._attachModalContainer(overlay, overlayRef, component, options.providers ?? []);
|
|
1675
|
+
this._attachData(overlayRef, options);
|
|
1675
1676
|
this.overlayRef = overlayRef;
|
|
1676
1677
|
return overlayRef;
|
|
1677
1678
|
}
|
|
1678
1679
|
// tslint:disable-next-line:max-line-length
|
|
1679
|
-
|
|
1680
|
-
const injector = this.
|
|
1680
|
+
_attachModalContainer(overlay, overlayRef, component, providers) {
|
|
1681
|
+
const injector = this._createInjector(overlayRef, providers);
|
|
1681
1682
|
const containerPortal = component instanceof CdkPortal
|
|
1682
1683
|
? component
|
|
1683
1684
|
: new ComponentPortal(component, null, injector);
|
|
1684
1685
|
const containerRef = overlay.attach(containerPortal);
|
|
1686
|
+
overlayRef.instance = containerRef.instance;
|
|
1685
1687
|
return containerRef.instance;
|
|
1686
1688
|
}
|
|
1687
|
-
|
|
1689
|
+
_createInjector(overlayRef, providers) {
|
|
1688
1690
|
return Injector.create({
|
|
1689
1691
|
providers: [
|
|
1690
1692
|
{
|
|
@@ -1696,7 +1698,7 @@ class OverlayService {
|
|
|
1696
1698
|
parent: this.injector,
|
|
1697
1699
|
});
|
|
1698
1700
|
}
|
|
1699
|
-
|
|
1701
|
+
_getOverlayConfig() {
|
|
1700
1702
|
const positionStrategy = this.overlay
|
|
1701
1703
|
.position()
|
|
1702
1704
|
.global()
|
|
@@ -1709,12 +1711,19 @@ class OverlayService {
|
|
|
1709
1711
|
});
|
|
1710
1712
|
return overlayConfig;
|
|
1711
1713
|
}
|
|
1712
|
-
|
|
1714
|
+
_createOverlay() {
|
|
1713
1715
|
// Returns an OverlayConfig
|
|
1714
|
-
const overlayConfig = this.
|
|
1716
|
+
const overlayConfig = this._getOverlayConfig();
|
|
1715
1717
|
// Returns an OverlayRef
|
|
1716
1718
|
return this.overlay.create(overlayConfig);
|
|
1717
1719
|
}
|
|
1720
|
+
_attachData(overlayRef, options) {
|
|
1721
|
+
if (options.data && typeof options.data === 'object') {
|
|
1722
|
+
for (const key of Object.keys(options.data)) {
|
|
1723
|
+
overlayRef.instance[key] = options.data[key];
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1718
1727
|
}
|
|
1719
1728
|
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 });
|
|
1720
1729
|
OverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: OverlayService });
|