@acorex/cdk 22.1.0-next.2 → 22.1.0-next.21
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/package.json
CHANGED
|
@@ -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;
|
|
@@ -627,6 +643,7 @@ declare class AXDataSource<T = unknown> {
|
|
|
627
643
|
private _items;
|
|
628
644
|
get items(): T[];
|
|
629
645
|
private fetchedPages;
|
|
646
|
+
private inflightPages;
|
|
630
647
|
private _page;
|
|
631
648
|
private _query;
|
|
632
649
|
get query(): AXDataSourceQuery;
|
|
@@ -639,6 +656,7 @@ declare class AXDataSource<T = unknown> {
|
|
|
639
656
|
private _isLoading;
|
|
640
657
|
get isLoading(): boolean;
|
|
641
658
|
constructor(config: AXDataSourceConfig<T>);
|
|
659
|
+
private pageHasCachedItems;
|
|
642
660
|
private load;
|
|
643
661
|
getItemsByFilter(filter: AXDataSourceFilterOption): Promise<AXDataSourceCallbackResult<T>>;
|
|
644
662
|
private setLoadingState;
|