monkey-front-core 0.0.174 → 0.0.177
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/core/directives/monkeyecx-popover.directive.mjs +39 -49
- package/fesm2015/monkey-front-core.mjs +38 -48
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +38 -48
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.177.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.174.tgz +0 -0
|
@@ -1987,57 +1987,47 @@ class MonkeyEcxPopoverDirective {
|
|
|
1987
1987
|
return [];
|
|
1988
1988
|
}
|
|
1989
1989
|
createPopover(origin, options) {
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
subs.unsubscribe();
|
|
2016
|
-
resizeObserver?.disconnect();
|
|
2017
|
-
this.zone.run(() => {
|
|
2018
|
-
if (this.closed) {
|
|
2019
|
-
this.closed(e);
|
|
2020
|
-
}
|
|
2021
|
-
});
|
|
2022
|
-
});
|
|
2023
|
-
const attached = this.overlayRef.attach(this.templatePortal);
|
|
2024
|
-
if (this.watch) {
|
|
2025
|
-
try {
|
|
2026
|
-
if ('ResizeObserver' in window) {
|
|
2027
|
-
resizeObserver = new ResizeObserver(([{ contentRect }]) => {
|
|
2028
|
-
this.overlayRef.updatePosition();
|
|
2029
|
-
})
|
|
2030
|
-
.observe(attached.rootNodes[0]);
|
|
2031
|
-
}
|
|
1990
|
+
this.templatePortal = new TemplatePortal(this.tpl, this._viewContainerRef);
|
|
1991
|
+
this.positionStrategy = this.overlayPositionBuilder
|
|
1992
|
+
.flexibleConnectedTo(origin || this.target)
|
|
1993
|
+
.withPush(true)
|
|
1994
|
+
.withGrowAfterOpen(true)
|
|
1995
|
+
.withPositions(this.getDirPositions(options?.dir));
|
|
1996
|
+
this.overlayRef = this.overlay.create({
|
|
1997
|
+
positionStrategy: this.positionStrategy,
|
|
1998
|
+
disposeOnNavigation: true,
|
|
1999
|
+
direction: 'ltr',
|
|
2000
|
+
hasBackdrop: this.backdrop,
|
|
2001
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition({}),
|
|
2002
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
2003
|
+
width: (this.options?.minwidth || this.minwidth) ? (this.target.offsetWidth - 2) : undefined,
|
|
2004
|
+
maxHeight: '95%',
|
|
2005
|
+
height: this.height
|
|
2006
|
+
});
|
|
2007
|
+
let resizeObserver;
|
|
2008
|
+
const subs = this.overlayRef.backdropClick().subscribe((e) => {
|
|
2009
|
+
this.popover = false;
|
|
2010
|
+
subs.unsubscribe();
|
|
2011
|
+
resizeObserver?.disconnect();
|
|
2012
|
+
this.zone.run(() => {
|
|
2013
|
+
if (this.closed) {
|
|
2014
|
+
this.closed(e);
|
|
2032
2015
|
}
|
|
2033
|
-
|
|
2034
|
-
|
|
2016
|
+
});
|
|
2017
|
+
});
|
|
2018
|
+
const attached = this.overlayRef.attach(this.templatePortal);
|
|
2019
|
+
if (this.watch) {
|
|
2020
|
+
try {
|
|
2021
|
+
if ('ResizeObserver' in window) {
|
|
2022
|
+
resizeObserver = new ResizeObserver(([{ contentRect }]) => {
|
|
2023
|
+
this.overlayRef.updatePosition();
|
|
2024
|
+
})
|
|
2025
|
+
.observe(attached.rootNodes[0]);
|
|
2035
2026
|
}
|
|
2036
2027
|
}
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
console.log(e);
|
|
2028
|
+
catch (e) {
|
|
2029
|
+
// not to do
|
|
2030
|
+
}
|
|
2041
2031
|
}
|
|
2042
2032
|
}
|
|
2043
2033
|
ngOnDestroy() {
|