@sebgroup/green-angular 6.3.0 → 6.4.0
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/esm2022/src/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +20 -34
- package/esm2022/src/v-angular/dropdown/dropdown.component.mjs +25 -126
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +3 -3
- package/esm2022/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +20 -34
- package/esm2022/v-angular/dropdown/dropdown.component.mjs +25 -126
- package/esm2022/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +3 -3
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs +41 -155
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-v-angular.mjs +39 -153
- package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -1
- package/package.json +14 -14
- package/src/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +5 -24
- package/src/v-angular/dropdown/dropdown.component.d.ts +5 -40
- package/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +5 -24
- package/v-angular/dropdown/dropdown.component.d.ts +5 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-angular",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": ">=18",
|
|
6
6
|
"@angular/common": ">=18",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"scroll-into-view-if-needed": "^2.2.31"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@sebgroup/green-core": "^2.5.
|
|
20
|
+
"@sebgroup/green-core": "^2.5.3",
|
|
21
21
|
"@sebgroup/chlorophyll": "^3.6.20",
|
|
22
22
|
"@sebgroup/extract": "^3.0.2",
|
|
23
23
|
"tslib": "^2.3.1"
|
|
@@ -111,6 +111,12 @@
|
|
|
111
111
|
"esm": "./esm2022/src/lib/modal/sebgroup-green-angular-src-lib-modal.mjs",
|
|
112
112
|
"default": "./fesm2022/sebgroup-green-angular-src-lib-modal.mjs"
|
|
113
113
|
},
|
|
114
|
+
"./src/lib/pagination": {
|
|
115
|
+
"types": "./src/lib/pagination/index.d.ts",
|
|
116
|
+
"esm2022": "./esm2022/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs",
|
|
117
|
+
"esm": "./esm2022/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs",
|
|
118
|
+
"default": "./fesm2022/sebgroup-green-angular-src-lib-pagination.mjs"
|
|
119
|
+
},
|
|
114
120
|
"./src/lib/progress-circle": {
|
|
115
121
|
"types": "./src/lib/progress-circle/index.d.ts",
|
|
116
122
|
"esm2022": "./esm2022/src/lib/progress-circle/sebgroup-green-angular-src-lib-progress-circle.mjs",
|
|
@@ -129,12 +135,6 @@
|
|
|
129
135
|
"esm": "./esm2022/src/lib/shared/sebgroup-green-angular-src-lib-shared.mjs",
|
|
130
136
|
"default": "./fesm2022/sebgroup-green-angular-src-lib-shared.mjs"
|
|
131
137
|
},
|
|
132
|
-
"./src/lib/pagination": {
|
|
133
|
-
"types": "./src/lib/pagination/index.d.ts",
|
|
134
|
-
"esm2022": "./esm2022/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs",
|
|
135
|
-
"esm": "./esm2022/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs",
|
|
136
|
-
"default": "./fesm2022/sebgroup-green-angular-src-lib-pagination.mjs"
|
|
137
|
-
},
|
|
138
138
|
"./src/lib/slider": {
|
|
139
139
|
"types": "./src/lib/slider/index.d.ts",
|
|
140
140
|
"esm2022": "./esm2022/src/lib/slider/sebgroup-green-angular-src-lib-slider.mjs",
|
|
@@ -177,6 +177,12 @@
|
|
|
177
177
|
"esm": "./esm2022/src/v-angular/button/sebgroup-green-angular-src-v-angular-button.mjs",
|
|
178
178
|
"default": "./fesm2022/sebgroup-green-angular-src-v-angular-button.mjs"
|
|
179
179
|
},
|
|
180
|
+
"./src/v-angular/card": {
|
|
181
|
+
"types": "./src/v-angular/card/index.d.ts",
|
|
182
|
+
"esm2022": "./esm2022/src/v-angular/card/sebgroup-green-angular-src-v-angular-card.mjs",
|
|
183
|
+
"esm": "./esm2022/src/v-angular/card/sebgroup-green-angular-src-v-angular-card.mjs",
|
|
184
|
+
"default": "./fesm2022/sebgroup-green-angular-src-v-angular-card.mjs"
|
|
185
|
+
},
|
|
180
186
|
"./src/v-angular/character-countdown": {
|
|
181
187
|
"types": "./src/v-angular/character-countdown/index.d.ts",
|
|
182
188
|
"esm2022": "./esm2022/src/v-angular/character-countdown/sebgroup-green-angular-src-v-angular-character-countdown.mjs",
|
|
@@ -189,12 +195,6 @@
|
|
|
189
195
|
"esm": "./esm2022/src/v-angular/checkbox/sebgroup-green-angular-src-v-angular-checkbox.mjs",
|
|
190
196
|
"default": "./fesm2022/sebgroup-green-angular-src-v-angular-checkbox.mjs"
|
|
191
197
|
},
|
|
192
|
-
"./src/v-angular/card": {
|
|
193
|
-
"types": "./src/v-angular/card/index.d.ts",
|
|
194
|
-
"esm2022": "./esm2022/src/v-angular/card/sebgroup-green-angular-src-v-angular-card.mjs",
|
|
195
|
-
"esm": "./esm2022/src/v-angular/card/sebgroup-green-angular-src-v-angular-card.mjs",
|
|
196
|
-
"default": "./fesm2022/sebgroup-green-angular-src-v-angular-card.mjs"
|
|
197
|
-
},
|
|
198
198
|
"./src/v-angular/core": {
|
|
199
199
|
"types": "./src/v-angular/core/index.d.ts",
|
|
200
200
|
"esm2022": "./esm2022/src/v-angular/core/sebgroup-green-angular-src-v-angular-core.mjs",
|
|
@@ -20,10 +20,6 @@ export declare class NggvDropdownListComponent implements OnInit, OnChanges {
|
|
|
20
20
|
id: any;
|
|
21
21
|
/** Special property used for selecting DOM elements during automated UI testing. */
|
|
22
22
|
thook: string | null | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated This attribute is no longer used. The dropdown position is now handled by Angular CDK Overlay.
|
|
25
|
-
* Will be removed in a future release.
|
|
26
|
-
*/
|
|
27
23
|
get positionAttr(): "bottom" | "top";
|
|
28
24
|
options: any[];
|
|
29
25
|
textToHighlight?: string;
|
|
@@ -40,31 +36,15 @@ export declare class NggvDropdownListComponent implements OnInit, OnChanges {
|
|
|
40
36
|
*/
|
|
41
37
|
selectWithSpace: boolean;
|
|
42
38
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
39
|
+
* When true, the dropdown will automatically choose to open above or below the input
|
|
40
|
+
* based on available space in the viewport, and will scale its height to fit if needed.
|
|
45
41
|
*/
|
|
46
42
|
dynamicPosition: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Stores the bounding rectangle of the dropdown trigger element,
|
|
49
|
-
* used for positioning the dropdown list overlay.
|
|
50
|
-
*/
|
|
51
|
-
triggerRect?: DOMRect;
|
|
52
|
-
/**
|
|
53
|
-
* Controls whether the dropdown list should have a vertical margin.
|
|
54
|
-
* Set to false when the dropdown list is rendered in a CDK overlay and spacing is handled by overlay offset.
|
|
55
|
-
* Set to true when the dropdown list is used standalone or in other micro frontends, so it maintains visual spacing.
|
|
56
|
-
* Defaults to true.
|
|
57
|
-
*/
|
|
58
|
-
useMargin: boolean;
|
|
59
43
|
selectedValueChanged: EventEmitter<any>;
|
|
60
44
|
closed: EventEmitter<void>;
|
|
61
45
|
/** The current active option based on numeric index. */
|
|
62
46
|
activeIndex: number;
|
|
63
47
|
scope: string | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated This attribute is no longer used. The dropdown position is now handled by Angular CDK Overlay.
|
|
66
|
-
* Will be removed in a future release.
|
|
67
|
-
*/
|
|
68
48
|
dropdownPosition: 'bottom' | 'top';
|
|
69
49
|
private dropdownUtils;
|
|
70
50
|
private _expanded;
|
|
@@ -137,9 +117,10 @@ export declare class NggvDropdownListComponent implements OnInit, OnChanges {
|
|
|
137
117
|
scrollToResult(option: any, focusElement?: boolean): void;
|
|
138
118
|
/**
|
|
139
119
|
* Calculates available space above and below the dropdown input,
|
|
120
|
+
* sets dropdownPosition ('top' or 'bottom') accordingly,
|
|
140
121
|
* and dynamically sets the max-height of the dropdown list to fit the viewport.
|
|
141
122
|
*/
|
|
142
|
-
|
|
123
|
+
setDropdownPosition(): void;
|
|
143
124
|
static ɵfac: i0.ɵɵFactoryDeclaration<NggvDropdownListComponent, [{ optional: true; }, null, null]>;
|
|
144
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownListComponent, "nggv-dropdown-list", never, { "expanded": { "alias": "expanded"; "required": false; }; "state": { "alias": "state"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "optionContentTpl": { "alias": "optionContentTpl"; "required": false; }; "groupLabelTpl": { "alias": "groupLabelTpl"; "required": false; }; "id": { "alias": "id"; "required": false; }; "thook": { "alias": "thook"; "required": false; }; "options": { "alias": "options"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "onlyEmitDistinctChanges": { "alias": "onlyEmitDistinctChanges"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; };
|
|
125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownListComponent, "nggv-dropdown-list", never, { "expanded": { "alias": "expanded"; "required": false; }; "state": { "alias": "state"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "optionContentTpl": { "alias": "optionContentTpl"; "required": false; }; "groupLabelTpl": { "alias": "groupLabelTpl"; "required": false; }; "id": { "alias": "id"; "required": false; }; "thook": { "alias": "thook"; "required": false; }; "options": { "alias": "options"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "onlyEmitDistinctChanges": { "alias": "onlyEmitDistinctChanges"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; }; }, { "selectedValueChanged": "selectedValueChanged"; "closed": "closed"; }, never, never, false, never>;
|
|
145
126
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js';
|
|
2
|
-
import {
|
|
3
|
-
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
|
|
4
3
|
import { NgControl } from '@angular/forms';
|
|
5
4
|
import { TranslocoScope } from '@jsverse/transloco';
|
|
6
5
|
import { NggvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor';
|
|
@@ -16,8 +15,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
16
15
|
protected translocoScope: TranslocoScope;
|
|
17
16
|
protected cdr: ChangeDetectorRef;
|
|
18
17
|
protected dropdownUtils: DropdownUtils<K, V, T>;
|
|
19
|
-
protected overlay: Overlay;
|
|
20
|
-
protected vcr: ViewContainerRef;
|
|
21
18
|
/** Custom template for displaying options and groups. */
|
|
22
19
|
selectedContentTpl: TemplateRef<OptionBase<T>> | undefined;
|
|
23
20
|
optionContentTpl: TemplateRef<OptionBase<any>> | undefined;
|
|
@@ -28,9 +25,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
28
25
|
thook: string | null | undefined;
|
|
29
26
|
get isSmall(): boolean;
|
|
30
27
|
get isLarge(): boolean;
|
|
31
|
-
/** Reference to the dropdown list template used for rendering the dropdown in an overlay. */
|
|
32
|
-
dropdownTemplate: TemplateRef<any>;
|
|
33
|
-
toggleButton: ElementRef;
|
|
34
28
|
/**
|
|
35
29
|
* Sets the displayed size of the dropdown.
|
|
36
30
|
*/
|
|
@@ -71,11 +65,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
71
65
|
* Defaults to true.
|
|
72
66
|
*/
|
|
73
67
|
onlyHandleDistinctChanges: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* If true (default), the dropdown list will close when any scrollable ancestor is scrolled.
|
|
76
|
-
* If false, the dropdown list will reposition itself instead of closing.
|
|
77
|
-
*/
|
|
78
|
-
closeDropdownListOnScroll: boolean;
|
|
79
68
|
/**
|
|
80
69
|
* Emits changes of the expanded state of the dropdown
|
|
81
70
|
*/
|
|
@@ -86,24 +75,13 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
86
75
|
expanded: boolean;
|
|
87
76
|
/** The current option selected based on numeric index. */
|
|
88
77
|
activeIndex: number;
|
|
89
|
-
/**
|
|
90
|
-
* Stores the bounding rectangle of the dropdown trigger element,
|
|
91
|
-
* used for positioning the dropdown list overlay.
|
|
92
|
-
*/
|
|
93
|
-
triggerRect: DOMRect | undefined;
|
|
94
78
|
/** Subscribe if dropdown expanded to listen to click outside to close dropdown. */
|
|
95
79
|
private onClickSubscription;
|
|
96
80
|
/** Subscribe if dropdown expanded to listen to scroll outside to close dropdown. */
|
|
97
81
|
private onScrollSubscription;
|
|
98
|
-
/** Subscribe to get dropdown width size changes for a dropdown list width to match. */
|
|
99
|
-
private resizeSubscription;
|
|
100
|
-
/** Subscription to dropdown list overlay detachments. */
|
|
101
|
-
private overlayDetachSubscription;
|
|
102
82
|
keyEvent: KeyboardEvent;
|
|
103
83
|
private _options;
|
|
104
|
-
|
|
105
|
-
private overlayRef?;
|
|
106
|
-
constructor(ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef, dropdownUtils: DropdownUtils<K, V, T>, overlay: Overlay, vcr: ViewContainerRef);
|
|
84
|
+
constructor(ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef, dropdownUtils: DropdownUtils<K, V, T>);
|
|
107
85
|
ngOnChanges(changes: SimpleChanges): void;
|
|
108
86
|
ngOnDestroy(): void;
|
|
109
87
|
/** @internal override to correctly set state from form value */
|
|
@@ -115,6 +93,7 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
115
93
|
* Closes the dropdown on click outside.
|
|
116
94
|
*/
|
|
117
95
|
subscribeToOutsideClickEvent(): void;
|
|
96
|
+
subscribeToOutsideScrollEvent(): void;
|
|
118
97
|
/**
|
|
119
98
|
* Set the dropdown value to given option.
|
|
120
99
|
* @param value the dropdown option to select.
|
|
@@ -128,20 +107,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
128
107
|
* @param state the expanded state which to set.
|
|
129
108
|
*/
|
|
130
109
|
setExpanded(state?: boolean): void;
|
|
131
|
-
/**
|
|
132
|
-
* Opens the dropdown overlay by detaching any existing overlay reference,
|
|
133
|
-
* attaching a new overlay, updating its width, and setting up listeners for overlay detachments.
|
|
134
|
-
* This method ensures the dropdown overlay is properly initialized and displayed.
|
|
135
|
-
*/
|
|
136
|
-
openDropdownOverlay(): void;
|
|
137
|
-
detachOldOverlayRef(): void;
|
|
138
|
-
attachNewOverlayRef(): void;
|
|
139
|
-
updateOverlayWidth(): void;
|
|
140
|
-
listenOverlayDetachments(): void;
|
|
141
|
-
getDropdownListPositionsArray(): ConnectedPosition[];
|
|
142
|
-
getScrollStrategy(): ScrollStrategy;
|
|
143
|
-
setOverlayWidth(): void;
|
|
144
|
-
closeDropdownOverlay(): void;
|
|
145
110
|
/**
|
|
146
111
|
* Typecast anything to an {@link Option}.
|
|
147
112
|
* @param option the object to typecast.
|
|
@@ -157,6 +122,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
157
122
|
* @param option the object to check.
|
|
158
123
|
*/
|
|
159
124
|
isOption(option: OptionBase<T>): option is OptionGroup<T>;
|
|
160
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NggvDropdownComponent<any, any, any>, [{ optional: true; self: true; }, { optional: true; }, null, null
|
|
161
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownComponent<any, any, any>, "nggv-dropdown", never, { "thook": { "alias": "thook"; "required": false; }; "size": { "alias": "size"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "options": { "alias": "options"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "allowControlNullishOption": { "alias": "allowControlNullishOption"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "selectOnSingleOption": { "alias": "selectOnSingleOption"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "onlyHandleDistinctChanges": { "alias": "onlyHandleDistinctChanges"; "required": false; };
|
|
125
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NggvDropdownComponent<any, any, any>, [{ optional: true; self: true; }, { optional: true; }, null, null]>;
|
|
126
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownComponent<any, any, any>, "nggv-dropdown", never, { "thook": { "alias": "thook"; "required": false; }; "size": { "alias": "size"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "options": { "alias": "options"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "allowControlNullishOption": { "alias": "allowControlNullishOption"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "selectOnSingleOption": { "alias": "selectOnSingleOption"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "onlyHandleDistinctChanges": { "alias": "onlyHandleDistinctChanges"; "required": false; }; }, { "expandedChange": "expandedChange"; }, ["selectedContentTpl", "optionContentTpl", "groupLabelTpl"], ["*"], false, never>;
|
|
162
127
|
}
|
|
@@ -20,10 +20,6 @@ export declare class NggvDropdownListComponent implements OnInit, OnChanges {
|
|
|
20
20
|
id: any;
|
|
21
21
|
/** Special property used for selecting DOM elements during automated UI testing. */
|
|
22
22
|
thook: string | null | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated This attribute is no longer used. The dropdown position is now handled by Angular CDK Overlay.
|
|
25
|
-
* Will be removed in a future release.
|
|
26
|
-
*/
|
|
27
23
|
get positionAttr(): "bottom" | "top";
|
|
28
24
|
options: any[];
|
|
29
25
|
textToHighlight?: string;
|
|
@@ -40,31 +36,15 @@ export declare class NggvDropdownListComponent implements OnInit, OnChanges {
|
|
|
40
36
|
*/
|
|
41
37
|
selectWithSpace: boolean;
|
|
42
38
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
39
|
+
* When true, the dropdown will automatically choose to open above or below the input
|
|
40
|
+
* based on available space in the viewport, and will scale its height to fit if needed.
|
|
45
41
|
*/
|
|
46
42
|
dynamicPosition: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Stores the bounding rectangle of the dropdown trigger element,
|
|
49
|
-
* used for positioning the dropdown list overlay.
|
|
50
|
-
*/
|
|
51
|
-
triggerRect?: DOMRect;
|
|
52
|
-
/**
|
|
53
|
-
* Controls whether the dropdown list should have a vertical margin.
|
|
54
|
-
* Set to false when the dropdown list is rendered in a CDK overlay and spacing is handled by overlay offset.
|
|
55
|
-
* Set to true when the dropdown list is used standalone or in other micro frontends, so it maintains visual spacing.
|
|
56
|
-
* Defaults to true.
|
|
57
|
-
*/
|
|
58
|
-
useMargin: boolean;
|
|
59
43
|
selectedValueChanged: EventEmitter<any>;
|
|
60
44
|
closed: EventEmitter<void>;
|
|
61
45
|
/** The current active option based on numeric index. */
|
|
62
46
|
activeIndex: number;
|
|
63
47
|
scope: string | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated This attribute is no longer used. The dropdown position is now handled by Angular CDK Overlay.
|
|
66
|
-
* Will be removed in a future release.
|
|
67
|
-
*/
|
|
68
48
|
dropdownPosition: 'bottom' | 'top';
|
|
69
49
|
private dropdownUtils;
|
|
70
50
|
private _expanded;
|
|
@@ -137,9 +117,10 @@ export declare class NggvDropdownListComponent implements OnInit, OnChanges {
|
|
|
137
117
|
scrollToResult(option: any, focusElement?: boolean): void;
|
|
138
118
|
/**
|
|
139
119
|
* Calculates available space above and below the dropdown input,
|
|
120
|
+
* sets dropdownPosition ('top' or 'bottom') accordingly,
|
|
140
121
|
* and dynamically sets the max-height of the dropdown list to fit the viewport.
|
|
141
122
|
*/
|
|
142
|
-
|
|
123
|
+
setDropdownPosition(): void;
|
|
143
124
|
static ɵfac: i0.ɵɵFactoryDeclaration<NggvDropdownListComponent, [{ optional: true; }, null, null]>;
|
|
144
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownListComponent, "nggv-dropdown-list", never, { "expanded": { "alias": "expanded"; "required": false; }; "state": { "alias": "state"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "optionContentTpl": { "alias": "optionContentTpl"; "required": false; }; "groupLabelTpl": { "alias": "groupLabelTpl"; "required": false; }; "id": { "alias": "id"; "required": false; }; "thook": { "alias": "thook"; "required": false; }; "options": { "alias": "options"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "onlyEmitDistinctChanges": { "alias": "onlyEmitDistinctChanges"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; };
|
|
125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownListComponent, "nggv-dropdown-list", never, { "expanded": { "alias": "expanded"; "required": false; }; "state": { "alias": "state"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "optionContentTpl": { "alias": "optionContentTpl"; "required": false; }; "groupLabelTpl": { "alias": "groupLabelTpl"; "required": false; }; "id": { "alias": "id"; "required": false; }; "thook": { "alias": "thook"; "required": false; }; "options": { "alias": "options"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "onlyEmitDistinctChanges": { "alias": "onlyEmitDistinctChanges"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "dynamicPosition": { "alias": "dynamicPosition"; "required": false; }; }, { "selectedValueChanged": "selectedValueChanged"; "closed": "closed"; }, never, never, false, never>;
|
|
145
126
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js';
|
|
2
|
-
import {
|
|
3
|
-
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
|
|
4
3
|
import { NgControl } from '@angular/forms';
|
|
5
4
|
import { TranslocoScope } from '@jsverse/transloco';
|
|
6
5
|
import { NggvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor';
|
|
@@ -16,8 +15,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
16
15
|
protected translocoScope: TranslocoScope;
|
|
17
16
|
protected cdr: ChangeDetectorRef;
|
|
18
17
|
protected dropdownUtils: DropdownUtils<K, V, T>;
|
|
19
|
-
protected overlay: Overlay;
|
|
20
|
-
protected vcr: ViewContainerRef;
|
|
21
18
|
/** Custom template for displaying options and groups. */
|
|
22
19
|
selectedContentTpl: TemplateRef<OptionBase<T>> | undefined;
|
|
23
20
|
optionContentTpl: TemplateRef<OptionBase<any>> | undefined;
|
|
@@ -28,9 +25,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
28
25
|
thook: string | null | undefined;
|
|
29
26
|
get isSmall(): boolean;
|
|
30
27
|
get isLarge(): boolean;
|
|
31
|
-
/** Reference to the dropdown list template used for rendering the dropdown in an overlay. */
|
|
32
|
-
dropdownTemplate: TemplateRef<any>;
|
|
33
|
-
toggleButton: ElementRef;
|
|
34
28
|
/**
|
|
35
29
|
* Sets the displayed size of the dropdown.
|
|
36
30
|
*/
|
|
@@ -71,11 +65,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
71
65
|
* Defaults to true.
|
|
72
66
|
*/
|
|
73
67
|
onlyHandleDistinctChanges: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* If true (default), the dropdown list will close when any scrollable ancestor is scrolled.
|
|
76
|
-
* If false, the dropdown list will reposition itself instead of closing.
|
|
77
|
-
*/
|
|
78
|
-
closeDropdownListOnScroll: boolean;
|
|
79
68
|
/**
|
|
80
69
|
* Emits changes of the expanded state of the dropdown
|
|
81
70
|
*/
|
|
@@ -86,24 +75,13 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
86
75
|
expanded: boolean;
|
|
87
76
|
/** The current option selected based on numeric index. */
|
|
88
77
|
activeIndex: number;
|
|
89
|
-
/**
|
|
90
|
-
* Stores the bounding rectangle of the dropdown trigger element,
|
|
91
|
-
* used for positioning the dropdown list overlay.
|
|
92
|
-
*/
|
|
93
|
-
triggerRect: DOMRect | undefined;
|
|
94
78
|
/** Subscribe if dropdown expanded to listen to click outside to close dropdown. */
|
|
95
79
|
private onClickSubscription;
|
|
96
80
|
/** Subscribe if dropdown expanded to listen to scroll outside to close dropdown. */
|
|
97
81
|
private onScrollSubscription;
|
|
98
|
-
/** Subscribe to get dropdown width size changes for a dropdown list width to match. */
|
|
99
|
-
private resizeSubscription;
|
|
100
|
-
/** Subscription to dropdown list overlay detachments. */
|
|
101
|
-
private overlayDetachSubscription;
|
|
102
82
|
keyEvent: KeyboardEvent;
|
|
103
83
|
private _options;
|
|
104
|
-
|
|
105
|
-
private overlayRef?;
|
|
106
|
-
constructor(ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef, dropdownUtils: DropdownUtils<K, V, T>, overlay: Overlay, vcr: ViewContainerRef);
|
|
84
|
+
constructor(ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef, dropdownUtils: DropdownUtils<K, V, T>);
|
|
107
85
|
ngOnChanges(changes: SimpleChanges): void;
|
|
108
86
|
ngOnDestroy(): void;
|
|
109
87
|
/** @internal override to correctly set state from form value */
|
|
@@ -115,6 +93,7 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
115
93
|
* Closes the dropdown on click outside.
|
|
116
94
|
*/
|
|
117
95
|
subscribeToOutsideClickEvent(): void;
|
|
96
|
+
subscribeToOutsideScrollEvent(): void;
|
|
118
97
|
/**
|
|
119
98
|
* Set the dropdown value to given option.
|
|
120
99
|
* @param value the dropdown option to select.
|
|
@@ -128,20 +107,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
128
107
|
* @param state the expanded state which to set.
|
|
129
108
|
*/
|
|
130
109
|
setExpanded(state?: boolean): void;
|
|
131
|
-
/**
|
|
132
|
-
* Opens the dropdown overlay by detaching any existing overlay reference,
|
|
133
|
-
* attaching a new overlay, updating its width, and setting up listeners for overlay detachments.
|
|
134
|
-
* This method ensures the dropdown overlay is properly initialized and displayed.
|
|
135
|
-
*/
|
|
136
|
-
openDropdownOverlay(): void;
|
|
137
|
-
detachOldOverlayRef(): void;
|
|
138
|
-
attachNewOverlayRef(): void;
|
|
139
|
-
updateOverlayWidth(): void;
|
|
140
|
-
listenOverlayDetachments(): void;
|
|
141
|
-
getDropdownListPositionsArray(): ConnectedPosition[];
|
|
142
|
-
getScrollStrategy(): ScrollStrategy;
|
|
143
|
-
setOverlayWidth(): void;
|
|
144
|
-
closeDropdownOverlay(): void;
|
|
145
110
|
/**
|
|
146
111
|
* Typecast anything to an {@link Option}.
|
|
147
112
|
* @param option the object to typecast.
|
|
@@ -157,6 +122,6 @@ export declare class NggvDropdownComponent<K = string | null | undefined, V = st
|
|
|
157
122
|
* @param option the object to check.
|
|
158
123
|
*/
|
|
159
124
|
isOption(option: OptionBase<T>): option is OptionGroup<T>;
|
|
160
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NggvDropdownComponent<any, any, any>, [{ optional: true; self: true; }, { optional: true; }, null, null
|
|
161
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownComponent<any, any, any>, "nggv-dropdown", never, { "thook": { "alias": "thook"; "required": false; }; "size": { "alias": "size"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "options": { "alias": "options"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "allowControlNullishOption": { "alias": "allowControlNullishOption"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "selectOnSingleOption": { "alias": "selectOnSingleOption"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "onlyHandleDistinctChanges": { "alias": "onlyHandleDistinctChanges"; "required": false; };
|
|
125
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NggvDropdownComponent<any, any, any>, [{ optional: true; self: true; }, { optional: true; }, null, null]>;
|
|
126
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NggvDropdownComponent<any, any, any>, "nggv-dropdown", never, { "thook": { "alias": "thook"; "required": false; }; "size": { "alias": "size"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "options": { "alias": "options"; "required": false; }; "scrollOffset": { "alias": "scrollOffset"; "required": false; }; "allowControlNullishOption": { "alias": "allowControlNullishOption"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; "selectOnSingleOption": { "alias": "selectOnSingleOption"; "required": false; }; "selectWithSpace": { "alias": "selectWithSpace"; "required": false; }; "onlyHandleDistinctChanges": { "alias": "onlyHandleDistinctChanges"; "required": false; }; }, { "expandedChange": "expandedChange"; }, ["selectedContentTpl", "optionContentTpl", "groupLabelTpl"], ["*"], false, never>;
|
|
162
127
|
}
|