@po-ui/ng-components 19.39.11 → 19.39.12
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/fesm2022/po-ui-ng-components.mjs +25 -16
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-popover/po-popover.component.d.ts +1 -0
- package/package.json +4 -4
- package/po-ui-ng-components-19.39.12.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-19.39.11.tgz +0 -0
|
@@ -7114,6 +7114,7 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
|
|
|
7114
7114
|
close() {
|
|
7115
7115
|
this.isHidden = true;
|
|
7116
7116
|
this.disconnectResizeObserver();
|
|
7117
|
+
this.widthPopover = undefined;
|
|
7117
7118
|
this.closePopover.emit();
|
|
7118
7119
|
if (this.trigger === 'function' && this.clickoutListener) {
|
|
7119
7120
|
this.clickoutListener();
|
|
@@ -7130,23 +7131,21 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
|
|
|
7130
7131
|
this.addScrollEventListener();
|
|
7131
7132
|
this.setOpacity(0);
|
|
7132
7133
|
this.isHidden = false;
|
|
7133
|
-
|
|
7134
|
-
this.
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
this.
|
|
7139
|
-
if (this.cornerAligned && !this.width) {
|
|
7140
|
-
const el = this.popoverElement.nativeElement;
|
|
7141
|
-
el.style.width = 'auto';
|
|
7142
|
-
const width = el.scrollWidth;
|
|
7143
|
-
this.widthPopover = width;
|
|
7144
|
-
requestAnimationFrame(() => {
|
|
7145
|
-
this.setPopoverPosition();
|
|
7146
|
-
});
|
|
7147
|
-
}
|
|
7134
|
+
if (this.cornerAligned && !this.width && !this.widthPopover) {
|
|
7135
|
+
const el = this.popoverElement.nativeElement;
|
|
7136
|
+
el.style.visibility = 'hidden';
|
|
7137
|
+
el.style.left = '-9999px';
|
|
7138
|
+
el.style.width = '';
|
|
7139
|
+
this.setOpacity(0);
|
|
7148
7140
|
this.cd.detectChanges();
|
|
7149
|
-
|
|
7141
|
+
requestAnimationFrame(() => {
|
|
7142
|
+
this.widthPopover = el.getBoundingClientRect().width;
|
|
7143
|
+
el.style.visibility = '';
|
|
7144
|
+
el.style.left = '';
|
|
7145
|
+
this.cd.detectChanges();
|
|
7146
|
+
});
|
|
7147
|
+
}
|
|
7148
|
+
this.showPopover();
|
|
7150
7149
|
if (this.trigger === 'function') {
|
|
7151
7150
|
this.clickoutListener = this.renderer.listen('document', 'click', (event) => {
|
|
7152
7151
|
this.togglePopup(event);
|
|
@@ -7154,6 +7153,16 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
|
|
|
7154
7153
|
}
|
|
7155
7154
|
this.cd.detectChanges();
|
|
7156
7155
|
}
|
|
7156
|
+
showPopover() {
|
|
7157
|
+
requestAnimationFrame(() => {
|
|
7158
|
+
this.setElementsControlPosition();
|
|
7159
|
+
this.setPopoverPosition();
|
|
7160
|
+
this.setOpacity(1);
|
|
7161
|
+
this.openPopover.emit();
|
|
7162
|
+
this.observeContentResize();
|
|
7163
|
+
this.cd.detectChanges();
|
|
7164
|
+
});
|
|
7165
|
+
}
|
|
7157
7166
|
ensurePopoverPosition() {
|
|
7158
7167
|
setTimeout(() => {
|
|
7159
7168
|
this.setElementsControlPosition();
|