@acorex/components 21.0.1-next.3 → 21.0.1-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +0 -1
- package/action-sheet/index.d.ts +116 -34
- package/button-group/index.d.ts +6 -4
- package/chips/index.d.ts +3 -8
- package/collapse/index.d.ts +4 -6
- package/command/index.d.ts +8 -1
- package/conversation2/README.md +71 -31
- package/conversation2/index.d.ts +36 -35
- package/data-table/index.d.ts +4 -253
- package/datetime-picker/index.d.ts +1 -1
- package/dialog/index.d.ts +18 -14
- package/dropdown/index.d.ts +3 -8
- package/fesm2022/acorex-components-accordion.mjs +16 -21
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +284 -118
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +13 -13
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs +3 -3
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +11 -10
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +7 -7
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +12 -12
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +9 -9
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +11 -11
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +11 -11
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +23 -19
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +18 -18
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +17 -17
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +10 -10
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +12 -14
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +12 -10
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs +10 -10
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +22 -19
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +9 -9
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +30 -30
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +17 -11
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +32 -32
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +51 -51
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +309 -303
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +46 -46
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +3 -3
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +33 -33
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +50 -486
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +9 -9
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +9 -9
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +40 -38
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +43 -36
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +75 -54
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer-legacy.mjs +13 -13
- package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +15 -16
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +25 -28
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +11 -11
- package/fesm2022/acorex-components-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs +25 -25
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs +16 -16
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +48 -42
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +13 -14
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +44 -44
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +9 -9
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +8 -8
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +140 -13
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +29 -11
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -9
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +9 -9
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +82 -45
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +23 -23
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +14 -14
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +72 -54
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +43 -22
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-CXXcFToK.mjs → acorex-components-modal-acorex-components-modal-BajlPo_n.mjs} +47 -23
- package/fesm2022/acorex-components-modal-acorex-components-modal-BajlPo_n.mjs.map +1 -0
- package/fesm2022/{acorex-components-modal-modal-content.component-B4rhHeEz.mjs → acorex-components-modal-modal-content.component-BVrBX4Qf.mjs} +9 -7
- package/fesm2022/acorex-components-modal-modal-content.component-BVrBX4Qf.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +9 -9
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +381 -260
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box-legacy.mjs +9 -9
- package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +9 -9
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +9 -9
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +34 -39
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +13 -13
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +8 -8
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +88 -47
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +19 -18
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +213 -197
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +308 -113
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +11 -9
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +9 -9
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +8 -8
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +9 -9
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +38 -36
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +10 -10
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +20 -35
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +22 -22
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +9 -9
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +56 -56
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +43 -43
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +16 -10
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +11 -9
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +11 -11
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +9 -9
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +74 -25
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +12 -12
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +14 -14
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +14 -14
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +14 -14
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +15 -15
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +9 -9
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +9 -9
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +14 -12
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +18 -20
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +12 -12
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +239 -131
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +8 -8
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +67 -67
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view-legacy.mjs +16 -12
- package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +26 -11
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +16 -16
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +42 -42
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/form/index.d.ts +2 -1
- package/grid-layout-builder/index.d.ts +1 -2
- package/kanban/index.d.ts +62 -4
- package/kbd/index.d.ts +13 -7
- package/loading/index.d.ts +1 -1
- package/loading-dialog/index.d.ts +31 -15
- package/media-viewer/index.d.ts +2 -1
- package/menu/index.d.ts +4 -0
- package/modal/index.d.ts +7 -0
- package/notification/index.d.ts +47 -32
- package/package.json +3 -3
- package/paint/index.d.ts +1 -6
- package/phone-box/index.d.ts +12 -7
- package/popover/index.d.ts +32 -30
- package/popup/index.d.ts +100 -27
- package/rate-picker/index.d.ts +5 -15
- package/side-menu/index.d.ts +9 -2
- package/slider/index.d.ts +2 -2
- package/time-duration/index.d.ts +0 -1
- package/toast/index.d.ts +24 -18
- package/tooltip/index.d.ts +4 -9
- package/tree-view/index.d.ts +11 -0
- package/tree-view-legacy/index.d.ts +1 -0
- package/fesm2022/acorex-components-modal-acorex-components-modal-CXXcFToK.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-modal-content.component-B4rhHeEz.mjs.map +0 -1
|
@@ -1,17 +1,48 @@
|
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { isPlatformBrowser, NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
7
|
+
import { AXOverlayService } from '@acorex/cdk/overlay';
|
|
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 }] }] } });
|
|
11
42
|
|
|
12
43
|
class AXActionSheetService {
|
|
13
44
|
constructor() {
|
|
14
|
-
this.
|
|
45
|
+
this.overlayService = inject(AXOverlayService);
|
|
15
46
|
this.actionSheetEvent = new Subject();
|
|
16
47
|
this.actionSheetEvent$ = this.actionSheetEvent.asObservable();
|
|
17
48
|
}
|
|
@@ -26,23 +57,24 @@ class AXActionSheetService {
|
|
|
26
57
|
* @param isUserInteraction - Whether the action sheet is opened by user interaction (default: true).
|
|
27
58
|
* This affects how the action sheet handles accessibility and focus management.
|
|
28
59
|
* @returns A promise that resolves to a dialog reference containing methods to control the action sheet.
|
|
29
|
-
* 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.
|
|
30
61
|
* @example
|
|
31
62
|
* ```typescript
|
|
32
63
|
* const dialogRef = await actionSheetService.open({
|
|
33
64
|
* title: 'Choose an option',
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* { text: 'Option 2', value: 'opt2' }
|
|
37
|
-
* ]
|
|
65
|
+
* content: MyCustomComponent,
|
|
66
|
+
* inputs: { userId: 123, userName: 'John' }
|
|
38
67
|
* });
|
|
39
68
|
*
|
|
69
|
+
* // Update inputs dynamically
|
|
70
|
+
* dialogRef.setInputs({ userName: 'Jane' });
|
|
71
|
+
*
|
|
40
72
|
* dialogRef.closed.subscribe(result => {
|
|
41
73
|
* console.log('Action sheet closed with:', result.data);
|
|
42
74
|
* });
|
|
43
75
|
* ```
|
|
44
76
|
*/
|
|
45
|
-
open(config, isUserInteraction = true) {
|
|
77
|
+
async open(config, isUserInteraction = true) {
|
|
46
78
|
const defaultConfig = {
|
|
47
79
|
title: 'action-sheet.title',
|
|
48
80
|
closeButton: true,
|
|
@@ -50,53 +82,87 @@ class AXActionSheetService {
|
|
|
50
82
|
header: true,
|
|
51
83
|
};
|
|
52
84
|
config = Object.assign(defaultConfig, config);
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
this.actionSheetEvent.next({
|
|
67
|
-
dialogRef,
|
|
68
|
-
data: { state: 'open' },
|
|
69
|
-
isUserInteraction,
|
|
70
|
-
});
|
|
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 });
|
|
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
|
|
89
|
+
let internalRef;
|
|
90
|
+
const closeActionSheet = (result) => {
|
|
91
|
+
if (internalRef) {
|
|
92
|
+
internalRef.overlayRef.dispose();
|
|
93
|
+
onClose.next(result?.data);
|
|
94
|
+
onClose.complete();
|
|
95
|
+
if (result?.data) {
|
|
96
|
+
closed.next({ data: result.data });
|
|
90
97
|
}
|
|
91
98
|
else {
|
|
92
99
|
closed.next({});
|
|
93
100
|
}
|
|
94
|
-
|
|
95
|
-
if (resolve) {
|
|
96
|
-
resolve(axDialogRef);
|
|
101
|
+
closed.complete();
|
|
97
102
|
}
|
|
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
|
+
};
|
|
127
|
+
const overlayRef = await this.overlayService.create(AXActionSheetComponent, {
|
|
128
|
+
inputs: {
|
|
129
|
+
data: config,
|
|
130
|
+
onClose: closeActionSheet,
|
|
131
|
+
__actionSheetRef__: actionSheetRef,
|
|
132
|
+
},
|
|
133
|
+
centered: false,
|
|
134
|
+
panelClass: ['ax-action-sheet-panel'],
|
|
135
|
+
backdrop: {
|
|
136
|
+
enabled: true,
|
|
137
|
+
background: true,
|
|
138
|
+
closeOnClick: config.closeOnBackdropClick,
|
|
139
|
+
},
|
|
140
|
+
onDispose: () => {
|
|
141
|
+
// Clean up when disposed externally (e.g., backdrop click)
|
|
142
|
+
closed.next({});
|
|
143
|
+
closed.complete();
|
|
144
|
+
},
|
|
98
145
|
});
|
|
99
|
-
|
|
146
|
+
internalRef = {
|
|
147
|
+
overlayRef,
|
|
148
|
+
close: closeActionSheet,
|
|
149
|
+
};
|
|
150
|
+
// Set the overlayRef input after creation
|
|
151
|
+
if (overlayRef.instance && 'setInput' in overlayRef.instance) {
|
|
152
|
+
overlayRef.instance.setInput('overlayRef', overlayRef);
|
|
153
|
+
}
|
|
154
|
+
// Positioning is handled by CSS via .ax-action-sheet-panel class
|
|
155
|
+
this.actionSheetEvent.next({
|
|
156
|
+
overlayRef,
|
|
157
|
+
data: { state: 'open' },
|
|
158
|
+
isUserInteraction,
|
|
159
|
+
});
|
|
160
|
+
const axDialogRef = {
|
|
161
|
+
close: actionSheetRef.close,
|
|
162
|
+
setInputs: actionSheetRef.setInputs,
|
|
163
|
+
onClose: actionSheetRef.onClose,
|
|
164
|
+
};
|
|
165
|
+
return axDialogRef;
|
|
100
166
|
}
|
|
101
167
|
/**
|
|
102
168
|
* Sets the current state of action sheet events.
|
|
@@ -105,16 +171,16 @@ class AXActionSheetService {
|
|
|
105
171
|
* observable for external subscribers to monitor action sheet state changes.
|
|
106
172
|
*
|
|
107
173
|
* @param event - The action sheet event to emit. Contains information about the event type,
|
|
108
|
-
* associated data, user interaction status, and
|
|
174
|
+
* associated data, user interaction status, and overlay reference.
|
|
109
175
|
* @returns void
|
|
110
176
|
*/
|
|
111
177
|
setActionSheetEventState(event) {
|
|
112
178
|
this.actionSheetEvent.next(event);
|
|
113
179
|
}
|
|
114
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
115
|
-
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' }); }
|
|
116
182
|
}
|
|
117
|
-
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: [{
|
|
118
184
|
type: Injectable,
|
|
119
185
|
args: [{
|
|
120
186
|
providedIn: 'root',
|
|
@@ -129,8 +195,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
129
195
|
class AXActionSheetComponent extends MXBaseComponent {
|
|
130
196
|
constructor() {
|
|
131
197
|
super(...arguments);
|
|
132
|
-
|
|
133
|
-
this.
|
|
198
|
+
/** Action sheet configuration data */
|
|
199
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
200
|
+
/** @internal Callback function to close the action sheet */
|
|
201
|
+
this.onClose = input(...(ngDevMode ? [undefined, { debugName: "onClose" }] : []));
|
|
202
|
+
/** @internal Overlay reference for event tracking */
|
|
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__" }] : []));
|
|
134
206
|
this.document = inject(DOCUMENT);
|
|
135
207
|
this.platformID = inject(PLATFORM_ID);
|
|
136
208
|
this.renderer = inject(Renderer2);
|
|
@@ -145,26 +217,56 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
145
217
|
this.actionSheetHeight = signal(0, ...(ngDevMode ? [{ debugName: "actionSheetHeight" }] : []));
|
|
146
218
|
this.isActionSheetHeightSet = signal(false, ...(ngDevMode ? [{ debugName: "isActionSheetHeightSet" }] : []));
|
|
147
219
|
this.transitionDuration = signal(300, ...(ngDevMode ? [{ debugName: "transitionDuration" }] : []));
|
|
220
|
+
/**
|
|
221
|
+
* @ignore
|
|
222
|
+
*/
|
|
223
|
+
this._componentRef = null;
|
|
224
|
+
/** Template content if data.content is a TemplateRef */
|
|
225
|
+
this.templateContent = computed(() => {
|
|
226
|
+
const content = this.data().content;
|
|
227
|
+
return content instanceof TemplateRef ? content : null;
|
|
228
|
+
}, ...(ngDevMode ? [{ debugName: "templateContent" }] : []));
|
|
229
|
+
/** Component content if data.content is a component Type */
|
|
230
|
+
this.componentContent = computed(() => {
|
|
231
|
+
const content = this.data().content;
|
|
232
|
+
return typeof content === 'function' ? content : null;
|
|
233
|
+
}, ...(ngDevMode ? [{ debugName: "componentContent" }] : []));
|
|
234
|
+
/** Template context for ngTemplateOutlet */
|
|
235
|
+
this.templateContext = computed(() => ({
|
|
236
|
+
$implicit: this.data(),
|
|
237
|
+
ref: this,
|
|
238
|
+
}), ...(ngDevMode ? [{ debugName: "templateContext" }] : []));
|
|
239
|
+
/** Whether content has been rendered (for component content) */
|
|
240
|
+
this.isContentRendered = signal(false, ...(ngDevMode ? [{ debugName: "isContentRendered" }] : []));
|
|
148
241
|
}
|
|
149
242
|
/**
|
|
150
243
|
* @ignore
|
|
151
244
|
*/
|
|
152
245
|
ngOnInit() {
|
|
153
246
|
super.ngOnInit();
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
247
|
+
// Enter animation: start with height 0 and animate to natural height
|
|
248
|
+
if (isPlatformBrowser(this.platformID)) {
|
|
249
|
+
const hostElement = this.getHostElement();
|
|
250
|
+
hostElement.style.height = '0';
|
|
251
|
+
hostElement.style.overflow = 'hidden';
|
|
252
|
+
// Use requestAnimationFrame to ensure the initial height is applied before animating
|
|
253
|
+
requestAnimationFrame(() => {
|
|
254
|
+
hostElement.style.transitionDuration = `${this.transitionDuration()}ms`;
|
|
255
|
+
hostElement.style.height = 'auto';
|
|
256
|
+
// Get the natural height
|
|
257
|
+
const naturalHeight = hostElement.scrollHeight;
|
|
258
|
+
hostElement.style.height = '0';
|
|
259
|
+
requestAnimationFrame(() => {
|
|
260
|
+
hostElement.style.height = `${naturalHeight}px`;
|
|
261
|
+
// After animation completes, set height to auto for flexibility
|
|
262
|
+
setTimeout(() => {
|
|
263
|
+
hostElement.style.height = 'auto';
|
|
264
|
+
hostElement.style.overflow = '';
|
|
265
|
+
}, this.transitionDuration());
|
|
159
266
|
});
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
else if (typeof this.data.content === 'function') {
|
|
163
|
-
this._selectedPortal = new ComponentPortal(this.data.content);
|
|
164
|
-
this.cdr.markForCheck();
|
|
165
|
-
}
|
|
267
|
+
});
|
|
166
268
|
}
|
|
167
|
-
if (isPlatformBrowser(this.platformID) && this.data.draggable) {
|
|
269
|
+
if (isPlatformBrowser(this.platformID) && this.data().draggable) {
|
|
168
270
|
this.onMouseMoveListenerFn = this.renderer.listen(this.document, 'mousemove', (e) => {
|
|
169
271
|
if (this.isDragging()) {
|
|
170
272
|
e.preventDefault();
|
|
@@ -184,7 +286,7 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
184
286
|
nativeEvent: e,
|
|
185
287
|
data: { state: 'dragEnd' },
|
|
186
288
|
isUserInteraction: true,
|
|
187
|
-
|
|
289
|
+
overlayRef: this.overlayRef(),
|
|
188
290
|
});
|
|
189
291
|
this.snapToFinalPosition();
|
|
190
292
|
}
|
|
@@ -196,40 +298,106 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
196
298
|
nativeEvent: e,
|
|
197
299
|
data: { state: 'dragEnd' },
|
|
198
300
|
isUserInteraction: true,
|
|
199
|
-
|
|
301
|
+
overlayRef: this.overlayRef(),
|
|
200
302
|
});
|
|
201
303
|
this.snapToFinalPosition();
|
|
202
304
|
}
|
|
203
305
|
});
|
|
204
306
|
}
|
|
205
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
|
+
}
|
|
206
369
|
ngOnDestroy() {
|
|
207
370
|
this.onMouseMoveListenerFn();
|
|
208
371
|
this.onMouseUpListenerFn();
|
|
209
372
|
this.onTouchMoveListenerFn();
|
|
210
373
|
this.onTouchUpListenerFn();
|
|
374
|
+
// Clean up component reference
|
|
375
|
+
if (this._componentRef) {
|
|
376
|
+
this._componentRef.destroy();
|
|
377
|
+
this._componentRef = null;
|
|
378
|
+
}
|
|
211
379
|
}
|
|
212
380
|
handleMouseDown(e) {
|
|
213
|
-
if (!this.data.draggable || e.button !== 0)
|
|
381
|
+
if (!this.data().draggable || e.button !== 0)
|
|
214
382
|
return;
|
|
215
383
|
e.preventDefault();
|
|
216
384
|
this.actionSheetService.setActionSheetEventState({
|
|
217
385
|
nativeEvent: e,
|
|
218
386
|
data: { state: 'dragStart' },
|
|
219
387
|
isUserInteraction: true,
|
|
220
|
-
|
|
388
|
+
overlayRef: this.overlayRef(),
|
|
221
389
|
});
|
|
222
390
|
this.handleDown(e.clientY);
|
|
223
391
|
}
|
|
224
392
|
handleTouchDown(e) {
|
|
225
|
-
if (!this.data.draggable || e.target.className.includes('close'))
|
|
393
|
+
if (!this.data().draggable || e.target.className.includes('close'))
|
|
226
394
|
return;
|
|
227
395
|
e.preventDefault();
|
|
228
396
|
this.actionSheetService.setActionSheetEventState({
|
|
229
397
|
nativeEvent: e,
|
|
230
398
|
data: { state: 'dragStart' },
|
|
231
399
|
isUserInteraction: true,
|
|
232
|
-
|
|
400
|
+
overlayRef: this.overlayRef(),
|
|
233
401
|
});
|
|
234
402
|
this.handleDown(e.touches[0].clientY);
|
|
235
403
|
}
|
|
@@ -259,18 +427,18 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
259
427
|
this.actionSheetService.setActionSheetEventState({
|
|
260
428
|
data: { state: 'normalSize' },
|
|
261
429
|
isUserInteraction: true,
|
|
262
|
-
|
|
430
|
+
overlayRef: this.overlayRef(),
|
|
263
431
|
});
|
|
264
432
|
return;
|
|
265
433
|
}
|
|
266
|
-
if (this.data.dragUp && currentHeight > (windowHeight + initialHeight) / 3) {
|
|
434
|
+
if (this.data().dragUp && currentHeight > (windowHeight + initialHeight) / 3) {
|
|
267
435
|
this.getHostElement().style.height = '100vh';
|
|
268
436
|
this.isFullScreen.set(true);
|
|
269
437
|
this.document.body.parentElement.style.overscrollBehaviorY = 'contain';
|
|
270
438
|
this.actionSheetService.setActionSheetEventState({
|
|
271
439
|
data: { state: 'fullScreen' },
|
|
272
440
|
isUserInteraction: true,
|
|
273
|
-
|
|
441
|
+
overlayRef: this.overlayRef(),
|
|
274
442
|
});
|
|
275
443
|
return;
|
|
276
444
|
}
|
|
@@ -278,11 +446,11 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
278
446
|
this.actionSheetService.setActionSheetEventState({
|
|
279
447
|
data: { state: 'normalSize' },
|
|
280
448
|
isUserInteraction: true,
|
|
281
|
-
|
|
449
|
+
overlayRef: this.overlayRef(),
|
|
282
450
|
});
|
|
283
451
|
}
|
|
284
452
|
heightCalculator(clientY) {
|
|
285
|
-
if (this.data.dragUp) {
|
|
453
|
+
if (this.data().dragUp) {
|
|
286
454
|
return this.document.documentElement.clientHeight - clientY;
|
|
287
455
|
}
|
|
288
456
|
if (clientY >= this.document.documentElement.clientHeight - this.actionSheetHeight()) {
|
|
@@ -290,19 +458,6 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
290
458
|
}
|
|
291
459
|
return (this.actionSheetHeight() + (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10);
|
|
292
460
|
}
|
|
293
|
-
handleAttched(ref) {
|
|
294
|
-
ref = ref;
|
|
295
|
-
if (ref.instance) {
|
|
296
|
-
this._componentRef = ref.instance;
|
|
297
|
-
Object.assign(this._componentRef, this.data);
|
|
298
|
-
Object.assign(this._componentRef, { _isPopup: true });
|
|
299
|
-
if (ref.instance.onClosed) {
|
|
300
|
-
ref.instance.onClosed.subscribe((e) => {
|
|
301
|
-
this.close(e);
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
461
|
/**
|
|
307
462
|
* Handles click events on action sheet items.
|
|
308
463
|
* This method is called when a user clicks on an action sheet item. It closes the action sheet
|
|
@@ -336,13 +491,16 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
336
491
|
this.actionSheetService.setActionSheetEventState({
|
|
337
492
|
data: { state: 'close' },
|
|
338
493
|
isUserInteraction,
|
|
339
|
-
|
|
340
|
-
});
|
|
341
|
-
this.dialogRef.close({
|
|
342
|
-
component: this._componentRef,
|
|
343
|
-
htmlElement: this.getHostElement(),
|
|
344
|
-
data: e,
|
|
494
|
+
overlayRef: this.overlayRef(),
|
|
345
495
|
});
|
|
496
|
+
const closeCallback = this.onClose();
|
|
497
|
+
if (closeCallback) {
|
|
498
|
+
closeCallback({
|
|
499
|
+
component: this._componentRef?.instance,
|
|
500
|
+
htmlElement: this.getHostElement(),
|
|
501
|
+
data: e,
|
|
502
|
+
});
|
|
503
|
+
}
|
|
346
504
|
}, this.transitionDuration());
|
|
347
505
|
}
|
|
348
506
|
/**
|
|
@@ -350,12 +508,12 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
350
508
|
*/
|
|
351
509
|
onKeydownHandler() {
|
|
352
510
|
const focusedOrHasFocused = this.getHostElement().matches(':focus-within');
|
|
353
|
-
if (this.data.closeButton && focusedOrHasFocused) {
|
|
511
|
+
if (this.data().closeButton && focusedOrHasFocused) {
|
|
354
512
|
this.close(null);
|
|
355
513
|
}
|
|
356
514
|
}
|
|
357
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
358
|
-
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: [
|
|
359
517
|
{ provide: AXComponent, useExisting: AXActionSheetComponent },
|
|
360
518
|
{
|
|
361
519
|
provide: AXClosableComponent,
|
|
@@ -365,11 +523,13 @@ class AXActionSheetComponent extends MXBaseComponent {
|
|
|
365
523
|
provide: AXFocusableComponent,
|
|
366
524
|
useExisting: AXActionSheetComponent,
|
|
367
525
|
},
|
|
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 (
|
|
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 class=\"line-clamp-1\">{{ data().title | translate | async }}</ax-title>\n\n @if (data().subTitle) {\n <ax-subtitle class=\"line-clamp-2\">\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 @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}\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-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 }); }
|
|
369
527
|
}
|
|
370
|
-
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: [{
|
|
371
529
|
type: Component,
|
|
372
|
-
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None,
|
|
530
|
+
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
531
|
+
'(keydown.escape)': 'onKeydownHandler()',
|
|
532
|
+
}, providers: [
|
|
373
533
|
{ provide: AXComponent, useExisting: AXActionSheetComponent },
|
|
374
534
|
{
|
|
375
535
|
provide: AXClosableComponent,
|
|
@@ -379,18 +539,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
379
539
|
provide: AXFocusableComponent,
|
|
380
540
|
useExisting: AXActionSheetComponent,
|
|
381
541
|
},
|
|
382
|
-
], imports: [
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
542
|
+
], imports: [
|
|
543
|
+
AXDecoratorGenericComponent,
|
|
544
|
+
AXDecoratorCloseButtonComponent,
|
|
545
|
+
NgTemplateOutlet,
|
|
546
|
+
AXTranslatorPipe,
|
|
547
|
+
AsyncPipe,
|
|
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 class=\"line-clamp-1\">{{ data().title | translate | async }}</ax-title>\n\n @if (data().subTitle) {\n <ax-subtitle class=\"line-clamp-2\">\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 @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}\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-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 }]
|
|
386
552
|
}] } });
|
|
387
553
|
|
|
388
554
|
class AXActionSheetModule {
|
|
389
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
390
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
391
|
-
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] }); }
|
|
392
558
|
}
|
|
393
|
-
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: [{
|
|
394
560
|
type: NgModule,
|
|
395
561
|
args: [{
|
|
396
562
|
imports: [AXActionSheetComponent],
|
|
@@ -403,5 +569,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
403
569
|
* Generated bundle index. Do not edit.
|
|
404
570
|
*/
|
|
405
571
|
|
|
406
|
-
export { AXActionSheetComponent, AXActionSheetModule, AXActionSheetService };
|
|
572
|
+
export { AXActionSheetComponent, AXActionSheetComponentBase, AXActionSheetModule, AXActionSheetService };
|
|
407
573
|
//# sourceMappingURL=acorex-components-action-sheet.mjs.map
|