@ng-matero/ng-select 0.3.0 → 0.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/fesm2022/ng-matero-ng-select.mjs +104 -161
- package/fesm2022/ng-matero-ng-select.mjs.map +1 -1
- package/index.d.ts +51 -72
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ interface NgOptionItem {
|
|
|
13
13
|
label?: string;
|
|
14
14
|
value?: string | any;
|
|
15
15
|
parent?: NgOptionItem | null;
|
|
16
|
-
children?: NgOptionItem[];
|
|
16
|
+
children?: NgOptionItem[] | null;
|
|
17
17
|
}
|
|
18
|
-
type
|
|
18
|
+
type DropdownPanelPosition = 'top' | 'right' | 'bottom' | 'left' | 'auto';
|
|
19
19
|
type AddTagFn = (term: string) => any | Promise<any>;
|
|
20
20
|
type CompareWithFn = (a: any, b: any) => boolean;
|
|
21
21
|
type GroupValueFn = (key: string | any, children: any[]) => string | any;
|
|
@@ -31,23 +31,23 @@ interface ScrollEvent {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
declare class NgDropdownPanel implements OnInit, OnChanges, OnDestroy {
|
|
34
|
+
listboxId: string;
|
|
34
35
|
items: NgOptionItem[];
|
|
35
36
|
markedItem?: NgOptionItem;
|
|
36
|
-
position:
|
|
37
|
+
position: DropdownPanelPosition;
|
|
37
38
|
appendTo?: string;
|
|
38
39
|
bufferAmount: number;
|
|
39
40
|
virtualScroll: boolean;
|
|
40
41
|
headerTemplate?: TemplateRef<any>;
|
|
41
42
|
footerTemplate?: TemplateRef<any>;
|
|
42
43
|
filterValue: string | null;
|
|
43
|
-
ariaLabelDropdown: string | null;
|
|
44
44
|
update: EventEmitter<NgOptionItem[]>;
|
|
45
45
|
scroll: EventEmitter<ScrollEvent>;
|
|
46
46
|
scrollToEnd: EventEmitter<void>;
|
|
47
47
|
outsideClick: EventEmitter<void>;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
scrollHostElRef: ElementRef<HTMLElement>;
|
|
49
|
+
scrollContentElRef: ElementRef<HTMLElement>;
|
|
50
|
+
scrollSpacerElRef: ElementRef<HTMLElement>;
|
|
51
51
|
private _document;
|
|
52
52
|
private _renderer;
|
|
53
53
|
private _zone;
|
|
@@ -55,15 +55,15 @@ declare class NgDropdownPanel implements OnInit, OnChanges, OnDestroy {
|
|
|
55
55
|
private _panelUtils;
|
|
56
56
|
private readonly _destroy$;
|
|
57
57
|
private readonly _dropdown;
|
|
58
|
-
private _virtualPadding;
|
|
59
|
-
private _scrollablePanel;
|
|
60
|
-
private _contentPanel;
|
|
61
58
|
private _select;
|
|
62
59
|
private _parent;
|
|
60
|
+
private _scrollHost;
|
|
61
|
+
private _scrollContent;
|
|
62
|
+
private _scrollSpacer;
|
|
63
63
|
private _scrollToEndFired;
|
|
64
64
|
private _updateScrollHeight;
|
|
65
65
|
private _lastScrollPosition;
|
|
66
|
-
get currentPosition():
|
|
66
|
+
get currentPosition(): DropdownPanelPosition;
|
|
67
67
|
private _currentPosition;
|
|
68
68
|
private get itemsLength();
|
|
69
69
|
private set itemsLength(value);
|
|
@@ -96,7 +96,7 @@ declare class NgDropdownPanel implements OnInit, OnChanges, OnDestroy {
|
|
|
96
96
|
private _updateYPosition;
|
|
97
97
|
private _setupMousedownListener;
|
|
98
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDropdownPanel, never>;
|
|
99
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgDropdownPanel, "ng-dropdown-panel", never, { "
|
|
99
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgDropdownPanel, "ng-dropdown-panel", never, { "listboxId": { "alias": "listboxId"; "required": false; }; "items": { "alias": "items"; "required": false; }; "markedItem": { "alias": "markedItem"; "required": false; }; "position": { "alias": "position"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "bufferAmount": { "alias": "bufferAmount"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "filterValue": { "alias": "filterValue"; "required": false; }; }, { "update": "update"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; "outsideClick": "outsideClick"; }, never, ["*"], true, never>;
|
|
100
100
|
static ngAcceptInputType_virtualScroll: unknown;
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -228,26 +228,26 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
228
228
|
readonly autoFocus: string | null;
|
|
229
229
|
readonly classes: string | null;
|
|
230
230
|
_classList: Record<string, boolean>;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
_uid: string;
|
|
232
|
+
bindLabel: string | undefined;
|
|
233
|
+
bindValue: string | undefined;
|
|
234
|
+
placeholder: string | undefined;
|
|
234
235
|
fixedPlaceholder: boolean;
|
|
235
|
-
appendTo
|
|
236
|
-
|
|
236
|
+
appendTo: string | undefined;
|
|
237
|
+
panelPosition: DropdownPanelPosition;
|
|
237
238
|
readonly: boolean;
|
|
238
239
|
multiple: boolean;
|
|
239
240
|
searchable: boolean;
|
|
240
241
|
clearable: boolean;
|
|
241
|
-
|
|
242
|
-
|
|
242
|
+
clearOnBackspace: boolean;
|
|
243
|
+
clearAllText: string;
|
|
243
244
|
loading: boolean;
|
|
244
|
-
loadingText
|
|
245
|
+
loadingText: string;
|
|
245
246
|
closeOnSelect: boolean;
|
|
246
|
-
clearOnBackspace: boolean;
|
|
247
247
|
hideSelected: boolean;
|
|
248
248
|
selectOnTab: boolean;
|
|
249
|
-
openOnEnter
|
|
250
|
-
virtualScroll
|
|
249
|
+
openOnEnter: boolean;
|
|
250
|
+
virtualScroll: boolean;
|
|
251
251
|
bufferAmount: number;
|
|
252
252
|
selectableGroup: boolean;
|
|
253
253
|
selectableGroupAsModel: boolean;
|
|
@@ -258,25 +258,26 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
258
258
|
markFirst: boolean;
|
|
259
259
|
preventToggleOnRightClick: boolean;
|
|
260
260
|
addTag: boolean | AddTagFn;
|
|
261
|
-
addTagText
|
|
262
|
-
notFoundText
|
|
261
|
+
addTagText: string;
|
|
262
|
+
notFoundText: string;
|
|
263
263
|
typeahead?: Subject<string>;
|
|
264
|
-
typeToSearchText
|
|
264
|
+
typeToSearchText: string;
|
|
265
265
|
groupBy?: string | ((value: any) => any);
|
|
266
266
|
groupValue?: GroupValueFn;
|
|
267
267
|
searchFn: SearchFn | null;
|
|
268
268
|
keyDownFn: (_: KeyboardEvent) => boolean;
|
|
269
269
|
trackByFn: TrackByFn | null;
|
|
270
|
-
appearance
|
|
270
|
+
appearance: string;
|
|
271
271
|
tabIndex?: number;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
ariaDescribedby?: string;
|
|
276
|
-
ariaLabelDropdown: string;
|
|
272
|
+
ariaLabel?: string | null;
|
|
273
|
+
ariaLabelledby?: string | null;
|
|
274
|
+
ariaDescribedby?: string | null;
|
|
277
275
|
inputAttrs: Record<string, string>;
|
|
278
276
|
isOpen?: boolean;
|
|
279
277
|
set panelClass(value: string | string[] | Record<string, any> | undefined);
|
|
278
|
+
get inputId(): string;
|
|
279
|
+
set inputId(value: string);
|
|
280
|
+
private _inputId;
|
|
280
281
|
get items(): readonly any[] | null | undefined;
|
|
281
282
|
set items(value: readonly any[] | null | undefined);
|
|
282
283
|
private _items;
|
|
@@ -285,11 +286,11 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
285
286
|
get compareWith(): CompareWithFn;
|
|
286
287
|
set compareWith(fn: CompareWithFn);
|
|
287
288
|
private _compareWith;
|
|
288
|
-
get clearSearchOnAdd(): boolean
|
|
289
|
-
set clearSearchOnAdd(value: boolean
|
|
289
|
+
get clearSearchOnAdd(): boolean;
|
|
290
|
+
set clearSearchOnAdd(value: boolean);
|
|
290
291
|
private _clearSearchOnAdd?;
|
|
291
|
-
get deselectOnClick(): boolean
|
|
292
|
-
set deselectOnClick(value: boolean
|
|
292
|
+
get deselectOnClick(): boolean;
|
|
293
|
+
set deselectOnClick(value: boolean);
|
|
293
294
|
private _deselectOnClick?;
|
|
294
295
|
blurEvent: EventEmitter<FocusEvent>;
|
|
295
296
|
focusEvent: EventEmitter<FocusEvent>;
|
|
@@ -319,14 +320,12 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
319
320
|
tagTemplate?: TemplateRef<any>;
|
|
320
321
|
loadingSpinnerTemplate?: TemplateRef<any>;
|
|
321
322
|
clearButtonTemplate?: TemplateRef<any>;
|
|
322
|
-
dropdownId: string;
|
|
323
|
-
element: HTMLElement;
|
|
324
323
|
itemsList: ItemsList;
|
|
324
|
+
element: HTMLElement;
|
|
325
325
|
viewPortItems: NgOptionItem[];
|
|
326
326
|
searchTerm: string | null;
|
|
327
327
|
focused?: boolean;
|
|
328
328
|
escapeHTML: boolean;
|
|
329
|
-
tabFocusOnClear: boolean;
|
|
330
329
|
private _itemsAreUsed?;
|
|
331
330
|
private _primitive;
|
|
332
331
|
private _manualOpen?;
|
|
@@ -338,12 +337,16 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
338
337
|
get selectedItems(): NgOptionItem[];
|
|
339
338
|
get selectedValues(): any[];
|
|
340
339
|
get hasValue(): boolean;
|
|
341
|
-
get currentPanelPosition():
|
|
340
|
+
get currentPanelPosition(): DropdownPanelPosition | undefined;
|
|
342
341
|
get showAddTag(): boolean;
|
|
343
342
|
get filtered(): boolean;
|
|
344
343
|
private get _editableSearchTerm();
|
|
345
344
|
private get _isTypeahead();
|
|
346
345
|
private get _validTerm();
|
|
346
|
+
get showClearButton(): boolean | "" | null;
|
|
347
|
+
get showNoItemsFound(): boolean | "" | undefined;
|
|
348
|
+
get showTypeToSearch(): boolean | undefined;
|
|
349
|
+
get listboxId(): string;
|
|
347
350
|
private _onChange;
|
|
348
351
|
private _onTouched;
|
|
349
352
|
trackByOption: (_: number, item: NgOptionItem) => any;
|
|
@@ -356,7 +359,7 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
356
359
|
registerOnChange(fn: any): void;
|
|
357
360
|
registerOnTouched(fn: any): void;
|
|
358
361
|
setDisabledState(isDisabled: boolean): void;
|
|
359
|
-
clearItem: (item
|
|
362
|
+
clearItem: (item?: NgOptionItem | null) => void;
|
|
360
363
|
handleKeyDown(e: KeyboardEvent): void;
|
|
361
364
|
handleKeyCode(e: KeyboardEvent): void;
|
|
362
365
|
handleKeyCodeInput(e: KeyboardEvent): void;
|
|
@@ -372,12 +375,8 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
372
375
|
select(item: NgOptionItem): void;
|
|
373
376
|
focus(): void;
|
|
374
377
|
blur(): void;
|
|
375
|
-
unselect(item
|
|
378
|
+
unselect(item?: NgOptionItem | null): void;
|
|
376
379
|
selectTag(): void;
|
|
377
|
-
showClear(): boolean | "" | null;
|
|
378
|
-
focusOnClear(): void;
|
|
379
|
-
showNoItemsFound(): boolean | "" | undefined;
|
|
380
|
-
showTypeToSearch(): boolean | undefined;
|
|
381
380
|
onCompositionStart(): void;
|
|
382
381
|
onCompositionEnd(term: string): void;
|
|
383
382
|
filter(term: string): void;
|
|
@@ -392,7 +391,6 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
392
391
|
private _handleWriteValue;
|
|
393
392
|
private _handleKeyPresses;
|
|
394
393
|
private _setInputAttributes;
|
|
395
|
-
private _setTabFocusOnClear;
|
|
396
394
|
private _updateNgModel;
|
|
397
395
|
private _clearSearch;
|
|
398
396
|
private _changeSearch;
|
|
@@ -406,32 +404,15 @@ declare class NgSelect implements OnDestroy, OnChanges, OnInit, AfterViewInit, C
|
|
|
406
404
|
private _handleArrowUp;
|
|
407
405
|
private _nextItemIsTag;
|
|
408
406
|
private _handleBackspace;
|
|
409
|
-
private _mergeGlobalConfig;
|
|
410
|
-
/**
|
|
411
|
-
* Gets virtual scroll value from input or from config
|
|
412
|
-
*
|
|
413
|
-
* @param config NgSelectConfig object
|
|
414
|
-
*
|
|
415
|
-
* @returns `true` if virtual scroll is enabled, `false` otherwise
|
|
416
|
-
*/
|
|
417
|
-
private getVirtualScroll;
|
|
418
|
-
/**
|
|
419
|
-
* Gets disableVirtualScroll value from input or from config
|
|
420
|
-
*
|
|
421
|
-
* @param config NgSelectConfig object
|
|
422
|
-
*
|
|
423
|
-
* @returns `true` if disableVirtualScroll is enabled, `false` otherwise
|
|
424
|
-
*/
|
|
425
|
-
private isVirtualScrollDisabled;
|
|
426
407
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgSelect, never>;
|
|
427
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgSelect, "ng-select", never, { "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "fixedPlaceholder": { "alias": "fixedPlaceholder"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "
|
|
408
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgSelect, "ng-select", never, { "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "fixedPlaceholder": { "alias": "fixedPlaceholder"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "panelPosition": { "alias": "panelPosition"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearOnBackspace": { "alias": "clearOnBackspace"; "required": false; }; "clearAllText": { "alias": "clearAllText"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "hideSelected": { "alias": "hideSelected"; "required": false; }; "selectOnTab": { "alias": "selectOnTab"; "required": false; }; "openOnEnter": { "alias": "openOnEnter"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "bufferAmount": { "alias": "bufferAmount"; "required": false; }; "selectableGroup": { "alias": "selectableGroup"; "required": false; }; "selectableGroupAsModel": { "alias": "selectableGroupAsModel"; "required": false; }; "searchWhileComposing": { "alias": "searchWhileComposing"; "required": false; }; "editableSearchTerm": { "alias": "editableSearchTerm"; "required": false; }; "maxSelectedItems": { "alias": "maxSelectedItems"; "required": false; }; "minTermLength": { "alias": "minTermLength"; "required": false; }; "markFirst": { "alias": "markFirst"; "required": false; }; "preventToggleOnRightClick": { "alias": "preventToggleOnRightClick"; "required": false; }; "addTag": { "alias": "addTag"; "required": false; }; "addTagText": { "alias": "addTagText"; "required": false; }; "notFoundText": { "alias": "notFoundText"; "required": false; }; "typeahead": { "alias": "typeahead"; "required": false; }; "typeToSearchText": { "alias": "typeToSearchText"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "groupValue": { "alias": "groupValue"; "required": false; }; "searchFn": { "alias": "searchFn"; "required": false; }; "keyDownFn": { "alias": "keyDownFn"; "required": false; }; "trackByFn": { "alias": "trackByFn"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; "inputAttrs": { "alias": "inputAttrs"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "items": { "alias": "items"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "clearSearchOnAdd": { "alias": "clearSearchOnAdd"; "required": false; }; "deselectOnClick": { "alias": "deselectOnClick"; "required": false; }; }, { "blurEvent": "blur"; "focusEvent": "focus"; "changeEvent": "change"; "openEvent": "open"; "closeEvent": "close"; "searchEvent": "search"; "clearEvent": "clear"; "addEvent": "add"; "removeEvent": "remove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["optionTemplate", "optgroupTemplate", "labelTemplate", "multiLabelTemplate", "headerTemplate", "footerTemplate", "notFoundTemplate", "placeholderTemplate", "typeToSearchTemplate", "loadingTextTemplate", "tagTemplate", "loadingSpinnerTemplate", "clearButtonTemplate", "ngOptions"], never, true, never>;
|
|
428
409
|
static ngAcceptInputType_readonly: unknown;
|
|
429
410
|
static ngAcceptInputType_multiple: unknown;
|
|
430
411
|
static ngAcceptInputType_searchable: unknown;
|
|
431
412
|
static ngAcceptInputType_clearable: unknown;
|
|
413
|
+
static ngAcceptInputType_clearOnBackspace: unknown;
|
|
432
414
|
static ngAcceptInputType_loading: unknown;
|
|
433
415
|
static ngAcceptInputType_closeOnSelect: unknown;
|
|
434
|
-
static ngAcceptInputType_clearOnBackspace: unknown;
|
|
435
416
|
static ngAcceptInputType_hideSelected: unknown;
|
|
436
417
|
static ngAcceptInputType_selectOnTab: unknown;
|
|
437
418
|
static ngAcceptInputType_openOnEnter: unknown;
|
|
@@ -456,16 +437,14 @@ declare class NgSelectConfig {
|
|
|
456
437
|
addTagText: string;
|
|
457
438
|
loadingText: string;
|
|
458
439
|
clearAllText: string;
|
|
459
|
-
|
|
460
|
-
disableVirtualScroll: boolean;
|
|
440
|
+
virtualScroll: boolean;
|
|
461
441
|
openOnEnter: boolean;
|
|
462
442
|
appendTo?: string;
|
|
463
443
|
bindValue?: string;
|
|
464
444
|
bindLabel?: string;
|
|
465
|
-
appearance: string;
|
|
466
445
|
clearSearchOnAdd?: boolean;
|
|
467
446
|
deselectOnClick?: boolean;
|
|
468
|
-
|
|
447
|
+
appearance: string;
|
|
469
448
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgSelectConfig, never>;
|
|
470
449
|
static ɵprov: i0.ɵɵInjectableDeclaration<NgSelectConfig>;
|
|
471
450
|
}
|
|
@@ -474,7 +453,7 @@ declare class NgItemLabel implements OnChanges {
|
|
|
474
453
|
ngItemLabel: string;
|
|
475
454
|
escape: boolean;
|
|
476
455
|
private element;
|
|
477
|
-
ngOnChanges(
|
|
456
|
+
ngOnChanges(): void;
|
|
478
457
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgItemLabel, never>;
|
|
479
458
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgItemLabel, "[ngItemLabel]", never, { "ngItemLabel": { "alias": "ngItemLabel"; "required": false; }; "escape": { "alias": "escape"; "required": false; }; }, {}, never, never, true, never>;
|
|
480
459
|
}
|
|
@@ -551,4 +530,4 @@ declare class NgSelectModule {
|
|
|
551
530
|
}
|
|
552
531
|
|
|
553
532
|
export { DefaultSelectionModel, DefaultSelectionModelFactory, NgClearButtonTemplate, NgDropdownPanel, NgDropdownPanelUtils, NgFooterTemplate, NgHeaderTemplate, NgItemLabel, NgLabelTemplate, NgLoadingSpinnerTemplate, NgLoadingTextTemplate, NgMultiLabelTemplate, NgNotFoundTemplate, NgOptgroupTemplate, NgOption, NgOptionHighlight, NgOptionTemplate, NgPlaceholderTemplate, NgSelect, NgSelectConfig, NgSelectModule, NgTagTemplate, NgTypeToSearchTemplate, SELECTION_MODEL_FACTORY };
|
|
554
|
-
export type { AddTagFn, CompareWithFn,
|
|
533
|
+
export type { AddTagFn, CompareWithFn, DropdownPanelPosition, GroupValueFn, ItemsRangeResult, NgOptionItem, PanelDimensions, ScrollEvent, SearchEvent, SearchFn, SelectionModel, SelectionModelFactory, TrackByFn };
|