@kirbydesign/extensions-angular 5.1.0 → 6.0.0-dev-d045bb2
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/kirbydesign-extensions-angular-combobox.mjs +897 -852
- package/fesm2022/kirbydesign-extensions-angular-combobox.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-image-banner.mjs +206 -128
- package/fesm2022/kirbydesign-extensions-angular-image-banner.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-localization.mjs +541 -411
- package/fesm2022/kirbydesign-extensions-angular-localization.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-sidebar-menu.mjs +1462 -603
- package/fesm2022/kirbydesign-extensions-angular-sidebar-menu.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-skeleton-loader.mjs +79 -40
- package/fesm2022/kirbydesign-extensions-angular-skeleton-loader.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-spot-illustration.mjs +164 -155
- package/fesm2022/kirbydesign-extensions-angular-spot-illustration.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular.mjs +1 -8
- package/fesm2022/kirbydesign-extensions-angular.mjs.map +1 -1
- package/package.json +13 -13
- package/types/kirbydesign-extensions-angular-combobox.d.ts +273 -216
- package/types/kirbydesign-extensions-angular-image-banner.d.ts +102 -66
- package/types/kirbydesign-extensions-angular-localization.d.ts +185 -204
- package/types/kirbydesign-extensions-angular-sidebar-menu.d.ts +137 -120
- package/types/kirbydesign-extensions-angular-skeleton-loader.d.ts +23 -17
- package/types/kirbydesign-extensions-angular-spot-illustration.d.ts +224 -212
- package/types/kirbydesign-extensions-angular.d.ts +2 -2
- package/combobox/package.json +0 -4
- package/image-banner/package.json +0 -4
- package/localization/package.json +0 -4
- package/sidebar-menu/package.json +0 -4
- package/skeleton-loader/package.json +0 -4
- package/spot-illustration/package.json +0 -4
|
@@ -1,216 +1,273 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { AfterViewInit,
|
|
3
|
-
import { ControlValueAccessor } from
|
|
4
|
-
import { HorizontalDirection, PopoverComponent } from
|
|
5
|
-
import { InputSize } from
|
|
6
|
-
import { FormFieldControl } from
|
|
7
|
-
import { ResizeObserverService } from
|
|
8
|
-
import { CdkVirtualScrollViewport } from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, QueryList, Renderer2, TemplateRef } from "@angular/core";
|
|
3
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
4
|
+
import { HorizontalDirection, PopoverComponent } from "@kirbydesign/designsystem/popover";
|
|
5
|
+
import { InputSize } from "@kirbydesign/designsystem/form-field";
|
|
6
|
+
import { FormFieldControl } from "@kirbydesign/designsystem/types";
|
|
7
|
+
import { ResizeObserverService } from "@kirbydesign/designsystem/shared";
|
|
8
|
+
import { CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
|
|
9
|
+
export declare class ComboboxComponent implements AfterViewInit, OnDestroy, ControlValueAccessor, FormFieldControl {
|
|
10
|
+
private renderer;
|
|
11
|
+
private elementRef;
|
|
12
|
+
private cdr;
|
|
13
|
+
private resizeObserverService;
|
|
14
|
+
private static readonly HEIGHT_OF_STANDARD_ITEM;
|
|
15
|
+
private state;
|
|
16
|
+
private _popout;
|
|
17
|
+
private _attributesToForward;
|
|
18
|
+
_listboxId: string;
|
|
19
|
+
_comboboxId: string;
|
|
20
|
+
private readonly _defaultSearchFunction;
|
|
21
|
+
private compareAlphabetically;
|
|
22
|
+
/**
|
|
23
|
+
* The text to display when the search returns no results.
|
|
24
|
+
*/
|
|
25
|
+
noSearchResultsText: string;
|
|
26
|
+
/**
|
|
27
|
+
* The text announced by screen readers when the selection is cleared.
|
|
28
|
+
*/
|
|
29
|
+
selectionClearedAnnouncement: string;
|
|
30
|
+
_liveRegionText: string;
|
|
31
|
+
/**
|
|
32
|
+
* The name of the property to use as the display text for each item.
|
|
33
|
+
*/
|
|
34
|
+
itemTextProperty: string;
|
|
35
|
+
protected getItemText(item: unknown): string;
|
|
36
|
+
/**
|
|
37
|
+
* The height of each item in the dropdown, in pixels. This is used to calculate the height of the dropdown based on the number of items.
|
|
38
|
+
*/
|
|
39
|
+
itemHeight: number;
|
|
40
|
+
protected get dropdownMaxHeight(): number;
|
|
41
|
+
protected get dropdownMinHeight(): number;
|
|
42
|
+
protected get viewportHeight(): number;
|
|
43
|
+
private isTypeString;
|
|
44
|
+
private objectHasItemTextProperty;
|
|
45
|
+
private objectHasItemIdProperty;
|
|
46
|
+
/**
|
|
47
|
+
* The name of the property to use as the unique identifier for each item.
|
|
48
|
+
*/
|
|
49
|
+
itemIdProperty: string;
|
|
50
|
+
protected getItemId(item: unknown): string;
|
|
51
|
+
/**
|
|
52
|
+
* A function that takes a search term and the list of items, and returns a filtered list of items to display in the dropdown.
|
|
53
|
+
*/
|
|
54
|
+
searchFunction: (searchTerm: string, itemsToSearch: any[]) => any[];
|
|
55
|
+
private _searchItems;
|
|
56
|
+
protected get searchItems(): unknown[];
|
|
57
|
+
private set searchItems(value);
|
|
58
|
+
private _items;
|
|
59
|
+
get items(): unknown[];
|
|
60
|
+
/**
|
|
61
|
+
* The list of items to display in the dropdown.
|
|
62
|
+
* @param value
|
|
63
|
+
*/
|
|
64
|
+
set items(value: unknown[]);
|
|
65
|
+
private _selectedItem;
|
|
66
|
+
get selectedItem(): unknown;
|
|
67
|
+
/**
|
|
68
|
+
* The currently selected item.
|
|
69
|
+
* @param value
|
|
70
|
+
*/
|
|
71
|
+
set selectedItem(value: unknown);
|
|
72
|
+
private _focusedItem;
|
|
73
|
+
get focusedItem(): unknown;
|
|
74
|
+
set focusedItem(item: unknown);
|
|
75
|
+
private getIndexOfItem;
|
|
76
|
+
private getKirbyElement;
|
|
77
|
+
private setAriaPosinsetOnElement;
|
|
78
|
+
/**
|
|
79
|
+
* The placeholder text to display in the input when no item is selected and the input is empty.
|
|
80
|
+
*/
|
|
81
|
+
placeholder: string;
|
|
82
|
+
/**
|
|
83
|
+
* The direction in which the dropdown should open relative to the input.
|
|
84
|
+
* @param direction
|
|
85
|
+
*/
|
|
86
|
+
set popout(direction: HorizontalDirection | `${HorizontalDirection}`);
|
|
87
|
+
get popout(): HorizontalDirection | `${HorizontalDirection}`;
|
|
88
|
+
/**
|
|
89
|
+
* If the combobox needs to expand to full width of its parent container, then use expand.
|
|
90
|
+
*/
|
|
91
|
+
expand?: 'block';
|
|
92
|
+
/**
|
|
93
|
+
* When `true`, the user cannot interact with the combobox.
|
|
94
|
+
*/
|
|
95
|
+
disabled: boolean;
|
|
96
|
+
get _isDisabled(): 'disabled' | null;
|
|
97
|
+
/**
|
|
98
|
+
* Will emit the new value when error changes.
|
|
99
|
+
*/
|
|
100
|
+
hasErrorChange: EventEmitter<boolean>;
|
|
101
|
+
private _hasError;
|
|
102
|
+
/**
|
|
103
|
+
* When `true`, the combobox will be styled with error styles.
|
|
104
|
+
*/
|
|
105
|
+
get hasError(): boolean;
|
|
106
|
+
set hasError(value: boolean);
|
|
107
|
+
/**
|
|
108
|
+
* The size of the input element.
|
|
109
|
+
*/
|
|
110
|
+
size: InputSize;
|
|
111
|
+
get _noBlurOnScroll(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Emitted when an item is selected (tap on mobile, click/keypress on web)
|
|
114
|
+
*/
|
|
115
|
+
change: EventEmitter<any>;
|
|
116
|
+
value: unknown;
|
|
117
|
+
get _isBlockLevel(): boolean;
|
|
118
|
+
get _isOpening(): boolean;
|
|
119
|
+
get isOpen(): boolean;
|
|
120
|
+
get hasValue(): boolean;
|
|
121
|
+
itemTemplate?: TemplateRef<unknown>;
|
|
122
|
+
slottedItems?: QueryList<ElementRef<HTMLElement>>;
|
|
123
|
+
cardElement?: ElementRef<HTMLElement>;
|
|
124
|
+
popover?: PopoverComponent;
|
|
125
|
+
rootElement: ElementRef<HTMLElement>;
|
|
126
|
+
private textInput;
|
|
127
|
+
get interactiveElement(): HTMLElement;
|
|
128
|
+
_virtualScrollViewport?: CdkVirtualScrollViewport;
|
|
129
|
+
private forwardAriaLabelToCombobox;
|
|
130
|
+
kirbyItemsDefault?: QueryList<ElementRef<HTMLElement>>;
|
|
131
|
+
_kirbyItemsSlotted?: QueryList<ElementRef<HTMLElement>>;
|
|
132
|
+
set kirbyItemsSlotted(kirbyItems: QueryList<ElementRef<HTMLElement>>);
|
|
133
|
+
get kirbyItemsSlotted(): QueryList<ElementRef<HTMLElement>> | undefined;
|
|
134
|
+
private disposeItemClickListeners;
|
|
135
|
+
constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, resizeObserverService: ResizeObserverService);
|
|
136
|
+
protected onToggle(event: MouseEvent): void;
|
|
137
|
+
private toggle;
|
|
138
|
+
ngAfterViewInit(): void;
|
|
139
|
+
private setPopoverCardStyle;
|
|
140
|
+
ngOnDestroy(): void;
|
|
141
|
+
open(): void;
|
|
142
|
+
private showPopOver;
|
|
143
|
+
close(): void;
|
|
144
|
+
protected onItemSelect(item: unknown): void;
|
|
145
|
+
private onChange;
|
|
146
|
+
private onTouched;
|
|
147
|
+
/**
|
|
148
|
+
* Sets the select's value. Part of the ControlValueAccessor interface
|
|
149
|
+
* required to integrate with Angular's core forms API.
|
|
150
|
+
*
|
|
151
|
+
* @param value New value to be written to the model.
|
|
152
|
+
*/
|
|
153
|
+
writeValue(value: string): void;
|
|
154
|
+
/**
|
|
155
|
+
* Saves a callback function to be invoked when the select's value
|
|
156
|
+
* changes from user input. Part of the ControlValueAccessor interface
|
|
157
|
+
* required to integrate with Angular's core forms API.
|
|
158
|
+
*
|
|
159
|
+
* @param fn Callback to be triggered when the value changes.
|
|
160
|
+
*/
|
|
161
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
162
|
+
/**
|
|
163
|
+
* Saves a callback function to be invoked when the select is blurred
|
|
164
|
+
* by the user. Part of the ControlValueAccessor interface required
|
|
165
|
+
* to integrate with Angular's core forms API.
|
|
166
|
+
*
|
|
167
|
+
* @param fn Callback to be triggered when the component has been touched.
|
|
168
|
+
*/
|
|
169
|
+
registerOnTouched(fn: () => void): void;
|
|
170
|
+
/**
|
|
171
|
+
* Disables the select. Part of the ControlValueAccessor interface required
|
|
172
|
+
* to integrate with Angular's core forms API.
|
|
173
|
+
*
|
|
174
|
+
* @param isDisabled Sets whether the component is disabled.
|
|
175
|
+
*/
|
|
176
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
177
|
+
private selectItem;
|
|
178
|
+
private selectItemByInput;
|
|
179
|
+
protected onInput(event: Event): void;
|
|
180
|
+
private clearSelection;
|
|
181
|
+
private _announceTimeout;
|
|
182
|
+
private announce;
|
|
183
|
+
private updateSearchResults;
|
|
184
|
+
protected onPopoverWillHide(): void;
|
|
185
|
+
protected onPopoverClick(): void;
|
|
186
|
+
onMouseDown(event: MouseEvent): void;
|
|
187
|
+
onTouchStart(event: TouchEvent): void;
|
|
188
|
+
onFocusOut(): void;
|
|
189
|
+
onTab(): void;
|
|
190
|
+
onEscape(): void;
|
|
191
|
+
onEnter(event: Event): void;
|
|
192
|
+
onArrowKeys(event: Event): void;
|
|
193
|
+
private handleFocusNavigation;
|
|
194
|
+
private shiftFocusIndex;
|
|
195
|
+
private setFocusOnFirstOrLastItem;
|
|
196
|
+
private setFocusOnSelectedItem;
|
|
197
|
+
private setFocusOnLastItem;
|
|
198
|
+
private setFocusOnFirstItem;
|
|
199
|
+
private unlistenAllSlottedItems;
|
|
200
|
+
private unobserveResize;
|
|
201
|
+
/**
|
|
202
|
+
* Resolve a model/data item based on current `items` by comparing displayed text.
|
|
203
|
+
* This is used to map an incoming form value or input `selectedItem` to an item
|
|
204
|
+
* from the list.
|
|
205
|
+
*/
|
|
206
|
+
private findItemByInput;
|
|
207
|
+
private setInputDisplayValue;
|
|
208
|
+
private scrollFocusedItemIntoViewWhileNavigating;
|
|
209
|
+
private getKirbyItems;
|
|
210
|
+
private scrollToIndexIntoViewWhenOpeningPopup;
|
|
211
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxComponent, never>;
|
|
212
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "kirby-x-combobox", never, {
|
|
213
|
+
"noSearchResultsText": {
|
|
214
|
+
"alias": "noSearchResultsText";
|
|
215
|
+
"required": false;
|
|
216
|
+
};
|
|
217
|
+
"selectionClearedAnnouncement": {
|
|
218
|
+
"alias": "selectionClearedAnnouncement";
|
|
219
|
+
"required": false;
|
|
220
|
+
};
|
|
221
|
+
"itemTextProperty": {
|
|
222
|
+
"alias": "itemTextProperty";
|
|
223
|
+
"required": false;
|
|
224
|
+
};
|
|
225
|
+
"itemHeight": {
|
|
226
|
+
"alias": "itemHeight";
|
|
227
|
+
"required": false;
|
|
228
|
+
};
|
|
229
|
+
"itemIdProperty": {
|
|
230
|
+
"alias": "itemIdProperty";
|
|
231
|
+
"required": false;
|
|
232
|
+
};
|
|
233
|
+
"searchFunction": {
|
|
234
|
+
"alias": "searchFunction";
|
|
235
|
+
"required": false;
|
|
236
|
+
};
|
|
237
|
+
"items": {
|
|
238
|
+
"alias": "items";
|
|
239
|
+
"required": false;
|
|
240
|
+
};
|
|
241
|
+
"selectedItem": {
|
|
242
|
+
"alias": "selectedItem";
|
|
243
|
+
"required": false;
|
|
244
|
+
};
|
|
245
|
+
"placeholder": {
|
|
246
|
+
"alias": "placeholder";
|
|
247
|
+
"required": false;
|
|
248
|
+
};
|
|
249
|
+
"popout": {
|
|
250
|
+
"alias": "popout";
|
|
251
|
+
"required": false;
|
|
252
|
+
};
|
|
253
|
+
"expand": {
|
|
254
|
+
"alias": "expand";
|
|
255
|
+
"required": false;
|
|
256
|
+
};
|
|
257
|
+
"disabled": {
|
|
258
|
+
"alias": "disabled";
|
|
259
|
+
"required": false;
|
|
260
|
+
};
|
|
261
|
+
"hasError": {
|
|
262
|
+
"alias": "hasError";
|
|
263
|
+
"required": false;
|
|
264
|
+
};
|
|
265
|
+
"size": {
|
|
266
|
+
"alias": "size";
|
|
267
|
+
"required": false;
|
|
268
|
+
};
|
|
269
|
+
}, {
|
|
270
|
+
"hasErrorChange": "hasErrorChange";
|
|
271
|
+
"change": "change";
|
|
272
|
+
}, ["itemTemplate", "slottedItems", "kirbyItemsSlotted"], never, true, never>;
|
|
273
|
+
}
|