@unnilouis.org/vs-chipdropdown 0.0.15 → 0.0.16-beta-2

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/bundles/unnilouis.org-vs-chipdropdown.umd.js +564 -0
  3. package/bundles/unnilouis.org-vs-chipdropdown.umd.js.map +1 -0
  4. package/bundles/unnilouis.org-vs-chipdropdown.umd.min.js +16 -0
  5. package/bundles/unnilouis.org-vs-chipdropdown.umd.min.js.map +1 -0
  6. package/esm2015/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.js +250 -0
  7. package/esm2015/lib/vs-chipdropdown.component.js +19 -0
  8. package/esm2015/lib/vs-chipdropdown.module.js +24 -0
  9. package/esm2015/lib/vs-chipdropdown.service.js +49 -0
  10. package/esm2015/public-api.js +8 -0
  11. package/esm2015/unnilouis.org-vs-chipdropdown.js +5 -0
  12. package/esm5/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.js +266 -0
  13. package/esm5/lib/vs-chipdropdown.component.js +17 -0
  14. package/esm5/lib/vs-chipdropdown.module.js +27 -0
  15. package/esm5/lib/vs-chipdropdown.service.js +52 -0
  16. package/esm5/public-api.js +8 -0
  17. package/esm5/unnilouis.org-vs-chipdropdown.js +5 -0
  18. package/fesm2015/unnilouis.org-vs-chipdropdown.js +336 -0
  19. package/fesm2015/unnilouis.org-vs-chipdropdown.js.map +1 -0
  20. package/fesm5/unnilouis.org-vs-chipdropdown.js +356 -0
  21. package/fesm5/unnilouis.org-vs-chipdropdown.js.map +1 -0
  22. package/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.d.ts +2 -3
  23. package/lib/vs-chipdropdown.component.d.ts +4 -4
  24. package/lib/vs-chipdropdown.module.d.ts +0 -15
  25. package/lib/vs-chipdropdown.service.d.ts +0 -3
  26. package/package.json +15 -19
  27. package/{index.d.ts → unnilouis.org-vs-chipdropdown.d.ts} +0 -1
  28. package/unnilouis.org-vs-chipdropdown.metadata.json +1 -0
  29. package/esm2022/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.mjs +0 -226
  30. package/esm2022/lib/vs-chipdropdown.component.mjs +0 -19
  31. package/esm2022/lib/vs-chipdropdown.module.mjs +0 -37
  32. package/esm2022/lib/vs-chipdropdown.service.mjs +0 -45
  33. package/esm2022/public-api.mjs +0 -8
  34. package/esm2022/unnilouis.org-vs-chipdropdown.mjs +0 -5
  35. package/fesm2022/unnilouis.org-vs-chipdropdown.mjs +0 -328
  36. package/fesm2022/unnilouis.org-vs-chipdropdown.mjs.map +0 -1
@@ -0,0 +1,336 @@
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.FeDrodown = [];
82
+ this.dataEvent = new EventEmitter();
83
+ this.separatorsKeysCodes = [ENTER, COMMA];
84
+ this.has_next = false;
85
+ this.currentpage = 1;
86
+ this.Dropdowndata = [];
87
+ this.has_previous = false;
88
+ this.chipSelectedId = [];
89
+ this.chipSelectedObj = [];
90
+ }
91
+ ngOnInit() {
92
+ var _a, _b, _c, _d, _e;
93
+ this.DropdownForm = this.fb.group({
94
+ value: ''
95
+ });
96
+ if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.defaultvalue) {
97
+ this.DropdownForm.get("value").patchValue((_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.defaultvalue);
98
+ this.chipSelectedObj = (_c = this.InputFields) === null || _c === void 0 ? void 0 : _c.defaultvalue;
99
+ if (this.chipSelectedObj.length > 0) {
100
+ for (let foundemp of this.chipSelectedObj) {
101
+ if ((_d = this.InputFields) === null || _d === void 0 ? void 0 : _d.Outputkey) {
102
+ this.chipSelectedId.push(foundemp[(_e = this.InputFields) === null || _e === void 0 ? void 0 : _e.Outputkey]);
103
+ }
104
+ else {
105
+ this.chipSelectedId.push(foundemp.id);
106
+ }
107
+ }
108
+ this.selected();
109
+ }
110
+ }
111
+ if (this.Backendapi) {
112
+ this.getdropdown('');
113
+ }
114
+ else {
115
+ this.Dropdowndata = this.FeDrodown;
116
+ }
117
+ }
118
+ ngOnChanges(changes) {
119
+ console.log("changes.ResetForm", changes.ResetForm, changes.ResetForm.currentValue, changes.ResetForm && changes.ResetForm.currentValue);
120
+ if (changes.InputFields && changes.InputFields.currentValue) {
121
+ console.log("Summary Log Changes");
122
+ this.currentpage = 1;
123
+ this.getdropdown('');
124
+ }
125
+ if (changes.ResetForm && changes.ResetForm.currentValue) {
126
+ console.log("hitted");
127
+ this.DropdownForm.reset();
128
+ this.currentpage = 1;
129
+ this.getdropdown('');
130
+ this.chipSelectedId = [];
131
+ this.chipSelectedObj = [];
132
+ this.dataEvent.emit([]);
133
+ }
134
+ }
135
+ // public displaydevelopclient(clt: any, key: string) {
136
+ // return key[clt];
137
+ // }
138
+ autocompleteAppScroll() {
139
+ if (this.Backendapi) {
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
+ if (this.Backendapi) {
179
+ this.DropdownForm.get("value").valueChanges.pipe(debounceTime(100), distinctUntilChanged(), tap(() => {
180
+ this.DrodownLoading = true;
181
+ console.log("inside tap");
182
+ }), switchMap((value) => {
183
+ let params = this.searchparams(value);
184
+ this.currentpage = 1;
185
+ return this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params).pipe(finalize(() => {
186
+ this.DrodownLoading = false;
187
+ }));
188
+ })).subscribe((results) => {
189
+ let datas = results["data"];
190
+ this.Dropdowndata = datas;
191
+ });
192
+ }
193
+ }
194
+ getdropdown(value) {
195
+ let params = this.searchparams(value);
196
+ this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params)
197
+ .subscribe((results) => {
198
+ let datas = results["data"];
199
+ let datapagination = results["pagination"];
200
+ this.Dropdowndata = datas;
201
+ if (this.Dropdowndata.length >= 0) {
202
+ this.has_next = datapagination.has_next;
203
+ this.has_previous = datapagination.has_previous;
204
+ this.currentpage = datapagination.index;
205
+ }
206
+ });
207
+ }
208
+ selected() {
209
+ var _a, _b;
210
+ // let data = this.DropdownForm.value.value
211
+ if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.wholedata) {
212
+ this.dataEvent.emit(this.chipSelectedObj);
213
+ }
214
+ else {
215
+ if ((_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.Outputkey) {
216
+ this.dataEvent.emit(this.chipSelectedId);
217
+ }
218
+ else {
219
+ this.dataEvent.emit(this.chipSelectedObj);
220
+ }
221
+ }
222
+ }
223
+ searchparams(value) {
224
+ let params = '';
225
+ if (this.InputFields.params) {
226
+ params = this.InputFields.params;
227
+ }
228
+ let inpValue = value;
229
+ inpValue ? params += '&' + this.InputFields.searchkey + '=' + inpValue : '';
230
+ return params;
231
+ }
232
+ removechip(obj) {
233
+ const index = this.chipSelectedObj.indexOf(obj);
234
+ if (index >= 0) {
235
+ this.chipSelectedObj.splice(index, 1);
236
+ console.log(this.chipSelectedObj);
237
+ this.chipSelectedId.splice(index, 1);
238
+ console.log(this.chipSelectedId);
239
+ this.DropInput.nativeElement.value = '';
240
+ this.selected();
241
+ }
242
+ }
243
+ venSelected(event) {
244
+ this.DropInput.nativeElement.value = '';
245
+ console.log('event.option.value', event.option.value);
246
+ this.selectvenByName(event.option.value[this.comparekey(event.option.value)]);
247
+ console.log('chipSelectedvenid', this.chipSelectedObj);
248
+ }
249
+ selectvenByName(ven) {
250
+ var _a, _b;
251
+ let foundemp1 = this.chipSelectedObj.filter(e => e[this.comparekey(e)] == ven);
252
+ if (foundemp1.length) {
253
+ return;
254
+ }
255
+ let foundemp = this.Dropdowndata.filter(e => e[this.comparekey(e)] == ven);
256
+ if (foundemp.length) {
257
+ this.chipSelectedObj.push(foundemp[0]);
258
+ if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.Outputkey) {
259
+ this.chipSelectedId.push(foundemp[0][(_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.Outputkey]);
260
+ }
261
+ else {
262
+ this.chipSelectedId.push(foundemp[0].id);
263
+ }
264
+ }
265
+ }
266
+ comparekey(e) {
267
+ var _a, _b;
268
+ if ((_a = this.InputFields) === null || _a === void 0 ? void 0 : _a.comparekey) {
269
+ return (_b = this.InputFields) === null || _b === void 0 ? void 0 : _b.comparekey;
270
+ }
271
+ else {
272
+ if (e === null || e === void 0 ? void 0 : e.id) {
273
+ return "id";
274
+ }
275
+ else {
276
+ return this.InputFields.displaykey;
277
+ }
278
+ }
279
+ }
280
+ };
281
+ VsChipddCmpComponent.ctorParameters = () => [
282
+ { type: VsChipdropdownService },
283
+ { type: FormBuilder }
284
+ ];
285
+ __decorate([
286
+ Input()
287
+ ], VsChipddCmpComponent.prototype, "InputFields", void 0);
288
+ __decorate([
289
+ Input()
290
+ ], VsChipddCmpComponent.prototype, "ResetForm", void 0);
291
+ __decorate([
292
+ Input()
293
+ ], VsChipddCmpComponent.prototype, "Backendapi", void 0);
294
+ __decorate([
295
+ Input()
296
+ ], VsChipddCmpComponent.prototype, "FeDrodown", void 0);
297
+ __decorate([
298
+ ViewChild(MatAutocompleteTrigger)
299
+ ], VsChipddCmpComponent.prototype, "autocompleteTrigger", void 0);
300
+ __decorate([
301
+ ViewChild('scrolll')
302
+ ], VsChipddCmpComponent.prototype, "matAutocompleteApp", void 0);
303
+ __decorate([
304
+ Output()
305
+ ], VsChipddCmpComponent.prototype, "dataEvent", void 0);
306
+ __decorate([
307
+ ViewChild('DropInput')
308
+ ], VsChipddCmpComponent.prototype, "DropInput", void 0);
309
+ VsChipddCmpComponent = __decorate([
310
+ Component({
311
+ selector: 'lib-vs-chipdd-cmp',
312
+ 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>",
313
+ 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}"]
314
+ })
315
+ ], VsChipddCmpComponent);
316
+
317
+ let VsChipdropdownModule = class VsChipdropdownModule {
318
+ };
319
+ VsChipdropdownModule = __decorate([
320
+ NgModule({
321
+ declarations: [VsChipdropdownComponent, VsChipddCmpComponent],
322
+ imports: [MatFormFieldModule, MatInputModule, MatSelectModule, MatAutocompleteModule, FormsModule, ReactiveFormsModule, CommonModule, MatGridListModule, MatChipsModule, MatIconModule],
323
+ exports: [VsChipddCmpComponent]
324
+ })
325
+ ], VsChipdropdownModule);
326
+
327
+ /*
328
+ * Public API Surface of vs-chipdropdown
329
+ */
330
+
331
+ /**
332
+ * Generated bundle index. Do not edit.
333
+ */
334
+
335
+ export { VsChipddCmpComponent, VsChipdropdownComponent, VsChipdropdownModule, VsChipdropdownService };
336
+ //# sourceMappingURL=unnilouis.org-vs-chipdropdown.js.map
@@ -0,0 +1 @@
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 @Input() FeDrodown: any=[]\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.Backendapi){\r\n this.getdropdown('')\r\n\r\n }\r\n else{\r\n this.Dropdowndata=this.FeDrodown\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.getdropdown('');\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.getdropdown('');\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.Backendapi){\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.Backendapi){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 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,C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