@acorex/components 21.0.1-next.17 → 21.0.1-next.19
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/action-sheet/index.d.ts +92 -32
- package/fesm2022/acorex-components-accordion.mjs +10 -10
- package/fesm2022/acorex-components-action-sheet.mjs +169 -51
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +7 -7
- package/fesm2022/acorex-components-aspect-ratio.mjs +3 -3
- package/fesm2022/acorex-components-audio-wave.mjs +7 -7
- package/fesm2022/acorex-components-autocomplete.mjs +7 -7
- package/fesm2022/acorex-components-avatar.mjs +10 -10
- package/fesm2022/acorex-components-badge.mjs +7 -7
- package/fesm2022/acorex-components-bottom-navigation.mjs +10 -10
- package/fesm2022/acorex-components-breadcrumbs.mjs +10 -10
- package/fesm2022/acorex-components-button-group.mjs +10 -10
- package/fesm2022/acorex-components-button.mjs +13 -13
- package/fesm2022/acorex-components-calendar.mjs +13 -13
- package/fesm2022/acorex-components-check-box.mjs +7 -7
- package/fesm2022/acorex-components-chips.mjs +7 -7
- package/fesm2022/acorex-components-circular-progress.mjs +7 -7
- package/fesm2022/acorex-components-code-editor.mjs +10 -10
- package/fesm2022/acorex-components-collapse.mjs +10 -10
- package/fesm2022/acorex-components-color-box.mjs +7 -7
- package/fesm2022/acorex-components-color-palette.mjs +28 -28
- package/fesm2022/acorex-components-command.mjs +7 -7
- package/fesm2022/acorex-components-comment.mjs +28 -28
- package/fesm2022/acorex-components-conversation.mjs +49 -49
- package/fesm2022/acorex-components-conversation2.mjs +184 -184
- package/fesm2022/acorex-components-cron-job.mjs +46 -46
- package/fesm2022/acorex-components-data-list.mjs +3 -3
- package/fesm2022/acorex-components-data-pager.mjs +31 -31
- package/fesm2022/acorex-components-data-table.mjs +34 -34
- package/fesm2022/acorex-components-datetime-box.mjs +7 -7
- package/fesm2022/acorex-components-datetime-input.mjs +7 -7
- package/fesm2022/acorex-components-datetime-picker.mjs +7 -7
- package/fesm2022/acorex-components-decorators.mjs +25 -25
- package/fesm2022/acorex-components-dialog.mjs +10 -10
- package/fesm2022/acorex-components-drawer-legacy.mjs +13 -13
- package/fesm2022/acorex-components-drawer.mjs +10 -10
- package/fesm2022/acorex-components-dropdown-button.mjs +7 -7
- package/fesm2022/acorex-components-dropdown.mjs +15 -15
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +7 -7
- package/fesm2022/acorex-components-file-explorer.mjs +25 -25
- package/fesm2022/acorex-components-flow-chart.mjs +16 -16
- package/fesm2022/acorex-components-form.mjs +16 -16
- package/fesm2022/acorex-components-grid-layout-builder.mjs +10 -10
- package/fesm2022/acorex-components-image-editor.mjs +34 -34
- package/fesm2022/acorex-components-image.mjs +7 -7
- package/fesm2022/acorex-components-json-viewer.mjs +7 -7
- package/fesm2022/acorex-components-kanban.mjs +3 -3
- package/fesm2022/acorex-components-kbd.mjs +6 -6
- package/fesm2022/acorex-components-label.mjs +7 -7
- package/fesm2022/acorex-components-list.mjs +7 -7
- package/fesm2022/acorex-components-loading-dialog.mjs +10 -10
- package/fesm2022/acorex-components-loading.mjs +16 -16
- package/fesm2022/acorex-components-map.mjs +13 -13
- package/fesm2022/acorex-components-media-viewer.mjs +34 -34
- package/fesm2022/acorex-components-menu.mjs +16 -16
- package/fesm2022/{acorex-components-modal-acorex-components-modal-CGfi_Wxa.mjs → acorex-components-modal-acorex-components-modal-BajlPo_n.mjs} +21 -21
- package/fesm2022/{acorex-components-modal-acorex-components-modal-CGfi_Wxa.mjs.map → acorex-components-modal-acorex-components-modal-BajlPo_n.mjs.map} +1 -1
- package/fesm2022/{acorex-components-modal-modal-content.component-BCxvFqL1.mjs → acorex-components-modal-modal-content.component-BVrBX4Qf.mjs} +5 -5
- package/fesm2022/{acorex-components-modal-modal-content.component-BCxvFqL1.mjs.map → acorex-components-modal-modal-content.component-BVrBX4Qf.mjs.map} +1 -1
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +7 -7
- package/fesm2022/acorex-components-notification.mjs +10 -10
- package/fesm2022/acorex-components-number-box-legacy.mjs +7 -7
- package/fesm2022/acorex-components-number-box.mjs +7 -7
- package/fesm2022/acorex-components-otp.mjs +7 -7
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-paint.mjs +25 -25
- package/fesm2022/acorex-components-password-box.mjs +10 -10
- package/fesm2022/acorex-components-pdf-reader.mjs +7 -7
- package/fesm2022/acorex-components-phone-box.mjs +7 -7
- package/fesm2022/acorex-components-picker.mjs +13 -13
- package/fesm2022/acorex-components-popover.mjs +8 -7
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +13 -13
- package/fesm2022/acorex-components-progress-bar.mjs +7 -7
- package/fesm2022/acorex-components-qrcode.mjs +7 -7
- package/fesm2022/acorex-components-query-builder.mjs +7 -7
- package/fesm2022/acorex-components-radio.mjs +7 -7
- package/fesm2022/acorex-components-rail-navigation.mjs +13 -13
- package/fesm2022/acorex-components-range-slider.mjs +7 -7
- package/fesm2022/acorex-components-rate-picker.mjs +7 -7
- package/fesm2022/acorex-components-rest-api-generator.mjs +22 -22
- package/fesm2022/acorex-components-result.mjs +7 -7
- package/fesm2022/acorex-components-routing-progress.mjs +7 -7
- package/fesm2022/acorex-components-rrule.mjs +9 -9
- package/fesm2022/acorex-components-scheduler-picker.mjs +54 -54
- package/fesm2022/acorex-components-scheduler.mjs +34 -34
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-search-box.mjs +7 -7
- package/fesm2022/acorex-components-select-box.mjs +7 -7
- package/fesm2022/acorex-components-selection-list-2.mjs +7 -7
- package/fesm2022/acorex-components-selection-list.mjs +7 -7
- package/fesm2022/acorex-components-side-menu.mjs +13 -13
- package/fesm2022/acorex-components-skeleton.mjs +7 -7
- package/fesm2022/acorex-components-slider.mjs +7 -7
- package/fesm2022/acorex-components-sliding-item.mjs +13 -13
- package/fesm2022/acorex-components-step-wizard.mjs +13 -13
- package/fesm2022/acorex-components-switch.mjs +10 -10
- package/fesm2022/acorex-components-tabs.mjs +13 -13
- package/fesm2022/acorex-components-tag-box.mjs +7 -7
- package/fesm2022/acorex-components-tag.mjs +7 -7
- package/fesm2022/acorex-components-text-area.mjs +7 -7
- package/fesm2022/acorex-components-text-box.mjs +10 -10
- package/fesm2022/acorex-components-time-duration.mjs +7 -7
- package/fesm2022/acorex-components-time-line.mjs +10 -10
- package/fesm2022/acorex-components-toast.mjs +10 -10
- package/fesm2022/acorex-components-toolbar.mjs +7 -7
- package/fesm2022/acorex-components-tooltip.mjs +53 -56
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view-legacy.mjs +10 -10
- package/fesm2022/acorex-components-tree-view.mjs +10 -10
- package/fesm2022/acorex-components-uploader.mjs +13 -13
- package/fesm2022/acorex-components-video-player.mjs +7 -7
- package/fesm2022/acorex-components-wysiwyg.mjs +34 -34
- package/package.json +3 -3
- package/tooltip/index.d.ts +1 -3
|
@@ -1,11 +1,44 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Directive, inject, ComponentRef, Injectable, DOCUMENT, PLATFORM_ID, Renderer2, signal, computed, TemplateRef, ViewContainerRef, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
1
3
|
import { MXBaseComponent, AXComponent, AXClosableComponent, AXFocusableComponent } from '@acorex/cdk/common';
|
|
2
4
|
import { AXDecoratorGenericComponent, AXDecoratorCloseButtonComponent } from '@acorex/components/decorators';
|
|
3
5
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
4
|
-
import { isPlatformBrowser, NgTemplateOutlet,
|
|
5
|
-
import * as i0 from '@angular/core';
|
|
6
|
-
import { inject, Injectable, input, DOCUMENT, PLATFORM_ID, Renderer2, signal, computed, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
6
|
+
import { isPlatformBrowser, NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
7
7
|
import { AXOverlayService } from '@acorex/cdk/overlay';
|
|
8
|
-
import { Subject
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Base class for components that are displayed inside an action sheet.
|
|
12
|
+
* Extend this class to get access to the action sheet reference and helper methods.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* @Component({...})
|
|
17
|
+
* export class MyActionSheetContent extends AXActionSheetComponentBase {
|
|
18
|
+
* save() {
|
|
19
|
+
* this.close({ saved: true });
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
class AXActionSheetComponentBase {
|
|
25
|
+
constructor() {
|
|
26
|
+
/** Reference to the parent action sheet */
|
|
27
|
+
this.__actionSheet__ = input(...(ngDevMode ? [undefined, { debugName: "__actionSheet__" }] : []));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Closes the action sheet with optional result data.
|
|
31
|
+
* @param data - Optional data to pass to the close handler
|
|
32
|
+
*/
|
|
33
|
+
close(data = null) {
|
|
34
|
+
this.__actionSheet__()?.close(data);
|
|
35
|
+
}
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetComponentBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
37
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type: AXActionSheetComponentBase, isStandalone: true, inputs: { __actionSheet__: { classPropertyName: "__actionSheet__", publicName: "__actionSheet__", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetComponentBase, decorators: [{
|
|
40
|
+
type: Directive
|
|
41
|
+
}], propDecorators: { __actionSheet__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__actionSheet__", required: false }] }] } });
|
|
9
42
|
|
|
10
43
|
class AXActionSheetService {
|
|
11
44
|
constructor() {
|
|
@@ -24,17 +57,18 @@ class AXActionSheetService {
|
|
|
24
57
|
* @param isUserInteraction - Whether the action sheet is opened by user interaction (default: true).
|
|
25
58
|
* This affects how the action sheet handles accessibility and focus management.
|
|
26
59
|
* @returns A promise that resolves to a dialog reference containing methods to control the action sheet.
|
|
27
|
-
* The reference includes methods like close() and a closed observable for tracking dialog state.
|
|
60
|
+
* The reference includes methods like close(), setInputs() and a closed observable for tracking dialog state.
|
|
28
61
|
* @example
|
|
29
62
|
* ```typescript
|
|
30
63
|
* const dialogRef = await actionSheetService.open({
|
|
31
64
|
* title: 'Choose an option',
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* { text: 'Option 2', value: 'opt2' }
|
|
35
|
-
* ]
|
|
65
|
+
* content: MyCustomComponent,
|
|
66
|
+
* inputs: { userId: 123, userName: 'John' }
|
|
36
67
|
* });
|
|
37
68
|
*
|
|
69
|
+
* // Update inputs dynamically
|
|
70
|
+
* dialogRef.setInputs({ userName: 'Jane' });
|
|
71
|
+
*
|
|
38
72
|
* dialogRef.closed.subscribe(result => {
|
|
39
73
|
* console.log('Action sheet closed with:', result.data);
|
|
40
74
|
* });
|
|
@@ -48,23 +82,53 @@ class AXActionSheetService {
|
|
|
48
82
|
header: true,
|
|
49
83
|
};
|
|
50
84
|
config = Object.assign(defaultConfig, config);
|
|
51
|
-
const closed = new
|
|
85
|
+
const closed = new Subject();
|
|
86
|
+
const onClose = new Subject();
|
|
87
|
+
// Using let because internalRef is assigned after overlayRef is created
|
|
88
|
+
// eslint-disable-next-line prefer-const
|
|
52
89
|
let internalRef;
|
|
53
90
|
const closeActionSheet = (result) => {
|
|
54
91
|
if (internalRef) {
|
|
55
92
|
internalRef.overlayRef.dispose();
|
|
93
|
+
onClose.next(result?.data);
|
|
94
|
+
onClose.complete();
|
|
56
95
|
if (result?.data) {
|
|
57
96
|
closed.next({ data: result.data });
|
|
58
97
|
}
|
|
59
98
|
else {
|
|
60
99
|
closed.next({});
|
|
61
100
|
}
|
|
101
|
+
closed.complete();
|
|
62
102
|
}
|
|
63
103
|
};
|
|
104
|
+
// Create the action sheet reference that will be passed to content components
|
|
105
|
+
const actionSheetRef = {
|
|
106
|
+
close: (data) => {
|
|
107
|
+
const component = internalRef?.overlayRef.instance;
|
|
108
|
+
if (component && 'close' in component) {
|
|
109
|
+
component.close(data);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
closeActionSheet({ data });
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
setInputs: (values) => {
|
|
116
|
+
const ref = internalRef?.overlayRef.instance;
|
|
117
|
+
if (ref && ref instanceof ComponentRef) {
|
|
118
|
+
const componentInstance = ref.instance;
|
|
119
|
+
componentInstance.setContentInputs(values);
|
|
120
|
+
}
|
|
121
|
+
else if (ref && 'setContentInputs' in ref) {
|
|
122
|
+
ref.setContentInputs(values);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
onClose,
|
|
126
|
+
};
|
|
64
127
|
const overlayRef = await this.overlayService.create(AXActionSheetComponent, {
|
|
65
128
|
inputs: {
|
|
66
129
|
data: config,
|
|
67
130
|
onClose: closeActionSheet,
|
|
131
|
+
__actionSheetRef__: actionSheetRef,
|
|
68
132
|
},
|
|
69
133
|
centered: false,
|
|
70
134
|
panelClass: ['ax-action-sheet-panel'],
|
|
@@ -76,6 +140,7 @@ class AXActionSheetService {
|
|
|
76
140
|
onDispose: () => {
|
|
77
141
|
// Clean up when disposed externally (e.g., backdrop click)
|
|
78
142
|
closed.next({});
|
|
143
|
+
closed.complete();
|
|
79
144
|
},
|
|
80
145
|
});
|
|
81
146
|
internalRef = {
|
|
@@ -93,15 +158,8 @@ class AXActionSheetService {
|
|
|
93
158
|
isUserInteraction,
|
|
94
159
|
});
|
|
95
160
|
const axDialogRef = {
|
|
96
|
-
close:
|
|
97
|
-
|
|
98
|
-
if (component?.close) {
|
|
99
|
-
component.close(e);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
closeActionSheet({ data: e });
|
|
103
|
-
}
|
|
104
|
-
},
|
|
161
|
+
close: actionSheetRef.close,
|
|
162
|
+
setInputs: actionSheetRef.setInputs,
|
|
105
163
|
closed,
|
|
106
164
|
};
|
|
107
165
|
return axDialogRef;
|
|
@@ -119,10 +177,10 @@ class AXActionSheetService {
|
|
|
119
177
|
setActionSheetEventState(event) {
|
|
120
178
|
this.actionSheetEvent.next(event);
|
|
121
179
|
}
|
|
122
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
123
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
181
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetService, providedIn: 'root' }); }
|
|
124
182
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetService, decorators: [{
|
|
126
184
|
type: Injectable,
|
|
127
185
|
args: [{
|
|
128
186
|
providedIn: 'root',
|
|
@@ -143,6 +201,8 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
143
201
|
this.onClose = input(...(ngDevMode ? [undefined, { debugName: "onClose" }] : []));
|
|
144
202
|
/** @internal Overlay reference for event tracking */
|
|
145
203
|
this.overlayRef = input(...(ngDevMode ? [undefined, { debugName: "overlayRef" }] : []));
|
|
204
|
+
/** @internal Reference to the action sheet for content components */
|
|
205
|
+
this.__actionSheetRef__ = input(...(ngDevMode ? [undefined, { debugName: "__actionSheetRef__" }] : []));
|
|
146
206
|
this.document = inject(DOCUMENT);
|
|
147
207
|
this.platformID = inject(PLATFORM_ID);
|
|
148
208
|
this.renderer = inject(Renderer2);
|
|
@@ -157,6 +217,10 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
157
217
|
this.actionSheetHeight = signal(0, ...(ngDevMode ? [{ debugName: "actionSheetHeight" }] : []));
|
|
158
218
|
this.isActionSheetHeightSet = signal(false, ...(ngDevMode ? [{ debugName: "isActionSheetHeightSet" }] : []));
|
|
159
219
|
this.transitionDuration = signal(300, ...(ngDevMode ? [{ debugName: "transitionDuration" }] : []));
|
|
220
|
+
/**
|
|
221
|
+
* @ignore
|
|
222
|
+
*/
|
|
223
|
+
this._componentRef = null;
|
|
160
224
|
/** Template content if data.content is a TemplateRef */
|
|
161
225
|
this.templateContent = computed(() => {
|
|
162
226
|
const content = this.data().content;
|
|
@@ -172,6 +236,8 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
172
236
|
$implicit: this.data(),
|
|
173
237
|
ref: this,
|
|
174
238
|
}), ...(ngDevMode ? [{ debugName: "templateContext" }] : []));
|
|
239
|
+
/** Whether content has been rendered (for component content) */
|
|
240
|
+
this.isContentRendered = signal(false, ...(ngDevMode ? [{ debugName: "isContentRendered" }] : []));
|
|
175
241
|
}
|
|
176
242
|
/**
|
|
177
243
|
* @ignore
|
|
@@ -239,11 +305,77 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
239
305
|
});
|
|
240
306
|
}
|
|
241
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* @ignore
|
|
310
|
+
*/
|
|
311
|
+
ngAfterViewInit() {
|
|
312
|
+
// Render component content after view is initialized (ViewChild is available)
|
|
313
|
+
this.renderComponentContent();
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Renders the component content if provided.
|
|
317
|
+
* Uses ViewContainerRef to create the component and properly set inputs.
|
|
318
|
+
*/
|
|
319
|
+
renderComponentContent() {
|
|
320
|
+
const componentType = this.componentContent();
|
|
321
|
+
if (!componentType || !this.contentContainerRef)
|
|
322
|
+
return;
|
|
323
|
+
const config = this.data();
|
|
324
|
+
// Create the component using ViewContainerRef
|
|
325
|
+
const componentRef = this.contentContainerRef.createComponent(componentType);
|
|
326
|
+
this._componentRef = componentRef;
|
|
327
|
+
// Get component input definitions to check before setting inputs
|
|
328
|
+
const inputDefs = componentRef.componentType?.ɵcmp
|
|
329
|
+
?.inputs;
|
|
330
|
+
// Set data inputs (legacy support - deprecated)
|
|
331
|
+
if (config?.data && typeof config.data === 'object') {
|
|
332
|
+
Object.entries(config.data).forEach(([key, value]) => {
|
|
333
|
+
componentRef.instance[key] = value;
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
// Set inputs using setInput for proper change detection
|
|
337
|
+
if (config?.inputs && typeof config.inputs === 'object') {
|
|
338
|
+
Object.entries(config.inputs).forEach(([key, value]) => {
|
|
339
|
+
if (inputDefs && key in inputDefs) {
|
|
340
|
+
componentRef.setInput(key, value);
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
// Set action sheet reference (only if the component has this input)
|
|
345
|
+
if (inputDefs && '__actionSheet__' in inputDefs) {
|
|
346
|
+
componentRef.setInput('__actionSheet__', this.__actionSheetRef__());
|
|
347
|
+
}
|
|
348
|
+
// Subscribe to close event if available
|
|
349
|
+
const instance = componentRef.instance;
|
|
350
|
+
if (instance.onClosed) {
|
|
351
|
+
instance.onClosed.subscribe((e) => {
|
|
352
|
+
this.close(e);
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
this.isContentRendered.set(true);
|
|
356
|
+
this.cdr.markForCheck();
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Sets input values on the content component.
|
|
360
|
+
* @param values - Object containing input values to set
|
|
361
|
+
*/
|
|
362
|
+
setContentInputs(values) {
|
|
363
|
+
if (this._componentRef) {
|
|
364
|
+
Object.entries(values).forEach(([key, value]) => {
|
|
365
|
+
this._componentRef.setInput(key, value);
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
242
369
|
ngOnDestroy() {
|
|
243
370
|
this.onMouseMoveListenerFn();
|
|
244
371
|
this.onMouseUpListenerFn();
|
|
245
372
|
this.onTouchMoveListenerFn();
|
|
246
373
|
this.onTouchUpListenerFn();
|
|
374
|
+
// Clean up component reference
|
|
375
|
+
if (this._componentRef) {
|
|
376
|
+
this._componentRef.destroy();
|
|
377
|
+
this._componentRef = null;
|
|
378
|
+
}
|
|
247
379
|
}
|
|
248
380
|
handleMouseDown(e) {
|
|
249
381
|
if (!this.data().draggable || e.button !== 0)
|
|
@@ -326,22 +458,6 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
326
458
|
}
|
|
327
459
|
return (this.actionSheetHeight() + (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10);
|
|
328
460
|
}
|
|
329
|
-
/**
|
|
330
|
-
* Handles component attachment from ngComponentOutlet
|
|
331
|
-
*/
|
|
332
|
-
handleComponentCreated(componentRef) {
|
|
333
|
-
if (componentRef?.instance) {
|
|
334
|
-
this._componentRef = componentRef.instance;
|
|
335
|
-
Object.assign(this._componentRef, this.data());
|
|
336
|
-
Object.assign(this._componentRef, { _isPopup: true });
|
|
337
|
-
if (componentRef.instance
|
|
338
|
-
.onClosed) {
|
|
339
|
-
componentRef.instance.onClosed.subscribe((e) => {
|
|
340
|
-
this.close(e);
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
461
|
/**
|
|
346
462
|
* Handles click events on action sheet items.
|
|
347
463
|
* This method is called when a user clicks on an action sheet item. It closes the action sheet
|
|
@@ -380,7 +496,7 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
380
496
|
const closeCallback = this.onClose();
|
|
381
497
|
if (closeCallback) {
|
|
382
498
|
closeCallback({
|
|
383
|
-
component: this._componentRef,
|
|
499
|
+
component: this._componentRef?.instance,
|
|
384
500
|
htmlElement: this.getHostElement(),
|
|
385
501
|
data: e,
|
|
386
502
|
});
|
|
@@ -396,8 +512,8 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
396
512
|
this.close(null);
|
|
397
513
|
}
|
|
398
514
|
}
|
|
399
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
400
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
515
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
516
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXActionSheetComponent, isStandalone: true, selector: "ax-action-sheet", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null }, overlayRef: { classPropertyName: "overlayRef", publicName: "overlayRef", isSignal: true, isRequired: false, transformFunction: null }, __actionSheetRef__: { classPropertyName: "__actionSheetRef__", publicName: "__actionSheetRef__", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.escape": "onKeydownHandler()" } }, providers: [
|
|
401
517
|
{ provide: AXComponent, useExisting: AXActionSheetComponent },
|
|
402
518
|
{
|
|
403
519
|
provide: AXClosableComponent,
|
|
@@ -407,9 +523,9 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
407
523
|
provide: AXFocusableComponent,
|
|
408
524
|
useExisting: AXActionSheetComponent,
|
|
409
525
|
},
|
|
410
|
-
], 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 (data().content) {\n <div class=\"ax-custom-template-container\">\n @if (templateContent()) {\n <ng-container *ngTemplateOutlet=\"templateContent(); context: templateContext()\"></ng-container>\n }
|
|
526
|
+
], viewQueries: [{ propertyName: "contentContainerRef", first: true, predicate: ["contentContainer"], descendants: true, read: ViewContainerRef }], 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 (data().content) {\n <div class=\"ax-custom-template-container\">\n @if (templateContent()) {\n <ng-container *ngTemplateOutlet=\"templateContent(); context: templateContext()\"></ng-container>\n }\n <!-- Component content container - always present but only populated when componentContent() is truthy -->\n <ng-container #contentContainer></ng-container>\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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
411
527
|
}
|
|
412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetComponent, decorators: [{
|
|
413
529
|
type: Component,
|
|
414
530
|
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
415
531
|
'(keydown.escape)': 'onKeydownHandler()',
|
|
@@ -427,18 +543,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
427
543
|
AXDecoratorGenericComponent,
|
|
428
544
|
AXDecoratorCloseButtonComponent,
|
|
429
545
|
NgTemplateOutlet,
|
|
430
|
-
NgComponentOutlet,
|
|
431
546
|
AXTranslatorPipe,
|
|
432
547
|
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 }
|
|
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 }] }] } }
|
|
548
|
+
], 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 }\n <!-- Component content container - always present but only populated when componentContent() is truthy -->\n <ng-container #contentContainer></ng-container>\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"] }]
|
|
549
|
+
}], 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 }] }], __actionSheetRef__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__actionSheetRef__", required: false }] }], contentContainerRef: [{
|
|
550
|
+
type: ViewChild,
|
|
551
|
+
args: ['contentContainer', { read: ViewContainerRef }]
|
|
552
|
+
}] } });
|
|
435
553
|
|
|
436
554
|
class AXActionSheetModule {
|
|
437
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
438
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
439
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
555
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
556
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetModule, imports: [AXActionSheetComponent], exports: [AXActionSheetComponent] }); }
|
|
557
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetModule, providers: [AXActionSheetService], imports: [AXActionSheetComponent] }); }
|
|
440
558
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXActionSheetModule, decorators: [{
|
|
442
560
|
type: NgModule,
|
|
443
561
|
args: [{
|
|
444
562
|
imports: [AXActionSheetComponent],
|
|
@@ -451,5 +569,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
451
569
|
* Generated bundle index. Do not edit.
|
|
452
570
|
*/
|
|
453
571
|
|
|
454
|
-
export { AXActionSheetComponent, AXActionSheetModule, AXActionSheetService };
|
|
572
|
+
export { AXActionSheetComponent, AXActionSheetComponentBase, AXActionSheetModule, AXActionSheetService };
|
|
455
573
|
//# sourceMappingURL=acorex-components-action-sheet.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../packages/components/action-sheet/src/lib/action-sheet.service.ts","../../../../packages/components/action-sheet/src/lib/action-sheet.component.ts","../../../../packages/components/action-sheet/src/lib/action-sheet.component.html","../../../../packages/components/action-sheet/src/lib/action-sheet.module.ts","../../../../packages/components/action-sheet/src/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXComponentCloseEvent } from '@acorex/cdk/common';\nimport { AXOverlayService } from '@acorex/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { AXActionSheetConfig, AXActionSheetEvent, AXActionSheetInternalRef } from './action-sheet.class';\nimport { AXActionSheetComponent } from './action-sheet.component';\n\nexport interface AXActionSheetDialogRef {\n close: (e?: any) => void;\n closed: Subject<{ data?: any }>;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXActionSheetService {\n private overlayService = inject(AXOverlayService);\n private readonly actionSheetEvent = new Subject<AXActionSheetEvent>();\n actionSheetEvent$ = this.actionSheetEvent.asObservable();\n\n /**\n * Opens an action sheet with the specified configuration.\n * This method creates and displays an action sheet component with the provided options.\n * The action sheet will slide up from the bottom of the screen and can be dismissed\n * by tapping outside, pressing escape, or calling the close method.\n *\n * @param config - The configuration object that defines the action sheet's appearance and behavior.\n * Must include at least a title or content property. Will be merged with default config.\n * @param isUserInteraction - Whether the action sheet is opened by user interaction (default: true).\n * This affects how the action sheet handles accessibility and focus management.\n * @returns A promise that resolves to a dialog reference containing methods to control the action sheet.\n * The reference includes methods like close() and a closed observable for tracking dialog state.\n * @example\n * ```typescript\n * const dialogRef = await actionSheetService.open({\n * title: 'Choose an option',\n * items: [\n * { text: 'Option 1', value: 'opt1' },\n * { text: 'Option 2', value: 'opt2' }\n * ]\n * });\n *\n * dialogRef.closed.subscribe(result => {\n * console.log('Action sheet closed with:', result.data);\n * });\n * ```\n */\n async open(config: AXActionSheetConfig, isUserInteraction = true): Promise<AXActionSheetDialogRef> {\n const defaultConfig: AXActionSheetConfig = {\n title: 'action-sheet.title',\n closeButton: true,\n closeOnBackdropClick: true,\n header: true,\n };\n config = Object.assign(defaultConfig, config);\n\n const closed = new BehaviorSubject<{ data?: any }>(null);\n let internalRef: AXActionSheetInternalRef;\n\n const closeActionSheet = (result?: AXComponentCloseEvent) => {\n if (internalRef) {\n internalRef.overlayRef.dispose();\n if (result?.data) {\n closed.next({ data: result.data });\n } else {\n closed.next({});\n }\n }\n };\n\n const overlayRef = await this.overlayService.create<AXActionSheetComponent>(AXActionSheetComponent, {\n inputs: {\n data: config,\n onClose: closeActionSheet,\n },\n centered: false,\n panelClass: ['ax-action-sheet-panel'],\n backdrop: {\n enabled: true,\n background: true,\n closeOnClick: config.closeOnBackdropClick,\n },\n onDispose: () => {\n // Clean up when disposed externally (e.g., backdrop click)\n closed.next({});\n },\n });\n\n internalRef = {\n overlayRef,\n close: closeActionSheet,\n };\n\n // Set the overlayRef input after creation\n if (overlayRef.instance && 'setInput' in overlayRef.instance) {\n (overlayRef.instance as { setInput: (name: string, value: any) => void }).setInput('overlayRef', overlayRef);\n }\n\n // Positioning is handled by CSS via .ax-action-sheet-panel class\n\n this.actionSheetEvent.next({\n overlayRef,\n data: { state: 'open' },\n isUserInteraction,\n });\n\n const axDialogRef: AXActionSheetDialogRef = {\n close: (e?: any) => {\n const component = overlayRef.instance as any as AXActionSheetComponent;\n if (component?.close) {\n component.close(e);\n } else {\n closeActionSheet({ data: e } as AXComponentCloseEvent);\n }\n },\n closed,\n };\n\n return axDialogRef;\n }\n\n /**\n * Sets the current state of action sheet events.\n * This method is used internally to track action sheet lifecycle events such as open, close,\n * drag start, drag end, and full screen transitions. It emits events through the actionSheetEvent$\n * observable for external subscribers to monitor action sheet state changes.\n *\n * @param event - The action sheet event to emit. Contains information about the event type,\n * associated data, user interaction status, and overlay reference.\n * @returns void\n */\n setActionSheetEventState(event: AXActionSheetEvent): void {\n this.actionSheetEvent.next(event);\n }\n}\n","import {\n AXClosableComponent,\n AXComponent,\n AXComponentCloseEvent,\n AXFocusableComponent,\n MXBaseComponent,\n} from '@acorex/cdk/common';\nimport { AXOverlayRef } from '@acorex/cdk/overlay';\nimport { AXDecoratorCloseButtonComponent, AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe, isPlatformBrowser, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DOCUMENT,\n inject,\n input,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n signal,\n TemplateRef,\n Type,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXActionSheetConfig, AXActionSheetItem } from './action-sheet.class';\nimport { AXActionSheetService } from './action-sheet.service';\n\n/**\n * A component for displaying an action sheet, which is a menu that slides up from the bottom of the screen.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-action-sheet',\n templateUrl: './action-sheet.component.html',\n styleUrls: ['./action-sheet.component.compiled.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '(keydown.escape)': 'onKeydownHandler()',\n },\n providers: [\n { provide: AXComponent, useExisting: AXActionSheetComponent },\n {\n provide: AXClosableComponent,\n useExisting: AXActionSheetComponent,\n },\n {\n provide: AXFocusableComponent,\n useExisting: AXActionSheetComponent,\n },\n ],\n imports: [\n AXDecoratorGenericComponent,\n AXDecoratorCloseButtonComponent,\n NgTemplateOutlet,\n NgComponentOutlet,\n AXTranslatorPipe,\n AsyncPipe,\n ],\n})\nexport class AXActionSheetComponent extends MXBaseComponent implements OnInit, OnDestroy {\n /** Action sheet configuration data */\n data = input.required<AXActionSheetConfig>();\n\n /** @internal Callback function to close the action sheet */\n onClose = input<(result?: AXComponentCloseEvent) => void>();\n\n /** @internal Overlay reference for event tracking */\n overlayRef = input<AXOverlayRef<any>>();\n\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n private renderer = inject(Renderer2);\n private actionSheetService = inject(AXActionSheetService);\n\n private onMouseMoveListenerFn = () => undefined;\n private onMouseUpListenerFn = () => undefined;\n private onTouchMoveListenerFn = () => undefined;\n private onTouchUpListenerFn = () => undefined;\n\n private isDragging = signal(false);\n private isFullScreen = signal(false);\n private curserOffset = signal(0);\n private actionSheetHeight = signal(0);\n private isActionSheetHeightSet = signal(false);\n private transitionDuration = signal(300);\n\n /**\n * @ignore\n */\n private _componentRef: any;\n\n /** Template content if data.content is a TemplateRef */\n protected templateContent = computed(() => {\n const content = this.data().content;\n return content instanceof TemplateRef ? content : null;\n });\n\n /** Component content if data.content is a component Type */\n protected componentContent = computed(() => {\n const content = this.data().content;\n return typeof content === 'function' ? (content as Type<any>) : null;\n });\n\n /** Template context for ngTemplateOutlet */\n protected templateContext = computed((): { $implicit: AXActionSheetConfig; ref: AXActionSheetComponent } => ({\n $implicit: this.data(),\n ref: this,\n }));\n\n /**\n * @ignore\n */\n override ngOnInit(): void {\n super.ngOnInit();\n\n // Enter animation: start with height 0 and animate to natural height\n if (isPlatformBrowser(this.platformID)) {\n const hostElement = this.getHostElement();\n hostElement.style.height = '0';\n hostElement.style.overflow = 'hidden';\n\n // Use requestAnimationFrame to ensure the initial height is applied before animating\n requestAnimationFrame(() => {\n hostElement.style.transitionDuration = `${this.transitionDuration()}ms`;\n hostElement.style.height = 'auto';\n // Get the natural height\n const naturalHeight = hostElement.scrollHeight;\n hostElement.style.height = '0';\n\n requestAnimationFrame(() => {\n hostElement.style.height = `${naturalHeight}px`;\n // After animation completes, set height to auto for flexibility\n setTimeout(() => {\n hostElement.style.height = 'auto';\n hostElement.style.overflow = '';\n }, this.transitionDuration());\n });\n });\n }\n\n if (isPlatformBrowser(this.platformID) && this.data().draggable) {\n this.onMouseMoveListenerFn = this.renderer.listen(this.document, 'mousemove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.clientY) + this.curserOffset()}px`;\n }\n });\n this.onTouchMoveListenerFn = this.renderer.listen(this.document, 'touchmove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.touches[0].clientY) + this.curserOffset()}px`;\n }\n });\n this.onMouseUpListenerFn = this.renderer.listen(this.document, 'mouseup', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.snapToFinalPosition();\n }\n });\n this.onTouchUpListenerFn = this.renderer.listen(this.document, 'touchend', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.snapToFinalPosition();\n }\n });\n }\n }\n\n ngOnDestroy(): void {\n this.onMouseMoveListenerFn();\n this.onMouseUpListenerFn();\n this.onTouchMoveListenerFn();\n this.onTouchUpListenerFn();\n }\n\n protected handleMouseDown(e: MouseEvent) {\n if (!this.data().draggable || e.button !== 0) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.handleDown(e.clientY);\n }\n\n protected handleTouchDown(e: TouchEvent) {\n if (!this.data().draggable || (e.target as HTMLElement).className.includes('close')) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.handleDown(e.touches[0].clientY);\n }\n\n private handleDown(clientY: number) {\n this.isDragging.set(true);\n this.getHostElement().style.transitionDuration = '0ms';\n\n if (isPlatformBrowser(this.platformID)) {\n this.curserOffset.set(\n clientY - (this.document.documentElement.clientHeight - this.getHostElement().clientHeight),\n );\n }\n\n if (!this.isActionSheetHeightSet()) {\n this.actionSheetHeight.set(this.getHostElement().clientHeight);\n this.isActionSheetHeightSet.set(true);\n }\n }\n\n private snapToFinalPosition(): void {\n this.getHostElement().style.transitionDuration = `${this.transitionDuration()}ms`;\n const currentHeight = this.getHostElement().clientHeight;\n const initialHeight = this.actionSheetHeight();\n const windowHeight = this.document.documentElement.clientHeight;\n\n if (currentHeight < initialHeight * 0.75) {\n this.close(null);\n return;\n }\n if (this.isFullScreen() && currentHeight < windowHeight * 0.9) {\n this.getHostElement().style.height = `${initialHeight}px`;\n this.isFullScreen.set(false);\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'normalSize' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n return;\n }\n if (this.data().dragUp && currentHeight > (windowHeight + initialHeight) / 3) {\n this.getHostElement().style.height = '100vh';\n this.isFullScreen.set(true);\n this.document.body.parentElement.style.overscrollBehaviorY = 'contain';\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'fullScreen' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n return;\n }\n this.getHostElement().style.height = `${initialHeight}px`;\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'normalSize' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n }\n\n private heightCalculator(clientY: number): number {\n if (this.data().dragUp) {\n return this.document.documentElement.clientHeight - clientY;\n }\n if (clientY >= this.document.documentElement.clientHeight - this.actionSheetHeight()) {\n return this.document.documentElement.clientHeight - clientY;\n }\n return (\n this.actionSheetHeight() + (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10\n );\n }\n\n /**\n * Handles component attachment from ngComponentOutlet\n */\n protected handleComponentCreated(componentRef: ComponentRef<any>) {\n if (componentRef?.instance) {\n this._componentRef = componentRef.instance;\n Object.assign(this._componentRef, this.data());\n Object.assign(this._componentRef, { _isPopup: true });\n if (\n (componentRef.instance as { onClosed?: { subscribe: (fn: (e: AXComponentCloseEvent) => void) => void } })\n .onClosed\n ) {\n (\n componentRef.instance as { onClosed: { subscribe: (fn: (e: AXComponentCloseEvent) => void) => void } }\n ).onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.close(e);\n });\n }\n }\n }\n\n /**\n * Handles click events on action sheet items.\n * This method is called when a user clicks on an action sheet item. It closes the action sheet\n * with the clicked item as the result data and executes the item's onClick callback if provided.\n *\n * @param item - The action sheet item that was clicked. Contains the item's data and optional onClick callback.\n * @returns void\n */\n onItemClick(item: AXActionSheetItem): void {\n this.close(item);\n if (item?.onClick) item.onClick();\n }\n\n /**\n * Closes the action sheet with optional result data.\n * This method initiates the closing animation of the action sheet and eventually closes the dialog.\n * The closing process includes a height animation and cleanup of event listeners.\n *\n * @param e - The result data to pass when closing the action sheet. Can be any value including null.\n * If an AXActionSheetItem is passed, it represents the selected item.\n * @param isUserInteraction - Whether the close action was triggered by user interaction (default: true).\n * This affects how the action sheet handles accessibility and event tracking.\n * @returns void\n */\n close(e: any = null, isUserInteraction = true): void {\n this.getHostElement().style.height = `${this.getHostElement().clientHeight}px`;\n setTimeout(() => {\n this.getHostElement().style.height = '0vh';\n });\n setTimeout(() => {\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'close' },\n isUserInteraction,\n overlayRef: this.overlayRef(),\n });\n const closeCallback = this.onClose();\n if (closeCallback) {\n closeCallback({\n component: this._componentRef,\n htmlElement: this.getHostElement(),\n data: e,\n });\n }\n }, this.transitionDuration());\n }\n\n /**\n * @ignore\n */\n protected onKeydownHandler() {\n const focusedOrHasFocused = this.getHostElement().matches(':focus-within');\n if (this.data().closeButton && focusedOrHasFocused) {\n this.close(null);\n }\n }\n}\n","@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","import { NgModule } from '@angular/core';\nimport { AXActionSheetComponent } from './action-sheet.component';\nimport { AXActionSheetService } from './action-sheet.service';\n\n@NgModule({\n imports: [AXActionSheetComponent],\n exports: [AXActionSheetComponent],\n providers: [AXActionSheetService],\n})\nexport class AXActionSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAea,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAChC,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAsB;AACrE,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;AAoHzD,IAAA;AAlHC;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AACH,IAAA,MAAM,IAAI,CAAC,MAA2B,EAAE,iBAAiB,GAAG,IAAI,EAAA;AAC9D,QAAA,MAAM,aAAa,GAAwB;AACzC,YAAA,KAAK,EAAE,oBAAoB;AAC3B,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,oBAAoB,EAAE,IAAI;AAC1B,YAAA,MAAM,EA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AnB,mBAAmB,EAAA,OAAA,EAAA,CAJpB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CACtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAGrB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EAAA,SAAA,EAFnB,CAAC,oBAAoB,CAAC,YAFvB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;4FAIrB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,SAAS,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../packages/components/action-sheet/src/lib/action-sheet.class.ts","../../../../packages/components/action-sheet/src/lib/action-sheet.service.ts","../../../../packages/components/action-sheet/src/lib/action-sheet.component.ts","../../../../packages/components/action-sheet/src/lib/action-sheet.component.html","../../../../packages/components/action-sheet/src/lib/action-sheet.module.ts","../../../../packages/components/action-sheet/src/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXComponentCloseEvent, AXStyleColorType } from '@acorex/cdk/common';\nimport { AXOverlayRef } from '@acorex/cdk/overlay';\nimport { AXComponentInputs } from '@acorex/core/components';\nimport { Directive, input, TemplateRef, Type } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nexport interface AXActionSheetItem {\n name?: string;\n text: string;\n icon?: string;\n disabled?: boolean;\n color?: AXStyleColorType;\n onClick?: () => void;\n suffix?: {\n text: string;\n };\n break?: boolean;\n group?: {\n name?: string;\n title?: string;\n };\n}\n\nexport type AXActionSheetContentType = TemplateRef<unknown> | Type<unknown>;\n\nexport interface AXActionSheetConfig {\n title?: string;\n subTitle?: string;\n closeButton?: boolean;\n header?: boolean;\n /** @deprecated Use `inputs` instead to pass data to the action sheet content component. */\n data?: unknown;\n /** Input values to pass to the content component */\n inputs?: unknown;\n closeOnBackdropClick?: boolean;\n items?: AXActionSheetItem[];\n content?: AXActionSheetContentType;\n draggable?: boolean;\n dragUp?: boolean;\n}\n\n/**\n * Reference to an open action sheet, providing methods to interact with it.\n */\nexport interface AXActionSheetRef<TResult = unknown> {\n /** Closes the action sheet with optional result data */\n close: (data?: TResult) => void;\n /** Sets input values on the content component */\n setInputs: (values: AXComponentInputs) => void;\n /** Observable that emits when the action sheet is closed */\n onClose: Subject<TResult>;\n}\n\n/**\n * Base class for components that are displayed inside an action sheet.\n * Extend this class to get access to the action sheet reference and helper methods.\n *\n * @example\n * ```typescript\n * @Component({...})\n * export class MyActionSheetContent extends AXActionSheetComponentBase {\n * save() {\n * this.close({ saved: true });\n * }\n * }\n * ```\n */\n@Directive()\nexport abstract class AXActionSheetComponentBase {\n /** Reference to the parent action sheet */\n __actionSheet__ = input<AXActionSheetRef>();\n\n /**\n * Closes the action sheet with optional result data.\n * @param data - Optional data to pass to the close handler\n */\n close(data: unknown = null) {\n this.__actionSheet__()?.close(data);\n }\n}\n\nexport interface AXActionSheetEvent {\n overlayRef?: AXOverlayRef<unknown>;\n nativeEvent?: Event;\n isUserInteraction: boolean;\n data: {\n state: 'open' | 'close' | 'dragStart' | 'dragEnd' | 'fullScreen' | 'normalSize';\n };\n}\n\n/**\n * @internal\n * Internal reference used by action sheet service to manage overlay instances\n */\nexport interface AXActionSheetInternalRef {\n overlayRef: AXOverlayRef<unknown>;\n close: (result?: AXComponentCloseEvent) => void;\n}\n","import { AXComponentCloseEvent } from '@acorex/cdk/common';\nimport { AXOverlayService } from '@acorex/cdk/overlay';\nimport { AXComponentInputs } from '@acorex/core/components';\nimport { ComponentRef, inject, Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport {\n AXActionSheetConfig,\n AXActionSheetEvent,\n AXActionSheetInternalRef,\n AXActionSheetRef,\n} from './action-sheet.class';\nimport { AXActionSheetComponent } from './action-sheet.component';\n\n/**\n * @deprecated Use `AXActionSheetRef` instead\n */\nexport interface AXActionSheetDialogRef<TResult = unknown> {\n close: (e?: TResult) => void;\n setInputs: (values: AXComponentInputs) => void;\n closed: Subject<{ data?: TResult }>;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXActionSheetService {\n private overlayService = inject(AXOverlayService);\n private readonly actionSheetEvent = new Subject<AXActionSheetEvent>();\n actionSheetEvent$ = this.actionSheetEvent.asObservable();\n\n /**\n * Opens an action sheet with the specified configuration.\n * This method creates and displays an action sheet component with the provided options.\n * The action sheet will slide up from the bottom of the screen and can be dismissed\n * by tapping outside, pressing escape, or calling the close method.\n *\n * @param config - The configuration object that defines the action sheet's appearance and behavior.\n * Must include at least a title or content property. Will be merged with default config.\n * @param isUserInteraction - Whether the action sheet is opened by user interaction (default: true).\n * This affects how the action sheet handles accessibility and focus management.\n * @returns A promise that resolves to a dialog reference containing methods to control the action sheet.\n * The reference includes methods like close(), setInputs() and a closed observable for tracking dialog state.\n * @example\n * ```typescript\n * const dialogRef = await actionSheetService.open({\n * title: 'Choose an option',\n * content: MyCustomComponent,\n * inputs: { userId: 123, userName: 'John' }\n * });\n *\n * // Update inputs dynamically\n * dialogRef.setInputs({ userName: 'Jane' });\n *\n * dialogRef.closed.subscribe(result => {\n * console.log('Action sheet closed with:', result.data);\n * });\n * ```\n */\n async open<TResult = unknown>(\n config: AXActionSheetConfig,\n isUserInteraction = true,\n ): Promise<AXActionSheetDialogRef<TResult>> {\n const defaultConfig: AXActionSheetConfig = {\n title: 'action-sheet.title',\n closeButton: true,\n closeOnBackdropClick: true,\n header: true,\n };\n config = Object.assign(defaultConfig, config);\n\n const closed = new Subject<{ data?: TResult }>();\n const onClose = new Subject<TResult>();\n // Using let because internalRef is assigned after overlayRef is created\n // eslint-disable-next-line prefer-const\n let internalRef: AXActionSheetInternalRef;\n\n const closeActionSheet = (result?: AXComponentCloseEvent) => {\n if (internalRef) {\n internalRef.overlayRef.dispose();\n onClose.next(result?.data as TResult);\n onClose.complete();\n if (result?.data) {\n closed.next({ data: result.data as TResult });\n } else {\n closed.next({});\n }\n closed.complete();\n }\n };\n\n // Create the action sheet reference that will be passed to content components\n const actionSheetRef: AXActionSheetRef<TResult> = {\n close: (data?: TResult) => {\n const component = internalRef?.overlayRef.instance;\n if (component && 'close' in component) {\n (component as unknown as AXActionSheetComponent).close(data);\n } else {\n closeActionSheet({ data } as AXComponentCloseEvent);\n }\n },\n setInputs: (values: AXComponentInputs) => {\n const ref = internalRef?.overlayRef.instance;\n if (ref && ref instanceof ComponentRef) {\n const componentInstance = ref.instance as AXActionSheetComponent;\n componentInstance.setContentInputs(values);\n } else if (ref && 'setContentInputs' in ref) {\n (ref as unknown as AXActionSheetComponent).setContentInputs(values);\n }\n },\n onClose,\n };\n\n const overlayRef = await this.overlayService.create<AXActionSheetComponent>(AXActionSheetComponent, {\n inputs: {\n data: config,\n onClose: closeActionSheet,\n __actionSheetRef__: actionSheetRef,\n },\n\n centered: false,\n panelClass: ['ax-action-sheet-panel'],\n backdrop: {\n enabled: true,\n background: true,\n closeOnClick: config.closeOnBackdropClick,\n },\n onDispose: () => {\n // Clean up when disposed externally (e.g., backdrop click)\n closed.next({});\n closed.complete();\n },\n });\n\n internalRef = {\n overlayRef,\n close: closeActionSheet,\n };\n\n // Set the overlayRef input after creation\n if (overlayRef.instance && 'setInput' in overlayRef.instance) {\n (overlayRef.instance as { setInput: (name: string, value: unknown) => void }).setInput('overlayRef', overlayRef);\n }\n\n // Positioning is handled by CSS via .ax-action-sheet-panel class\n\n this.actionSheetEvent.next({\n overlayRef,\n data: { state: 'open' },\n isUserInteraction,\n });\n\n const axDialogRef: AXActionSheetDialogRef<TResult> = {\n close: actionSheetRef.close,\n setInputs: actionSheetRef.setInputs,\n closed,\n };\n\n return axDialogRef;\n }\n\n /**\n * Sets the current state of action sheet events.\n * This method is used internally to track action sheet lifecycle events such as open, close,\n * drag start, drag end, and full screen transitions. It emits events through the actionSheetEvent$\n * observable for external subscribers to monitor action sheet state changes.\n *\n * @param event - The action sheet event to emit. Contains information about the event type,\n * associated data, user interaction status, and overlay reference.\n * @returns void\n */\n setActionSheetEventState(event: AXActionSheetEvent): void {\n this.actionSheetEvent.next(event);\n }\n}\n","import {\n AXClosableComponent,\n AXComponent,\n AXComponentCloseEvent,\n AXFocusableComponent,\n MXBaseComponent,\n} from '@acorex/cdk/common';\nimport { AXOverlayRef } from '@acorex/cdk/overlay';\nimport { AXDecoratorCloseButtonComponent, AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXComponentInputs, AXComponentType } from '@acorex/core/components';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DOCUMENT,\n inject,\n input,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n signal,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXActionSheetConfig, AXActionSheetItem, AXActionSheetRef } from './action-sheet.class';\nimport { AXActionSheetService } from './action-sheet.service';\n\n/**\n * A component for displaying an action sheet, which is a menu that slides up from the bottom of the screen.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-action-sheet',\n templateUrl: './action-sheet.component.html',\n styleUrls: ['./action-sheet.component.compiled.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '(keydown.escape)': 'onKeydownHandler()',\n },\n providers: [\n { provide: AXComponent, useExisting: AXActionSheetComponent },\n {\n provide: AXClosableComponent,\n useExisting: AXActionSheetComponent,\n },\n {\n provide: AXFocusableComponent,\n useExisting: AXActionSheetComponent,\n },\n ],\n imports: [\n AXDecoratorGenericComponent,\n AXDecoratorCloseButtonComponent,\n NgTemplateOutlet,\n AXTranslatorPipe,\n AsyncPipe,\n ],\n})\nexport class AXActionSheetComponent extends MXBaseComponent implements OnInit, AfterViewInit, OnDestroy {\n /** Action sheet configuration data */\n data = input.required<AXActionSheetConfig>();\n\n /** @internal Callback function to close the action sheet */\n onClose = input<(result?: AXComponentCloseEvent) => void>();\n\n /** @internal Overlay reference for event tracking */\n overlayRef = input<AXOverlayRef<unknown>>();\n\n /** @internal Reference to the action sheet for content components */\n __actionSheetRef__ = input<AXActionSheetRef>();\n\n @ViewChild('contentContainer', { read: ViewContainerRef })\n private contentContainerRef: ViewContainerRef;\n\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n private renderer = inject(Renderer2);\n private actionSheetService = inject(AXActionSheetService);\n\n private onMouseMoveListenerFn = () => undefined;\n private onMouseUpListenerFn = () => undefined;\n private onTouchMoveListenerFn = () => undefined;\n private onTouchUpListenerFn = () => undefined;\n\n private isDragging = signal(false);\n private isFullScreen = signal(false);\n private curserOffset = signal(0);\n private actionSheetHeight = signal(0);\n private isActionSheetHeightSet = signal(false);\n private transitionDuration = signal(300);\n\n /**\n * @ignore\n */\n private _componentRef: ComponentRef<unknown> | null = null;\n\n /** Template content if data.content is a TemplateRef */\n protected templateContent = computed(() => {\n const content = this.data().content;\n return content instanceof TemplateRef ? content : null;\n });\n\n /** Component content if data.content is a component Type */\n protected componentContent = computed(() => {\n const content = this.data().content;\n return typeof content === 'function' ? (content as AXComponentType<unknown>) : null;\n });\n\n /** Template context for ngTemplateOutlet */\n protected templateContext = computed((): { $implicit: AXActionSheetConfig; ref: AXActionSheetComponent } => ({\n $implicit: this.data(),\n ref: this,\n }));\n\n /** Whether content has been rendered (for component content) */\n protected isContentRendered = signal(false);\n\n /**\n * @ignore\n */\n override ngOnInit(): void {\n super.ngOnInit();\n\n // Enter animation: start with height 0 and animate to natural height\n if (isPlatformBrowser(this.platformID)) {\n const hostElement = this.getHostElement();\n hostElement.style.height = '0';\n hostElement.style.overflow = 'hidden';\n\n // Use requestAnimationFrame to ensure the initial height is applied before animating\n requestAnimationFrame(() => {\n hostElement.style.transitionDuration = `${this.transitionDuration()}ms`;\n hostElement.style.height = 'auto';\n // Get the natural height\n const naturalHeight = hostElement.scrollHeight;\n hostElement.style.height = '0';\n\n requestAnimationFrame(() => {\n hostElement.style.height = `${naturalHeight}px`;\n // After animation completes, set height to auto for flexibility\n setTimeout(() => {\n hostElement.style.height = 'auto';\n hostElement.style.overflow = '';\n }, this.transitionDuration());\n });\n });\n }\n\n if (isPlatformBrowser(this.platformID) && this.data().draggable) {\n this.onMouseMoveListenerFn = this.renderer.listen(this.document, 'mousemove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.clientY) + this.curserOffset()}px`;\n }\n });\n this.onTouchMoveListenerFn = this.renderer.listen(this.document, 'touchmove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.touches[0].clientY) + this.curserOffset()}px`;\n }\n });\n this.onMouseUpListenerFn = this.renderer.listen(this.document, 'mouseup', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.snapToFinalPosition();\n }\n });\n this.onTouchUpListenerFn = this.renderer.listen(this.document, 'touchend', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.snapToFinalPosition();\n }\n });\n }\n }\n\n /**\n * @ignore\n */\n ngAfterViewInit(): void {\n // Render component content after view is initialized (ViewChild is available)\n this.renderComponentContent();\n }\n\n /**\n * Renders the component content if provided.\n * Uses ViewContainerRef to create the component and properly set inputs.\n */\n private renderComponentContent(): void {\n const componentType = this.componentContent();\n if (!componentType || !this.contentContainerRef) return;\n\n const config = this.data();\n\n // Create the component using ViewContainerRef\n const componentRef = this.contentContainerRef.createComponent(componentType);\n this._componentRef = componentRef;\n\n // Get component input definitions to check before setting inputs\n const inputDefs = (componentRef.componentType as unknown as { ɵcmp?: { inputs?: Record<string, unknown> } })?.ɵcmp\n ?.inputs;\n\n // Set data inputs (legacy support - deprecated)\n if (config?.data && typeof config.data === 'object') {\n Object.entries(config.data).forEach(([key, value]) => {\n (componentRef.instance as Record<string, unknown>)[key] = value;\n });\n }\n\n // Set inputs using setInput for proper change detection\n if (config?.inputs && typeof config.inputs === 'object') {\n Object.entries(config.inputs).forEach(([key, value]) => {\n if (inputDefs && key in inputDefs) {\n componentRef.setInput(key, value);\n }\n });\n }\n\n // Set action sheet reference (only if the component has this input)\n if (inputDefs && '__actionSheet__' in inputDefs) {\n componentRef.setInput('__actionSheet__', this.__actionSheetRef__());\n }\n\n // Subscribe to close event if available\n const instance = componentRef.instance as {\n onClosed?: { subscribe: (fn: (e: AXComponentCloseEvent) => void) => void };\n };\n if (instance.onClosed) {\n instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.close(e);\n });\n }\n\n this.isContentRendered.set(true);\n this.cdr.markForCheck();\n }\n\n /**\n * Sets input values on the content component.\n * @param values - Object containing input values to set\n */\n setContentInputs(values: AXComponentInputs): void {\n if (this._componentRef) {\n Object.entries(values).forEach(([key, value]) => {\n this._componentRef.setInput(key, value);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.onMouseMoveListenerFn();\n this.onMouseUpListenerFn();\n this.onTouchMoveListenerFn();\n this.onTouchUpListenerFn();\n\n // Clean up component reference\n if (this._componentRef) {\n this._componentRef.destroy();\n this._componentRef = null;\n }\n }\n\n protected handleMouseDown(e: MouseEvent) {\n if (!this.data().draggable || e.button !== 0) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.handleDown(e.clientY);\n }\n\n protected handleTouchDown(e: TouchEvent) {\n if (!this.data().draggable || (e.target as HTMLElement).className.includes('close')) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n this.handleDown(e.touches[0].clientY);\n }\n\n private handleDown(clientY: number) {\n this.isDragging.set(true);\n this.getHostElement().style.transitionDuration = '0ms';\n\n if (isPlatformBrowser(this.platformID)) {\n this.curserOffset.set(\n clientY - (this.document.documentElement.clientHeight - this.getHostElement().clientHeight),\n );\n }\n\n if (!this.isActionSheetHeightSet()) {\n this.actionSheetHeight.set(this.getHostElement().clientHeight);\n this.isActionSheetHeightSet.set(true);\n }\n }\n\n private snapToFinalPosition(): void {\n this.getHostElement().style.transitionDuration = `${this.transitionDuration()}ms`;\n const currentHeight = this.getHostElement().clientHeight;\n const initialHeight = this.actionSheetHeight();\n const windowHeight = this.document.documentElement.clientHeight;\n\n if (currentHeight < initialHeight * 0.75) {\n this.close(null);\n return;\n }\n if (this.isFullScreen() && currentHeight < windowHeight * 0.9) {\n this.getHostElement().style.height = `${initialHeight}px`;\n this.isFullScreen.set(false);\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'normalSize' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n return;\n }\n if (this.data().dragUp && currentHeight > (windowHeight + initialHeight) / 3) {\n this.getHostElement().style.height = '100vh';\n this.isFullScreen.set(true);\n this.document.body.parentElement.style.overscrollBehaviorY = 'contain';\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'fullScreen' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n return;\n }\n this.getHostElement().style.height = `${initialHeight}px`;\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'normalSize' },\n isUserInteraction: true,\n overlayRef: this.overlayRef(),\n });\n }\n\n private heightCalculator(clientY: number): number {\n if (this.data().dragUp) {\n return this.document.documentElement.clientHeight - clientY;\n }\n if (clientY >= this.document.documentElement.clientHeight - this.actionSheetHeight()) {\n return this.document.documentElement.clientHeight - clientY;\n }\n return (\n this.actionSheetHeight() + (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10\n );\n }\n\n /**\n * Handles click events on action sheet items.\n * This method is called when a user clicks on an action sheet item. It closes the action sheet\n * with the clicked item as the result data and executes the item's onClick callback if provided.\n *\n * @param item - The action sheet item that was clicked. Contains the item's data and optional onClick callback.\n * @returns void\n */\n onItemClick(item: AXActionSheetItem): void {\n this.close(item);\n if (item?.onClick) item.onClick();\n }\n\n /**\n * Closes the action sheet with optional result data.\n * This method initiates the closing animation of the action sheet and eventually closes the dialog.\n * The closing process includes a height animation and cleanup of event listeners.\n *\n * @param e - The result data to pass when closing the action sheet. Can be any value including null.\n * If an AXActionSheetItem is passed, it represents the selected item.\n * @param isUserInteraction - Whether the close action was triggered by user interaction (default: true).\n * This affects how the action sheet handles accessibility and event tracking.\n * @returns void\n */\n close(e: unknown = null, isUserInteraction = true): void {\n this.getHostElement().style.height = `${this.getHostElement().clientHeight}px`;\n setTimeout(() => {\n this.getHostElement().style.height = '0vh';\n });\n setTimeout(() => {\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'close' },\n isUserInteraction,\n overlayRef: this.overlayRef(),\n });\n const closeCallback = this.onClose();\n if (closeCallback) {\n closeCallback({\n component: this._componentRef?.instance,\n htmlElement: this.getHostElement(),\n data: e,\n });\n }\n }, this.transitionDuration());\n }\n\n /**\n * @ignore\n */\n protected onKeydownHandler() {\n const focusedOrHasFocused = this.getHostElement().matches(':focus-within');\n if (this.data().closeButton && focusedOrHasFocused) {\n this.close(null);\n }\n }\n}\n","@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 }\n <!-- Component content container - always present but only populated when componentContent() is truthy -->\n <ng-container #contentContainer></ng-container>\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","import { NgModule } from '@angular/core';\nimport { AXActionSheetComponent } from './action-sheet.component';\nimport { AXActionSheetService } from './action-sheet.service';\n\n@NgModule({\n imports: [AXActionSheetComponent],\n exports: [AXActionSheetComponent],\n providers: [AXActionSheetService],\n})\nexport class AXActionSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAqDA;;;;;;;;;;;;;AAaG;MAEmB,0BAA0B,CAAA;AADhD,IAAA,WAAA,GAAA;;QAGE,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