@acorex/cdk 22.1.0-next.3 → 22.1.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-cdk-common.mjs +160 -23
- package/fesm2022/acorex-cdk-common.mjs.map +1 -1
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs +144 -7
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +6 -4
- package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
- package/horizontal-scroll/README.md +1 -1
- package/package.json +2 -2
- package/types/acorex-cdk-common.d.ts +77 -61
- package/types/acorex-cdk-horizontal-scroll.d.ts +25 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ChangeDetectorRef, ViewContainerRef, EventEmitter, OnDestroy, AfterViewInit, InjectionToken } from '@angular/core';
|
|
3
|
-
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
4
3
|
import { AXValidationSummary, AXValidationRuleOptions } from '@acorex/core/validation';
|
|
4
|
+
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
5
5
|
import { ControlValueAccessor } from '@angular/forms';
|
|
6
6
|
import { DataSource, CollectionViewer } from '@angular/cdk/collections';
|
|
7
7
|
import { Subject, Observable } from 'rxjs';
|
|
@@ -44,6 +44,11 @@ declare abstract class NXComponent {
|
|
|
44
44
|
#private;
|
|
45
45
|
protected isRendered: i0.Signal<boolean>;
|
|
46
46
|
get nativeElement(): HTMLElement;
|
|
47
|
+
/**
|
|
48
|
+
* Gets the host HTML element of the component.
|
|
49
|
+
* Same contract as classic editors so `ax-label` / `ax-form-field` can associate the field.
|
|
50
|
+
*/
|
|
51
|
+
getHostElement<T = HTMLElement>(): T;
|
|
47
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<NXComponent, never>;
|
|
48
53
|
static ɵprov: i0.ɵɵInjectableDeclaration<NXComponent>;
|
|
49
54
|
}
|
|
@@ -87,66 +92,6 @@ declare abstract class NXLookComponent {
|
|
|
87
92
|
static ɵcmp: i0.ɵɵComponentDeclaration<NXLookComponent, "ng-component", never, { "look": { "alias": "look"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; }, never, never, true, never>;
|
|
88
93
|
}
|
|
89
94
|
|
|
90
|
-
declare abstract class NXValueComponent {
|
|
91
|
-
readonly: i0.ModelSignal<boolean>;
|
|
92
|
-
name: i0.ModelSignal<string>;
|
|
93
|
-
value: i0.ModelSignal<unknown>;
|
|
94
|
-
onValueChanged: i0.OutputEmitterRef<void>;
|
|
95
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NXValueComponent, never>;
|
|
96
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NXValueComponent, "ng-component", never, { "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "readonly": "readonlyChange"; "name": "nameChange"; "value": "valueChange"; "onValueChanged": "onValueChanged"; }, never, never, true, never>;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* A token that specifies the direction of component.
|
|
101
|
-
*/
|
|
102
|
-
type AXDirection = 'vertical' | 'horizontal';
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* A token that specifies the orientation of component.
|
|
106
|
-
*/
|
|
107
|
-
type AXOrientation = 'vertical' | 'horizontal';
|
|
108
|
-
|
|
109
|
-
type AXPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'end' | 'end-top' | 'end-bottom' | 'start' | 'start-top' | 'start-bottom';
|
|
110
|
-
type AXPlacementType = AXConnectedPosition | AXConnectedPosition[] | AXPlacement | AXPlacement[];
|
|
111
|
-
declare function convertToPlacement(value: AXPlacementType): AXConnectedPosition[];
|
|
112
|
-
interface AXConnectedPosition {
|
|
113
|
-
originX: 'start' | 'center' | 'end';
|
|
114
|
-
originY: 'top' | 'center' | 'bottom';
|
|
115
|
-
overlayX: 'start' | 'center' | 'end';
|
|
116
|
-
overlayY: 'top' | 'center' | 'bottom';
|
|
117
|
-
weight?: number;
|
|
118
|
-
offsetX?: number;
|
|
119
|
-
offsetY?: number;
|
|
120
|
-
}
|
|
121
|
-
declare const AX_PLACEMENT_TOP: AXConnectedPosition;
|
|
122
|
-
declare const AX_PLACEMENT_TOP_START: AXConnectedPosition;
|
|
123
|
-
declare const AX_PLACEMENT_TOP_END: AXConnectedPosition;
|
|
124
|
-
declare const AX_PLACEMENT_BOTTOM: AXConnectedPosition;
|
|
125
|
-
declare const AX_PLACEMENT_BOTTOM_START: AXConnectedPosition;
|
|
126
|
-
declare const AX_PLACEMENT_BOTTOM_END: AXConnectedPosition;
|
|
127
|
-
declare const AX_PLACEMENT_START: AXConnectedPosition;
|
|
128
|
-
declare const AX_PLACEMENT_START_TOP: AXConnectedPosition;
|
|
129
|
-
declare const AX_PLACEMENT_START_BOTTOM: AXConnectedPosition;
|
|
130
|
-
declare const AX_PLACEMENT_END: AXConnectedPosition;
|
|
131
|
-
declare const AX_PLACEMENT_END_TOP: AXConnectedPosition;
|
|
132
|
-
declare const AX_PLACEMENT_END_BOTTOM: AXConnectedPosition;
|
|
133
|
-
declare const AX_PLACEMENT_MAP: {
|
|
134
|
-
[key: string]: {
|
|
135
|
-
origin: AXConnectedPosition;
|
|
136
|
-
alts?: AXConnectedPosition[];
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
interface AXRange<T> {
|
|
141
|
-
from: T;
|
|
142
|
-
end: T;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* A token that specifies the selection mode of component.
|
|
147
|
-
*/
|
|
148
|
-
type AXSelectionMode = 'single' | 'multiple' | 'none';
|
|
149
|
-
|
|
150
95
|
/**
|
|
151
96
|
* Contains native event
|
|
152
97
|
* @category Events
|
|
@@ -569,6 +514,77 @@ declare abstract class AXAutocompleteParentComponent<T> extends MXValueComponent
|
|
|
569
514
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXAutocompleteParentComponent<any>>;
|
|
570
515
|
}
|
|
571
516
|
|
|
517
|
+
/**
|
|
518
|
+
* Signal-based value editor with the same `ax-validation-rule` / `ax-form` contract as the classic value mixins.
|
|
519
|
+
*/
|
|
520
|
+
declare abstract class NXValueComponent extends NXComponent {
|
|
521
|
+
#private;
|
|
522
|
+
readonly validationRulesChange: EventEmitter<AXFormValidationRule[]>;
|
|
523
|
+
get isRequired(): boolean;
|
|
524
|
+
get state(): AXComponentState;
|
|
525
|
+
protected registerValidation(): void;
|
|
526
|
+
addValidationRule(rule: AXFormValidationRule): void;
|
|
527
|
+
removeValidationRule(ruleToRemove: AXFormValidationRule): void;
|
|
528
|
+
removeValidationRuleByType(type: string): void;
|
|
529
|
+
validate(): Promise<AXValidationSummary>;
|
|
530
|
+
setState(state: AXComponentState, ...args: unknown[]): void;
|
|
531
|
+
resetErrors(): void;
|
|
532
|
+
commitValue(value: unknown, _isUserInteraction?: boolean): void;
|
|
533
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NXValueComponent, never>;
|
|
534
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NXValueComponent>;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* A token that specifies the direction of component.
|
|
539
|
+
*/
|
|
540
|
+
type AXDirection = 'vertical' | 'horizontal';
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* A token that specifies the orientation of component.
|
|
544
|
+
*/
|
|
545
|
+
type AXOrientation = 'vertical' | 'horizontal';
|
|
546
|
+
|
|
547
|
+
type AXPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'end' | 'end-top' | 'end-bottom' | 'start' | 'start-top' | 'start-bottom';
|
|
548
|
+
type AXPlacementType = AXConnectedPosition | AXConnectedPosition[] | AXPlacement | AXPlacement[];
|
|
549
|
+
declare function convertToPlacement(value: AXPlacementType): AXConnectedPosition[];
|
|
550
|
+
interface AXConnectedPosition {
|
|
551
|
+
originX: 'start' | 'center' | 'end';
|
|
552
|
+
originY: 'top' | 'center' | 'bottom';
|
|
553
|
+
overlayX: 'start' | 'center' | 'end';
|
|
554
|
+
overlayY: 'top' | 'center' | 'bottom';
|
|
555
|
+
weight?: number;
|
|
556
|
+
offsetX?: number;
|
|
557
|
+
offsetY?: number;
|
|
558
|
+
}
|
|
559
|
+
declare const AX_PLACEMENT_TOP: AXConnectedPosition;
|
|
560
|
+
declare const AX_PLACEMENT_TOP_START: AXConnectedPosition;
|
|
561
|
+
declare const AX_PLACEMENT_TOP_END: AXConnectedPosition;
|
|
562
|
+
declare const AX_PLACEMENT_BOTTOM: AXConnectedPosition;
|
|
563
|
+
declare const AX_PLACEMENT_BOTTOM_START: AXConnectedPosition;
|
|
564
|
+
declare const AX_PLACEMENT_BOTTOM_END: AXConnectedPosition;
|
|
565
|
+
declare const AX_PLACEMENT_START: AXConnectedPosition;
|
|
566
|
+
declare const AX_PLACEMENT_START_TOP: AXConnectedPosition;
|
|
567
|
+
declare const AX_PLACEMENT_START_BOTTOM: AXConnectedPosition;
|
|
568
|
+
declare const AX_PLACEMENT_END: AXConnectedPosition;
|
|
569
|
+
declare const AX_PLACEMENT_END_TOP: AXConnectedPosition;
|
|
570
|
+
declare const AX_PLACEMENT_END_BOTTOM: AXConnectedPosition;
|
|
571
|
+
declare const AX_PLACEMENT_MAP: {
|
|
572
|
+
[key: string]: {
|
|
573
|
+
origin: AXConnectedPosition;
|
|
574
|
+
alts?: AXConnectedPosition[];
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
interface AXRange<T> {
|
|
579
|
+
from: T;
|
|
580
|
+
end: T;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* A token that specifies the selection mode of component.
|
|
585
|
+
*/
|
|
586
|
+
type AXSelectionMode = 'single' | 'multiple' | 'none';
|
|
587
|
+
|
|
572
588
|
type AXDataSourceOperator = {
|
|
573
589
|
type: 'equal' | 'isNull' | 'isEmpty' | 'lt' | 'lte' | 'gt' | 'gte' | 'startsWith' | 'endsWith' | 'contains' | 'in';
|
|
574
590
|
negative?: boolean;
|
|
@@ -2,8 +2,8 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { OnDestroy } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Converts vertical mouse-wheel scrolling into horizontal scrolling on the host element.
|
|
6
|
-
* Applies only when the host can scroll horizontally.
|
|
5
|
+
* Converts vertical mouse-wheel scrolling and pointer drag/swipe into horizontal scrolling on the host element.
|
|
6
|
+
* Applies only when the host can scroll horizontally. Pointer events cover mouse, touch, and pen.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* <div axHorizontalScroll [speed]="150" class="overflow-x-auto">
|
|
@@ -16,7 +16,7 @@ declare class AXHorizontalScrollDirective implements OnDestroy {
|
|
|
16
16
|
private platformId;
|
|
17
17
|
private zone;
|
|
18
18
|
/**
|
|
19
|
-
* Disables wheel-to-horizontal conversion when true.
|
|
19
|
+
* Disables wheel-to-horizontal conversion and pointer drag when true.
|
|
20
20
|
*/
|
|
21
21
|
disabled: _angular_core.InputSignal<boolean>;
|
|
22
22
|
/**
|
|
@@ -28,15 +28,37 @@ declare class AXHorizontalScrollDirective implements OnDestroy {
|
|
|
28
28
|
private targetScrollLeft;
|
|
29
29
|
private scrollPosition;
|
|
30
30
|
private lastFrameTime;
|
|
31
|
+
private pointerId;
|
|
32
|
+
private pointerStartX;
|
|
33
|
+
private pointerStartY;
|
|
34
|
+
private pointerStartScrollLeft;
|
|
35
|
+
private pointerAxis;
|
|
36
|
+
private lastPointerX;
|
|
37
|
+
private lastPointerTime;
|
|
38
|
+
private pointerVelocityX;
|
|
39
|
+
private suppressClickListener;
|
|
40
|
+
private suppressClickTimer;
|
|
41
|
+
private readonly axisLockThreshold;
|
|
42
|
+
private readonly interactiveSelector;
|
|
31
43
|
private readonly wheelListener;
|
|
44
|
+
private readonly pointerDownListener;
|
|
45
|
+
private readonly pointerMoveListener;
|
|
46
|
+
private readonly pointerUpListener;
|
|
32
47
|
ngOnDestroy(): void;
|
|
33
48
|
private get nativeElement();
|
|
34
49
|
private handleWheel;
|
|
50
|
+
private handlePointerDown;
|
|
51
|
+
private handlePointerMove;
|
|
52
|
+
private handlePointerUp;
|
|
53
|
+
private releasePointer;
|
|
54
|
+
private suppressClick;
|
|
55
|
+
private clearClickSuppression;
|
|
35
56
|
private syncScrollState;
|
|
36
57
|
private startAnimation;
|
|
37
58
|
private applyScrollPosition;
|
|
38
59
|
private stopAnimation;
|
|
39
60
|
private canScrollHorizontally;
|
|
61
|
+
private getMaxScrollLeft;
|
|
40
62
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXHorizontalScrollDirective, never>;
|
|
41
63
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXHorizontalScrollDirective, "[axHorizontalScroll]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "speed": { "alias": "speed"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
42
64
|
}
|