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