@unnilouis.org/vs-chipdropdown 0.0.16-beta-4 → 0.0.16

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.
Files changed (36) hide show
  1. package/README.md +24 -24
  2. package/esm2022/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.mjs +226 -0
  3. package/esm2022/lib/vs-chipdropdown.component.mjs +19 -0
  4. package/esm2022/lib/vs-chipdropdown.module.mjs +37 -0
  5. package/esm2022/lib/vs-chipdropdown.service.mjs +45 -0
  6. package/esm2022/public-api.mjs +8 -0
  7. package/esm2022/unnilouis.org-vs-chipdropdown.mjs +5 -0
  8. package/fesm2022/unnilouis.org-vs-chipdropdown.mjs +328 -0
  9. package/fesm2022/unnilouis.org-vs-chipdropdown.mjs.map +1 -0
  10. package/{unnilouis.org-vs-chipdropdown.d.ts → index.d.ts} +1 -0
  11. package/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.d.ts +3 -1
  12. package/lib/vs-chipdropdown.component.d.ts +4 -4
  13. package/lib/vs-chipdropdown.module.d.ts +15 -0
  14. package/lib/vs-chipdropdown.service.d.ts +3 -0
  15. package/package.json +19 -15
  16. package/bundles/unnilouis.org-vs-chipdropdown.umd.js +0 -562
  17. package/bundles/unnilouis.org-vs-chipdropdown.umd.js.map +0 -1
  18. package/bundles/unnilouis.org-vs-chipdropdown.umd.min.js +0 -16
  19. package/bundles/unnilouis.org-vs-chipdropdown.umd.min.js.map +0 -1
  20. package/esm2015/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.js +0 -248
  21. package/esm2015/lib/vs-chipdropdown.component.js +0 -19
  22. package/esm2015/lib/vs-chipdropdown.module.js +0 -24
  23. package/esm2015/lib/vs-chipdropdown.service.js +0 -49
  24. package/esm2015/public-api.js +0 -8
  25. package/esm2015/unnilouis.org-vs-chipdropdown.js +0 -5
  26. package/esm5/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.js +0 -264
  27. package/esm5/lib/vs-chipdropdown.component.js +0 -17
  28. package/esm5/lib/vs-chipdropdown.module.js +0 -27
  29. package/esm5/lib/vs-chipdropdown.service.js +0 -52
  30. package/esm5/public-api.js +0 -8
  31. package/esm5/unnilouis.org-vs-chipdropdown.js +0 -5
  32. package/fesm2015/unnilouis.org-vs-chipdropdown.js +0 -334
  33. package/fesm2015/unnilouis.org-vs-chipdropdown.js.map +0 -1
  34. package/fesm5/unnilouis.org-vs-chipdropdown.js +0 -354
  35. package/fesm5/unnilouis.org-vs-chipdropdown.js.map +0 -1
  36. package/unnilouis.org-vs-chipdropdown.metadata.json +0 -1
@@ -1,334 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { ɵɵdefineInjectable, ɵɵinject, Injectable, Component, EventEmitter, Input, ViewChild, Output, NgModule } from '@angular/core';
3
- import { HttpClient } from '@angular/common/http';
4
- import { MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
5
- import { map, takeUntil, debounceTime, distinctUntilChanged, tap, switchMap, finalize } from 'rxjs/operators';
6
- import { fromEvent } from 'rxjs';
7
- import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import { ENTER, COMMA } from '@angular/cdk/keycodes';
9
- import { MatFormFieldModule } from '@angular/material/form-field';
10
- import { MatInputModule } from '@angular/material/input';
11
- import { MatSelectModule } from '@angular/material/select';
12
- import { CommonModule } from '@angular/common';
13
- import { MatGridListModule } from '@angular/material/grid-list';
14
- import { MatChipsModule } from '@angular/material/chips';
15
- import { MatIconModule } from '@angular/material/icon';
16
-
17
- let VsChipdropdownService = class VsChipdropdownService {
18
- constructor(http) {
19
- this.http = http;
20
- }
21
- postApi(Apiurl, json = {}, params) {
22
- const getToken = localStorage.getItem("sessionData");
23
- let tokenValue = JSON.parse(getToken);
24
- let token = tokenValue.token;
25
- console.log("params", params);
26
- let paradata = '';
27
- if (params !== undefined && params !== null && params !== '') {
28
- paradata = params;
29
- }
30
- const headers = { Authorization: "Token " + token };
31
- return this.http.post(Apiurl + paradata, json, {
32
- headers: headers,
33
- });
34
- }
35
- GetApi(Apiurl, params = '') {
36
- const getToken = localStorage.getItem("sessionData");
37
- let tokenValue = JSON.parse(getToken);
38
- let token = tokenValue.token;
39
- console.log("params", params);
40
- let paradata = '';
41
- if (params !== undefined && params !== null && params !== '') {
42
- paradata = params;
43
- }
44
- const headers = { Authorization: "Token " + token };
45
- return this.http.get(Apiurl + paradata, {
46
- headers: headers,
47
- });
48
- }
49
- };
50
- VsChipdropdownService.ctorParameters = () => [
51
- { type: HttpClient }
52
- ];
53
- VsChipdropdownService.ɵprov = ɵɵdefineInjectable({ factory: function VsChipdropdownService_Factory() { return new VsChipdropdownService(ɵɵinject(HttpClient)); }, token: VsChipdropdownService, providedIn: "root" });
54
- VsChipdropdownService = __decorate([
55
- Injectable({
56
- providedIn: 'root'
57
- })
58
- ], VsChipdropdownService);
59
-
60
- let VsChipdropdownComponent = class VsChipdropdownComponent {
61
- constructor() { }
62
- ngOnInit() {
63
- }
64
- };
65
- VsChipdropdownComponent = __decorate([
66
- Component({
67
- selector: 'lib-vs-chipdropdown',
68
- template: `
69
- <p>
70
- vs-chipdropdown works!
71
- </p>
72
- `
73
- })
74
- ], VsChipdropdownComponent);
75
-
76
- let VsChipddCmpComponent = class VsChipddCmpComponent {
77
- constructor(service, fb) {
78
- this.service = service;
79
- this.fb = fb;
80
- this.Backendapi = true;
81
- this.dataEvent = new EventEmitter();
82
- this.separatorsKeysCodes = [ENTER, COMMA];
83
- this.has_next = false;
84
- this.currentpage = 1;
85
- this.Dropdowndata = [];
86
- this.has_previous = false;
87
- this.chipSelectedId = [];
88
- this.chipSelectedObj = [];
89
- }
90
- ngOnInit() {
91
- var _a, _b, _c, _d, _e, _f, _g;
92
- this.DropdownForm = this.fb.group({
93
- value: ''
94
- });
95
- if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.defaultvalue) {
96
- this.DropdownForm.get("value").patchValue((_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.defaultvalue);
97
- this.chipSelectedObj = (_c = this.InputFields) === null || _c === void 0 ? void 0 : _c.defaultvalue;
98
- if (this.chipSelectedObj.length > 0) {
99
- for (let foundemp of this.chipSelectedObj) {
100
- if ((_d = this.InputFields) === null || _d === void 0 ? void 0 : _d.Outputkey) {
101
- this.chipSelectedId.push(foundemp[(_e = this.InputFields) === null || _e === void 0 ? void 0 : _e.Outputkey]);
102
- }
103
- else {
104
- this.chipSelectedId.push(foundemp.id);
105
- }
106
- }
107
- this.selected();
108
- }
109
- }
110
- if ((_f = this.InputFields) === null || _f === void 0 ? void 0 : _f.fronentdata) {
111
- this.Dropdowndata = (_g = this.InputFields) === null || _g === void 0 ? void 0 : _g.data;
112
- }
113
- else {
114
- this.getdropdown('');
115
- }
116
- }
117
- ngOnChanges(changes) {
118
- console.log("changes.ResetForm", changes.ResetForm, changes.ResetForm.currentValue, changes.ResetForm && changes.ResetForm.currentValue);
119
- if (changes.InputFields && changes.InputFields.currentValue) {
120
- console.log("Summary Log Changes");
121
- this.currentpage = 1;
122
- this.ngOnInit();
123
- }
124
- if (changes.ResetForm && changes.ResetForm.currentValue) {
125
- console.log("hitted");
126
- this.DropdownForm.reset();
127
- this.currentpage = 1;
128
- this.ngOnInit();
129
- this.chipSelectedId = [];
130
- this.chipSelectedObj = [];
131
- this.dataEvent.emit([]);
132
- }
133
- }
134
- // public displaydevelopclient(clt: any, key: string) {
135
- // return key[clt];
136
- // }
137
- autocompleteAppScroll() {
138
- var _a;
139
- if (!((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.fronentdata)) {
140
- setTimeout(() => {
141
- if (this.matAutocompleteApp &&
142
- this.autocompleteTrigger &&
143
- this.matAutocompleteApp.panel) {
144
- fromEvent(this.matAutocompleteApp.panel.nativeElement, 'scroll')
145
- .pipe(map(x => this.matAutocompleteApp.panel.nativeElement.scrollTop), takeUntil(this.autocompleteTrigger.panelClosingActions))
146
- .subscribe(x => {
147
- const scrollTop = this.matAutocompleteApp.panel.nativeElement.scrollTop;
148
- const scrollHeight = this.matAutocompleteApp.panel.nativeElement.scrollHeight;
149
- const elementHeight = this.matAutocompleteApp.panel.nativeElement.clientHeight;
150
- const atBottom = scrollHeight - 1 <= scrollTop + elementHeight;
151
- if (atBottom) {
152
- if (this.has_next === true) {
153
- let value = this.DropInput.nativeElement.value;
154
- let params = this.searchparams(value);
155
- this.currentpage = this.currentpage + 1;
156
- if (this.currentpage > 1) {
157
- this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params)
158
- .subscribe((results) => {
159
- let datas = results["data"];
160
- let datapagination = results["pagination"];
161
- this.Dropdowndata = this.Dropdowndata.concat(datas);
162
- console.log("this.Dropdowndata", this.Dropdowndata);
163
- if (this.Dropdowndata.length >= 0) {
164
- this.has_next = datapagination.has_next;
165
- this.has_previous = datapagination.has_previous;
166
- this.currentpage = datapagination.index;
167
- }
168
- });
169
- }
170
- }
171
- }
172
- });
173
- }
174
- });
175
- }
176
- }
177
- dropdownsearch() {
178
- var _a;
179
- if (!((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.fronentdata)) {
180
- this.DropdownForm.get("value").valueChanges.pipe(debounceTime(100), distinctUntilChanged(), tap(() => {
181
- this.DrodownLoading = true;
182
- console.log("inside tap");
183
- }), switchMap((value) => {
184
- let params = this.searchparams(value);
185
- this.currentpage = 1;
186
- return this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params).pipe(finalize(() => {
187
- this.DrodownLoading = false;
188
- }));
189
- })).subscribe((results) => {
190
- let datas = results["data"];
191
- this.Dropdowndata = datas;
192
- });
193
- }
194
- }
195
- getdropdown(value) {
196
- let params = this.searchparams(value);
197
- this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params)
198
- .subscribe((results) => {
199
- let datas = results["data"];
200
- let datapagination = results["pagination"];
201
- this.Dropdowndata = datas;
202
- if (this.Dropdowndata.length >= 0) {
203
- this.has_next = datapagination.has_next;
204
- this.has_previous = datapagination.has_previous;
205
- this.currentpage = datapagination.index;
206
- }
207
- });
208
- }
209
- selected() {
210
- var _a, _b;
211
- // let data = this.DropdownForm.value.value
212
- if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.wholedata) {
213
- this.dataEvent.emit(this.chipSelectedObj);
214
- }
215
- else {
216
- if ((_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.Outputkey) {
217
- this.dataEvent.emit(this.chipSelectedId);
218
- }
219
- else {
220
- this.dataEvent.emit(this.chipSelectedObj);
221
- }
222
- }
223
- }
224
- searchparams(value) {
225
- let params = '';
226
- if (this.InputFields.params) {
227
- params = this.InputFields.params;
228
- }
229
- let inpValue = value;
230
- inpValue ? params += '&' + this.InputFields.searchkey + '=' + inpValue : '';
231
- return params;
232
- }
233
- removechip(obj) {
234
- const index = this.chipSelectedObj.indexOf(obj);
235
- if (index >= 0) {
236
- this.chipSelectedObj.splice(index, 1);
237
- console.log(this.chipSelectedObj);
238
- this.chipSelectedId.splice(index, 1);
239
- console.log(this.chipSelectedId);
240
- this.DropInput.nativeElement.value = '';
241
- this.selected();
242
- }
243
- }
244
- venSelected(event) {
245
- this.DropInput.nativeElement.value = '';
246
- console.log('event.option.value', event.option.value);
247
- this.selectvenByName(event.option.value[this.comparekey(event.option.value)]);
248
- console.log('chipSelectedvenid', this.chipSelectedObj);
249
- }
250
- selectvenByName(ven) {
251
- var _a, _b;
252
- let foundemp1 = this.chipSelectedObj.filter(e => e[this.comparekey(e)] == ven);
253
- if (foundemp1.length) {
254
- return;
255
- }
256
- let foundemp = this.Dropdowndata.filter(e => e[this.comparekey(e)] == ven);
257
- if (foundemp.length) {
258
- this.chipSelectedObj.push(foundemp[0]);
259
- if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.Outputkey) {
260
- this.chipSelectedId.push(foundemp[0][(_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.Outputkey]);
261
- }
262
- else {
263
- this.chipSelectedId.push(foundemp[0].id);
264
- }
265
- }
266
- }
267
- comparekey(e) {
268
- var _a, _b;
269
- if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.comparekey) {
270
- return (_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.comparekey;
271
- }
272
- else {
273
- if (e === null || e === void 0 ? void 0 : e.id) {
274
- return "id";
275
- }
276
- else {
277
- return this.InputFields.displaykey;
278
- }
279
- }
280
- }
281
- };
282
- VsChipddCmpComponent.ctorParameters = () => [
283
- { type: VsChipdropdownService },
284
- { type: FormBuilder }
285
- ];
286
- __decorate([
287
- Input()
288
- ], VsChipddCmpComponent.prototype, "InputFields", void 0);
289
- __decorate([
290
- Input()
291
- ], VsChipddCmpComponent.prototype, "ResetForm", void 0);
292
- __decorate([
293
- Input()
294
- ], VsChipddCmpComponent.prototype, "Backendapi", void 0);
295
- __decorate([
296
- ViewChild(MatAutocompleteTrigger)
297
- ], VsChipddCmpComponent.prototype, "autocompleteTrigger", void 0);
298
- __decorate([
299
- ViewChild('scrolll')
300
- ], VsChipddCmpComponent.prototype, "matAutocompleteApp", void 0);
301
- __decorate([
302
- Output()
303
- ], VsChipddCmpComponent.prototype, "dataEvent", void 0);
304
- __decorate([
305
- ViewChild('DropInput')
306
- ], VsChipddCmpComponent.prototype, "DropInput", void 0);
307
- VsChipddCmpComponent = __decorate([
308
- Component({
309
- selector: 'lib-vs-chipdd-cmp',
310
- template: "<div>\r\n <form [formGroup]=\"DropdownForm\">\r\n <mat-form-field class=\"mat-chipScroll\"\r\n appearance=\"outline\">\r\n <mat-label>{{InputFields?.label}}</mat-label>\r\n <mat-chip-list multiple #chipListvendor class=\"chip-container\">\r\n <mat-chip *ngFor=\"let obj of chipSelectedObj\" [removable]=\"true\" (removed)=\"removechip(obj)\" class=\"mat-chipEx\">\r\n {{ obj[InputFields?.displaykey] }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n <input #DropInput [matAutocomplete]=\"scrolll\" class=\"matformfieldinputstyle\"\r\n (keydown)=\"dropdownsearch()\" [matChipInputFor]=\"chipListvendor\" [matChipInputSeparatorKeyCodes]=\"\r\n separatorsKeysCodes\r\n \" [matChipInputAddOnBlur]=\"true\" formControlName=\"value\" />\r\n </mat-chip-list>\r\n <mat-autocomplete #scrolll=\"matAutocomplete\" (optionSelected)=\"venSelected($event)\"\r\n (opened)=\"autocompleteAppScroll()\">\r\n <ng-container>\r\n <mat-option *ngFor=\"let dropvalues of Dropdowndata\" [value]=\"dropvalues\" (click)=\"selected()\">\r\n {{dropvalues[InputFields?.displaykey]}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </form>\r\n</div>",
311
- styles: [".mat-chipScroll{max-width:420px;width:100%}.mat-chipEx{text-align:left}.chip-container{overflow-y:scroll;max-height:80px}.chip-container::-webkit-scrollbar{width:6px;height:6px}.chip-container::-webkit-scrollbar-track{background:0 0}.chip-container::-webkit-scrollbar-thumb{border-radius:20px;background:#c3c3c3}.chip-container::-webkit-scrollbar-thumb:hover{background:#a6a6a6}"]
312
- })
313
- ], VsChipddCmpComponent);
314
-
315
- let VsChipdropdownModule = class VsChipdropdownModule {
316
- };
317
- VsChipdropdownModule = __decorate([
318
- NgModule({
319
- declarations: [VsChipdropdownComponent, VsChipddCmpComponent],
320
- imports: [MatFormFieldModule, MatInputModule, MatSelectModule, MatAutocompleteModule, FormsModule, ReactiveFormsModule, CommonModule, MatGridListModule, MatChipsModule, MatIconModule],
321
- exports: [VsChipddCmpComponent]
322
- })
323
- ], VsChipdropdownModule);
324
-
325
- /*
326
- * Public API Surface of vs-chipdropdown
327
- */
328
-
329
- /**
330
- * Generated bundle index. Do not edit.
331
- */
332
-
333
- export { VsChipddCmpComponent, VsChipdropdownComponent, VsChipdropdownModule, VsChipdropdownService };
334
- //# sourceMappingURL=unnilouis.org-vs-chipdropdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unnilouis.org-vs-chipdropdown.js","sources":["ng://@unnilouis.org/vs-chipdropdown/lib/vs-chipdropdown.service.ts","ng://@unnilouis.org/vs-chipdropdown/lib/vs-chipdropdown.component.ts","ng://@unnilouis.org/vs-chipdropdown/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.ts","ng://@unnilouis.org/vs-chipdropdown/lib/vs-chipdropdown.module.ts","ng://@unnilouis.org/vs-chipdropdown/public-api.ts","ng://@unnilouis.org/vs-chipdropdown/unnilouis.org-vs-chipdropdown.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class VsChipdropdownService {\r\n\r\n constructor(private http: HttpClient) { }\r\n postApi(Apiurl,json={},params): Observable<any> {\r\n const getToken = localStorage.getItem(\"sessionData\");\r\n let tokenValue = JSON.parse(getToken);\r\n let token = tokenValue.token;\r\n console.log(\"params\",params)\r\n let paradata=''\r\n if(params!==undefined && params!==null && params!==''){\r\n paradata=params\r\n }\r\n const headers = { Authorization: \"Token \" + token };\r\n return this.http.post<any>(Apiurl+paradata,json ,{\r\n headers: headers,\r\n \r\n });\r\n }\r\n GetApi(Apiurl,params=''): Observable<any> {\r\n const getToken = localStorage.getItem(\"sessionData\");\r\n let tokenValue = JSON.parse(getToken);\r\n let token = tokenValue.token;\r\n console.log(\"params\",params)\r\n let paradata=''\r\n if(params!==undefined && params!==null && params!==''){\r\n paradata=params\r\n }\r\n const headers = { Authorization: \"Token \" + token };\r\n return this.http.get<any>(Apiurl+paradata,{\r\n headers: headers,\r\n });\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-vs-chipdropdown',\r\n template: `\r\n <p>\r\n vs-chipdropdown works!\r\n </p>\r\n `,\r\n styles: [\r\n ]\r\n})\r\nexport class VsChipdropdownComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { Component, EventEmitter, Input, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { MatAutocompleteSelectedEvent, MatAutocomplete, MatAutocompleteTrigger } from '@angular/material/autocomplete';\r\nimport {\r\n debounceTime,\r\n distinctUntilChanged,\r\n tap,\r\n filter,\r\n switchMap,\r\n finalize,\r\n takeUntil,\r\n map,\r\n} from \"rxjs/operators\";\r\nimport { from, Observable, fromEvent } from 'rxjs';\r\nimport { VsChipdropdownService } from '../vs-chipdropdown.service'\r\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\r\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\r\n@Component({\r\n selector: 'lib-vs-chipdd-cmp',\r\n templateUrl: './vs-chipdd-cmp.component.html',\r\n styleUrls: ['./vs-chipdd-cmp.component.scss']\r\n})\r\nexport class VsChipddCmpComponent {\r\n DrodownLoading: boolean;\r\n constructor(private service: VsChipdropdownService, private fb: FormBuilder) { }\r\n @Input() InputFields: any\r\n @Input() ResetForm: any\r\n @Input() Backendapi: boolean = true\r\n\r\n @ViewChild(MatAutocompleteTrigger) autocompleteTrigger: MatAutocompleteTrigger;\r\n @ViewChild('scrolll') matAutocompleteApp: MatAutocomplete;\r\n @Output() dataEvent: EventEmitter<any> = new EventEmitter<any>();\r\n @ViewChild('DropInput') DropInput: any;\r\n readonly separatorsKeysCodes: number[] = [ENTER, COMMA];\r\n\r\n has_next: boolean = false;\r\n currentpage: number = 1;\r\n Dropdowndata: any = [];\r\n has_previous: boolean = false;\r\n DropdownForm: FormGroup\r\n chipSelectedId: any = [];\r\n chipSelectedObj: any = []\r\n\r\n ngOnInit() {\r\n this.DropdownForm = this.fb.group({\r\n value: ''\r\n })\r\n if (this.InputFields?.defaultvalue) {\r\n this.DropdownForm.get(\"value\").patchValue(this.InputFields?.defaultvalue)\r\n this.chipSelectedObj = this.InputFields?.defaultvalue\r\n if (this.chipSelectedObj.length > 0) {\r\n for (let foundemp of this.chipSelectedObj) {\r\n if (this.InputFields?.Outputkey) {\r\n this.chipSelectedId.push(foundemp[this.InputFields?.Outputkey])\r\n\r\n }\r\n else {\r\n this.chipSelectedId.push(foundemp.id)\r\n\r\n }\r\n }\r\n this.selected()\r\n }\r\n\r\n\r\n }\r\n if (this.InputFields?.fronentdata) {\r\n this.Dropdowndata = this.InputFields?.data\r\n\r\n }\r\n else {\r\n this.getdropdown('')\r\n }\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n console.log(\"changes.ResetForm\", changes.ResetForm, changes.ResetForm.currentValue, changes.ResetForm && changes.ResetForm.currentValue)\r\n if (changes.InputFields && changes.InputFields.currentValue) {\r\n console.log(\"Summary Log Changes\")\r\n this.currentpage = 1\r\n this.ngOnInit()\r\n }\r\n if (changes.ResetForm && changes.ResetForm.currentValue) {\r\n console.log(\"hitted\")\r\n this.DropdownForm.reset()\r\n this.currentpage = 1\r\n this.ngOnInit()\r\n this.chipSelectedId = [];\r\n this.chipSelectedObj = []\r\n this.dataEvent.emit([]);\r\n\r\n\r\n }\r\n }\r\n // public displaydevelopclient(clt: any, key: string) {\r\n // return key[clt];\r\n // }\r\n autocompleteAppScroll() {\r\n if (!(this.InputFields?.fronentdata)) {\r\n setTimeout(() => {\r\n if (\r\n this.matAutocompleteApp &&\r\n this.autocompleteTrigger &&\r\n this.matAutocompleteApp.panel\r\n ) {\r\n fromEvent(this.matAutocompleteApp.panel.nativeElement, 'scroll')\r\n .pipe(\r\n map(x => this.matAutocompleteApp.panel.nativeElement.scrollTop),\r\n takeUntil(this.autocompleteTrigger.panelClosingActions as Observable<any>)\r\n )\r\n .subscribe(x => {\r\n const scrollTop = this.matAutocompleteApp.panel.nativeElement.scrollTop;\r\n const scrollHeight = this.matAutocompleteApp.panel.nativeElement.scrollHeight;\r\n const elementHeight = this.matAutocompleteApp.panel.nativeElement.clientHeight;\r\n const atBottom = scrollHeight - 1 <= scrollTop + elementHeight;\r\n if (atBottom) {\r\n if (this.has_next === true) {\r\n let value = this.DropInput.nativeElement.value\r\n let params = this.searchparams(value)\r\n this.currentpage = this.currentpage + 1\r\n if (this.currentpage > 1) {\r\n this.service.GetApi(this.InputFields.url + \"?page=\" + this.currentpage, params)\r\n .subscribe((results: any[]) => {\r\n let datas = results[\"data\"];\r\n let datapagination = results[\"pagination\"];\r\n this.Dropdowndata = this.Dropdowndata.concat(datas);\r\n console.log(\"this.Dropdowndata\", this.Dropdowndata)\r\n if (this.Dropdowndata.length >= 0) {\r\n this.has_next = datapagination.has_next;\r\n this.has_previous = datapagination.has_previous;\r\n this.currentpage = datapagination.index;\r\n }\r\n })\r\n }\r\n\r\n }\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n }\r\n dropdownsearch() {\r\n if (!(this.InputFields?.fronentdata)) {\r\n this.DropdownForm.get(\"value\").valueChanges.pipe(\r\n debounceTime(100),\r\n distinctUntilChanged(),\r\n tap(() => {\r\n this.DrodownLoading = true;\r\n console.log(\"inside tap\");\r\n }),\r\n switchMap((value) => {\r\n let params = this.searchparams(value);\r\n this.currentpage = 1\r\n return this.service.GetApi(this.InputFields.url + \"?page=\" + this.currentpage, params).pipe(\r\n finalize(() => {\r\n this.DrodownLoading = false;\r\n })\r\n );\r\n })\r\n ).subscribe((results: any[]) => {\r\n let datas = results[\"data\"];\r\n this.Dropdowndata = datas;\r\n });\r\n }\r\n\r\n }\r\n getdropdown(value) {\r\n let params = this.searchparams(value)\r\n this.service.GetApi(this.InputFields.url + \"?page=\" + this.currentpage, params)\r\n .subscribe((results: any[]) => {\r\n let datas = results[\"data\"];\r\n let datapagination = results[\"pagination\"];\r\n this.Dropdowndata = datas\r\n if (this.Dropdowndata.length >= 0) {\r\n this.has_next = datapagination.has_next;\r\n this.has_previous = datapagination.has_previous;\r\n this.currentpage = datapagination.index;\r\n }\r\n })\r\n }\r\n selected() {\r\n // let data = this.DropdownForm.value.value\r\n if (this.InputFields?.wholedata) {\r\n this.dataEvent.emit(this.chipSelectedObj);\r\n }\r\n else {\r\n if (this.InputFields?.Outputkey) {\r\n this.dataEvent.emit(this.chipSelectedId);\r\n }\r\n else {\r\n this.dataEvent.emit(this.chipSelectedObj);\r\n }\r\n\r\n }\r\n\r\n }\r\n searchparams(value) {\r\n let params = ''\r\n if (this.InputFields.params) {\r\n params = this.InputFields.params\r\n }\r\n let inpValue = value\r\n inpValue ? params += '&' + this.InputFields.searchkey + '=' + inpValue : ''\r\n return params\r\n }\r\n removechip(obj) {\r\n const index = this.chipSelectedObj.indexOf(obj);\r\n\r\n if (index >= 0) {\r\n\r\n this.chipSelectedObj.splice(index, 1);\r\n console.log(this.chipSelectedObj);\r\n this.chipSelectedId.splice(index, 1);\r\n console.log(this.chipSelectedId);\r\n this.DropInput.nativeElement.value = '';\r\n this.selected()\r\n }\r\n\r\n }\r\n public venSelected(event: MatAutocompleteSelectedEvent): void {\r\n this.DropInput.nativeElement.value = '';\r\n console.log('event.option.value', event.option.value)\r\n this.selectvenByName(event.option.value[this.comparekey(event.option.value)]);\r\n console.log('chipSelectedvenid', this.chipSelectedObj)\r\n }\r\n private selectvenByName(ven) {\r\n let foundemp1 = this.chipSelectedObj.filter(e => e[this.comparekey(e)] == ven);\r\n if (foundemp1.length) {\r\n return;\r\n }\r\n let foundemp = this.Dropdowndata.filter(e => e[this.comparekey(e)] == ven);\r\n if (foundemp.length) {\r\n this.chipSelectedObj.push(foundemp[0]);\r\n if (this.InputFields?.Outputkey) {\r\n this.chipSelectedId.push(foundemp[0][this.InputFields?.Outputkey])\r\n\r\n }\r\n else {\r\n this.chipSelectedId.push(foundemp[0].id)\r\n\r\n }\r\n }\r\n }\r\n comparekey(e) {\r\n if (this.InputFields?.comparekey) {\r\n return this.InputFields?.comparekey\r\n }\r\n else {\r\n if (e?.id) {\r\n return \"id\"\r\n }\r\n else {\r\n return this.InputFields.displaykey\r\n }\r\n }\r\n }\r\n}","import { NgModule } from '@angular/core';\r\nimport { VsChipdropdownComponent } from './vs-chipdropdown.component';\r\nimport { VsChipddCmpComponent } from './vs-chipdd-cmp/vs-chipdd-cmp.component';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatGridListModule } from '@angular/material/grid-list';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [VsChipdropdownComponent, VsChipddCmpComponent],\r\n imports: [MatFormFieldModule,MatInputModule,MatSelectModule,MatAutocompleteModule,FormsModule,ReactiveFormsModule,CommonModule,MatGridListModule,MatChipsModule,MatIconModule],\r\n exports: [VsChipddCmpComponent]\r\n})\r\nexport class VsChipdropdownModule { }\r\n","/*\r\n * Public API Surface of vs-chipdropdown\r\n */\r\n\r\nexport * from './lib/vs-chipdropdown.service';\r\nexport * from './lib/vs-chipdropdown.component';\r\nexport * from './lib/vs-chipdropdown.module';\r\nexport * from './lib/vs-chipdd-cmp/vs-chipdd-cmp.component'\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;IAOa,qBAAqB,GAAlC,MAAa,qBAAqB;IAEhC,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;KAAK;IACzC,OAAO,CAAC,MAAM,EAAC,IAAI,GAAC,EAAE,EAAC,MAAM;QAC3B,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACrD,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,MAAM,CAAC,CAAA;QAC5B,IAAI,QAAQ,GAAC,EAAE,CAAA;QACf,IAAG,MAAM,KAAG,SAAS,IAAI,MAAM,KAAG,IAAI,I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