ng-jvx-multiselect 19.0.38 → 20.0.1

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/index.d.ts CHANGED
@@ -1,5 +1,313 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, TemplateRef, ElementRef, ViewContainerRef, OnInit, OnDestroy, InputSignal, AfterViewInit, QueryList, WritableSignal, ChangeDetectorRef } from '@angular/core';
3
+ import { Observable, Subject } from 'rxjs';
4
+ import { HttpClient, HttpHeaders, HttpContextToken } from '@angular/common/http';
5
+ import { ControlValueAccessor, NgControl, UntypedFormGroup, UntypedFormBuilder } from '@angular/forms';
6
+ import { NgScrollbar } from 'ngx-scrollbar';
7
+ import { Overlay } from '@angular/cdk/overlay';
8
+
9
+ declare class NgJvxOptionComponent {
10
+ clickOnOption: EventEmitter<any>;
11
+ value: i0.InputSignal<any>;
12
+ disabled: i0.InputSignal<boolean>;
13
+ isSelected: i0.InputSignal<boolean>;
14
+ constructor();
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxOptionComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgJvxOptionComponent, "ng-jvx-option", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "isSelected": { "alias": "isSelected"; "required": false; "isSignal": true; }; }, { "clickOnOption": "clickOnOption"; }, never, ["*"], true, never>;
17
+ }
18
+
19
+ declare class NgJvxOptionsTemplateDirective {
20
+ private el;
21
+ template: TemplateRef<any>;
22
+ private vcRef;
23
+ constructor(el: ElementRef, template: TemplateRef<any>, vcRef: ViewContainerRef);
24
+ set ngJvxOptionsTemplateOf(source: Array<any[]>);
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxOptionsTemplateDirective, never>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxOptionsTemplateDirective, "[ngJvxOptionsTemplate]", never, { "ngJvxOptionsTemplateOf": { "alias": "ngJvxOptionsTemplateOf"; "required": false; }; }, {}, never, never, true, never>;
27
+ }
28
+
29
+ declare class NgJvxSelectionTemplateDirective {
30
+ template: TemplateRef<any>;
31
+ private vcRef;
32
+ constructor(template: TemplateRef<any>, vcRef: ViewContainerRef);
33
+ set ngJvxSelectionTemplateOf(source: Array<any[]>);
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxSelectionTemplateDirective, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxSelectionTemplateDirective, "[ngJvxSelectionTemplate]", never, { "ngJvxSelectionTemplateOf": { "alias": "ngJvxSelectionTemplateOf"; "required": false; }; }, {}, never, never, true, never>;
36
+ }
37
+
38
+ declare class NgJvxGroupHeaderDirective {
39
+ template: TemplateRef<any>;
40
+ private vcRef;
41
+ constructor(template: TemplateRef<any>, vcRef: ViewContainerRef);
42
+ set ngJvxGroupHeaderOf(source: Array<any[]>);
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxGroupHeaderDirective, never>;
44
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxGroupHeaderDirective, "[ngJvxGroupHeader]", never, { "ngJvxGroupHeaderOf": { "alias": "ngJvxGroupHeaderOf"; "required": false; }; }, {}, never, never, true, never>;
45
+ }
46
+
47
+ declare class NgJvxDisabledOptionDirective implements OnInit, OnDestroy {
48
+ private el;
49
+ private isDisabled;
50
+ private originalOpacity;
51
+ private unsubs;
52
+ private restore;
53
+ set ngJvxDisabledOption(source: boolean);
54
+ constructor(el: ElementRef);
55
+ ngOnInit(): void;
56
+ ngOnDestroy(): void;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxDisabledOptionDirective, never>;
58
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxDisabledOptionDirective, "[ngJvxDisabledOption]", never, { "ngJvxDisabledOption": { "alias": "ngJvxDisabledOption"; "required": false; }; }, {}, never, never, true, never>;
59
+ }
60
+
61
+ declare class NgJvxMultiselectService {
62
+ private http;
63
+ constructor(http: HttpClient);
64
+ getList({ url, ignorePagination, currentPage, pageSize, requestType, requestHeaders, search, searchProp, data, }: {
65
+ url: string;
66
+ ignorePagination: boolean;
67
+ currentPage: number;
68
+ pageSize: number;
69
+ requestType: 'get' | 'post';
70
+ requestHeaders: any;
71
+ search?: string;
72
+ searchProp?: string;
73
+ data: any;
74
+ }): Observable<any>;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxMultiselectService, never>;
76
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgJvxMultiselectService>;
77
+ }
78
+
1
79
  /**
2
- * Generated bundle index. Do not edit.
80
+ * Maps the option returned by the async call in an object of type T. When object is mapped the resulting object is returned in an observable
3
81
  */
4
- /// <amd-module name="ng-jvx-multiselect" />
5
- export * from './public-api';
82
+ interface NgJvxOptionMapper<T> {
83
+ mapOption(source: any): Observable<T>;
84
+ }
85
+ /**
86
+ * Maps the options returned by the async call in an object of type T. When object is mapped the resulting object is returned in an observable
87
+ */
88
+ interface NgJvxMultiOptionMapper<T> {
89
+ mapOptions(source: any): Observable<T[]>;
90
+ }
91
+
92
+ /**
93
+ * Maps the option returned by the async call in an object of type T. When object is mapped the resulting object is returned in an observable
94
+ */
95
+ interface NgJvxSearchMapper<T> {
96
+ mapSearch(source: any, options: T[]): Observable<T[]>;
97
+ }
98
+
99
+ interface NgJvxGroupMapper<T> {
100
+ mapGroup(option: T): Observable<NgJvxGroup<T>>;
101
+ }
102
+ interface NgJvxGroup<T> {
103
+ group: string;
104
+ option: T;
105
+ }
106
+
107
+ declare class PanelComponent implements OnDestroy {
108
+ menuTemplate: TemplateRef<any>;
109
+ protected isOpen: i0.WritableSignal<boolean>;
110
+ private unsubscribe;
111
+ trigger: ElementRef<any>;
112
+ yPosition: InputSignal<'above' | 'below'>;
113
+ multi: InputSignal<boolean>;
114
+ onClose: EventEmitter<void>;
115
+ onClosed: EventEmitter<void>;
116
+ onOpened: EventEmitter<void>;
117
+ constructor();
118
+ ngOnDestroy(): void;
119
+ open(): void;
120
+ close(): void;
121
+ protected clickOnMenu(): void;
122
+ static ɵfac: i0.ɵɵFactoryDeclaration<PanelComponent, never>;
123
+ static ɵcmp: i0.ɵɵComponentDeclaration<PanelComponent, "lib-panel", never, { "trigger": { "alias": "trigger"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": true; "isSignal": true; }; }, { "onClose": "onClose"; "onClosed": "onClosed"; "onOpened": "onOpened"; }, never, ["*"], true, never>;
124
+ }
125
+
126
+ declare class MenuTriggerDirective implements OnDestroy, AfterViewInit {
127
+ private el;
128
+ private overlay;
129
+ private unsubscribe;
130
+ closed: EventEmitter<void>;
131
+ onMenuOpen: EventEmitter<void>;
132
+ menuOpened: EventEmitter<void>;
133
+ onMenuClose: EventEmitter<void>;
134
+ menuClosed: EventEmitter<void>;
135
+ /** References the menu instance that the trigger is associated with. */
136
+ get menu(): PanelComponent | null;
137
+ set libMenuTriggerFor(menu: PanelComponent | null);
138
+ private _menu;
139
+ constructor(el: ElementRef, overlay: Overlay);
140
+ ngAfterViewInit(): void;
141
+ ngOnDestroy(): void;
142
+ closeMenu(): void;
143
+ openMenu(): void;
144
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuTriggerDirective, never>;
145
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MenuTriggerDirective, "[lib-menu-trigger-for], [libMenuTriggerFor]", never, { "libMenuTriggerFor": { "alias": "libMenuTriggerFor"; "required": false; }; }, { "closed": "closed"; "onMenuOpen": "onMenuOpen"; "menuOpened": "menuOpened"; "onMenuClose": "onMenuClose"; "menuClosed": "menuClosed"; }, never, never, true, never>;
146
+ }
147
+
148
+ declare class NgJvxMultiselectComponent implements OnInit, OnDestroy, AfterViewInit, ControlValueAccessor {
149
+ private formBuilder;
150
+ private service;
151
+ private elementRef;
152
+ private changeDetectorRef;
153
+ ngControl: NgControl;
154
+ static nextId: number;
155
+ id: string;
156
+ get invalid(): boolean;
157
+ get shouldLabelFloat(): boolean;
158
+ jvxMultiselect: i0.Signal<ElementRef<any>>;
159
+ valueContainer: ElementRef;
160
+ selectionContainer: i0.Signal<ElementRef<any>>;
161
+ menuFooter: i0.Signal<ElementRef<any>>;
162
+ trigger: MenuTriggerDirective;
163
+ scrollbar: NgScrollbar;
164
+ multiContainer: i0.Signal<ElementRef<any>>;
165
+ placeholderContainer: ElementRef;
166
+ optionComp: QueryList<NgJvxOptionComponent>;
167
+ optionsTemplate: NgJvxOptionsTemplateDirective | null;
168
+ selectionTemplate: NgJvxSelectionTemplateDirective | null;
169
+ groupHeaderTemplate: NgJvxGroupHeaderDirective | null;
170
+ set options(v: any[]);
171
+ get options(): any[];
172
+ multi: boolean;
173
+ url: string;
174
+ requestType: 'get' | 'post';
175
+ itemValue: string;
176
+ itemText: string;
177
+ ignorePagination: boolean;
178
+ clearable: boolean;
179
+ closeOnClick: boolean;
180
+ hasErrors: boolean;
181
+ searchMode: null | 'server' | 'client';
182
+ searchInput: boolean;
183
+ searchLabel: string;
184
+ listProp: string;
185
+ totalRowsProp: string;
186
+ panelClass: string;
187
+ searchProp: string;
188
+ closeButton: boolean;
189
+ mapper: NgJvxOptionMapper<any>;
190
+ multiMapper: NgJvxMultiOptionMapper<any>;
191
+ searchMapper: NgJvxSearchMapper<any>;
192
+ groupBy: NgJvxGroupMapper<any> | string | null;
193
+ set value(value: any[]);
194
+ get value(): any[];
195
+ requestHeaders: HttpHeaders;
196
+ get required(): boolean;
197
+ set required(req: boolean);
198
+ postPayload: i0.InputSignal<object>;
199
+ private _required;
200
+ private _jvxWidth;
201
+ get disabled(): boolean;
202
+ set disabled(value: boolean);
203
+ get pageSize(): number;
204
+ set pageSize(val: number);
205
+ private _disabled;
206
+ get errorState(): boolean;
207
+ valueChange: EventEmitter<any[]>;
208
+ jvxMultiselectOpen: EventEmitter<void>;
209
+ jvxMultiselectOpened: EventEmitter<void>;
210
+ jvxMultiselectClose: EventEmitter<void>;
211
+ jvxMultiselectClosed: EventEmitter<void>;
212
+ scrollEnd: EventEmitter<void>;
213
+ private _options;
214
+ controlType: string;
215
+ document: Document;
216
+ window: Window & typeof globalThis;
217
+ form: UntypedFormGroup;
218
+ isOpen: WritableSignal<boolean>;
219
+ isLoading: WritableSignal<boolean>;
220
+ showList: boolean;
221
+ asyncOptions: any;
222
+ selectableOptions: any[];
223
+ orderedOptions: {
224
+ group: any;
225
+ options: any[];
226
+ }[];
227
+ searchValue: string;
228
+ yPosition: WritableSignal<'above' | 'below'>;
229
+ stateChanges: Subject<void>;
230
+ currentPage: number;
231
+ listContainerSize: i0.Signal<{
232
+ height: string;
233
+ minHeight: string;
234
+ width: string;
235
+ }>;
236
+ parts: UntypedFormGroup;
237
+ touched: boolean;
238
+ placeholder: string;
239
+ focused: boolean;
240
+ multiContainerWidth: i0.Signal<any>;
241
+ private isPlaceholderActiveSubject;
242
+ private isPlaceholderActive;
243
+ private searchValueSubject;
244
+ private searchValue$;
245
+ private pValue;
246
+ private shouldLoadMore;
247
+ private unsubscribe;
248
+ private unsubscribe$;
249
+ private intPageSize;
250
+ onTouched: () => void;
251
+ constructor(formBuilder: UntypedFormBuilder, service: NgJvxMultiselectService, elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, ngControl: NgControl, fb: UntypedFormBuilder);
252
+ ngOnInit(): void;
253
+ private areArraysEqual;
254
+ private clientSearch;
255
+ private setSelectableOptions;
256
+ private serverSearch;
257
+ ngOnDestroy(): void;
258
+ ngAfterViewInit(): void;
259
+ get selectionValue(): any[];
260
+ get empty(): boolean;
261
+ onCLickOnMenu(e: MouseEvent): void;
262
+ private propagateChange;
263
+ writeValue(obj: any[]): void;
264
+ registerOnChange(fn: any): void;
265
+ registerOnTouched(fn: any): void;
266
+ onChange(e: any): void;
267
+ onFocusIn(event: FocusEvent): void;
268
+ onFocusOut(event: FocusEvent): void;
269
+ onMenuOpen(): void;
270
+ onMenuClose(): void;
271
+ deselect(val: any): void;
272
+ private setSelectionContainerSize;
273
+ clickOnMenuTrigger(e: MouseEvent): void;
274
+ private getList;
275
+ onScrolled(e: any): void;
276
+ onMenuOpened(): void;
277
+ onMenuClosed(): void;
278
+ onSearchInputClick(e: MouseEvent): void;
279
+ onSearchValueChange(e: any): void;
280
+ clear(e: Event): void;
281
+ setDescribedByIds(ids: string[]): void;
282
+ onContainerClick(event: MouseEvent): void;
283
+ private get stateChange$();
284
+ updateOrderedOptions(options: any): Observable<any>;
285
+ closeMenu(): void;
286
+ isOptionSelected(option: any): boolean;
287
+ clickOnOption(option: any): void;
288
+ select(option: any): void;
289
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxMultiselectComponent, [null, null, null, null, { optional: true; self: true; }, null]>;
290
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgJvxMultiselectComponent, "ng-jvx-multiselect", never, { "options": { "alias": "options"; "required": false; }; "multi": { "alias": "multi"; "required": false; }; "url": { "alias": "url"; "required": false; }; "requestType": { "alias": "requestType"; "required": false; }; "itemValue": { "alias": "itemValue"; "required": false; }; "itemText": { "alias": "itemText"; "required": false; }; "ignorePagination": { "alias": "ignorePagination"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; }; "hasErrors": { "alias": "hasErrors"; "required": false; }; "searchMode": { "alias": "searchMode"; "required": false; }; "searchInput": { "alias": "searchInput"; "required": false; }; "searchLabel": { "alias": "searchLabel"; "required": false; }; "listProp": { "alias": "listProp"; "required": false; }; "totalRowsProp": { "alias": "totalRowsProp"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "searchProp": { "alias": "searchProp"; "required": false; }; "closeButton": { "alias": "closeButton"; "required": false; }; "mapper": { "alias": "mapper"; "required": false; }; "multiMapper": { "alias": "multiMapper"; "required": false; }; "searchMapper": { "alias": "searchMapper"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "value": { "alias": "value"; "required": false; }; "requestHeaders": { "alias": "requestHeaders"; "required": false; }; "required": { "alias": "required"; "required": false; }; "postPayload": { "alias": "postPayload"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "valueChange": "valueChange"; "jvxMultiselectOpen": "jvxMultiselectOpen"; "jvxMultiselectOpened": "jvxMultiselectOpened"; "jvxMultiselectClose": "jvxMultiselectClose"; "jvxMultiselectClosed": "jvxMultiselectClosed"; "scrollEnd": "scrollEnd"; }, ["optionsTemplate", "selectionTemplate", "groupHeaderTemplate"], ["*", "[ng-jvx-footer]", "[placeholder]"], true, never>;
291
+ }
292
+
293
+ declare class NgJvxMultisectChipComponent {
294
+ removed: i0.OutputEmitterRef<any>;
295
+ value: i0.InputSignal<any>;
296
+ disabled: i0.InputSignal<boolean>;
297
+ container: NgJvxMultiselectComponent;
298
+ clickOnRemove(e: MouseEvent): void;
299
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxMultisectChipComponent, never>;
300
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgJvxMultisectChipComponent, "ng-jvx-multiselect-chip", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "removed": "removed"; }, never, ["*"], true, never>;
301
+ }
302
+
303
+ declare class NgJvxMultiselectModule {
304
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxMultiselectModule, never>;
305
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgJvxMultiselectModule, never, [typeof NgJvxMultiselectComponent, typeof NgJvxOptionComponent, typeof NgJvxOptionsTemplateDirective, typeof NgJvxSelectionTemplateDirective, typeof NgJvxDisabledOptionDirective, typeof NgJvxMultisectChipComponent, typeof NgJvxGroupHeaderDirective], [typeof NgJvxMultiselectComponent, typeof NgJvxOptionComponent, typeof NgJvxOptionsTemplateDirective, typeof NgJvxSelectionTemplateDirective, typeof NgJvxDisabledOptionDirective, typeof NgJvxMultisectChipComponent, typeof NgJvxGroupHeaderDirective]>;
306
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgJvxMultiselectModule>;
307
+ }
308
+
309
+ declare const JVXMULTISELECT: HttpContextToken<boolean>;
310
+ declare const setJvxCall: () => any;
311
+
312
+ export { JVXMULTISELECT, NgJvxDisabledOptionDirective, NgJvxGroupHeaderDirective, NgJvxMultisectChipComponent, NgJvxMultiselectComponent, NgJvxMultiselectModule, NgJvxMultiselectService, NgJvxOptionComponent, NgJvxOptionsTemplateDirective, NgJvxSelectionTemplateDirective, setJvxCall };
313
+ export type { NgJvxGroup, NgJvxGroupMapper, NgJvxMultiOptionMapper, NgJvxOptionMapper, NgJvxSearchMapper };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-jvx-multiselect",
3
- "version": "19.0.38",
3
+ "version": "20.0.1",
4
4
  "license": "MIT",
5
5
  "description": "ng-jvx-multiselect is a select for angular projects. It handles both single and multiple selections and allows to retrieves the options via asynchronous calls.",
6
6
  "exports": {
@@ -14,10 +14,10 @@
14
14
  }
15
15
  },
16
16
  "peerDependencies": {
17
- "@angular/common": "^19.0.0",
18
- "@angular/core": "^19.0.0",
17
+ "@angular/common": "^20.0.0",
18
+ "@angular/core": "^20.0.0",
19
19
  "ngx-scrollbar": "^13.0.3",
20
- "@angular/cdk": "^19.0.0",
20
+ "@angular/cdk": "^20.0.0",
21
21
  "form-data": "^3.0.4"
22
22
  },
23
23
  "dependencies": {
@@ -1,11 +0,0 @@
1
- import { NgJvxMultiselectComponent } from '../../ng-jvx-multiselect.component';
2
- import * as i0 from "@angular/core";
3
- export declare class NgJvxMultisectChipComponent {
4
- removed: import("@angular/core").OutputEmitterRef<any>;
5
- value: import("@angular/core").InputSignal<any>;
6
- disabled: import("@angular/core").InputSignal<boolean>;
7
- container: NgJvxMultiselectComponent;
8
- clickOnRemove(e: MouseEvent): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxMultisectChipComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<NgJvxMultisectChipComponent, "ng-jvx-multiselect-chip", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "removed": "removed"; }, never, ["*"], true, never>;
11
- }
@@ -1,15 +0,0 @@
1
- import { ElementRef, OnDestroy, OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class NgJvxDisabledOptionDirective implements OnInit, OnDestroy {
4
- private el;
5
- private isDisabled;
6
- private originalOpacity;
7
- private unsubs;
8
- private restore;
9
- set ngJvxDisabledOption(source: boolean);
10
- constructor(el: ElementRef);
11
- ngOnInit(): void;
12
- ngOnDestroy(): void;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxDisabledOptionDirective, never>;
14
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxDisabledOptionDirective, "[ngJvxDisabledOption]", never, { "ngJvxDisabledOption": { "alias": "ngJvxDisabledOption"; "required": false; }; }, {}, never, never, true, never>;
15
- }
@@ -1,11 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class NgJvxFocusDirective implements OnInit, OnChanges {
4
- private el;
5
- ngJvxFocus: boolean;
6
- constructor(el: ElementRef);
7
- ngOnInit(): void;
8
- ngOnChanges(changes: SimpleChanges): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxFocusDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxFocusDirective, "[ngJvxFocus]", never, { "ngJvxFocus": { "alias": "ngJvxFocus"; "required": false; }; }, {}, never, never, true, never>;
11
- }
@@ -1,10 +0,0 @@
1
- import { TemplateRef, ViewContainerRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class NgJvxGroupHeaderDirective {
4
- template: TemplateRef<any>;
5
- private vcRef;
6
- constructor(template: TemplateRef<any>, vcRef: ViewContainerRef);
7
- set ngJvxGroupHeaderOf(source: Array<any[]>);
8
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxGroupHeaderDirective, never>;
9
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxGroupHeaderDirective, "[ngJvxGroupHeader]", never, { "ngJvxGroupHeaderOf": { "alias": "ngJvxGroupHeaderOf"; "required": false; }; }, {}, never, never, true, never>;
10
- }
@@ -1,11 +0,0 @@
1
- import { ElementRef, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class NgJvxOptionsTemplateDirective {
4
- private el;
5
- template: TemplateRef<any>;
6
- private vcRef;
7
- constructor(el: ElementRef, template: TemplateRef<any>, vcRef: ViewContainerRef);
8
- set ngJvxOptionsTemplateOf(source: Array<any[]>);
9
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxOptionsTemplateDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxOptionsTemplateDirective, "[ngJvxOptionsTemplate]", never, { "ngJvxOptionsTemplateOf": { "alias": "ngJvxOptionsTemplateOf"; "required": false; }; }, {}, never, never, true, never>;
11
- }
@@ -1,10 +0,0 @@
1
- import { TemplateRef, ViewContainerRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class NgJvxSelectionTemplateDirective {
4
- template: TemplateRef<any>;
5
- private vcRef;
6
- constructor(template: TemplateRef<any>, vcRef: ViewContainerRef);
7
- set ngJvxSelectionTemplateOf(source: Array<any[]>);
8
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxSelectionTemplateDirective, never>;
9
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgJvxSelectionTemplateDirective, "[ngJvxSelectionTemplate]", never, { "ngJvxSelectionTemplateOf": { "alias": "ngJvxSelectionTemplateOf"; "required": false; }; }, {}, never, never, true, never>;
10
- }
@@ -1,8 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- export interface NgJvxGroupMapper<T> {
3
- mapGroup(option: T): Observable<NgJvxGroup<T>>;
4
- }
5
- export interface NgJvxGroup<T> {
6
- group: string;
7
- option: T;
8
- }
@@ -1,13 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- /**
3
- * Maps the option returned by the async call in an object of type T. When object is mapped the resulting object is returned in an observable
4
- */
5
- export interface NgJvxOptionMapper<T> {
6
- mapOption(source: any): Observable<T>;
7
- }
8
- /**
9
- * Maps the options returned by the async call in an object of type T. When object is mapped the resulting object is returned in an observable
10
- */
11
- export interface NgJvxMultiOptionMapper<T> {
12
- mapOptions(source: any): Observable<T[]>;
13
- }
@@ -1,7 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- /**
3
- * Maps the option returned by the async call in an object of type T. When object is mapped the resulting object is returned in an observable
4
- */
5
- export interface NgJvxSearchMapper<T> {
6
- mapSearch(source: any, options: T[]): Observable<T[]>;
7
- }
@@ -1,159 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, WritableSignal } from '@angular/core';
2
- import { NgJvxOptionsTemplateDirective } from './directives/ng-jvx-options-template.directive';
3
- import { ControlValueAccessor, NgControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
4
- import { NgJvxOptionComponent } from './ng-jvx-option/ng-jvx-option.component';
5
- import { NgJvxMultiselectService } from './ng-jvx-multiselect.service';
6
- import { HttpHeaders } from '@angular/common/http';
7
- import { NgScrollbar } from 'ngx-scrollbar';
8
- import { Observable, Subject } from 'rxjs';
9
- import { NgJvxMultiOptionMapper, NgJvxOptionMapper } from './interfaces/ng-jvx-option-mapper';
10
- import { NgJvxSelectionTemplateDirective } from './directives/ng-jvx-selection-template.directive';
11
- import { NgJvxGroupHeaderDirective } from './directives/ng-jvx-group-header.directive';
12
- import { NgJvxSearchMapper } from './interfaces/ng-jvx-search-mapper';
13
- import { NgJvxGroupMapper } from './interfaces/ng-jvx-group-mapper';
14
- import { MenuTriggerDirective } from './panel/menu-trigger/menu-trigger.directive';
15
- import * as i0 from "@angular/core";
16
- export declare class NgJvxMultiselectComponent implements OnInit, OnDestroy, AfterViewInit, ControlValueAccessor {
17
- private formBuilder;
18
- private service;
19
- private elementRef;
20
- private changeDetectorRef;
21
- ngControl: NgControl;
22
- static nextId: number;
23
- id: string;
24
- get invalid(): boolean;
25
- get shouldLabelFloat(): boolean;
26
- jvxMultiselect: import("@angular/core").Signal<ElementRef<any>>;
27
- valueContainer: ElementRef;
28
- selectionContainer: import("@angular/core").Signal<ElementRef<any>>;
29
- menuFooter: import("@angular/core").Signal<ElementRef<any>>;
30
- trigger: MenuTriggerDirective;
31
- scrollbar: NgScrollbar;
32
- multiContainer: import("@angular/core").Signal<ElementRef<any>>;
33
- placeholderContainer: ElementRef;
34
- optionComp: QueryList<NgJvxOptionComponent>;
35
- optionsTemplate: NgJvxOptionsTemplateDirective | null;
36
- selectionTemplate: NgJvxSelectionTemplateDirective | null;
37
- groupHeaderTemplate: NgJvxGroupHeaderDirective | null;
38
- set options(v: any[]);
39
- get options(): any[];
40
- multi: boolean;
41
- url: string;
42
- requestType: 'get' | 'post';
43
- itemValue: string;
44
- itemText: string;
45
- ignorePagination: boolean;
46
- clearable: boolean;
47
- closeOnClick: boolean;
48
- hasErrors: boolean;
49
- searchMode: null | 'server' | 'client';
50
- searchInput: boolean;
51
- searchLabel: string;
52
- listProp: string;
53
- totalRowsProp: string;
54
- panelClass: string;
55
- searchProp: string;
56
- closeButton: boolean;
57
- mapper: NgJvxOptionMapper<any>;
58
- multiMapper: NgJvxMultiOptionMapper<any>;
59
- searchMapper: NgJvxSearchMapper<any>;
60
- groupBy: NgJvxGroupMapper<any> | string | null;
61
- set value(value: any[]);
62
- get value(): any[];
63
- requestHeaders: HttpHeaders;
64
- get required(): boolean;
65
- set required(req: boolean);
66
- postPayload: import("@angular/core").InputSignal<object>;
67
- private _required;
68
- private _jvxWidth;
69
- get disabled(): boolean;
70
- set disabled(value: boolean);
71
- get pageSize(): number;
72
- set pageSize(val: number);
73
- private _disabled;
74
- get errorState(): boolean;
75
- valueChange: EventEmitter<any[]>;
76
- jvxMultiselectOpen: EventEmitter<void>;
77
- jvxMultiselectOpened: EventEmitter<void>;
78
- jvxMultiselectClose: EventEmitter<void>;
79
- jvxMultiselectClosed: EventEmitter<void>;
80
- scrollEnd: EventEmitter<void>;
81
- private _options;
82
- controlType: string;
83
- document: Document;
84
- window: Window & typeof globalThis;
85
- form: UntypedFormGroup;
86
- isOpen: WritableSignal<boolean>;
87
- isLoading: WritableSignal<boolean>;
88
- showList: boolean;
89
- asyncOptions: any;
90
- selectableOptions: any[];
91
- orderedOptions: {
92
- group: any;
93
- options: any[];
94
- }[];
95
- searchValue: string;
96
- yPosition: WritableSignal<'above' | 'below'>;
97
- stateChanges: Subject<void>;
98
- currentPage: number;
99
- listContainerSize: import("@angular/core").Signal<{
100
- height: string;
101
- minHeight: string;
102
- width: string;
103
- }>;
104
- parts: UntypedFormGroup;
105
- touched: boolean;
106
- placeholder: string;
107
- focused: boolean;
108
- multiContainerWidth: import("@angular/core").Signal<any>;
109
- private isPlaceholderActiveSubject;
110
- private isPlaceholderActive;
111
- private searchValueSubject;
112
- private searchValue$;
113
- private pValue;
114
- private shouldLoadMore;
115
- private unsubscribe;
116
- private unsubscribe$;
117
- private intPageSize;
118
- onTouched: () => void;
119
- constructor(formBuilder: UntypedFormBuilder, service: NgJvxMultiselectService, elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, ngControl: NgControl, fb: UntypedFormBuilder);
120
- ngOnInit(): void;
121
- private areArraysEqual;
122
- private clientSearch;
123
- private setSelectableOptions;
124
- private serverSearch;
125
- ngOnDestroy(): void;
126
- ngAfterViewInit(): void;
127
- get selectionValue(): any[];
128
- get empty(): boolean;
129
- onCLickOnMenu(e: MouseEvent): void;
130
- private propagateChange;
131
- writeValue(obj: any[]): void;
132
- registerOnChange(fn: any): void;
133
- registerOnTouched(fn: any): void;
134
- onChange(e: any): void;
135
- onFocusIn(event: FocusEvent): void;
136
- onFocusOut(event: FocusEvent): void;
137
- onMenuOpen(): void;
138
- onMenuClose(): void;
139
- deselect(val: any): void;
140
- private setSelectionContainerSize;
141
- clickOnMenuTrigger(e: MouseEvent): void;
142
- private getList;
143
- onScrolled(e: any): void;
144
- onMenuOpened(): void;
145
- onMenuClosed(): void;
146
- onSearchInputClick(e: MouseEvent): void;
147
- onSearchValueChange(e: any): void;
148
- clear(e: Event): void;
149
- setDescribedByIds(ids: string[]): void;
150
- onContainerClick(event: MouseEvent): void;
151
- private get stateChange$();
152
- updateOrderedOptions(options: any): Observable<any>;
153
- closeMenu(): void;
154
- isOptionSelected(option: any): boolean;
155
- clickOnOption(option: any): void;
156
- select(option: any): void;
157
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxMultiselectComponent, [null, null, null, null, { optional: true; self: true; }, null]>;
158
- static ɵcmp: i0.ɵɵComponentDeclaration<NgJvxMultiselectComponent, "ng-jvx-multiselect", never, { "options": { "alias": "options"; "required": false; }; "multi": { "alias": "multi"; "required": false; }; "url": { "alias": "url"; "required": false; }; "requestType": { "alias": "requestType"; "required": false; }; "itemValue": { "alias": "itemValue"; "required": false; }; "itemText": { "alias": "itemText"; "required": false; }; "ignorePagination": { "alias": "ignorePagination"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; }; "hasErrors": { "alias": "hasErrors"; "required": false; }; "searchMode": { "alias": "searchMode"; "required": false; }; "searchInput": { "alias": "searchInput"; "required": false; }; "searchLabel": { "alias": "searchLabel"; "required": false; }; "listProp": { "alias": "listProp"; "required": false; }; "totalRowsProp": { "alias": "totalRowsProp"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "searchProp": { "alias": "searchProp"; "required": false; }; "closeButton": { "alias": "closeButton"; "required": false; }; "mapper": { "alias": "mapper"; "required": false; }; "multiMapper": { "alias": "multiMapper"; "required": false; }; "searchMapper": { "alias": "searchMapper"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "value": { "alias": "value"; "required": false; }; "requestHeaders": { "alias": "requestHeaders"; "required": false; }; "required": { "alias": "required"; "required": false; }; "postPayload": { "alias": "postPayload"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "valueChange": "valueChange"; "jvxMultiselectOpen": "jvxMultiselectOpen"; "jvxMultiselectOpened": "jvxMultiselectOpened"; "jvxMultiselectClose": "jvxMultiselectClose"; "jvxMultiselectClosed": "jvxMultiselectClosed"; "scrollEnd": "scrollEnd"; }, ["optionsTemplate", "selectionTemplate", "groupHeaderTemplate"], ["*", "[ng-jvx-footer]", "[placeholder]"], true, never>;
159
- }
@@ -1,20 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { HttpClient } from '@angular/common/http';
3
- import * as i0 from "@angular/core";
4
- export declare class NgJvxMultiselectService {
5
- private http;
6
- constructor(http: HttpClient);
7
- getList({ url, ignorePagination, currentPage, pageSize, requestType, requestHeaders, search, searchProp, data, }: {
8
- url: string;
9
- ignorePagination: boolean;
10
- currentPage: number;
11
- pageSize: number;
12
- requestType: 'get' | 'post';
13
- requestHeaders: any;
14
- search?: string;
15
- searchProp?: string;
16
- data: any;
17
- }): Observable<any>;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxMultiselectService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<NgJvxMultiselectService>;
20
- }
@@ -1,11 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class NgJvxOptionComponent {
4
- clickOnOption: EventEmitter<any>;
5
- value: import("@angular/core").InputSignal<any>;
6
- disabled: import("@angular/core").InputSignal<boolean>;
7
- isSelected: import("@angular/core").InputSignal<boolean>;
8
- constructor();
9
- static ɵfac: i0.ɵɵFactoryDeclaration<NgJvxOptionComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<NgJvxOptionComponent, "ng-jvx-option", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "isSelected": { "alias": "isSelected"; "required": false; "isSignal": true; }; }, { "clickOnOption": "clickOnOption"; }, never, ["*"], true, never>;
11
- }