@acorex/cdk 21.0.0-next.6 → 21.0.0-next.61
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 +1 -0
- package/common/index.d.ts +9 -7
- package/double-click/index.d.ts +66 -0
- package/drag-drop/index.d.ts +57 -44
- package/drawer/index.d.ts +12 -9
- package/fesm2022/acorex-cdk-accordion.mjs +55 -70
- package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
- package/fesm2022/acorex-cdk-carousel.mjs +14 -11
- package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
- package/fesm2022/acorex-cdk-clipboard.mjs +7 -8
- package/fesm2022/acorex-cdk-clipboard.mjs.map +1 -1
- package/fesm2022/acorex-cdk-common.mjs +174 -119
- package/fesm2022/acorex-cdk-common.mjs.map +1 -1
- package/fesm2022/acorex-cdk-dom.mjs +4 -4
- package/fesm2022/acorex-cdk-dom.mjs.map +1 -1
- package/fesm2022/acorex-cdk-double-click.mjs +176 -0
- package/fesm2022/acorex-cdk-double-click.mjs.map +1 -0
- package/fesm2022/acorex-cdk-drag-drop.mjs +279 -88
- package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drawer.mjs +44 -33
- package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
- package/fesm2022/acorex-cdk-focus-trap.mjs +3 -3
- package/fesm2022/acorex-cdk-focus-trap.mjs.map +1 -1
- package/fesm2022/acorex-cdk-input-mask.mjs +6 -4
- package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
- package/fesm2022/acorex-cdk-list-navigation.mjs +41 -23
- package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
- package/fesm2022/acorex-cdk-outline.mjs +8 -8
- package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +3 -3
- package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
- package/fesm2022/acorex-cdk-pan-view.mjs +4 -4
- package/fesm2022/acorex-cdk-pan-view.mjs.map +1 -1
- package/fesm2022/acorex-cdk-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-cdk-resizable.mjs +167 -119
- package/fesm2022/acorex-cdk-resizable.mjs.map +1 -1
- package/fesm2022/acorex-cdk-selection.mjs +12 -12
- package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sliding-item.mjs +3 -3
- package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sticky.mjs +3 -3
- package/fesm2022/acorex-cdk-sticky.mjs.map +1 -1
- package/fesm2022/acorex-cdk-uploader.mjs +746 -0
- package/fesm2022/acorex-cdk-uploader.mjs.map +1 -0
- package/fesm2022/acorex-cdk-virtual-scroll.mjs +11 -11
- package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-cdk.mjs.map +1 -1
- package/list-navigation/index.d.ts +1 -0
- package/package.json +17 -9
- package/resizable/index.d.ts +19 -7
- package/uploader/README.md +3 -0
- package/uploader/index.d.ts +378 -0
package/accordion/index.d.ts
CHANGED
|
@@ -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
|
}
|
package/common/index.d.ts
CHANGED
|
@@ -22,8 +22,11 @@ declare abstract class NXButtonComponent {
|
|
|
22
22
|
* A token that specifies the color style of component.
|
|
23
23
|
*/
|
|
24
24
|
type AXStyleColorType = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'default';
|
|
25
|
+
type AXStyleColorClassType = `ax-${AXStyleColorType}`;
|
|
25
26
|
declare const AX_STYLE_COLOR_TYPES: AXStyleColorType[];
|
|
26
27
|
type AXStyleLookType = 'solid' | 'blank' | 'outline' | 'twotone' | 'flat' | 'fill' | 'link' | 'none';
|
|
28
|
+
type AXStyleLookClassType = `ax-${AXStyleLookType}`;
|
|
29
|
+
type AXStyleInteractiveLookClassType = `${AXStyleLookClassType}-interactive`;
|
|
27
30
|
declare const AX_STYLE_LOOK_TYPES: AXStyleLookType[];
|
|
28
31
|
type AXSizeType = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
29
32
|
type AXStyleSizeType = `ax-${AXSizeType}`;
|
|
@@ -771,8 +774,8 @@ declare class MXColorComponent extends MXBaseComponent {
|
|
|
771
774
|
/**
|
|
772
775
|
* Predefined color schemes
|
|
773
776
|
*/
|
|
774
|
-
get color():
|
|
775
|
-
set color(value: AXStyleColorType);
|
|
777
|
+
get color(): AXStyleColorClassType | string;
|
|
778
|
+
set color(value: AXStyleColorType | string);
|
|
776
779
|
}
|
|
777
780
|
|
|
778
781
|
declare abstract class MXLookableComponent {
|
|
@@ -786,8 +789,9 @@ declare class MXLookComponent extends MXBaseComponent {
|
|
|
786
789
|
/**
|
|
787
790
|
* Predefined look schemes
|
|
788
791
|
*/
|
|
789
|
-
get look():
|
|
790
|
-
|
|
792
|
+
get look(): AXStyleLookClassType | string;
|
|
793
|
+
get interactiveLook(): AXStyleInteractiveLookClassType | string;
|
|
794
|
+
set look(value: AXStyleLookType | string);
|
|
791
795
|
}
|
|
792
796
|
|
|
793
797
|
declare const MXColorLookComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXColorComponent, typeof MXLookComponent]>;
|
|
@@ -841,8 +845,6 @@ declare class MXButtonBaseComponent extends MXButtonBaseComponent_base {
|
|
|
841
845
|
*/
|
|
842
846
|
protected get cssClasses(): {
|
|
843
847
|
'ax-button-icon': boolean;
|
|
844
|
-
'ax-state-disabled': boolean;
|
|
845
|
-
'ax-state-selected': boolean;
|
|
846
848
|
};
|
|
847
849
|
}
|
|
848
850
|
|
|
@@ -1155,4 +1157,4 @@ declare class AXHotkeysService {
|
|
|
1155
1157
|
}
|
|
1156
1158
|
|
|
1157
1159
|
export { AXAutoFocusDirective, AXAutocompleteParentComponent, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosableComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXItemSelectedEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, NXButtonComponent, NXClickEvent, NXColorComponent, NXComponent, NXEvent, NXInteractiveComponent, NXLookComponent, NXNativeEvent, NXValueComponent, TAB_META_KEY, applyDataSourceQuery, convertArrayToDataSource, convertToPlacement };
|
|
1158
|
-
export type { AXAnimationEasing, AXComponentState, AXConnectedPosition, AXDataListFetchCallbackResult, AXDataListFetchDataCallback, AXDataListItems, AXDataListQuery, AXDataSourceByKeyCallback, AXDataSourceCallbackResult, AXDataSourceChangedEvent, AXDataSourceConfig, AXDataSourceFilterOption, AXDataSourceItemExpandedEvent, AXDataSourceLoadCallback, AXDataSourceOperator, AXDataSourceQuery, AXDataSourceSortOption, AXDirection, AXExpandToggleIcons, AXFilterLogic, AXFormValidationRule, AXHotKeyAction, AXLocation, AXOrientation, AXPagedComponentInterface, AXPlacement, AXPlacementType, AXRange, AXScrollPosition, AXSelectionMode, AXSizeType, AXSortOrder, AXStyleColorType, AXStyleLookType, AXStyleSizeType, AXSurfaceType, DisabledCallback, MXComponentOptionChanged, MXComponentOptionChanging, MXComponentSetOption, NormalizedItem };
|
|
1160
|
+
export type { AXAnimationEasing, AXComponentState, AXConnectedPosition, AXDataListFetchCallbackResult, AXDataListFetchDataCallback, AXDataListItems, AXDataListQuery, AXDataSourceByKeyCallback, AXDataSourceCallbackResult, AXDataSourceChangedEvent, AXDataSourceConfig, AXDataSourceFilterOption, AXDataSourceItemExpandedEvent, AXDataSourceLoadCallback, AXDataSourceOperator, AXDataSourceQuery, AXDataSourceSortOption, AXDirection, AXExpandToggleIcons, AXFilterLogic, AXFormValidationRule, AXHotKeyAction, AXLocation, AXOrientation, AXPagedComponentInterface, AXPlacement, AXPlacementType, AXRange, AXScrollPosition, AXSelectionMode, AXSizeType, AXSortOrder, AXStyleColorClassType, AXStyleColorType, AXStyleInteractiveLookClassType, AXStyleLookClassType, AXStyleLookType, AXStyleSizeType, AXSurfaceType, DisabledCallback, MXComponentOptionChanged, MXComponentOptionChanging, MXComponentSetOption, NormalizedItem };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Directive to detect single-click and double-click events on the host element.
|
|
6
|
+
* Supports both desktop (click-based detection) and mobile (touchend) events.
|
|
7
|
+
* Prevents native click event propagation and emits separate single-click and double-click events.
|
|
8
|
+
* Can be disabled to allow native DOM behavior (click and dblclick events).
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* <button
|
|
12
|
+
* axDoubleClick
|
|
13
|
+
* [duration]="300"
|
|
14
|
+
* [disabled]="false"
|
|
15
|
+
* (onClick)="onSingleClick($event)"
|
|
16
|
+
* (onDblClick)="onDoubleClick($event)"
|
|
17
|
+
* >Click me</button>
|
|
18
|
+
*/
|
|
19
|
+
declare class AXDoubleClickDirective implements OnDestroy {
|
|
20
|
+
private elementRef;
|
|
21
|
+
/**
|
|
22
|
+
* Input to configure the duration in milliseconds for detecting double-clicks.
|
|
23
|
+
* Defaults to 250ms.
|
|
24
|
+
* Two clicks/taps within this duration are considered a double-click.
|
|
25
|
+
*/
|
|
26
|
+
duration: _angular_core.InputSignal<number>;
|
|
27
|
+
/**
|
|
28
|
+
* Input to disable the directive's custom click handling.
|
|
29
|
+
* When true, native click and dblclick events will fire normally (DOM default behavior).
|
|
30
|
+
* When false (default), the directive prevents default and emits custom single/double-click events.
|
|
31
|
+
* Defaults to false.
|
|
32
|
+
*/
|
|
33
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Output event emitted when a single-click is detected.
|
|
36
|
+
* Emits after the configured duration milliseconds if no second click occurs.
|
|
37
|
+
* Emits the MouseEvent.
|
|
38
|
+
*/
|
|
39
|
+
onClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
40
|
+
/**
|
|
41
|
+
* Output event emitted when a double-click is detected.
|
|
42
|
+
* Emits when two clicks occur within the configured duration milliseconds.
|
|
43
|
+
* Emits the Event (MouseEvent for desktop, TouchEvent for mobile).
|
|
44
|
+
*/
|
|
45
|
+
onDblClick: _angular_core.OutputEmitterRef<Event>;
|
|
46
|
+
private lastClick;
|
|
47
|
+
private lastTap;
|
|
48
|
+
private clickTimeout;
|
|
49
|
+
private pendingClickEvent;
|
|
50
|
+
/**
|
|
51
|
+
* Handles click events and detects both single-clicks and double-clicks.
|
|
52
|
+
* Prevents native click propagation and emits appropriate events.
|
|
53
|
+
* When disabled is true, emits click immediately, still detects double-clicks, and allows native DOM behavior (no preventDefault).
|
|
54
|
+
*/
|
|
55
|
+
handleClick(event: MouseEvent): void;
|
|
56
|
+
/**
|
|
57
|
+
* Handles touchend events (mobile) to detect double-tap.
|
|
58
|
+
* When disabled is true, allows native touch behavior.
|
|
59
|
+
*/
|
|
60
|
+
onTouchEnd(event: TouchEvent): void;
|
|
61
|
+
ngOnDestroy(): void;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDoubleClickDirective, never>;
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDoubleClickDirective, "[axDoubleClick]", never, { "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; "onDblClick": "onDblClick"; }, never, never, true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { AXDoubleClickDirective };
|
package/drag-drop/index.d.ts
CHANGED
|
@@ -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
|
|
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 {
|
|
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.
|
|
11
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionCloseButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: AXAccordionCloseButtonDirective, isStandalone: true, selector: "[axAccordionCloseButton]", ngImport: i0 }); }
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", 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.
|
|
23
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionItemHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: AXAccordionItemHeaderDirective, isStandalone: true, selector: "[axAccordionItemHeader]", exportAs: ["axAccordionItemHeader"], ngImport: i0 }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionItemHeaderDirective, decorators: [{
|
|
26
26
|
type: Directive,
|
|
27
27
|
args: [{
|
|
28
28
|
selector: '[axAccordionItemHeader]',
|
|
@@ -67,16 +67,16 @@ 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.
|
|
71
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.
|
|
70
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
71
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.15", 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.
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionItemDirective, decorators: [{
|
|
74
74
|
type: Directive,
|
|
75
75
|
args: [{
|
|
76
76
|
selector: '[axAccordionItem]',
|
|
77
77
|
exportAs: 'axAccordionItem',
|
|
78
78
|
}]
|
|
79
|
-
}] });
|
|
79
|
+
}], propDecorators: { closeBtn: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXAccordionCloseButtonDirective), { ...{ descendants: true }, isSignal: true }] }], header: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXAccordionItemHeaderDirective), { ...{ descendants: true }, isSignal: true }] }], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], onClick: [{ type: i0.Output, args: ["onClick"] }] } });
|
|
80
80
|
|
|
81
81
|
class AXAccordionGroupDirective {
|
|
82
82
|
constructor() {
|
|
@@ -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 =
|
|
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,44 +139,41 @@ 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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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.15", ngImport: i0, type: AXAccordionGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
168
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.15", 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.
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionGroupDirective, decorators: [{
|
|
170
171
|
type: Directive,
|
|
171
172
|
args: [{
|
|
172
173
|
selector: '[axAccordionGroup]',
|
|
173
174
|
exportAs: 'axAccordionGroup',
|
|
174
175
|
}]
|
|
175
|
-
}] });
|
|
176
|
+
}], propDecorators: { accordion: [{ type: i0.Input, args: [{ isSignal: true, alias: "accordion", required: false }] }], activeIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIndex", required: false }] }], collapsedOnItemClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedOnItemClick", required: false }] }], contentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXAccordionItemDirective), { isSignal: true }] }] } });
|
|
176
177
|
|
|
177
178
|
class AXAccordionItemContentDirective {
|
|
178
179
|
constructor() {
|
|
@@ -180,48 +181,32 @@ 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
|
-
|
|
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
|
-
|
|
200
|
-
|
|
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.
|
|
216
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionItemContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
201
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", 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.
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionItemContentDirective, decorators: [{
|
|
219
204
|
type: Directive,
|
|
220
205
|
args: [{
|
|
221
206
|
selector: '[axAccordionItemContent]',
|
|
222
207
|
exportAs: 'axAccordionItemContent',
|
|
223
208
|
}]
|
|
224
|
-
}] });
|
|
209
|
+
}], propDecorators: { transition: [{ type: i0.Input, args: [{ isSignal: true, alias: "transition", required: false }] }] } });
|
|
225
210
|
|
|
226
211
|
const COMPONENT = [
|
|
227
212
|
AXAccordionGroupDirective,
|
|
@@ -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.
|
|
236
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
220
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionCdkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
221
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", 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.
|
|
230
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionCdkModule, imports: [MODULES] }); }
|
|
246
231
|
}
|
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXAccordionCdkModule, decorators: [{
|
|
248
233
|
type: NgModule,
|
|
249
234
|
args: [{
|
|
250
235
|
imports: [...MODULES, ...COMPONENT],
|