@acorex/components 21.0.1-next.11 → 21.0.1-next.13
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 +19 -41
- package/button-group/index.d.ts +6 -4
- package/chips/index.d.ts +3 -8
- package/collapse/index.d.ts +4 -6
- package/conversation2/README.md +31 -71
- package/conversation2/index.d.ts +35 -36
- package/data-table/index.d.ts +4 -253
- package/dialog/index.d.ts +15 -19
- package/dropdown/index.d.ts +4 -3
- package/fesm2022/acorex-components-accordion.mjs +8 -13
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +93 -141
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +6 -6
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +5 -4
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +3 -3
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +3 -3
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +2 -2
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +2 -2
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +15 -11
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +5 -5
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +4 -4
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +3 -3
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +6 -8
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +6 -4
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +13 -10
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +2 -2
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +2 -2
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +2 -2
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +8 -8
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +2 -2
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +155 -161
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +2 -2
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +16 -452
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +2 -2
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +2 -2
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +10 -12
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +20 -13
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +47 -67
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +6 -7
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +2 -2
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +13 -12
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +4 -4
- package/fesm2022/acorex-components-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +17 -9
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +4 -5
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +18 -18
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +2 -2
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +2 -2
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +6 -4
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +25 -7
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +2 -2
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +36 -73
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +8 -8
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +2 -2
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +10 -10
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +6 -27
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs → acorex-components-modal-acorex-components-modal-BnUdtPke.mjs} +5 -29
- package/fesm2022/acorex-components-modal-acorex-components-modal-BnUdtPke.mjs.map +1 -0
- package/fesm2022/{acorex-components-modal-modal-content.component-CSJU1vRi.mjs → acorex-components-modal-modal-content.component-Cgq-wx_m.mjs} +7 -5
- package/fesm2022/acorex-components-modal-modal-content.component-Cgq-wx_m.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +3 -3
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +250 -374
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box-legacy.mjs +2 -2
- package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +2 -2
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +2 -2
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +14 -19
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +4 -4
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +2 -2
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +2 -2
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +6 -6
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +175 -136
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +105 -308
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +5 -3
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +2 -2
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +2 -2
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +2 -2
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +27 -25
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +3 -3
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +14 -29
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +2 -2
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +2 -2
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +2 -2
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +18 -18
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +9 -3
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +4 -2
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +4 -4
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +63 -14
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +2 -2
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +5 -5
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +2 -2
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +2 -2
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +4 -4
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +2 -2
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +2 -2
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +3 -3
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +2 -2
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +2 -2
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +4 -4
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +125 -233
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +2 -2
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +12 -12
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +6 -6
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +2 -2
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +12 -12
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/grid-layout-builder/index.d.ts +1 -2
- package/kbd/index.d.ts +13 -7
- package/loading/index.d.ts +1 -1
- package/loading-dialog/index.d.ts +15 -31
- package/menu/index.d.ts +0 -4
- package/modal/index.d.ts +0 -7
- package/notification/index.d.ts +30 -47
- package/package.json +7 -7
- package/paint/index.d.ts +1 -6
- package/popover/index.d.ts +27 -20
- package/popup/index.d.ts +27 -104
- package/rate-picker/index.d.ts +5 -15
- package/side-menu/index.d.ts +9 -2
- package/slider/index.d.ts +2 -2
- package/toast/index.d.ts +18 -24
- package/tooltip/index.d.ts +2 -2
- package/fesm2022/acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-modal-content.component-CSJU1vRi.mjs.map +0 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { MXBaseComponent, AXComponent, AXClosableComponent, AXFocusableComponent } from '@acorex/cdk/common';
|
|
2
2
|
import { AXDecoratorGenericComponent, AXDecoratorCloseButtonComponent } from '@acorex/components/decorators';
|
|
3
3
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
4
|
-
import {
|
|
4
|
+
import { Dialog, DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';
|
|
5
|
+
import { TemplatePortal, ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
|
6
|
+
import { isPlatformBrowser, AsyncPipe } from '@angular/common';
|
|
5
7
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { inject, Injectable,
|
|
7
|
-
import {
|
|
8
|
+
import { inject, Injectable, DOCUMENT, PLATFORM_ID, Renderer2, signal, TemplateRef, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
9
|
+
import { GlobalPositionStrategy } from '@angular/cdk/overlay';
|
|
8
10
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
9
11
|
|
|
10
12
|
class AXActionSheetService {
|
|
11
13
|
constructor() {
|
|
12
|
-
this.
|
|
14
|
+
this.dialog = inject(Dialog);
|
|
13
15
|
this.actionSheetEvent = new Subject();
|
|
14
16
|
this.actionSheetEvent$ = this.actionSheetEvent.asObservable();
|
|
15
17
|
}
|
|
@@ -40,7 +42,7 @@ class AXActionSheetService {
|
|
|
40
42
|
* });
|
|
41
43
|
* ```
|
|
42
44
|
*/
|
|
43
|
-
|
|
45
|
+
open(config, isUserInteraction = true) {
|
|
44
46
|
const defaultConfig = {
|
|
45
47
|
title: 'action-sheet.title',
|
|
46
48
|
closeButton: true,
|
|
@@ -48,63 +50,53 @@ class AXActionSheetService {
|
|
|
48
50
|
header: true,
|
|
49
51
|
};
|
|
50
52
|
config = Object.assign(defaultConfig, config);
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
closed.next({});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
const overlayRef = await this.overlayService.create(AXActionSheetComponent, {
|
|
65
|
-
inputs: {
|
|
66
|
-
data: config,
|
|
67
|
-
onClose: closeActionSheet,
|
|
68
|
-
},
|
|
69
|
-
centered: false,
|
|
53
|
+
const dialogRef = this.dialog.open(AXActionSheetComponent, {
|
|
54
|
+
data: config,
|
|
55
|
+
autoFocus: 'first-tabbable',
|
|
56
|
+
restoreFocus: true,
|
|
57
|
+
role: 'dialog',
|
|
58
|
+
ariaModal: true,
|
|
59
|
+
closeOnNavigation: true,
|
|
60
|
+
closeOnDestroy: true,
|
|
61
|
+
hasBackdrop: true,
|
|
70
62
|
panelClass: ['ax-action-sheet-panel'],
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
background: true,
|
|
74
|
-
closeOnClick: config.closeOnBackdropClick,
|
|
75
|
-
},
|
|
76
|
-
onDispose: () => {
|
|
77
|
-
// Clean up when disposed externally (e.g., backdrop click)
|
|
78
|
-
closed.next({});
|
|
79
|
-
},
|
|
63
|
+
disableClose: true,
|
|
64
|
+
positionStrategy: new GlobalPositionStrategy().centerHorizontally().bottom(),
|
|
80
65
|
});
|
|
81
|
-
internalRef = {
|
|
82
|
-
overlayRef,
|
|
83
|
-
close: closeActionSheet,
|
|
84
|
-
};
|
|
85
|
-
// Set the overlayRef input after creation
|
|
86
|
-
if (overlayRef.instance && 'setInput' in overlayRef.instance) {
|
|
87
|
-
overlayRef.instance.setInput('overlayRef', overlayRef);
|
|
88
|
-
}
|
|
89
|
-
// Positioning is handled by CSS via .ax-action-sheet-panel class
|
|
90
66
|
this.actionSheetEvent.next({
|
|
91
|
-
|
|
67
|
+
dialogRef,
|
|
92
68
|
data: { state: 'open' },
|
|
93
69
|
isUserInteraction,
|
|
94
70
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
99
|
-
|
|
71
|
+
if (config.closeOnBackdropClick) {
|
|
72
|
+
dialogRef.backdropClick.subscribe(() => {
|
|
73
|
+
const componentInstance = dialogRef.componentInstance;
|
|
74
|
+
if (componentInstance) {
|
|
75
|
+
componentInstance.close();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const promise = new Promise((resolve) => {
|
|
80
|
+
const closed = new BehaviorSubject(null);
|
|
81
|
+
const axDialogRef = {
|
|
82
|
+
close: (e) => {
|
|
83
|
+
dialogRef.close(e);
|
|
84
|
+
},
|
|
85
|
+
closed,
|
|
86
|
+
};
|
|
87
|
+
dialogRef.closed.subscribe((c) => {
|
|
88
|
+
if (c?.data) {
|
|
89
|
+
closed.next({ data: c.data });
|
|
100
90
|
}
|
|
101
91
|
else {
|
|
102
|
-
|
|
92
|
+
closed.next({});
|
|
103
93
|
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
94
|
+
});
|
|
95
|
+
if (resolve) {
|
|
96
|
+
resolve(axDialogRef);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return promise;
|
|
108
100
|
}
|
|
109
101
|
/**
|
|
110
102
|
* Sets the current state of action sheet events.
|
|
@@ -113,7 +105,7 @@ class AXActionSheetService {
|
|
|
113
105
|
* observable for external subscribers to monitor action sheet state changes.
|
|
114
106
|
*
|
|
115
107
|
* @param event - The action sheet event to emit. Contains information about the event type,
|
|
116
|
-
* associated data, user interaction status, and
|
|
108
|
+
* associated data, user interaction status, and dialog reference.
|
|
117
109
|
* @returns void
|
|
118
110
|
*/
|
|
119
111
|
setActionSheetEventState(event) {
|
|
@@ -137,12 +129,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
137
129
|
class AXActionSheetComponent extends MXBaseComponent {
|
|
138
130
|
constructor() {
|
|
139
131
|
super(...arguments);
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
/** @internal Callback function to close the action sheet */
|
|
143
|
-
this.onClose = input(...(ngDevMode ? [undefined, { debugName: "onClose" }] : []));
|
|
144
|
-
/** @internal Overlay reference for event tracking */
|
|
145
|
-
this.overlayRef = input(...(ngDevMode ? [undefined, { debugName: "overlayRef" }] : []));
|
|
132
|
+
this.data = inject(DIALOG_DATA);
|
|
133
|
+
this.dialogRef = inject(DialogRef);
|
|
146
134
|
this.document = inject(DOCUMENT);
|
|
147
135
|
this.platformID = inject(PLATFORM_ID);
|
|
148
136
|
this.renderer = inject(Renderer2);
|
|
@@ -157,50 +145,26 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
157
145
|
this.actionSheetHeight = signal(0, ...(ngDevMode ? [{ debugName: "actionSheetHeight" }] : []));
|
|
158
146
|
this.isActionSheetHeightSet = signal(false, ...(ngDevMode ? [{ debugName: "isActionSheetHeightSet" }] : []));
|
|
159
147
|
this.transitionDuration = signal(300, ...(ngDevMode ? [{ debugName: "transitionDuration" }] : []));
|
|
160
|
-
/** Template content if data.content is a TemplateRef */
|
|
161
|
-
this.templateContent = computed(() => {
|
|
162
|
-
const content = this.data().content;
|
|
163
|
-
return content instanceof TemplateRef ? content : null;
|
|
164
|
-
}, ...(ngDevMode ? [{ debugName: "templateContent" }] : []));
|
|
165
|
-
/** Component content if data.content is a component Type */
|
|
166
|
-
this.componentContent = computed(() => {
|
|
167
|
-
const content = this.data().content;
|
|
168
|
-
return typeof content === 'function' ? content : null;
|
|
169
|
-
}, ...(ngDevMode ? [{ debugName: "componentContent" }] : []));
|
|
170
|
-
/** Template context for ngTemplateOutlet */
|
|
171
|
-
this.templateContext = computed(() => ({
|
|
172
|
-
$implicit: this.data(),
|
|
173
|
-
ref: this,
|
|
174
|
-
}), ...(ngDevMode ? [{ debugName: "templateContext" }] : []));
|
|
175
148
|
}
|
|
176
149
|
/**
|
|
177
150
|
* @ignore
|
|
178
151
|
*/
|
|
179
152
|
ngOnInit() {
|
|
180
153
|
super.ngOnInit();
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
// Use requestAnimationFrame to ensure the initial height is applied before animating
|
|
187
|
-
requestAnimationFrame(() => {
|
|
188
|
-
hostElement.style.transitionDuration = `${this.transitionDuration()}ms`;
|
|
189
|
-
hostElement.style.height = 'auto';
|
|
190
|
-
// Get the natural height
|
|
191
|
-
const naturalHeight = hostElement.scrollHeight;
|
|
192
|
-
hostElement.style.height = '0';
|
|
193
|
-
requestAnimationFrame(() => {
|
|
194
|
-
hostElement.style.height = `${naturalHeight}px`;
|
|
195
|
-
// After animation completes, set height to auto for flexibility
|
|
196
|
-
setTimeout(() => {
|
|
197
|
-
hostElement.style.height = 'auto';
|
|
198
|
-
hostElement.style.overflow = '';
|
|
199
|
-
}, this.transitionDuration());
|
|
154
|
+
if (this.data.content) {
|
|
155
|
+
if (this.data.content instanceof TemplateRef) {
|
|
156
|
+
this._selectedPortal = new TemplatePortal(this.data.content, this.getViewContainer(), {
|
|
157
|
+
$implicit: this.data,
|
|
158
|
+
ref: this,
|
|
200
159
|
});
|
|
201
|
-
|
|
160
|
+
this.cdr.markForCheck();
|
|
161
|
+
}
|
|
162
|
+
else if (typeof this.data.content === 'function') {
|
|
163
|
+
this._selectedPortal = new ComponentPortal(this.data.content);
|
|
164
|
+
this.cdr.markForCheck();
|
|
165
|
+
}
|
|
202
166
|
}
|
|
203
|
-
if (isPlatformBrowser(this.platformID) && this.data
|
|
167
|
+
if (isPlatformBrowser(this.platformID) && this.data.draggable) {
|
|
204
168
|
this.onMouseMoveListenerFn = this.renderer.listen(this.document, 'mousemove', (e) => {
|
|
205
169
|
if (this.isDragging()) {
|
|
206
170
|
e.preventDefault();
|
|
@@ -220,7 +184,7 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
220
184
|
nativeEvent: e,
|
|
221
185
|
data: { state: 'dragEnd' },
|
|
222
186
|
isUserInteraction: true,
|
|
223
|
-
|
|
187
|
+
dialogRef: this.dialogRef,
|
|
224
188
|
});
|
|
225
189
|
this.snapToFinalPosition();
|
|
226
190
|
}
|
|
@@ -232,7 +196,7 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
232
196
|
nativeEvent: e,
|
|
233
197
|
data: { state: 'dragEnd' },
|
|
234
198
|
isUserInteraction: true,
|
|
235
|
-
|
|
199
|
+
dialogRef: this.dialogRef,
|
|
236
200
|
});
|
|
237
201
|
this.snapToFinalPosition();
|
|
238
202
|
}
|
|
@@ -246,26 +210,26 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
246
210
|
this.onTouchUpListenerFn();
|
|
247
211
|
}
|
|
248
212
|
handleMouseDown(e) {
|
|
249
|
-
if (!this.data
|
|
213
|
+
if (!this.data.draggable || e.button !== 0)
|
|
250
214
|
return;
|
|
251
215
|
e.preventDefault();
|
|
252
216
|
this.actionSheetService.setActionSheetEventState({
|
|
253
217
|
nativeEvent: e,
|
|
254
218
|
data: { state: 'dragStart' },
|
|
255
219
|
isUserInteraction: true,
|
|
256
|
-
|
|
220
|
+
dialogRef: this.dialogRef,
|
|
257
221
|
});
|
|
258
222
|
this.handleDown(e.clientY);
|
|
259
223
|
}
|
|
260
224
|
handleTouchDown(e) {
|
|
261
|
-
if (!this.data
|
|
225
|
+
if (!this.data.draggable || e.target.className.includes('close'))
|
|
262
226
|
return;
|
|
263
227
|
e.preventDefault();
|
|
264
228
|
this.actionSheetService.setActionSheetEventState({
|
|
265
229
|
nativeEvent: e,
|
|
266
230
|
data: { state: 'dragStart' },
|
|
267
231
|
isUserInteraction: true,
|
|
268
|
-
|
|
232
|
+
dialogRef: this.dialogRef,
|
|
269
233
|
});
|
|
270
234
|
this.handleDown(e.touches[0].clientY);
|
|
271
235
|
}
|
|
@@ -295,18 +259,18 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
295
259
|
this.actionSheetService.setActionSheetEventState({
|
|
296
260
|
data: { state: 'normalSize' },
|
|
297
261
|
isUserInteraction: true,
|
|
298
|
-
|
|
262
|
+
dialogRef: this.dialogRef,
|
|
299
263
|
});
|
|
300
264
|
return;
|
|
301
265
|
}
|
|
302
|
-
if (this.data
|
|
266
|
+
if (this.data.dragUp && currentHeight > (windowHeight + initialHeight) / 3) {
|
|
303
267
|
this.getHostElement().style.height = '100vh';
|
|
304
268
|
this.isFullScreen.set(true);
|
|
305
269
|
this.document.body.parentElement.style.overscrollBehaviorY = 'contain';
|
|
306
270
|
this.actionSheetService.setActionSheetEventState({
|
|
307
271
|
data: { state: 'fullScreen' },
|
|
308
272
|
isUserInteraction: true,
|
|
309
|
-
|
|
273
|
+
dialogRef: this.dialogRef,
|
|
310
274
|
});
|
|
311
275
|
return;
|
|
312
276
|
}
|
|
@@ -314,11 +278,11 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
314
278
|
this.actionSheetService.setActionSheetEventState({
|
|
315
279
|
data: { state: 'normalSize' },
|
|
316
280
|
isUserInteraction: true,
|
|
317
|
-
|
|
281
|
+
dialogRef: this.dialogRef,
|
|
318
282
|
});
|
|
319
283
|
}
|
|
320
284
|
heightCalculator(clientY) {
|
|
321
|
-
if (this.data
|
|
285
|
+
if (this.data.dragUp) {
|
|
322
286
|
return this.document.documentElement.clientHeight - clientY;
|
|
323
287
|
}
|
|
324
288
|
if (clientY >= this.document.documentElement.clientHeight - this.actionSheetHeight()) {
|
|
@@ -326,17 +290,14 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
326
290
|
}
|
|
327
291
|
return (this.actionSheetHeight() + (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10);
|
|
328
292
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
this._componentRef = componentRef.instance;
|
|
335
|
-
Object.assign(this._componentRef, this.data());
|
|
293
|
+
handleAttched(ref) {
|
|
294
|
+
ref = ref;
|
|
295
|
+
if (ref.instance) {
|
|
296
|
+
this._componentRef = ref.instance;
|
|
297
|
+
Object.assign(this._componentRef, this.data);
|
|
336
298
|
Object.assign(this._componentRef, { _isPopup: true });
|
|
337
|
-
if (
|
|
338
|
-
.onClosed) {
|
|
339
|
-
componentRef.instance.onClosed.subscribe((e) => {
|
|
299
|
+
if (ref.instance.onClosed) {
|
|
300
|
+
ref.instance.onClosed.subscribe((e) => {
|
|
340
301
|
this.close(e);
|
|
341
302
|
});
|
|
342
303
|
}
|
|
@@ -375,16 +336,13 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
375
336
|
this.actionSheetService.setActionSheetEventState({
|
|
376
337
|
data: { state: 'close' },
|
|
377
338
|
isUserInteraction,
|
|
378
|
-
|
|
339
|
+
dialogRef: this.dialogRef,
|
|
340
|
+
});
|
|
341
|
+
this.dialogRef.close({
|
|
342
|
+
component: this._componentRef,
|
|
343
|
+
htmlElement: this.getHostElement(),
|
|
344
|
+
data: e,
|
|
379
345
|
});
|
|
380
|
-
const closeCallback = this.onClose();
|
|
381
|
-
if (closeCallback) {
|
|
382
|
-
closeCallback({
|
|
383
|
-
component: this._componentRef,
|
|
384
|
-
htmlElement: this.getHostElement(),
|
|
385
|
-
data: e,
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
346
|
}, this.transitionDuration());
|
|
389
347
|
}
|
|
390
348
|
/**
|
|
@@ -392,12 +350,12 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
392
350
|
*/
|
|
393
351
|
onKeydownHandler() {
|
|
394
352
|
const focusedOrHasFocused = this.getHostElement().matches(':focus-within');
|
|
395
|
-
if (this.data
|
|
353
|
+
if (this.data.closeButton && focusedOrHasFocused) {
|
|
396
354
|
this.close(null);
|
|
397
355
|
}
|
|
398
356
|
}
|
|
399
357
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXActionSheetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
400
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXActionSheetComponent, isStandalone: true, selector: "ax-action-sheet",
|
|
358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXActionSheetComponent, isStandalone: true, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler()" } }, providers: [
|
|
401
359
|
{ provide: AXComponent, useExisting: AXActionSheetComponent },
|
|
402
360
|
{
|
|
403
361
|
provide: AXClosableComponent,
|
|
@@ -407,13 +365,11 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
407
365
|
provide: AXFocusableComponent,
|
|
408
366
|
useExisting: AXActionSheetComponent,
|
|
409
367
|
},
|
|
410
|
-
], usesInheritance: true, ngImport: i0, template: "@if (data
|
|
368
|
+
], usesInheritance: true, ngImport: i0, template: "@if (data.draggable) {\n <div (mousedown)=\"handleMouseDown($event)\" (touchstart)=\"handleTouchDown($event)\" class=\"ax-drag-handle-container\">\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data.header) {\n <ax-header\n [class.draggable-header]=\"data.draggable\"\n (mousedown)=\"data.draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data.draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data.title | translate | async }}</ax-title>\n\n @if (data.subTitle) {\n <ax-subtitle>\n {{ data.subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data.closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (this.data.content) {\n <div class=\"ax-custom-template-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"handleAttched($event)\"></ng-template>\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data.items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'default' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer components{ax-action-sheet{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:100vw;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));display:block;position:relative}@media (min-width:48rem){ax-action-sheet{width:70vw}}@media (min-width:64rem){ax-action-sheet{width:50vw}}ax-action-sheet:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-action-sheet .ax-custom-template-container{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-drag-handle-container{padding-top:calc(var(--spacing,.25rem)*2)}ax-action-sheet .ax-drag-handle-container .ax-drag-handle{height:calc(var(--spacing,.25rem)*1);width:calc(var(--spacing,.25rem)*12);border-radius:var(--radius-lg,.5rem);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)));margin:auto}ax-action-sheet ax-header{border-bottom-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*4);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);border-bottom-width:1px}@media (min-width:48rem){ax-action-sheet ax-header{font-size:var(--text-lg,1.125rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75/1.125)))}}ax-action-sheet ax-header.draggable-header{padding-top:calc(var(--spacing,.25rem)*0);-webkit-user-select:none;user-select:none}ax-action-sheet ax-header ax-prefix,ax-action-sheet ax-header ax-suffix{flex-direction:column;justify-content:flex-start;display:flex}ax-action-sheet ax-header ax-prefix{align-items:flex-start}ax-action-sheet ax-header ax-prefix ax-title{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}ax-action-sheet ax-header ax-suffix{align-items:flex-end;max-width:fit-content}ax-action-sheet .ax-action-list{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-action-list ax-title{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)))}ax-action-sheet .ax-action-list .ax-action-item{color:var(--ax-comp-bg);min-height:calc(var(--spacing,.25rem)*14)!important;font-size:var(--text-base,1rem)!important;line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ))!important}ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:var(--ax-comp-bg)!important}@supports (color:color-mix(in lab,red,red)){ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:color-mix(in oklab,var(--ax-comp-bg)10%,transparent)!important}}ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover:not(ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-selected){background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)))!important}ax-action-sheet .ax-action-list .ax-action-item .ax-item-icon{font-size:var(--text-2xl,1.5rem)!important;line-height:var(--tw-leading,var(--text-2xl--line-height,calc(2/1.5)))!important;margin-inline-end:calc(var(--spacing,.25rem)*3)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
411
369
|
}
|
|
412
370
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXActionSheetComponent, decorators: [{
|
|
413
371
|
type: Component,
|
|
414
|
-
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None,
|
|
415
|
-
'(keydown.escape)': 'onKeydownHandler()',
|
|
416
|
-
}, providers: [
|
|
372
|
+
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
417
373
|
{ provide: AXComponent, useExisting: AXActionSheetComponent },
|
|
418
374
|
{
|
|
419
375
|
provide: AXClosableComponent,
|
|
@@ -423,15 +379,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
423
379
|
provide: AXFocusableComponent,
|
|
424
380
|
useExisting: AXActionSheetComponent,
|
|
425
381
|
},
|
|
426
|
-
], imports: [
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
AXTranslatorPipe,
|
|
432
|
-
AsyncPipe,
|
|
433
|
-
], template: "@if (data().draggable) {\n <div (mousedown)=\"handleMouseDown($event)\" (touchstart)=\"handleTouchDown($event)\" class=\"ax-drag-handle-container\">\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data().header) {\n <ax-header\n [class.draggable-header]=\"data().draggable\"\n (mousedown)=\"data().draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data().draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data().title | translate | async }}</ax-title>\n\n @if (data().subTitle) {\n <ax-subtitle>\n {{ data().subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data().closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (data().content) {\n <div class=\"ax-custom-template-container\">\n @if (templateContent()) {\n <ng-container *ngTemplateOutlet=\"templateContent(); context: templateContext()\"></ng-container>\n } @else if (componentContent()) {\n <ng-container *ngComponentOutlet=\"componentContent()\"></ng-container>\n }\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data().items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'default' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n", styles: ["ax-action-sheet{--ax-comp-action-sheet-bg-color: var(--ax-sys-color-lightest-surface)}ax-action-sheet .ax-action-item.ax-primary{--ax-comp-action-sheet-text-color: var(--ax-sys-color-primary-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-primary-surface), .1}ax-action-sheet .ax-action-item.ax-secondary{--ax-comp-action-sheet-text-color: var(--ax-sys-color-secondary-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-secondary-surface), .1}ax-action-sheet .ax-action-item.ax-success{--ax-comp-action-sheet-text-color: var(--ax-sys-color-success-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-success-surface), .1}ax-action-sheet .ax-action-item.ax-warning{--ax-comp-action-sheet-text-color: var(--ax-sys-color-warning-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-warning-surface), .1}ax-action-sheet .ax-action-item.ax-danger{--ax-comp-action-sheet-text-color: var(--ax-sys-color-danger-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-danger-surface), .1}ax-action-sheet .ax-action-item.ax-accent1{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent1-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent1-surface), .1}ax-action-sheet .ax-action-item.ax-accent2{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent2-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent2-surface), .1}ax-action-sheet .ax-action-item.ax-accent3{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent3-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent3-surface), .1}ax-action-sheet .ax-action-item.ax-accent4{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent4-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent4-surface), .1}ax-action-sheet .ax-action-item.ax-accent5{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent5-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent5-surface), .1}ax-action-sheet .ax-action-item.ax-accent6{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent6-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent6-surface), .1}ax-action-sheet .ax-action-item.ax-accent7{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent7-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent7-surface), .1}.ax-action-sheet-panel{position:fixed!important;bottom:0!important;left:50%!important;transform:translate(-50%)!important;top:auto!important;right:auto!important;width:auto!important;height:auto!important;display:block!important;align-items:unset!important;justify-content:unset!important;max-width:none!important}ax-action-sheet{display:block;width:var(--ax-comp-action-sheet-width-sm, 100vw);position:relative;transition-property:height;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function);background-color:rgba(var(--ax-comp-action-sheet-bg-color))}@media (min-width: 768px){ax-action-sheet{width:var(--ax-comp-action-sheet-width-md, 70vw)}}@media (min-width: 1024px){ax-action-sheet{width:var(--ax-comp-action-sheet-width-lg, 50vw)}}ax-action-sheet .ax-custom-template-container{overflow-y:auto;max-height:100vh}ax-action-sheet .ax-drag-handle-container{padding-top:.5rem}ax-action-sheet .ax-drag-handle-container .ax-drag-handle{height:.375rem;width:3rem;margin:auto;border-radius:.5rem;background-color:rgba(var(--ax-sys-color-surface))}ax-action-sheet ax-header{padding:1rem;border-bottom-width:1px;font-size:1rem;line-height:1.5rem;font-weight:500}@media (min-width: 768px){ax-action-sheet ax-header{font-size:1.125rem;line-height:1.75rem}}ax-action-sheet ax-header.draggable-header{padding-top:0;-webkit-user-select:none;user-select:none}ax-action-sheet ax-header ax-prefix,ax-action-sheet ax-header ax-suffix{display:flex;flex-direction:column;justify-content:flex-start}ax-action-sheet ax-header ax-prefix{align-items:flex-start}ax-action-sheet ax-header ax-prefix ax-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;line-clamp:1;-webkit-line-clamp:1}ax-action-sheet ax-header ax-suffix{align-items:flex-end;max-width:fit-content}ax-action-sheet .ax-action-list{overflow-y:auto;max-height:100vh}ax-action-sheet .ax-action-list ax-title{font-size:.875rem}ax-action-sheet .ax-action-list .ax-action-item{min-height:3.5rem!important;font-size:1rem!important;color:rgba(var(--ax-comp-action-sheet-text-color))}ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:rgba(var(--ax-comp-action-sheet-hover-bg-color, var(--ax-sys-color-surface)))!important}ax-action-sheet .ax-action-list .ax-action-item .ax-item-icon{margin-inline-end:.75rem!important;font-size:1.5rem!important;line-height:2rem!important}.ax-dark ax-action-sheet{--ax-comp-action-sheet-bg-color: var(--ax-sys-color-darker-surface)}\n"] }]
|
|
434
|
-
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], onClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "onClose", required: false }] }], overlayRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayRef", required: false }] }] } });
|
|
382
|
+
], imports: [AXDecoratorGenericComponent, AXDecoratorCloseButtonComponent, CdkPortalOutlet, AXTranslatorPipe, AsyncPipe], template: "@if (data.draggable) {\n <div (mousedown)=\"handleMouseDown($event)\" (touchstart)=\"handleTouchDown($event)\" class=\"ax-drag-handle-container\">\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data.header) {\n <ax-header\n [class.draggable-header]=\"data.draggable\"\n (mousedown)=\"data.draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data.draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data.title | translate | async }}</ax-title>\n\n @if (data.subTitle) {\n <ax-subtitle>\n {{ data.subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data.closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (this.data.content) {\n <div class=\"ax-custom-template-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"handleAttched($event)\"></ng-template>\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data.items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'default' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer components{ax-action-sheet{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:100vw;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));display:block;position:relative}@media (min-width:48rem){ax-action-sheet{width:70vw}}@media (min-width:64rem){ax-action-sheet{width:50vw}}ax-action-sheet:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-action-sheet .ax-custom-template-container{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-drag-handle-container{padding-top:calc(var(--spacing,.25rem)*2)}ax-action-sheet .ax-drag-handle-container .ax-drag-handle{height:calc(var(--spacing,.25rem)*1);width:calc(var(--spacing,.25rem)*12);border-radius:var(--radius-lg,.5rem);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)));margin:auto}ax-action-sheet ax-header{border-bottom-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*4);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);border-bottom-width:1px}@media (min-width:48rem){ax-action-sheet ax-header{font-size:var(--text-lg,1.125rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75/1.125)))}}ax-action-sheet ax-header.draggable-header{padding-top:calc(var(--spacing,.25rem)*0);-webkit-user-select:none;user-select:none}ax-action-sheet ax-header ax-prefix,ax-action-sheet ax-header ax-suffix{flex-direction:column;justify-content:flex-start;display:flex}ax-action-sheet ax-header ax-prefix{align-items:flex-start}ax-action-sheet ax-header ax-prefix ax-title{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}ax-action-sheet ax-header ax-suffix{align-items:flex-end;max-width:fit-content}ax-action-sheet .ax-action-list{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-action-list ax-title{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)))}ax-action-sheet .ax-action-list .ax-action-item{color:var(--ax-comp-bg);min-height:calc(var(--spacing,.25rem)*14)!important;font-size:var(--text-base,1rem)!important;line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ))!important}ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:var(--ax-comp-bg)!important}@supports (color:color-mix(in lab,red,red)){ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:color-mix(in oklab,var(--ax-comp-bg)10%,transparent)!important}}ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover:not(ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-selected){background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)))!important}ax-action-sheet .ax-action-list .ax-action-item .ax-item-icon{font-size:var(--text-2xl,1.5rem)!important;line-height:var(--tw-leading,var(--text-2xl--line-height,calc(2/1.5)))!important;margin-inline-end:calc(var(--spacing,.25rem)*3)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"] }]
|
|
383
|
+
}], propDecorators: { onKeydownHandler: [{
|
|
384
|
+
type: HostListener,
|
|
385
|
+
args: ['keydown.escape']
|
|
386
|
+
}] } });
|
|
435
387
|
|
|
436
388
|
class AXActionSheetModule {
|
|
437
389
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXActionSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|