@acorex/cdk 21.0.0-next.9 → 21.0.0-next51

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.
Files changed (46) hide show
  1. package/accordion/index.d.ts +1 -0
  2. package/drag-drop/index.d.ts +57 -44
  3. package/drawer/index.d.ts +12 -9
  4. package/fesm2022/acorex-cdk-accordion.mjs +52 -67
  5. package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
  6. package/fesm2022/acorex-cdk-carousel.mjs +13 -10
  7. package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
  8. package/fesm2022/acorex-cdk-clipboard.mjs +6 -6
  9. package/fesm2022/acorex-cdk-clipboard.mjs.map +1 -1
  10. package/fesm2022/acorex-cdk-common.mjs +104 -104
  11. package/fesm2022/acorex-cdk-common.mjs.map +1 -1
  12. package/fesm2022/acorex-cdk-dom.mjs +3 -3
  13. package/fesm2022/acorex-cdk-dom.mjs.map +1 -1
  14. package/fesm2022/acorex-cdk-drag-drop.mjs +278 -85
  15. package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
  16. package/fesm2022/acorex-cdk-drawer.mjs +44 -33
  17. package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
  18. package/fesm2022/acorex-cdk-focus-trap.mjs +3 -3
  19. package/fesm2022/acorex-cdk-focus-trap.mjs.map +1 -1
  20. package/fesm2022/acorex-cdk-input-mask.mjs +5 -3
  21. package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
  22. package/fesm2022/acorex-cdk-list-navigation.mjs +39 -21
  23. package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
  24. package/fesm2022/acorex-cdk-outline.mjs +6 -6
  25. package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
  26. package/fesm2022/acorex-cdk-overlay.mjs +3 -3
  27. package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
  28. package/fesm2022/acorex-cdk-pan-view.mjs +3 -3
  29. package/fesm2022/acorex-cdk-pan-view.mjs.map +1 -1
  30. package/fesm2022/acorex-cdk-resizable.mjs +166 -118
  31. package/fesm2022/acorex-cdk-resizable.mjs.map +1 -1
  32. package/fesm2022/acorex-cdk-selection.mjs +10 -10
  33. package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
  34. package/fesm2022/acorex-cdk-sliding-item.mjs +3 -3
  35. package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
  36. package/fesm2022/acorex-cdk-sticky.mjs +3 -3
  37. package/fesm2022/acorex-cdk-sticky.mjs.map +1 -1
  38. package/fesm2022/acorex-cdk-uploader.mjs +746 -0
  39. package/fesm2022/acorex-cdk-uploader.mjs.map +1 -0
  40. package/fesm2022/acorex-cdk-virtual-scroll.mjs +10 -10
  41. package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
  42. package/list-navigation/index.d.ts +1 -0
  43. package/package.json +6 -2
  44. package/resizable/index.d.ts +19 -7
  45. package/uploader/README.md +3 -0
  46. package/uploader/index.d.ts +378 -0
@@ -32,6 +32,7 @@ declare class AXAccordionGroupDirective {
32
32
  private contentChildren;
33
33
  private activeId;
34
34
  customAccordionItem: i0.WritableSignal<AXAccordionItemDirective[]>;
35
+ private accordionHandler;
35
36
  static ɵfac: i0.ɵɵFactoryDeclaration<AXAccordionGroupDirective, never>;
36
37
  static ɵdir: i0.ɵɵDirectiveDeclaration<AXAccordionGroupDirective, "[axAccordionGroup]", ["axAccordionGroup"], { "accordion": { "alias": "accordion"; "required": false; "isSignal": true; }; "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "collapsedOnItemClick": { "alias": "collapsedOnItemClick"; "required": false; "isSignal": true; }; }, {}, ["contentChildren"], never, true, never>;
37
38
  }
@@ -16,6 +16,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
16
16
  private viewContainerRef;
17
17
  private el;
18
18
  private handleDirective;
19
+ axDrag: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
19
20
  dragData: _angular_core.InputSignal<unknown>;
20
21
  dragDisabled: _angular_core.InputSignal<boolean>;
21
22
  dragTransition: _angular_core.InputSignal<boolean>;
@@ -38,13 +39,14 @@ declare class AXDragDirective implements OnInit, OnDestroy {
38
39
  private dragStartTime;
39
40
  private isDragging;
40
41
  private elementOpacity;
41
- private isDelayStarted;
42
42
  private movedAfterDelay;
43
43
  private activePointerId;
44
44
  private prevDropZone;
45
45
  private dragStartOffset;
46
46
  private clonePointerOffset;
47
47
  private clonedElementViewRef;
48
+ private rafId;
49
+ private pendingPointerEvent;
48
50
  private _parentDropList;
49
51
  private _currentDropList;
50
52
  readonly createCloneElement: _angular_core.Signal<boolean>;
@@ -56,6 +58,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
56
58
  private boundHandlePointerUp;
57
59
  private boundHandlePointerDown;
58
60
  private boundHandlePointerMove;
61
+ private listenersAttached;
59
62
  ngOnInit(): void;
60
63
  ngOnDestroy(): void;
61
64
  private setElementTransition;
@@ -68,6 +71,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
68
71
  private preventClicking;
69
72
  private handleDropListInteractions;
70
73
  private canDropInList;
74
+ private isCircularReference;
71
75
  private dropZoneHoverHandler;
72
76
  private dropZoneDropHandler;
73
77
  private getDropZonesFromPoint;
@@ -83,7 +87,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
83
87
  private addDocumentListeners;
84
88
  private removeDocumentListeners;
85
89
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragDirective, never>;
86
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragDirective, "[axDrag]", never, { "dragData": { "alias": "dragData"; "required": false; "isSignal": true; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; "isSignal": true; }; "dragTransition": { "alias": "dragTransition"; "required": false; "isSignal": true; }; "dragElementClone": { "alias": "dragElementClone"; "required": false; "isSignal": true; }; "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; "dragStartDelay": { "alias": "dragStartDelay"; "required": false; "isSignal": true; }; "dragResetOnDblClick": { "alias": "dragResetOnDblClick"; "required": false; "isSignal": true; }; "dragLockAxis": { "alias": "dragLockAxis"; "required": false; "isSignal": true; }; "dragClonedTemplate": { "alias": "dragClonedTemplate"; "required": false; "isSignal": true; }; "dragCursor": { "alias": "dragCursor"; "required": false; "isSignal": true; }; "dragBoundary": { "alias": "dragBoundary"; "required": false; "isSignal": true; }; "dragTransitionDuration": { "alias": "dragTransitionDuration"; "required": false; "isSignal": true; }; }, { "dragPositionChanged": "dragPositionChanged"; }, ["handleDirective"], never, true, never>;
90
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragDirective, "[axDrag]", never, { "axDrag": { "alias": "axDrag"; "required": false; "isSignal": true; }; "dragData": { "alias": "dragData"; "required": false; "isSignal": true; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; "isSignal": true; }; "dragTransition": { "alias": "dragTransition"; "required": false; "isSignal": true; }; "dragElementClone": { "alias": "dragElementClone"; "required": false; "isSignal": true; }; "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; "dragStartDelay": { "alias": "dragStartDelay"; "required": false; "isSignal": true; }; "dragResetOnDblClick": { "alias": "dragResetOnDblClick"; "required": false; "isSignal": true; }; "dragLockAxis": { "alias": "dragLockAxis"; "required": false; "isSignal": true; }; "dragClonedTemplate": { "alias": "dragClonedTemplate"; "required": false; "isSignal": true; }; "dragCursor": { "alias": "dragCursor"; "required": false; "isSignal": true; }; "dragBoundary": { "alias": "dragBoundary"; "required": false; "isSignal": true; }; "dragTransitionDuration": { "alias": "dragTransitionDuration"; "required": false; "isSignal": true; }; }, { "dragPositionChanged": "dragPositionChanged"; }, ["handleDirective"], never, true, never>;
87
91
  }
88
92
 
89
93
  declare class AXDragHandleDirective {
@@ -93,45 +97,6 @@ declare class AXDragHandleDirective {
93
97
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragHandleDirective, "[axDragHandle]", never, {}, {}, never, never, true, never>;
94
98
  }
95
99
 
96
- interface AXDropZoneDropEvent extends NXNativeEvent<AXDropZoneDirective, MouseEvent> {
97
- dropped: AXDragDirective;
98
- }
99
- type AXDropZoneHoverEvent = AXDropZoneDropEvent & {
100
- state: 'enter' | 'leave';
101
- };
102
- declare class AXDropZoneDirective extends NXComponent implements OnInit {
103
- dropZoneGroup: _angular_core.InputSignal<string>;
104
- isHovered: _angular_core.WritableSignal<boolean>;
105
- readonly element: _angular_core.WritableSignal<HTMLElement>;
106
- onElementDrop: _angular_core.OutputEmitterRef<AXDropZoneDropEvent>;
107
- onElementHover: _angular_core.OutputEmitterRef<AXDropZoneHoverEvent>;
108
- ngOnInit(): void;
109
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDropZoneDirective, never>;
110
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropZoneDirective, "[axDropZone]", ["axDropZone"], { "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; }, { "onElementDrop": "onElementDrop"; "onElementHover": "onElementHover"; }, never, never, true, never>;
111
- }
112
-
113
- declare class AXDragDropModule {
114
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragDropModule, never>;
115
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXDragDropModule, never, [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropZoneDirective], [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropZoneDirective]>;
116
- static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXDragDropModule>;
117
- }
118
-
119
- /**
120
- * Moves an item one index in an array to another.
121
- * @param array Array in which to move the item.
122
- * @param fromIndex Starting index of the item.
123
- * @param toIndex Index to which the item should be moved.
124
- */
125
- declare function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void;
126
- /**
127
- * Moves an item from one array to another.
128
- * @param currentArray Array from which to transfer the item.
129
- * @param targetArray Array into which to put the item.
130
- * @param currentIndex Index of the item in its current array.
131
- * @param targetIndex Index at which to insert the item.
132
- */
133
- declare function transferArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
134
-
135
100
  /** Event object emitted when an item is dropped into a drop list. */
136
101
  interface AXDropListDroppedEvent extends NXNativeEvent<AXDropListDirective, MouseEvent> {
137
102
  item: AXDragDirective;
@@ -150,12 +115,14 @@ interface AXDropListDroppedEvent extends NXNativeEvent<AXDropListDirective, Mous
150
115
  * This directive automatically detects `gap` from flexbox/grid layouts and handles
151
116
  * items with variable sizes and margins.
152
117
  */
153
- declare class AXDropListDirective extends NXComponent implements OnInit, AfterContentInit {
118
+ declare class AXDropListDirective extends NXComponent implements OnInit, AfterContentInit, OnDestroy {
154
119
  private readonly _zone;
155
120
  private readonly _renderer;
156
121
  private readonly _cdr;
157
122
  private readonly _platformId;
158
123
  private readonly _hostEl;
124
+ /** Boolean input matching the directive selector name for conditional application. */
125
+ axDropList: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
159
126
  /** Whether sorting within this list is disabled. */
160
127
  sortingDisabled: _angular_core.InputSignal<boolean>;
161
128
  /** The group this drop list belongs to. Dragging is only allowed between lists of the same group. */
@@ -180,8 +147,11 @@ declare class AXDropListDirective extends NXComponent implements OnInit, AfterCo
180
147
  private readonly _listGap;
181
148
  /** A signal-based alias for the orientation input for internal use. */
182
149
  private readonly _orientation;
150
+ /** DOM placeholder element for inter-list drags */
151
+ private _placeholderElement;
183
152
  ngOnInit(): void;
184
153
  ngAfterContentInit(): void;
154
+ ngOnDestroy(): void;
185
155
  /** Checks if the given drag item is the one currently active in this list. */
186
156
  isDragActiveForThisList(dragItem: AXDragDirective): boolean;
187
157
  /**
@@ -222,8 +192,12 @@ declare class AXDropListDirective extends NXComponent implements OnInit, AfterCo
222
192
  * @returns The calculated placeholder index.
223
193
  */
224
194
  private _calculatePlaceholderIndex;
225
- /** Applies `transform` styles to all items to create the visual sorting effect. */
195
+ /** Applies visual shifts - uses placeholder for inter-list, transforms for intra-list. */
226
196
  private _applyVisualShifts;
197
+ /** Creates or moves the placeholder element for inter-list drags */
198
+ private _updatePlaceholderElement;
199
+ /** Removes the placeholder element if it exists */
200
+ private _removePlaceholderElement;
227
201
  /**
228
202
  * Calculates the required transform in pixels for a single item.
229
203
  * @param index The index of the item to transform.
@@ -240,8 +214,47 @@ declare class AXDropListDirective extends NXComponent implements OnInit, AfterCo
240
214
  /** Resets the internal state of the directive to its initial values. */
241
215
  resetSortState(): void;
242
216
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDropListDirective, never>;
243
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropListDirective, "[axDropList]", ["axDropList"], { "sortingDisabled": { "alias": "sortingDisabled"; "required": false; "isSignal": true; }; "dropListGroup": { "alias": "dropListGroup"; "required": false; "isSignal": true; }; "dropListOrientation": { "alias": "dropListOrientation"; "required": false; "isSignal": true; }; }, { "dropListDropped": "dropListDropped"; }, ["_draggableItems"], never, true, never>;
217
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropListDirective, "[axDropList]", ["axDropList"], { "axDropList": { "alias": "axDropList"; "required": false; "isSignal": true; }; "sortingDisabled": { "alias": "sortingDisabled"; "required": false; "isSignal": true; }; "dropListGroup": { "alias": "dropListGroup"; "required": false; "isSignal": true; }; "dropListOrientation": { "alias": "dropListOrientation"; "required": false; "isSignal": true; }; }, { "dropListDropped": "dropListDropped"; }, ["_draggableItems"], never, true, never>;
244
218
  }
245
219
 
220
+ interface AXDropZoneDropEvent extends NXNativeEvent<AXDropZoneDirective, MouseEvent> {
221
+ dropped: AXDragDirective;
222
+ }
223
+ type AXDropZoneHoverEvent = AXDropZoneDropEvent & {
224
+ state: 'enter' | 'leave';
225
+ };
226
+ declare class AXDropZoneDirective extends NXComponent implements OnInit {
227
+ dropZoneGroup: _angular_core.InputSignal<string>;
228
+ isHovered: _angular_core.WritableSignal<boolean>;
229
+ readonly element: _angular_core.WritableSignal<HTMLElement>;
230
+ onElementDrop: _angular_core.OutputEmitterRef<AXDropZoneDropEvent>;
231
+ onElementHover: _angular_core.OutputEmitterRef<AXDropZoneHoverEvent>;
232
+ ngOnInit(): void;
233
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDropZoneDirective, never>;
234
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropZoneDirective, "[axDropZone]", ["axDropZone"], { "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; }, { "onElementDrop": "onElementDrop"; "onElementHover": "onElementHover"; }, never, never, true, never>;
235
+ }
236
+
237
+ declare class AXDragDropModule {
238
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragDropModule, never>;
239
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXDragDropModule, never, [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropListDirective, typeof AXDropZoneDirective], [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropListDirective, typeof AXDropZoneDirective]>;
240
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXDragDropModule>;
241
+ }
242
+
243
+ /**
244
+ * Moves an item one index in an array to another.
245
+ * @param array Array in which to move the item.
246
+ * @param fromIndex Starting index of the item.
247
+ * @param toIndex Index to which the item should be moved.
248
+ */
249
+ declare function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void;
250
+ /**
251
+ * Moves an item from one array to another.
252
+ * @param currentArray Array from which to transfer the item.
253
+ * @param targetArray Array into which to put the item.
254
+ * @param currentIndex Index of the item in its current array.
255
+ * @param targetIndex Index at which to insert the item.
256
+ */
257
+ declare function transferArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
258
+
246
259
  export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, moveItemInArray, transferArrayItem };
247
260
  export type { AXDropListDroppedEvent, AXDropZoneDropEvent, AXDropZoneHoverEvent };
package/drawer/index.d.ts CHANGED
@@ -1,14 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ElementRef, OnDestroy } from '@angular/core';
2
+ import { OnDestroy, ElementRef } from '@angular/core';
3
3
  import { AXClickEvent } from '@acorex/cdk/common';
4
4
 
5
- declare class AXDrawerContainerDirective {
6
- #private;
7
- el: ElementRef<any>;
8
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDrawerContainerDirective, never>;
9
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDrawerContainerDirective, "[axDrawerContainer]", ["axDrawerContainer"], {}, {}, never, never, true, never>;
10
- }
11
-
12
5
  type AXDrawerMode = 'push' | 'overlay';
13
6
  type AXDrawerLocation = 'start' | 'end' | 'top' | 'bottom';
14
7
  declare class AXDrawerItemDirective implements OnDestroy {
@@ -28,6 +21,8 @@ declare class AXDrawerItemDirective implements OnDestroy {
28
21
  closeOnBackdropClick: _angular_core.ModelSignal<boolean>;
29
22
  backdropClass: _angular_core.ModelSignal<string>;
30
23
  onBackdropClick: _angular_core.OutputEmitterRef<AXClickEvent>;
24
+ singleOpenMode: _angular_core.ModelSignal<boolean>;
25
+ id: number;
31
26
  /**
32
27
  * Shows the drawer by animating it into view.
33
28
  *
@@ -51,7 +46,15 @@ declare class AXDrawerItemDirective implements OnDestroy {
51
46
  private removeBackDropOnResize;
52
47
  ngOnDestroy(): void;
53
48
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDrawerItemDirective, never>;
54
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDrawerItemDirective, "[axDrawerItem]", ["axDrawerItem"], { "location": { "alias": "location"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "backDrop": { "alias": "backDrop"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; }, { "collapseStateChanged": "collapseStateChanged"; "location": "locationChange"; "collapsed": "collapsedChange"; "backDrop": "backDropChange"; "mode": "modeChange"; "transition": "transitionChange"; "closeOnBackdropClick": "closeOnBackdropClickChange"; "backdropClass": "backdropClassChange"; "onBackdropClick": "onBackdropClick"; }, never, never, true, never>;
49
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDrawerItemDirective, "[axDrawerItem]", ["axDrawerItem"], { "location": { "alias": "location"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "backDrop": { "alias": "backDrop"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "singleOpenMode": { "alias": "singleOpenMode"; "required": false; "isSignal": true; }; }, { "collapseStateChanged": "collapseStateChanged"; "location": "locationChange"; "collapsed": "collapsedChange"; "backDrop": "backDropChange"; "mode": "modeChange"; "transition": "transitionChange"; "closeOnBackdropClick": "closeOnBackdropClickChange"; "backdropClass": "backdropClassChange"; "onBackdropClick": "onBackdropClick"; "singleOpenMode": "singleOpenModeChange"; }, never, never, true, never>;
50
+ }
51
+
52
+ declare class AXDrawerContainerDirective {
53
+ #private;
54
+ el: ElementRef<any>;
55
+ drawerItem: _angular_core.Signal<readonly AXDrawerItemDirective[]>;
56
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDrawerContainerDirective, never>;
57
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDrawerContainerDirective, "[axDrawerContainer]", ["axDrawerContainer"], {}, {}, ["drawerItem"], never, true, never>;
55
58
  }
56
59
 
57
60
  declare class AXDrawerDirectiveModule {
@@ -7,10 +7,10 @@ class AXAccordionCloseButtonDirective {
7
7
  constructor() {
8
8
  this.elm = inject(ElementRef);
9
9
  }
10
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionCloseButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: AXAccordionCloseButtonDirective, isStandalone: true, selector: "[axAccordionCloseButton]", ngImport: i0 }); }
10
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionCloseButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: AXAccordionCloseButtonDirective, isStandalone: true, selector: "[axAccordionCloseButton]", ngImport: i0 }); }
12
12
  }
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionCloseButtonDirective, decorators: [{
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionCloseButtonDirective, decorators: [{
14
14
  type: Directive,
15
15
  args: [{ selector: '[axAccordionCloseButton]' }]
16
16
  }] });
@@ -19,10 +19,10 @@ class AXAccordionItemHeaderDirective {
19
19
  constructor() {
20
20
  this.elm = inject(ElementRef);
21
21
  }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionItemHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
23
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: AXAccordionItemHeaderDirective, isStandalone: true, selector: "[axAccordionItemHeader]", exportAs: ["axAccordionItemHeader"], ngImport: i0 }); }
22
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionItemHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
23
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: AXAccordionItemHeaderDirective, isStandalone: true, selector: "[axAccordionItemHeader]", exportAs: ["axAccordionItemHeader"], ngImport: i0 }); }
24
24
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionItemHeaderDirective, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionItemHeaderDirective, decorators: [{
26
26
  type: Directive,
27
27
  args: [{
28
28
  selector: '[axAccordionItemHeader]',
@@ -67,10 +67,10 @@ class AXAccordionItemDirective {
67
67
  toggle() {
68
68
  this.isCollapsed.update((prev) => !prev);
69
69
  }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
71
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.6", type: AXAccordionItemDirective, isStandalone: true, selector: "[axAccordionItem]", inputs: { isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange", onClick: "onClick" }, queries: [{ propertyName: "closeBtn", first: true, predicate: AXAccordionCloseButtonDirective, descendants: true, isSignal: true }, { propertyName: "header", first: true, predicate: AXAccordionItemHeaderDirective, descendants: true, isSignal: true }], exportAs: ["axAccordionItem"], ngImport: i0 }); }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
71
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.9", type: AXAccordionItemDirective, isStandalone: true, selector: "[axAccordionItem]", inputs: { isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange", onClick: "onClick" }, queries: [{ propertyName: "closeBtn", first: true, predicate: AXAccordionCloseButtonDirective, descendants: true, isSignal: true }, { propertyName: "header", first: true, predicate: AXAccordionItemHeaderDirective, descendants: true, isSignal: true }], exportAs: ["axAccordionItem"], ngImport: i0 }); }
72
72
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionItemDirective, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionItemDirective, decorators: [{
74
74
  type: Directive,
75
75
  args: [{
76
76
  selector: '[axAccordionItem]',
@@ -86,7 +86,7 @@ class AXAccordionGroupDirective {
86
86
  this.contentChildren = contentChildren(AXAccordionItemDirective, ...(ngDevMode ? [{ debugName: "contentChildren" }] : []));
87
87
  this.activeId = signal(null, ...(ngDevMode ? [{ debugName: "activeId" }] : []));
88
88
  this.customAccordionItem = signal([], ...(ngDevMode ? [{ debugName: "customAccordionItem" }] : []));
89
- this.#init = afterNextRender(() => {
89
+ this.#init = effect(() => {
90
90
  if (this.contentChildren().length) {
91
91
  this.contentChildren().forEach((element) => {
92
92
  element.collapsedOnItemClick.set(this.collapsedOnItemClick());
@@ -94,6 +94,8 @@ class AXAccordionGroupDirective {
94
94
  this.activeId.set(element.id());
95
95
  element.onClick.subscribe((e) => {
96
96
  this.activeId.set(e.component.id());
97
+ if (this.accordion())
98
+ this.accordionHandler(e.component.id());
97
99
  });
98
100
  });
99
101
  }
@@ -104,10 +106,12 @@ class AXAccordionGroupDirective {
104
106
  this.activeId.set(element.id());
105
107
  element.onClick.subscribe((e) => {
106
108
  this.activeId.set(e.component.id());
109
+ if (this.accordion())
110
+ this.accordionHandler(e.component.id());
107
111
  });
108
112
  });
109
113
  }
110
- });
114
+ }, ...(ngDevMode ? [{ debugName: "#init" }] : []));
111
115
  this.#eff2 = effect(() => {
112
116
  if (!this.activeIndex())
113
117
  return;
@@ -135,38 +139,35 @@ class AXAccordionGroupDirective {
135
139
  });
136
140
  }
137
141
  }, ...(ngDevMode ? [{ debugName: "#eff2" }] : []));
138
- this.#eff3 = effect(() => {
139
- if (!this.accordion() || !this.collapsedOnItemClick())
140
- return;
141
- if (this.contentChildren().length) {
142
- this.contentChildren().forEach((element) => {
143
- if (this.activeId() === element.id()) {
144
- element.isCollapsed.set(false);
145
- }
146
- else {
147
- element.isCollapsed.set(true);
148
- }
149
- });
150
- }
151
- else {
152
- this.customAccordionItem().forEach((element) => {
153
- if (this.activeId() === element.id()) {
154
- element.isCollapsed.set(false);
155
- }
156
- else {
157
- element.isCollapsed.set(true);
158
- }
159
- });
160
- }
161
- }, ...(ngDevMode ? [{ debugName: "#eff3" }] : []));
162
142
  }
163
143
  #init;
164
144
  #eff2;
165
- #eff3;
166
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
167
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.6", type: AXAccordionGroupDirective, isStandalone: true, selector: "[axAccordionGroup]", inputs: { accordion: { classPropertyName: "accordion", publicName: "accordion", isSignal: true, isRequired: false, transformFunction: null }, activeIndex: { classPropertyName: "activeIndex", publicName: "activeIndex", isSignal: true, isRequired: false, transformFunction: null }, collapsedOnItemClick: { classPropertyName: "collapsedOnItemClick", publicName: "collapsedOnItemClick", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "contentChildren", predicate: AXAccordionItemDirective, isSignal: true }], exportAs: ["axAccordionGroup"], ngImport: i0 }); }
145
+ accordionHandler(activeId) {
146
+ if (this.contentChildren().length) {
147
+ this.contentChildren().forEach((element) => {
148
+ if (activeId === element.id()) {
149
+ element.isCollapsed.update((prev) => prev);
150
+ }
151
+ else {
152
+ element.isCollapsed.set(true);
153
+ }
154
+ });
155
+ }
156
+ else {
157
+ this.customAccordionItem().forEach((element) => {
158
+ if (activeId === element.id()) {
159
+ element.isCollapsed.update((prev) => prev);
160
+ }
161
+ else {
162
+ element.isCollapsed.set(true);
163
+ }
164
+ });
165
+ }
166
+ }
167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
168
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.9", type: AXAccordionGroupDirective, isStandalone: true, selector: "[axAccordionGroup]", inputs: { accordion: { classPropertyName: "accordion", publicName: "accordion", isSignal: true, isRequired: false, transformFunction: null }, activeIndex: { classPropertyName: "activeIndex", publicName: "activeIndex", isSignal: true, isRequired: false, transformFunction: null }, collapsedOnItemClick: { classPropertyName: "collapsedOnItemClick", publicName: "collapsedOnItemClick", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "contentChildren", predicate: AXAccordionItemDirective, isSignal: true }], exportAs: ["axAccordionGroup"], ngImport: i0 }); }
168
169
  }
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionGroupDirective, decorators: [{
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionGroupDirective, decorators: [{
170
171
  type: Directive,
171
172
  args: [{
172
173
  selector: '[axAccordionGroup]',
@@ -180,42 +181,26 @@ class AXAccordionItemContentDirective {
180
181
  this.parent = inject(AXAccordionItemDirective);
181
182
  this.collapseContent = computed(() => this.parent.isCollapsed(), ...(ngDevMode ? [{ debugName: "collapseContent" }] : []));
182
183
  this.transition = input(150, ...(ngDevMode ? [{ debugName: "transition" }] : []));
183
- this.#init = afterNextRender(() => {
184
- const el = this.elm.nativeElement;
185
- el.style.display = 'none';
186
- });
187
184
  this.#eff = effect(() => {
188
185
  const el = this.elm.nativeElement;
189
- el.style.transition = `height ${this.transition()}ms cubic-bezier(0.4,0,0.2,1), opacity ${this.transition()}ms cubic-bezier(0.4,0,0.2,1)`;
186
+ const originalTransition = `all ${this.transition()}ms ease-in-out`;
187
+ el.style.transition = originalTransition;
190
188
  el.style.overflow = 'hidden';
191
189
  if (this.collapseContent()) {
190
+ el.style.height = '0';
192
191
  el.style.opacity = '0';
193
- el.style.height = el.scrollHeight + 'px';
194
- requestAnimationFrame(() => {
195
- el.style.height = '0';
196
- });
197
192
  }
198
193
  else {
199
- setTimeout(() => {
200
- el.style.display = 'block';
201
- el.style.opacity = '1';
202
- el.style.height = el.scrollHeight + 'px';
203
- });
204
- const onTransitionEnd = (event) => {
205
- if (event.propertyName === 'height') {
206
- el.style.height = 'auto';
207
- }
208
- };
209
- el.addEventListener('transitionend', onTransitionEnd, { once: true });
194
+ el.style.height = 'auto';
195
+ el.style.opacity = '1';
210
196
  }
211
197
  }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
212
198
  }
213
- #init;
214
199
  #eff;
215
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionItemContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
216
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.6", type: AXAccordionItemContentDirective, isStandalone: true, selector: "[axAccordionItemContent]", inputs: { transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["axAccordionItemContent"], ngImport: i0 }); }
200
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionItemContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
201
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: AXAccordionItemContentDirective, isStandalone: true, selector: "[axAccordionItemContent]", inputs: { transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["axAccordionItemContent"], ngImport: i0 }); }
217
202
  }
218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionItemContentDirective, decorators: [{
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionItemContentDirective, decorators: [{
219
204
  type: Directive,
220
205
  args: [{
221
206
  selector: '[axAccordionItemContent]',
@@ -232,8 +217,8 @@ const COMPONENT = [
232
217
  ];
233
218
  const MODULES = [CommonModule];
234
219
  class AXAccordionCdkModule {
235
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionCdkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
236
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionCdkModule, imports: [CommonModule, AXAccordionGroupDirective,
220
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionCdkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
221
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionCdkModule, imports: [CommonModule, AXAccordionGroupDirective,
237
222
  AXAccordionItemContentDirective,
238
223
  AXAccordionItemHeaderDirective,
239
224
  AXAccordionItemDirective,
@@ -242,9 +227,9 @@ class AXAccordionCdkModule {
242
227
  AXAccordionItemHeaderDirective,
243
228
  AXAccordionItemDirective,
244
229
  AXAccordionCloseButtonDirective] }); }
245
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionCdkModule, imports: [MODULES] }); }
230
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionCdkModule, imports: [MODULES] }); }
246
231
  }
247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXAccordionCdkModule, decorators: [{
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXAccordionCdkModule, decorators: [{
248
233
  type: NgModule,
249
234
  args: [{
250
235
  imports: [...MODULES, ...COMPONENT],