@acorex/components 21.0.1-next.3 → 21.0.1-next.31
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/accordion/index.d.ts +0 -1
- package/action-sheet/index.d.ts +116 -34
- package/button-group/index.d.ts +6 -4
- package/chips/index.d.ts +3 -8
- package/collapse/index.d.ts +4 -6
- package/command/index.d.ts +8 -1
- package/conversation2/README.md +71 -31
- package/conversation2/index.d.ts +36 -35
- package/data-table/index.d.ts +4 -253
- package/datetime-picker/index.d.ts +1 -1
- package/dialog/index.d.ts +18 -14
- package/dropdown/index.d.ts +3 -8
- package/fesm2022/acorex-components-accordion.mjs +16 -21
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +284 -118
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +13 -13
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs +3 -3
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +11 -10
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +7 -7
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +12 -12
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +9 -9
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +11 -11
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +11 -11
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +23 -19
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +18 -18
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +17 -17
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +10 -10
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +12 -14
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +12 -10
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs +10 -10
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +22 -19
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +9 -9
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +30 -30
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +17 -11
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +32 -32
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +51 -51
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +310 -304
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +46 -46
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +3 -3
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +33 -33
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +50 -486
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +9 -9
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +9 -9
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +40 -38
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +43 -36
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +75 -54
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer-legacy.mjs +13 -13
- package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +15 -16
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +25 -28
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +11 -11
- package/fesm2022/acorex-components-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs +25 -25
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs +16 -16
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +48 -42
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +13 -14
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +44 -44
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +9 -9
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +8 -8
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +140 -13
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +29 -11
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -9
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +9 -9
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +82 -45
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +23 -23
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +14 -14
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +72 -54
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +43 -22
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-CXXcFToK.mjs → acorex-components-modal-acorex-components-modal-BajlPo_n.mjs} +47 -23
- package/fesm2022/acorex-components-modal-acorex-components-modal-BajlPo_n.mjs.map +1 -0
- package/fesm2022/{acorex-components-modal-modal-content.component-B4rhHeEz.mjs → acorex-components-modal-modal-content.component-BVrBX4Qf.mjs} +9 -7
- package/fesm2022/acorex-components-modal-modal-content.component-BVrBX4Qf.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +9 -9
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +381 -260
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box-legacy.mjs +9 -9
- package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +9 -9
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +9 -9
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +34 -39
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +13 -13
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +8 -8
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +88 -47
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +19 -18
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +254 -195
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +308 -113
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +11 -9
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +9 -9
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +8 -8
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +9 -9
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +38 -36
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +10 -10
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +20 -35
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +22 -22
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +9 -9
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +56 -56
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +43 -43
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +16 -10
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +11 -9
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +11 -11
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +9 -9
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +74 -25
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +12 -12
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +14 -14
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +14 -14
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +14 -14
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +15 -15
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +9 -9
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +9 -9
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +14 -12
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +18 -20
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +12 -12
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +239 -131
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +8 -8
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +67 -67
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view-legacy.mjs +16 -12
- package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +26 -11
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +16 -16
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +42 -42
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/form/index.d.ts +2 -1
- package/grid-layout-builder/index.d.ts +1 -2
- package/kanban/index.d.ts +62 -4
- package/kbd/index.d.ts +13 -7
- package/loading/index.d.ts +1 -1
- package/loading-dialog/index.d.ts +31 -15
- package/media-viewer/index.d.ts +2 -1
- package/menu/index.d.ts +4 -0
- package/modal/index.d.ts +7 -0
- package/notification/index.d.ts +47 -32
- package/package.json +3 -3
- package/paint/index.d.ts +1 -6
- package/phone-box/index.d.ts +12 -7
- package/popover/index.d.ts +45 -31
- package/popup/index.d.ts +100 -27
- package/rate-picker/index.d.ts +5 -15
- package/side-menu/index.d.ts +9 -2
- package/slider/index.d.ts +2 -2
- package/time-duration/index.d.ts +0 -1
- package/toast/index.d.ts +24 -18
- package/tooltip/index.d.ts +4 -9
- package/tree-view/index.d.ts +11 -0
- package/tree-view-legacy/index.d.ts +1 -0
- package/fesm2022/acorex-components-modal-acorex-components-modal-CXXcFToK.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-modal-content.component-B4rhHeEz.mjs.map +0 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { MXBaseComponent, convertToPlacement, AXFocusableComponent, AXComponent } from '@acorex/cdk/common';
|
|
2
|
+
import { AXOverlayService } from '@acorex/cdk/overlay';
|
|
2
3
|
import { AXPlatform } from '@acorex/core/platform';
|
|
3
|
-
import {
|
|
4
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
5
|
-
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
4
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
6
5
|
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
7
6
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { inject, DOCUMENT, PLATFORM_ID,
|
|
9
|
-
import { Subject, fromEvent, delay
|
|
7
|
+
import { inject, DOCUMENT, PLATFORM_ID, input, afterNextRender, EventEmitter, ElementRef, TemplateRef, Output, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
8
|
+
import { Subject, fromEvent, delay } from 'rxjs';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* @category Components
|
|
@@ -15,45 +14,66 @@ import { Subject, fromEvent, delay, debounceTime } from 'rxjs';
|
|
|
15
14
|
class AXPopoverComponent extends MXBaseComponent {
|
|
16
15
|
constructor() {
|
|
17
16
|
super(...arguments);
|
|
18
|
-
this
|
|
17
|
+
this.platform = inject(AXPlatform);
|
|
19
18
|
this.document = inject(DOCUMENT);
|
|
20
19
|
this.platformID = inject(PLATFORM_ID);
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
20
|
+
this.overlayService = inject(AXOverlayService);
|
|
21
|
+
this.onKeyDownHandler = null;
|
|
23
22
|
/** @ignore */
|
|
24
|
-
this.
|
|
23
|
+
this._overlayRef = null;
|
|
25
24
|
/** @ignore */
|
|
26
|
-
this.
|
|
25
|
+
this._lastActiveElement = null;
|
|
27
26
|
/** @ignore */
|
|
28
|
-
this.
|
|
27
|
+
this._targetEvents = {};
|
|
29
28
|
/** @ignore */
|
|
30
|
-
this.
|
|
29
|
+
this._outsideClickHandler = null;
|
|
31
30
|
/** @ignore */
|
|
32
|
-
this.
|
|
31
|
+
this._scrollHandler = null;
|
|
33
32
|
/** @ignore */
|
|
34
|
-
this.
|
|
33
|
+
this._scrollListenerActive = false;
|
|
34
|
+
/** @ignore */
|
|
35
|
+
this.resizeObserver = null;
|
|
35
36
|
/** @ignore */
|
|
36
37
|
this.resize$ = new Subject();
|
|
37
|
-
//
|
|
38
38
|
/** @ignore */
|
|
39
39
|
this._disabled = false;
|
|
40
|
-
this.width = input('
|
|
40
|
+
this.width = input('fit-content', ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
41
|
+
this.translateService = inject(AXTranslationService);
|
|
42
|
+
this.#init = afterNextRender(() => {
|
|
43
|
+
const lang = this.translateService.getActiveLang();
|
|
44
|
+
let defaultPlacementDirection;
|
|
45
|
+
if (lang === 'en-US') {
|
|
46
|
+
defaultPlacementDirection = 'bottom-start';
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
defaultPlacementDirection = 'bottom-end';
|
|
50
|
+
}
|
|
51
|
+
if (!this.placement)
|
|
52
|
+
this.placement = defaultPlacementDirection;
|
|
53
|
+
const converted = this.placement
|
|
54
|
+
? convertToPlacement(this.placement)
|
|
55
|
+
: convertToPlacement(defaultPlacementDirection);
|
|
56
|
+
this._placements = converted;
|
|
57
|
+
this.resize$.subscribe(() => {
|
|
58
|
+
if (this.isOpen) {
|
|
59
|
+
this.updatePosition();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
41
63
|
/** @ignore */
|
|
42
64
|
this._offsetX = 0;
|
|
43
|
-
//
|
|
44
65
|
/** @ignore */
|
|
45
66
|
this._offsetY = 0;
|
|
46
67
|
/** @ignore */
|
|
47
|
-
this.
|
|
68
|
+
this._placements = [];
|
|
48
69
|
/** @ignore */
|
|
49
|
-
this.
|
|
70
|
+
this._placement = null;
|
|
50
71
|
/** @ignore */
|
|
51
|
-
this.
|
|
72
|
+
this._componentRef = null;
|
|
52
73
|
/** @ignore */
|
|
53
74
|
this._openOn = 'toggle';
|
|
54
75
|
/** @ignore */
|
|
55
76
|
this._closeOn = 'clickOut';
|
|
56
|
-
//
|
|
57
77
|
/**
|
|
58
78
|
* Determines if a backdrop should be displayed behind the popover.
|
|
59
79
|
*/
|
|
@@ -61,16 +81,19 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
61
81
|
/**
|
|
62
82
|
* Delay in milliseconds before the popover opens after a trigger event.
|
|
63
83
|
*/
|
|
64
|
-
this.
|
|
84
|
+
this._openAfter = 200;
|
|
65
85
|
/**
|
|
66
86
|
* Delay in milliseconds before the popover closes after a trigger event.
|
|
67
87
|
*/
|
|
68
|
-
this.
|
|
88
|
+
this._closeAfter = 200;
|
|
89
|
+
/**
|
|
90
|
+
* Whether to update the popover position when scrolling.
|
|
91
|
+
*/
|
|
92
|
+
this.repositionOnScroll = true;
|
|
69
93
|
/**
|
|
70
94
|
* Enables or disables adaptivity.
|
|
71
95
|
*/
|
|
72
96
|
this.adaptivityEnabled = false;
|
|
73
|
-
//
|
|
74
97
|
/**
|
|
75
98
|
* Emits when the component is opened.
|
|
76
99
|
* @event
|
|
@@ -82,7 +105,7 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
82
105
|
*/
|
|
83
106
|
this.onClosed = new EventEmitter();
|
|
84
107
|
}
|
|
85
|
-
#
|
|
108
|
+
#init;
|
|
86
109
|
/**
|
|
87
110
|
* Gets or sets whether the popover is disabled.
|
|
88
111
|
* When disabled, the popover will not open and will close if already open.
|
|
@@ -149,7 +172,6 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
149
172
|
this._target = v.nativeElement;
|
|
150
173
|
else if (typeof v?.getHostElement == 'function')
|
|
151
174
|
this._target = v.getHostElement();
|
|
152
|
-
//
|
|
153
175
|
this.bindTargetEvents();
|
|
154
176
|
}
|
|
155
177
|
/**
|
|
@@ -166,10 +188,14 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
166
188
|
name: 'placement',
|
|
167
189
|
value: v,
|
|
168
190
|
afterCallback: (o, n) => {
|
|
191
|
+
if (!n)
|
|
192
|
+
return;
|
|
169
193
|
const converted = convertToPlacement(n);
|
|
170
|
-
this._placements = converted
|
|
194
|
+
this._placements = converted;
|
|
171
195
|
this.updateOffset();
|
|
172
|
-
this.
|
|
196
|
+
if (this._overlayRef) {
|
|
197
|
+
this._overlayRef.updatePosition();
|
|
198
|
+
}
|
|
173
199
|
},
|
|
174
200
|
});
|
|
175
201
|
}
|
|
@@ -205,7 +231,6 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
205
231
|
}
|
|
206
232
|
/**
|
|
207
233
|
* Sets the trigger for closing the popover and rebinds target events.
|
|
208
|
-
* @param v
|
|
209
234
|
*/
|
|
210
235
|
set closeOn(v) {
|
|
211
236
|
this.setOption({
|
|
@@ -216,6 +241,20 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
216
241
|
},
|
|
217
242
|
});
|
|
218
243
|
}
|
|
244
|
+
get openAfter() {
|
|
245
|
+
return this._openAfter;
|
|
246
|
+
}
|
|
247
|
+
set openAfter(value) {
|
|
248
|
+
this._openAfter = value;
|
|
249
|
+
this.bindTargetEvents();
|
|
250
|
+
}
|
|
251
|
+
get closeAfter() {
|
|
252
|
+
return this._closeAfter;
|
|
253
|
+
}
|
|
254
|
+
set closeAfter(value) {
|
|
255
|
+
this._closeAfter = value;
|
|
256
|
+
this.bindTargetEvents();
|
|
257
|
+
}
|
|
219
258
|
/** @ignore */
|
|
220
259
|
_emitOnOpenedEvent() {
|
|
221
260
|
this.onOpened.emit({
|
|
@@ -230,25 +269,12 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
230
269
|
htmlElement: this.getHostElement(),
|
|
231
270
|
});
|
|
232
271
|
}
|
|
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
|
-
}
|
|
247
272
|
/** @ignore */
|
|
248
273
|
removeTargetEvents() {
|
|
249
274
|
Object.entries(this._targetEvents).forEach((e) => {
|
|
250
|
-
e[1]
|
|
275
|
+
e[1]?.unsubscribe();
|
|
251
276
|
});
|
|
277
|
+
this._targetEvents = {};
|
|
252
278
|
}
|
|
253
279
|
/** @ignore */
|
|
254
280
|
bindTargetEvents() {
|
|
@@ -257,84 +283,126 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
257
283
|
return;
|
|
258
284
|
const targetMouseEnter$ = fromEvent(this._target, 'mouseenter');
|
|
259
285
|
const targetMouseLeave$ = fromEvent(this._target, 'mouseleave');
|
|
260
|
-
if (this.openOn
|
|
286
|
+
if (this.openOn === 'hover') {
|
|
261
287
|
this._targetEvents.mouseenter = targetMouseEnter$.pipe(delay(this.openAfter)).subscribe(() => {
|
|
262
|
-
this._isMouseOverButton = true;
|
|
263
288
|
this.open();
|
|
264
289
|
});
|
|
265
290
|
}
|
|
266
|
-
if (this.closeOn
|
|
291
|
+
if (this.closeOn === 'leave') {
|
|
267
292
|
this._targetEvents.mouseleave = targetMouseLeave$.pipe(delay(this.closeAfter)).subscribe(() => {
|
|
268
|
-
this.
|
|
269
|
-
if (!this._isMouseOverTooltip) {
|
|
270
|
-
this.close();
|
|
271
|
-
}
|
|
293
|
+
this.close();
|
|
272
294
|
});
|
|
273
295
|
}
|
|
274
296
|
if (this.openOn === 'click' || this.openOn === 'toggle') {
|
|
275
297
|
const click$ = fromEvent(this._target, 'click');
|
|
276
|
-
this._targetEvents.click = click$.subscribe((
|
|
277
|
-
this.openOn
|
|
298
|
+
this._targetEvents.click = click$.subscribe(() => {
|
|
299
|
+
this.openOn === 'toggle' ? this.toggle() : this.open();
|
|
278
300
|
});
|
|
279
301
|
}
|
|
280
302
|
}
|
|
281
|
-
//
|
|
282
303
|
/** @ignore */
|
|
283
304
|
bindOverlayEvents() {
|
|
284
|
-
this.
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
this._overlayRef?.overlayElement?.addEventListener('mouseleave', this._handleMouseLeave.bind(this));
|
|
292
|
-
}
|
|
293
|
-
//
|
|
294
|
-
this._overlayEvents.outside = this._overlayRef._outsidePointerEvents.subscribe((e) => {
|
|
305
|
+
const overlayElement = this._overlayRef?.overlayElement;
|
|
306
|
+
if (!overlayElement)
|
|
307
|
+
return;
|
|
308
|
+
overlayElement.style.pointerEvents = 'none';
|
|
309
|
+
// Outside click handler
|
|
310
|
+
if (this.closeOn === 'clickOut') {
|
|
311
|
+
this._outsideClickHandler = (e) => {
|
|
295
312
|
const el = e.target;
|
|
296
|
-
if (this.
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
this.close();
|
|
301
|
-
}
|
|
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();
|
|
313
|
+
if (this.isOpen && !this._target?.contains(el) && !overlayElement?.contains(el)) {
|
|
314
|
+
// Check if the click is inside a child overlay (e.g., selectbox dropdown)
|
|
315
|
+
// Child overlays have a higher z-index than this popover
|
|
316
|
+
if (this.isClickInsideChildOverlay(el)) {
|
|
310
317
|
return;
|
|
311
318
|
}
|
|
312
|
-
|
|
313
|
-
!el.closest('.ax-overlay-pane') &&
|
|
314
|
-
!this._target.contains(el) &&
|
|
315
|
-
!this._overlayRef?.overlayElement?.contains(el)) {
|
|
316
|
-
this.close();
|
|
317
|
-
}
|
|
319
|
+
this.close();
|
|
318
320
|
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
+
};
|
|
322
|
+
this.document.addEventListener('mousedown', this._outsideClickHandler);
|
|
323
|
+
}
|
|
324
|
+
// Scroll listener to close on scroll
|
|
325
|
+
this.setupScrollListener();
|
|
326
|
+
// Resize observer
|
|
327
|
+
this.initializeResizeObserver();
|
|
328
|
+
setTimeout(() => {
|
|
329
|
+
overlayElement.style.pointerEvents = 'auto';
|
|
330
|
+
}, this.openAfter);
|
|
321
331
|
}
|
|
322
332
|
/** @ignore */
|
|
323
333
|
removeOverlayEvents() {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
334
|
+
if (this._outsideClickHandler) {
|
|
335
|
+
this.document.removeEventListener('mousedown', this._outsideClickHandler);
|
|
336
|
+
this._outsideClickHandler = null;
|
|
337
|
+
}
|
|
338
|
+
this.removeScrollListener();
|
|
339
|
+
}
|
|
340
|
+
/** @ignore */
|
|
341
|
+
setupScrollListener() {
|
|
342
|
+
if (!this.repositionOnScroll || !isPlatformBrowser(this.platformID)) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
this._scrollHandler = () => {
|
|
346
|
+
// Ignore scroll events during initial setup
|
|
347
|
+
if (!this._scrollListenerActive) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
// Update popover position to follow the anchor element
|
|
351
|
+
this._overlayRef?.updatePosition();
|
|
352
|
+
};
|
|
353
|
+
// Listen on document with capture to catch all scroll events
|
|
354
|
+
this.document.addEventListener('scroll', this._scrollHandler, true);
|
|
355
|
+
window.addEventListener('scroll', this._scrollHandler, true);
|
|
356
|
+
// Delay activation to prevent initial layout scroll events from triggering
|
|
357
|
+
requestAnimationFrame(() => {
|
|
358
|
+
this._scrollListenerActive = true;
|
|
328
359
|
});
|
|
329
360
|
}
|
|
330
|
-
|
|
361
|
+
/** @ignore */
|
|
362
|
+
removeScrollListener() {
|
|
363
|
+
if (this._scrollHandler) {
|
|
364
|
+
this.document.removeEventListener('scroll', this._scrollHandler, true);
|
|
365
|
+
window.removeEventListener('scroll', this._scrollHandler, true);
|
|
366
|
+
this._scrollHandler = null;
|
|
367
|
+
}
|
|
368
|
+
this._scrollListenerActive = false;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Checks if the clicked element is inside a child overlay (e.g., selectbox dropdown).
|
|
372
|
+
* Child overlays are identified by having a higher z-index than this popover's overlay.
|
|
373
|
+
* @ignore
|
|
374
|
+
*/
|
|
375
|
+
isClickInsideChildOverlay(element) {
|
|
376
|
+
const overlayElement = this._overlayRef?.overlayElement;
|
|
377
|
+
if (!overlayElement)
|
|
378
|
+
return false;
|
|
379
|
+
// Find if the clicked element is inside any overlay container
|
|
380
|
+
const clickedOverlay = element.closest('.ax-overlay-container');
|
|
381
|
+
if (!clickedOverlay)
|
|
382
|
+
return false;
|
|
383
|
+
// Get z-index values
|
|
384
|
+
const popoverZIndex = parseInt(overlayElement.style.zIndex || '0', 10);
|
|
385
|
+
const clickedZIndex = parseInt(clickedOverlay.style.zIndex || '0', 10);
|
|
386
|
+
// If the clicked overlay has a higher z-index, it's a child overlay
|
|
387
|
+
return clickedZIndex > popoverZIndex;
|
|
388
|
+
}
|
|
389
|
+
/** @ignore */
|
|
390
|
+
handleOverlayDisposed() {
|
|
391
|
+
// Called when overlay is disposed externally (e.g., by scroll)
|
|
392
|
+
this.disconnectResizeObserver();
|
|
393
|
+
this.removeOverlayEvents();
|
|
394
|
+
this.removeKeyDownListener();
|
|
395
|
+
this._overlayRef = null;
|
|
396
|
+
this._componentRef = null;
|
|
397
|
+
this.restoreFocus();
|
|
398
|
+
this._emitOnClosedEvent();
|
|
399
|
+
}
|
|
331
400
|
/**
|
|
332
401
|
* Toggles the component's open state.
|
|
333
402
|
*/
|
|
334
403
|
toggle() {
|
|
335
404
|
this.isOpen ? this.close() : this.open();
|
|
336
405
|
}
|
|
337
|
-
//
|
|
338
406
|
/**
|
|
339
407
|
* Closes the component if it's open, detaches the overlay, restores focus, and emits the closed event.
|
|
340
408
|
*/
|
|
@@ -343,29 +411,45 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
343
411
|
return;
|
|
344
412
|
}
|
|
345
413
|
this.disconnectResizeObserver();
|
|
346
|
-
this.
|
|
414
|
+
this.removeOverlayEvents();
|
|
415
|
+
this.removeKeyDownListener();
|
|
416
|
+
if (this._overlayRef) {
|
|
417
|
+
this._overlayRef.dispose();
|
|
418
|
+
this._overlayRef = null;
|
|
419
|
+
}
|
|
420
|
+
this._componentRef = null;
|
|
347
421
|
this.restoreFocus();
|
|
348
422
|
this._emitOnClosedEvent();
|
|
349
|
-
this.onKeyDownListenerFn();
|
|
350
423
|
}
|
|
351
|
-
//
|
|
352
424
|
/**
|
|
353
425
|
* Opens the component if it's not already open, saves focus, opens the overlay, and emits the opened event.
|
|
354
426
|
*/
|
|
355
|
-
open() {
|
|
427
|
+
async open() {
|
|
356
428
|
if (this.isOpen || this.disabled) {
|
|
357
429
|
return;
|
|
358
430
|
}
|
|
431
|
+
this.addKeyDownListener();
|
|
432
|
+
this.saveFocus();
|
|
433
|
+
await this.openOverlayInternal();
|
|
434
|
+
this._emitOnOpenedEvent();
|
|
435
|
+
}
|
|
436
|
+
/** @ignore */
|
|
437
|
+
addKeyDownListener() {
|
|
359
438
|
if (isPlatformBrowser(this.platformID)) {
|
|
360
|
-
this.
|
|
361
|
-
if (e.key
|
|
439
|
+
this.onKeyDownHandler = (e) => {
|
|
440
|
+
if (e.key === 'Escape') {
|
|
362
441
|
this.close();
|
|
363
442
|
}
|
|
364
|
-
}
|
|
443
|
+
};
|
|
444
|
+
this.document.addEventListener('keydown', this.onKeyDownHandler);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
/** @ignore */
|
|
448
|
+
removeKeyDownListener() {
|
|
449
|
+
if (this.onKeyDownHandler) {
|
|
450
|
+
this.document.removeEventListener('keydown', this.onKeyDownHandler);
|
|
451
|
+
this.onKeyDownHandler = null;
|
|
365
452
|
}
|
|
366
|
-
this.saveFocus();
|
|
367
|
-
this.openOverlayInternal();
|
|
368
|
-
this._emitOnOpenedEvent();
|
|
369
453
|
}
|
|
370
454
|
/** @ignore */
|
|
371
455
|
saveFocus() {
|
|
@@ -376,105 +460,81 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
376
460
|
/** @ignore */
|
|
377
461
|
restoreFocus() {
|
|
378
462
|
if (this._lastActiveElement instanceof HTMLElement) {
|
|
379
|
-
|
|
380
|
-
this._lastActiveElement.focus();
|
|
381
|
-
}
|
|
463
|
+
this._lastActiveElement?.focus?.();
|
|
382
464
|
}
|
|
383
465
|
}
|
|
384
466
|
/** @ignore */
|
|
385
|
-
openOverlayInternal() {
|
|
467
|
+
async openOverlayInternal() {
|
|
386
468
|
const targetRef = this._target;
|
|
387
469
|
if (!targetRef)
|
|
388
470
|
return;
|
|
389
|
-
//
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
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
|
-
});
|
|
471
|
+
// Build panel classes
|
|
472
|
+
const panelClasses = ['ax-animate-fadeIn', 'ax-animate-faster'];
|
|
473
|
+
if (this.platform.isDark()) {
|
|
474
|
+
panelClasses.push('ax-dark');
|
|
404
475
|
}
|
|
405
|
-
|
|
406
|
-
|
|
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()
|
|
476
|
+
if (this.panelClass) {
|
|
477
|
+
panelClasses.push(this.panelClass);
|
|
418
478
|
}
|
|
419
|
-
//
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
//
|
|
479
|
+
// Determine content to display
|
|
480
|
+
let contentToRender;
|
|
481
|
+
let inputs;
|
|
423
482
|
if (this.content instanceof TemplateRef) {
|
|
424
|
-
|
|
425
|
-
$implicit: this.context,
|
|
426
|
-
ref: this,
|
|
427
|
-
});
|
|
428
|
-
this._overlayRef?.attach(this._portal);
|
|
483
|
+
contentToRender = this.content;
|
|
429
484
|
}
|
|
430
485
|
else if (typeof this.content === 'function') {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
Object.assign(this._componentRef.instance, this.context);
|
|
486
|
+
contentToRender = this.content;
|
|
487
|
+
inputs = this.context;
|
|
434
488
|
}
|
|
435
489
|
else {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
490
|
+
contentToRender = this._baseTemplate;
|
|
491
|
+
}
|
|
492
|
+
// Create the overlay
|
|
493
|
+
this._overlayRef = await this.overlayService.create(contentToRender, {
|
|
494
|
+
inputs,
|
|
495
|
+
anchorOptions: {
|
|
496
|
+
anchor: targetRef,
|
|
497
|
+
placement: this._placement,
|
|
498
|
+
offsetX: this._offsetX,
|
|
499
|
+
offsetY: this._offsetY,
|
|
500
|
+
autoFlip: true,
|
|
501
|
+
},
|
|
502
|
+
panelClass: panelClasses,
|
|
503
|
+
width: this.width(),
|
|
504
|
+
onDispose: () => this.handleOverlayDisposed(),
|
|
505
|
+
actionSheetStyle: this.isActionsheetStyle,
|
|
506
|
+
});
|
|
507
|
+
// Store component ref if it's a component
|
|
508
|
+
if (this._overlayRef.instance && 'instance' in this._overlayRef.instance) {
|
|
509
|
+
this._componentRef = this._overlayRef.instance;
|
|
510
|
+
if (this.context && this._componentRef.instance) {
|
|
511
|
+
Object.assign(this._componentRef.instance, this.context);
|
|
512
|
+
}
|
|
441
513
|
}
|
|
514
|
+
// Bind overlay events
|
|
515
|
+
this.bindOverlayEvents();
|
|
442
516
|
}
|
|
443
517
|
/**
|
|
444
518
|
* Checks if the overlay is currently open.
|
|
445
519
|
* @returns {boolean}
|
|
446
520
|
*/
|
|
447
521
|
get isOpen() {
|
|
448
|
-
return this._overlayRef
|
|
522
|
+
return this._overlayRef !== null;
|
|
449
523
|
}
|
|
450
524
|
/**
|
|
451
525
|
* Determines if the actionsheet style should be applied.
|
|
452
526
|
* @returns {boolean}
|
|
453
527
|
*/
|
|
454
528
|
get isActionsheetStyle() {
|
|
455
|
-
return this.
|
|
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);
|
|
529
|
+
return this.platform.is('SM');
|
|
470
530
|
}
|
|
471
531
|
/** @ignore */
|
|
472
532
|
updateOffset() {
|
|
473
533
|
this._placements?.forEach((p) => {
|
|
474
|
-
if (this.
|
|
475
|
-
p.offsetY = this.
|
|
476
|
-
if (this.
|
|
477
|
-
p.offsetX = this.
|
|
534
|
+
if (this._offsetY != null)
|
|
535
|
+
p.offsetY = this._offsetY;
|
|
536
|
+
if (this._offsetX != null)
|
|
537
|
+
p.offsetX = this._offsetX;
|
|
478
538
|
});
|
|
479
539
|
}
|
|
480
540
|
/**
|
|
@@ -488,7 +548,13 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
488
548
|
* Focuses the overlay element.
|
|
489
549
|
*/
|
|
490
550
|
focus() {
|
|
491
|
-
//
|
|
551
|
+
// Optional focus behavior
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Brings this popover to the front of all other overlays.
|
|
555
|
+
*/
|
|
556
|
+
bringToFront() {
|
|
557
|
+
this._overlayRef?.bringToFront();
|
|
492
558
|
}
|
|
493
559
|
/** @ignore */
|
|
494
560
|
initializeResizeObserver() {
|
|
@@ -499,7 +565,7 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
499
565
|
this.resizeObserver = new ResizeObserver(() => {
|
|
500
566
|
this.resize$.next();
|
|
501
567
|
});
|
|
502
|
-
this.resizeObserver.observe(this._overlayRef
|
|
568
|
+
this.resizeObserver.observe(this._overlayRef.overlayElement);
|
|
503
569
|
}
|
|
504
570
|
/** @ignore */
|
|
505
571
|
disconnectResizeObserver() {
|
|
@@ -508,34 +574,25 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
|
508
574
|
this.resizeObserver = null;
|
|
509
575
|
}
|
|
510
576
|
}
|
|
511
|
-
//
|
|
512
|
-
ngOnInit() {
|
|
513
|
-
super.ngOnInit();
|
|
514
|
-
// this.platformService.directionChange.subscribe((c) => {
|
|
515
|
-
// this.isRtl = c.data == 'rtl';
|
|
516
|
-
// });
|
|
517
|
-
this.resize$.pipe(debounceTime(50)).subscribe(() => {
|
|
518
|
-
if (this.isOpen) {
|
|
519
|
-
this.updatePosition();
|
|
520
|
-
}
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
577
|
/** @ignore */
|
|
524
578
|
ngOnDestroy() {
|
|
525
579
|
this.disconnectResizeObserver();
|
|
526
580
|
this.resize$.complete();
|
|
527
581
|
this.removeTargetEvents();
|
|
528
582
|
this.removeOverlayEvents();
|
|
529
|
-
this.
|
|
530
|
-
this._overlayRef
|
|
583
|
+
this.removeKeyDownListener();
|
|
584
|
+
if (this._overlayRef) {
|
|
585
|
+
this._overlayRef.dispose();
|
|
586
|
+
this._overlayRef = null;
|
|
587
|
+
}
|
|
531
588
|
}
|
|
532
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
533
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
589
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
590
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", 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 }, repositionOnScroll: { classPropertyName: "repositionOnScroll", publicName: "repositionOnScroll", 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: [
|
|
534
591
|
{ provide: AXFocusableComponent, useExisting: AXPopoverComponent },
|
|
535
592
|
{ provide: AXComponent, useExisting: AXPopoverComponent },
|
|
536
593
|
], viewQueries: [{ propertyName: "_baseTemplate", first: true, predicate: ["baseTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #baseTemplate>\n <ng-content></ng-content>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
537
594
|
}
|
|
538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPopoverComponent, decorators: [{
|
|
539
596
|
type: Component,
|
|
540
597
|
args: [{ selector: 'ax-popover', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
541
598
|
{ provide: AXFocusableComponent, useExisting: AXPopoverComponent },
|
|
@@ -566,6 +623,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
566
623
|
type: Input
|
|
567
624
|
}], closeAfter: [{
|
|
568
625
|
type: Input
|
|
626
|
+
}], repositionOnScroll: [{
|
|
627
|
+
type: Input
|
|
569
628
|
}], backdropClass: [{
|
|
570
629
|
type: Input
|
|
571
630
|
}], panelClass: [{
|
|
@@ -579,11 +638,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
579
638
|
}] } });
|
|
580
639
|
|
|
581
640
|
class AXPopoverModule {
|
|
582
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
583
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
584
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
641
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
642
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXPopoverModule, imports: [CommonModule, AXPopoverComponent], exports: [AXPopoverComponent] }); }
|
|
643
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPopoverModule, imports: [CommonModule] }); }
|
|
585
644
|
}
|
|
586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPopoverModule, decorators: [{
|
|
587
646
|
type: NgModule,
|
|
588
647
|
args: [{
|
|
589
648
|
imports: [CommonModule, AXPopoverComponent],
|