@acorex/components 21.0.1-next.4 → 21.0.1-next.5

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.
Files changed (47) hide show
  1. package/action-sheet/index.d.ts +19 -41
  2. package/dialog/index.d.ts +14 -18
  3. package/dropdown/index.d.ts +4 -3
  4. package/fesm2022/acorex-components-action-sheet.mjs +93 -141
  5. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  6. package/fesm2022/acorex-components-conversation2.mjs +2 -2
  7. package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
  8. package/fesm2022/acorex-components-dialog.mjs +45 -66
  9. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  10. package/fesm2022/acorex-components-dropdown.mjs +4 -0
  11. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  12. package/fesm2022/acorex-components-grid-layout-builder.mjs +2 -2
  13. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  14. package/fesm2022/acorex-components-kanban.mjs +119 -6
  15. package/fesm2022/acorex-components-kanban.mjs.map +1 -1
  16. package/fesm2022/acorex-components-loading-dialog.mjs +36 -73
  17. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  18. package/fesm2022/acorex-components-menu.mjs +5 -26
  19. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  20. package/fesm2022/{acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs → acorex-components-modal-acorex-components-modal-CXXcFToK.mjs} +3 -27
  21. package/fesm2022/acorex-components-modal-acorex-components-modal-CXXcFToK.mjs.map +1 -0
  22. package/fesm2022/{acorex-components-modal-modal-content.component-CSJU1vRi.mjs → acorex-components-modal-modal-content.component-B4rhHeEz.mjs} +2 -2
  23. package/fesm2022/{acorex-components-modal-modal-content.component-CSJU1vRi.mjs.map → acorex-components-modal-modal-content.component-B4rhHeEz.mjs.map} +1 -1
  24. package/fesm2022/acorex-components-modal.mjs +1 -1
  25. package/fesm2022/acorex-components-notification.mjs +257 -374
  26. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  27. package/fesm2022/acorex-components-popover.mjs +175 -136
  28. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  29. package/fesm2022/acorex-components-popup.mjs +105 -308
  30. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  31. package/fesm2022/acorex-components-routing-progress.mjs +2 -2
  32. package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
  33. package/fesm2022/acorex-components-toast.mjs +123 -231
  34. package/fesm2022/acorex-components-toast.mjs.map +1 -1
  35. package/fesm2022/acorex-components-tooltip.mjs +3 -2
  36. package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
  37. package/kanban/index.d.ts +58 -2
  38. package/loading-dialog/index.d.ts +15 -31
  39. package/menu/index.d.ts +0 -4
  40. package/modal/index.d.ts +0 -7
  41. package/notification/index.d.ts +32 -47
  42. package/package.json +7 -7
  43. package/popover/index.d.ts +27 -20
  44. package/popup/index.d.ts +27 -103
  45. package/toast/index.d.ts +18 -24
  46. package/tooltip/index.d.ts +2 -1
  47. package/fesm2022/acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs.map +0 -1
@@ -1,9 +1,11 @@
1
1
  import { MXBaseComponent, convertToPlacement, AXFocusableComponent, AXComponent } from '@acorex/cdk/common';
2
- import { AXOverlayService } from '@acorex/cdk/overlay';
3
2
  import { AXPlatform } from '@acorex/core/platform';
3
+ import { AXHtmlUtil } from '@acorex/core/utils';
4
+ import { Overlay } from '@angular/cdk/overlay';
5
+ import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
4
6
  import { isPlatformBrowser, CommonModule } from '@angular/common';
5
7
  import * as i0 from '@angular/core';
6
- import { inject, DOCUMENT, PLATFORM_ID, input, EventEmitter, ElementRef, TemplateRef, Output, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
8
+ import { inject, DOCUMENT, PLATFORM_ID, Renderer2, input, EventEmitter, ElementRef, TemplateRef, Output, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
7
9
  import { Subject, fromEvent, delay, debounceTime } from 'rxjs';
8
10
 
9
11
  /**
@@ -13,42 +15,45 @@ import { Subject, fromEvent, delay, debounceTime } from 'rxjs';
13
15
  class AXPopoverComponent extends MXBaseComponent {
14
16
  constructor() {
15
17
  super(...arguments);
16
- this.platform = inject(AXPlatform);
18
+ this.#platform = inject(AXPlatform);
17
19
  this.document = inject(DOCUMENT);
18
20
  this.platformID = inject(PLATFORM_ID);
19
- this.overlayService = inject(AXOverlayService);
20
- this.onKeyDownHandler = null;
21
+ this.renderer = inject(Renderer2);
22
+ this.onKeyDownListenerFn = () => undefined;
21
23
  /** @ignore */
22
- this._overlayRef = null;
24
+ this._platform = inject(AXPlatform);
23
25
  /** @ignore */
24
- this._lastActiveElement = null;
26
+ this._overlay = inject(Overlay);
25
27
  /** @ignore */
26
- this._targetEvents = {};
28
+ this._isMouseOverButton = false;
29
+ /** @ignore */
30
+ this._isMouseOverTooltip = false;
27
31
  /** @ignore */
28
- this._outsideClickHandler = null;
32
+ this._targetEvents = {};
29
33
  /** @ignore */
30
- this.resizeObserver = null;
34
+ this._overlayEvents = {};
31
35
  /** @ignore */
32
36
  this.resize$ = new Subject();
37
+ //
33
38
  /** @ignore */
34
39
  this._disabled = false;
35
- this.width = input('fit-content', ...(ngDevMode ? [{ debugName: "width" }] : []));
40
+ this.width = input('auto', ...(ngDevMode ? [{ debugName: "width" }] : []));
36
41
  /** @ignore */
37
42
  this._offsetX = 0;
43
+ //
38
44
  /** @ignore */
39
45
  this._offsetY = 0;
40
46
  /** @ignore */
41
- this._defaultPlacements = convertToPlacement('bottom-start');
47
+ this._defautPlacements = convertToPlacement('bottom-start');
42
48
  /** @ignore */
43
- this._placements = [...this._defaultPlacements];
49
+ this._placements = [...this._defautPlacements];
44
50
  /** @ignore */
45
51
  this._placement = this._placements;
46
52
  /** @ignore */
47
- this._componentRef = null;
48
- /** @ignore */
49
53
  this._openOn = 'toggle';
50
54
  /** @ignore */
51
55
  this._closeOn = 'clickOut';
56
+ //
52
57
  /**
53
58
  * Determines if a backdrop should be displayed behind the popover.
54
59
  */
@@ -65,6 +70,7 @@ class AXPopoverComponent extends MXBaseComponent {
65
70
  * Enables or disables adaptivity.
66
71
  */
67
72
  this.adaptivityEnabled = false;
73
+ //
68
74
  /**
69
75
  * Emits when the component is opened.
70
76
  * @event
@@ -76,6 +82,7 @@ class AXPopoverComponent extends MXBaseComponent {
76
82
  */
77
83
  this.onClosed = new EventEmitter();
78
84
  }
85
+ #platform;
79
86
  /**
80
87
  * Gets or sets whether the popover is disabled.
81
88
  * When disabled, the popover will not open and will close if already open.
@@ -142,6 +149,7 @@ class AXPopoverComponent extends MXBaseComponent {
142
149
  this._target = v.nativeElement;
143
150
  else if (typeof v?.getHostElement == 'function')
144
151
  this._target = v.getHostElement();
152
+ //
145
153
  this.bindTargetEvents();
146
154
  }
147
155
  /**
@@ -159,11 +167,9 @@ class AXPopoverComponent extends MXBaseComponent {
159
167
  value: v,
160
168
  afterCallback: (o, n) => {
161
169
  const converted = convertToPlacement(n);
162
- this._placements = converted.length ? converted : this._defaultPlacements;
170
+ this._placements = converted.length ? converted : this._defautPlacements;
163
171
  this.updateOffset();
164
- if (this._overlayRef) {
165
- this._overlayRef.updatePosition();
166
- }
172
+ this.updatePositionStrategy();
167
173
  },
168
174
  });
169
175
  }
@@ -199,6 +205,7 @@ class AXPopoverComponent extends MXBaseComponent {
199
205
  }
200
206
  /**
201
207
  * Sets the trigger for closing the popover and rebinds target events.
208
+ * @param v
202
209
  */
203
210
  set closeOn(v) {
204
211
  this.setOption({
@@ -223,12 +230,25 @@ class AXPopoverComponent extends MXBaseComponent {
223
230
  htmlElement: this.getHostElement(),
224
231
  });
225
232
  }
233
+ //
234
+ /** @ignore */
235
+ _handleMouseEnter(e) {
236
+ this._isMouseOverTooltip = true;
237
+ }
238
+ /** @ignore */
239
+ _handleMouseLeave(e) {
240
+ this._isMouseOverTooltip = false;
241
+ setTimeout(() => {
242
+ if (!this._isMouseOverButton && this.closeOn == 'leave') {
243
+ this.close();
244
+ }
245
+ }, 250);
246
+ }
226
247
  /** @ignore */
227
248
  removeTargetEvents() {
228
249
  Object.entries(this._targetEvents).forEach((e) => {
229
- e[1]?.unsubscribe();
250
+ e[1].unsubscribe();
230
251
  });
231
- this._targetEvents = {};
232
252
  }
233
253
  /** @ignore */
234
254
  bindTargetEvents() {
@@ -237,69 +257,84 @@ class AXPopoverComponent extends MXBaseComponent {
237
257
  return;
238
258
  const targetMouseEnter$ = fromEvent(this._target, 'mouseenter');
239
259
  const targetMouseLeave$ = fromEvent(this._target, 'mouseleave');
240
- if (this.openOn === 'hover') {
260
+ if (this.openOn == 'hover') {
241
261
  this._targetEvents.mouseenter = targetMouseEnter$.pipe(delay(this.openAfter)).subscribe(() => {
262
+ this._isMouseOverButton = true;
242
263
  this.open();
243
264
  });
244
265
  }
245
- if (this.closeOn === 'leave') {
266
+ if (this.closeOn == 'leave') {
246
267
  this._targetEvents.mouseleave = targetMouseLeave$.pipe(delay(this.closeAfter)).subscribe(() => {
247
- this.close();
268
+ this._isMouseOverButton = false;
269
+ if (!this._isMouseOverTooltip) {
270
+ this.close();
271
+ }
248
272
  });
249
273
  }
250
274
  if (this.openOn === 'click' || this.openOn === 'toggle') {
251
275
  const click$ = fromEvent(this._target, 'click');
252
- this._targetEvents.click = click$.subscribe(() => {
253
- this.openOn === 'toggle' ? this.toggle() : this.open();
276
+ this._targetEvents.click = click$.subscribe((e) => {
277
+ this.openOn == 'toggle' ? this.toggle() : this.open();
254
278
  });
255
279
  }
256
280
  }
281
+ //
257
282
  /** @ignore */
258
283
  bindOverlayEvents() {
259
- const overlayElement = this._overlayRef?.overlayElement;
260
- if (!overlayElement)
261
- return;
262
- overlayElement.style.pointerEvents = 'none';
263
- // Outside click handler
264
- if (this.closeOn === 'clickOut') {
265
- this._outsideClickHandler = (e) => {
284
+ this.removeOverlayEvents();
285
+ this._overlayEvents.attach = this._overlayRef.attachments().subscribe(() => {
286
+ this.initializeResizeObserver();
287
+ if (this.openOn == 'hover') {
288
+ this._overlayRef?.overlayElement?.addEventListener('mouseenter', this._handleMouseEnter.bind(this));
289
+ }
290
+ if (this.closeOn == 'leave') {
291
+ this._overlayRef?.overlayElement?.addEventListener('mouseleave', this._handleMouseLeave.bind(this));
292
+ }
293
+ //
294
+ this._overlayEvents.outside = this._overlayRef._outsidePointerEvents.subscribe((e) => {
266
295
  const el = e.target;
267
- if (this.isOpen && !this._target?.contains(el) && !overlayElement?.contains(el)) {
296
+ if (this.closeOn == 'clickOut' &&
297
+ this.isOpen &&
298
+ !this._target.contains(el) &&
299
+ !this._overlayRef?.overlayElement?.contains(el)) {
268
300
  this.close();
269
301
  }
270
- };
271
- this.document.addEventListener('mousedown', this._outsideClickHandler);
272
- }
273
- // Resize observer
274
- this.initializeResizeObserver();
275
- setTimeout(() => {
276
- overlayElement.style.pointerEvents = 'auto';
277
- }, this.openAfter);
302
+ });
303
+ //
304
+ this._overlayEvents.scroll = this._platform.scroll.subscribe((c) => {
305
+ //__axContext__
306
+ const el = c.nativeEvent.target;
307
+ if (!this.isActionsheetStyle && isPlatformBrowser(this.platformID)) {
308
+ if (el == this.document) {
309
+ this.close();
310
+ return;
311
+ }
312
+ if (el?.closest &&
313
+ !el.closest('.ax-overlay-pane') &&
314
+ !this._target.contains(el) &&
315
+ !this._overlayRef?.overlayElement?.contains(el)) {
316
+ this.close();
317
+ }
318
+ }
319
+ });
320
+ });
278
321
  }
279
322
  /** @ignore */
280
323
  removeOverlayEvents() {
281
- if (this._outsideClickHandler) {
282
- this.document.removeEventListener('mousedown', this._outsideClickHandler);
283
- this._outsideClickHandler = null;
284
- }
285
- }
286
- /** @ignore */
287
- handleOverlayDisposed() {
288
- // Called when overlay is disposed externally (e.g., by scroll)
289
- this.disconnectResizeObserver();
290
- this.removeOverlayEvents();
291
- this.removeKeyDownListener();
292
- this._overlayRef = null;
293
- this._componentRef = null;
294
- this.restoreFocus();
295
- this._emitOnClosedEvent();
324
+ this._overlayRef?.overlayElement?.removeEventListener('mouseenter', this._handleMouseEnter.bind(this));
325
+ this._overlayRef?.overlayElement?.addEventListener('mouseleave', this._handleMouseLeave.bind(this));
326
+ Object.entries(this._overlayEvents).forEach((e) => {
327
+ e[1].unsubscribe();
328
+ });
296
329
  }
330
+ //
297
331
  /**
298
332
  * Toggles the component's open state.
299
333
  */
300
334
  toggle() {
301
335
  this.isOpen ? this.close() : this.open();
302
336
  }
337
+ //
303
338
  /**
304
339
  * Closes the component if it's open, detaches the overlay, restores focus, and emits the closed event.
305
340
  */
@@ -308,45 +343,29 @@ class AXPopoverComponent extends MXBaseComponent {
308
343
  return;
309
344
  }
310
345
  this.disconnectResizeObserver();
311
- this.removeOverlayEvents();
312
- this.removeKeyDownListener();
313
- if (this._overlayRef) {
314
- this._overlayRef.dispose();
315
- this._overlayRef = null;
316
- }
317
- this._componentRef = null;
346
+ this._overlayRef?.detach();
318
347
  this.restoreFocus();
319
348
  this._emitOnClosedEvent();
349
+ this.onKeyDownListenerFn();
320
350
  }
351
+ //
321
352
  /**
322
353
  * Opens the component if it's not already open, saves focus, opens the overlay, and emits the opened event.
323
354
  */
324
- async open() {
355
+ open() {
325
356
  if (this.isOpen || this.disabled) {
326
357
  return;
327
358
  }
328
- this.addKeyDownListener();
329
- this.saveFocus();
330
- await this.openOverlayInternal();
331
- this._emitOnOpenedEvent();
332
- }
333
- /** @ignore */
334
- addKeyDownListener() {
335
359
  if (isPlatformBrowser(this.platformID)) {
336
- this.onKeyDownHandler = (e) => {
337
- if (e.key === 'Escape') {
360
+ this.onKeyDownListenerFn = this.renderer.listen(this.document.body, 'keydown', (e) => {
361
+ if (e.key == 'Escape') {
338
362
  this.close();
339
363
  }
340
- };
341
- this.document.addEventListener('keydown', this.onKeyDownHandler);
342
- }
343
- }
344
- /** @ignore */
345
- removeKeyDownListener() {
346
- if (this.onKeyDownHandler) {
347
- this.document.removeEventListener('keydown', this.onKeyDownHandler);
348
- this.onKeyDownHandler = null;
364
+ });
349
365
  }
366
+ this.saveFocus();
367
+ this.openOverlayInternal();
368
+ this._emitOnOpenedEvent();
350
369
  }
351
370
  /** @ignore */
352
371
  saveFocus() {
@@ -357,72 +376,97 @@ class AXPopoverComponent extends MXBaseComponent {
357
376
  /** @ignore */
358
377
  restoreFocus() {
359
378
  if (this._lastActiveElement instanceof HTMLElement) {
360
- this._lastActiveElement?.focus?.();
379
+ if (this._lastActiveElement?.focus) {
380
+ this._lastActiveElement.focus();
381
+ }
361
382
  }
362
383
  }
363
384
  /** @ignore */
364
- async openOverlayInternal() {
385
+ openOverlayInternal() {
365
386
  const targetRef = this._target;
366
387
  if (!targetRef)
367
388
  return;
368
- // Build panel classes
369
- const panelClasses = ['ax-overlay-pane', 'ax-animate-fadeIn', 'ax-animate-faster'];
370
- if (this.platform.isDark()) {
371
- panelClasses.push('ax-dark');
389
+ //if (!this._overlayRef) {
390
+ if (this.isActionsheetStyle) {
391
+ this._overlayRef = this._overlay.create({
392
+ positionStrategy: this._overlay.position().global().bottom().centerHorizontally(),
393
+ disposeOnNavigation: true,
394
+ scrollStrategy: this._overlay.scrollStrategies.block(),
395
+ panelClass: [
396
+ 'ax-actionsheet-base',
397
+ 'ax-animate-slideInUp',
398
+ 'ax-animate-faster',
399
+ this.panelClass ? this.panelClass : this.#platform.isDark() ? 'ax-dark' : '',
400
+ ],
401
+ hasBackdrop: true,
402
+ width: '100%',
403
+ });
372
404
  }
373
- if (this.panelClass) {
374
- panelClasses.push(this.panelClass);
405
+ else {
406
+ this._overlayRef = this._overlay.create({
407
+ positionStrategy: this._overlay.position().flexibleConnectedTo(targetRef).withPositions(this._placements),
408
+ scrollStrategy: this._overlay.scrollStrategies.noop(),
409
+ disposeOnNavigation: true,
410
+ panelClass: ['ax-animate-fadeIn', 'ax-animate-faster', this.#platform.isDark() ? 'ax-dark' : ''],
411
+ maxHeight: 'unset',
412
+ hasBackdrop: this.hasBackdrop,
413
+ backdropClass: [this.backdropClass || 'cdk-overlay-transparent-backdrop'],
414
+ direction: AXHtmlUtil.isRtl(this.getHostElement()) ? 'rtl' : 'ltr',
415
+ width: this.width(),
416
+ });
417
+ // this._overlayRef.setDirection()
375
418
  }
376
- // Determine content to display
377
- let contentToRender;
378
- let inputs;
419
+ //
420
+ this.bindOverlayEvents();
421
+ //}
422
+ //
379
423
  if (this.content instanceof TemplateRef) {
380
- contentToRender = this.content;
424
+ this._portal = new TemplatePortal(this.content, this.getViewContainer(), {
425
+ $implicit: this.context,
426
+ ref: this,
427
+ });
428
+ this._overlayRef?.attach(this._portal);
381
429
  }
382
430
  else if (typeof this.content === 'function') {
383
- contentToRender = this.content;
384
- inputs = this.context;
431
+ this._portal = new ComponentPortal(this.content);
432
+ this._componentRef = this._overlayRef?.attach(this._portal);
433
+ Object.assign(this._componentRef.instance, this.context);
385
434
  }
386
435
  else {
387
- contentToRender = this._baseTemplate;
388
- }
389
- // Create the overlay
390
- this._overlayRef = await this.overlayService.create(contentToRender, {
391
- inputs,
392
- anchorOptions: {
393
- anchor: targetRef,
394
- placement: this._placement,
395
- offsetX: this.offsetX,
396
- offsetY: this.offsetY,
397
- autoFlip: true,
398
- },
399
- panelClass: panelClasses,
400
- width: this.width(),
401
- onDispose: () => this.handleOverlayDisposed(),
402
- });
403
- // Store component ref if it's a component
404
- if (this._overlayRef.instance && 'instance' in this._overlayRef.instance) {
405
- this._componentRef = this._overlayRef.instance;
406
- if (this.context && this._componentRef.instance) {
407
- Object.assign(this._componentRef.instance, this.context);
408
- }
436
+ this._portal = new TemplatePortal(this._baseTemplate, this.getViewContainer(), {
437
+ $implicit: this.context,
438
+ ref: this,
439
+ });
440
+ this._overlayRef?.attach(this._portal);
409
441
  }
410
- // Bind overlay events
411
- this.bindOverlayEvents();
412
442
  }
413
443
  /**
414
444
  * Checks if the overlay is currently open.
415
445
  * @returns {boolean}
416
446
  */
417
447
  get isOpen() {
418
- return this._overlayRef !== null;
448
+ return this._overlayRef ? this._overlayRef.hasAttached() : false;
419
449
  }
420
450
  /**
421
451
  * Determines if the actionsheet style should be applied.
422
452
  * @returns {boolean}
423
453
  */
424
454
  get isActionsheetStyle() {
425
- return this.platform.is('SM') && this.adaptivityEnabled;
455
+ return this._platform.is('SM') && this.adaptivityEnabled;
456
+ }
457
+ /** @ignore */
458
+ updatePositionStrategy() {
459
+ const targetRef = this._target;
460
+ if (!targetRef)
461
+ return;
462
+ let strategy;
463
+ if (this.isActionsheetStyle) {
464
+ strategy = this._overlay.position().global().bottom().centerHorizontally();
465
+ }
466
+ else {
467
+ strategy = this._overlay.position().flexibleConnectedTo(targetRef).withPositions(this._placements);
468
+ }
469
+ this._overlayRef?.updatePositionStrategy(strategy);
426
470
  }
427
471
  /** @ignore */
428
472
  updateOffset() {
@@ -444,13 +488,7 @@ class AXPopoverComponent extends MXBaseComponent {
444
488
  * Focuses the overlay element.
445
489
  */
446
490
  focus() {
447
- // Optional focus behavior
448
- }
449
- /**
450
- * Brings this popover to the front of all other overlays.
451
- */
452
- bringToFront() {
453
- this._overlayRef?.bringToFront();
491
+ //TODO: need this??
454
492
  }
455
493
  /** @ignore */
456
494
  initializeResizeObserver() {
@@ -461,7 +499,7 @@ class AXPopoverComponent extends MXBaseComponent {
461
499
  this.resizeObserver = new ResizeObserver(() => {
462
500
  this.resize$.next();
463
501
  });
464
- this.resizeObserver.observe(this._overlayRef.overlayElement);
502
+ this.resizeObserver.observe(this._overlayRef?.overlayElement);
465
503
  }
466
504
  /** @ignore */
467
505
  disconnectResizeObserver() {
@@ -470,8 +508,12 @@ class AXPopoverComponent extends MXBaseComponent {
470
508
  this.resizeObserver = null;
471
509
  }
472
510
  }
511
+ //
473
512
  ngOnInit() {
474
513
  super.ngOnInit();
514
+ // this.platformService.directionChange.subscribe((c) => {
515
+ // this.isRtl = c.data == 'rtl';
516
+ // });
475
517
  this.resize$.pipe(debounceTime(50)).subscribe(() => {
476
518
  if (this.isOpen) {
477
519
  this.updatePosition();
@@ -484,11 +526,8 @@ class AXPopoverComponent extends MXBaseComponent {
484
526
  this.resize$.complete();
485
527
  this.removeTargetEvents();
486
528
  this.removeOverlayEvents();
487
- this.removeKeyDownListener();
488
- if (this._overlayRef) {
489
- this._overlayRef.dispose();
490
- this._overlayRef = null;
491
- }
529
+ this._overlayRef?.detach();
530
+ this._overlayRef?.dispose();
492
531
  }
493
532
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
494
533
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: AXPopoverComponent, isStandalone: true, selector: "ax-popover", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, offsetX: { classPropertyName: "offsetX", publicName: "offsetX", isSignal: false, isRequired: false, transformFunction: null }, offsetY: { classPropertyName: "offsetY", publicName: "offsetY", isSignal: false, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: false, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: false, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: false, isRequired: false, transformFunction: null }, openOn: { classPropertyName: "openOn", publicName: "openOn", isSignal: false, isRequired: false, transformFunction: null }, closeOn: { classPropertyName: "closeOn", publicName: "closeOn", isSignal: false, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: false, isRequired: false, transformFunction: null }, openAfter: { classPropertyName: "openAfter", publicName: "openAfter", isSignal: false, isRequired: false, transformFunction: null }, closeAfter: { classPropertyName: "closeAfter", publicName: "closeAfter", isSignal: false, isRequired: false, transformFunction: null }, backdropClass: { classPropertyName: "backdropClass", publicName: "backdropClass", isSignal: false, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: false, isRequired: false, transformFunction: null }, adaptivityEnabled: { classPropertyName: "adaptivityEnabled", publicName: "adaptivityEnabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onOpened: "onOpened", onClosed: "onClosed" }, providers: [