@unnilouis.org/vs-chipdropdown 16.3.6 → 17.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/README.md +1 -1
- package/esm2022/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.mjs +271 -429
- package/esm2022/lib/vs-chipdropdown.component.mjs +12 -12
- package/esm2022/lib/vs-chipdropdown.module.mjs +58 -56
- package/esm2022/lib/vs-chipdropdown.service.mjs +45 -45
- package/esm2022/public-api.mjs +7 -7
- package/esm2022/unnilouis.org-vs-chipdropdown.mjs +4 -4
- package/fesm2022/unnilouis.org-vs-chipdropdown.mjs +349 -505
- package/fesm2022/unnilouis.org-vs-chipdropdown.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/vs-chipdd-cmp/vs-chipdd-cmp.component.d.ts +40 -47
- package/lib/vs-chipdropdown.component.d.ts +5 -5
- package/lib/vs-chipdropdown.module.d.ts +22 -22
- package/lib/vs-chipdropdown.service.d.ts +11 -11
- package/package.json +5 -9
- package/public-api.d.ts +4 -4
|
@@ -3,11 +3,11 @@ import { Injectable, Component, EventEmitter, Input, ViewChild, Output, NgModule
|
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
4
|
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
|
5
5
|
import * as i5 from '@angular/material/autocomplete';
|
|
6
|
-
import { MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
7
|
-
import { map, takeUntil, debounceTime, distinctUntilChanged, switchMap, finalize } from 'rxjs/operators';
|
|
6
|
+
import { MatAutocompleteTrigger, MatAutocomplete, MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
7
|
+
import { map, takeUntil, debounceTime, distinctUntilChanged, tap, switchMap, finalize } from 'rxjs/operators';
|
|
8
8
|
import { fromEvent } from 'rxjs';
|
|
9
9
|
import * as i2 from '@angular/forms';
|
|
10
|
-
import {
|
|
10
|
+
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
11
11
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
12
12
|
import * as i3 from '@angular/material/form-field';
|
|
13
13
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
@@ -20,528 +20,372 @@ import * as i8 from '@angular/material/icon';
|
|
|
20
20
|
import { MatIconModule } from '@angular/material/icon';
|
|
21
21
|
import * as i9 from '@ngx-translate/core';
|
|
22
22
|
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
23
|
-
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
24
23
|
import { MatInputModule } from '@angular/material/input';
|
|
25
24
|
import { MatSelectModule } from '@angular/material/select';
|
|
26
25
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
26
|
+
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
27
27
|
|
|
28
|
-
class VsChipdropdownService {
|
|
29
|
-
constructor(http) {
|
|
30
|
-
this.http = http;
|
|
31
|
-
}
|
|
32
|
-
postApi(Apiurl, json = {}, params) {
|
|
33
|
-
const getToken = localStorage.getItem("sessionData");
|
|
34
|
-
let tokenValue = JSON.parse(getToken);
|
|
35
|
-
let token = tokenValue.token;
|
|
36
|
-
console.log("params", params);
|
|
37
|
-
let paradata = '';
|
|
38
|
-
if (params !== undefined && params !== null && params !== '') {
|
|
39
|
-
paradata = params;
|
|
40
|
-
}
|
|
41
|
-
const headers = { Authorization: "Token " + token };
|
|
42
|
-
return this.http.post(Apiurl + paradata, json, {
|
|
43
|
-
headers: headers,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
GetApi(Apiurl, params = '') {
|
|
47
|
-
const getToken = localStorage.getItem("sessionData");
|
|
48
|
-
let tokenValue = JSON.parse(getToken);
|
|
49
|
-
let token = tokenValue.token;
|
|
50
|
-
console.log("params", params);
|
|
51
|
-
let paradata = '';
|
|
52
|
-
if (params !== undefined && params !== null && params !== '') {
|
|
53
|
-
paradata = params;
|
|
54
|
-
}
|
|
55
|
-
const headers = { Authorization: "Token " + token };
|
|
56
|
-
return this.http.get(Apiurl + paradata, {
|
|
57
|
-
headers: headers,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
62
|
-
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
64
|
-
type: Injectable,
|
|
65
|
-
args: [{
|
|
66
|
-
providedIn: 'root'
|
|
67
|
-
}]
|
|
68
|
-
}], ctorParameters:
|
|
28
|
+
class VsChipdropdownService {
|
|
29
|
+
constructor(http) {
|
|
30
|
+
this.http = http;
|
|
31
|
+
}
|
|
32
|
+
postApi(Apiurl, json = {}, params) {
|
|
33
|
+
const getToken = localStorage.getItem("sessionData");
|
|
34
|
+
let tokenValue = JSON.parse(getToken);
|
|
35
|
+
let token = tokenValue.token;
|
|
36
|
+
console.log("params", params);
|
|
37
|
+
let paradata = '';
|
|
38
|
+
if (params !== undefined && params !== null && params !== '') {
|
|
39
|
+
paradata = params;
|
|
40
|
+
}
|
|
41
|
+
const headers = { Authorization: "Token " + token };
|
|
42
|
+
return this.http.post(Apiurl + paradata, json, {
|
|
43
|
+
headers: headers,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
GetApi(Apiurl, params = '') {
|
|
47
|
+
const getToken = localStorage.getItem("sessionData");
|
|
48
|
+
let tokenValue = JSON.parse(getToken);
|
|
49
|
+
let token = tokenValue.token;
|
|
50
|
+
console.log("params", params);
|
|
51
|
+
let paradata = '';
|
|
52
|
+
if (params !== undefined && params !== null && params !== '') {
|
|
53
|
+
paradata = params;
|
|
54
|
+
}
|
|
55
|
+
const headers = { Authorization: "Token " + token };
|
|
56
|
+
return this.http.get(Apiurl + paradata, {
|
|
57
|
+
headers: headers,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
61
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownService, providedIn: 'root' }); }
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownService, decorators: [{
|
|
64
|
+
type: Injectable,
|
|
65
|
+
args: [{
|
|
66
|
+
providedIn: 'root'
|
|
67
|
+
}]
|
|
68
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
69
69
|
|
|
70
|
-
class VsChipdropdownComponent {
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
70
|
+
class VsChipdropdownComponent {
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: VsChipdropdownComponent, selector: "lib-vs-chipdropdown", ngImport: i0, template: `
|
|
73
73
|
<p>
|
|
74
74
|
vs-chipdropdown works!
|
|
75
75
|
</p>
|
|
76
|
-
`, isInline: true }); }
|
|
77
|
-
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
79
|
-
type: Component,
|
|
76
|
+
`, isInline: true, styles: [""] }); }
|
|
77
|
+
}
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownComponent, decorators: [{
|
|
79
|
+
type: Component,
|
|
80
80
|
args: [{ selector: 'lib-vs-chipdropdown', template: `
|
|
81
81
|
<p>
|
|
82
82
|
vs-chipdropdown works!
|
|
83
83
|
</p>
|
|
84
|
-
` }]
|
|
84
|
+
` }]
|
|
85
85
|
}] });
|
|
86
86
|
|
|
87
|
-
class VsChipddCmpComponent {
|
|
88
|
-
constructor(service, fb) {
|
|
89
|
-
this.service = service;
|
|
90
|
-
this.fb = fb;
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
97
|
-
this.
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
// this.
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
this.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
this.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
this.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
let params = this.searchparams(value);
|
|
341
|
-
this.service
|
|
342
|
-
.GetApi(this.InputFields.url + '?page=' + this.currentpage, params)
|
|
343
|
-
.subscribe((results) => {
|
|
344
|
-
let datas = results['data'];
|
|
345
|
-
let datapagination = results['pagination'];
|
|
346
|
-
this.Dropdowndata = datas;
|
|
347
|
-
setTimeout(() => {
|
|
348
|
-
this.trigger.openPanel();
|
|
349
|
-
}, 0);
|
|
350
|
-
if (this.Dropdowndata.length >= 0) {
|
|
351
|
-
this.has_next = datapagination.has_next;
|
|
352
|
-
this.has_previous = datapagination.has_previous;
|
|
353
|
-
this.currentpage = datapagination.index;
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
dynamciformcontrolparent() {
|
|
359
|
-
return this.InputFields?.formcontrolname && this.formGroup
|
|
360
|
-
? this.InputFields?.formcontrolname
|
|
361
|
-
: 'chipvalue';
|
|
362
|
-
}
|
|
363
|
-
selected() {
|
|
364
|
-
this.Outputdata = this.chipSelectedObj;
|
|
365
|
-
if (this.InputFields?.Outputkey) {
|
|
366
|
-
this.Outputdata = this.chipSelectedId;
|
|
367
|
-
}
|
|
368
|
-
if (this.formGroup && this.InputFields?.formcontrolname) {
|
|
369
|
-
this.DropdownForm.get(this.dynamciformcontrolparent()).patchValue(this.formkeyarr);
|
|
370
|
-
}
|
|
371
|
-
console.log(this.formkeyarr);
|
|
372
|
-
console.log('this.DropdownForm.get', this.DropdownForm.value);
|
|
373
|
-
this.dataEvent.emit(this.Outputdata);
|
|
374
|
-
// let data = this.DropdownForm.value.value
|
|
375
|
-
// if (this.InputFields?.wholedata) {
|
|
376
|
-
// this.dataEvent.emit(this.chipSelectedObj);
|
|
377
|
-
// if (this.InputFields?.formgroup && this.InputFields?.formcontrolname) {
|
|
378
|
-
// this.InputFields?.formgroup
|
|
379
|
-
// .get(this.InputFields?.formcontrolname)
|
|
380
|
-
// .patchValue(this.chipSelectedObj);
|
|
381
|
-
// }
|
|
382
|
-
// }
|
|
383
|
-
// else {
|
|
384
|
-
// if (this.InputFields?.Outputkey) {
|
|
385
|
-
// this.dataEvent.emit(this.chipSelectedId);
|
|
386
|
-
// if (this.InputFields?.formgroup && this.InputFields?.formcontrolname) {
|
|
387
|
-
// this.InputFields?.formgroup
|
|
388
|
-
// .get(this.InputFields?.formcontrolname)
|
|
389
|
-
// .patchValue(this.chipSelectedId);
|
|
390
|
-
// }
|
|
391
|
-
// }
|
|
392
|
-
// else {
|
|
393
|
-
// this.dataEvent.emit(this.chipSelectedObj);
|
|
394
|
-
// if (this.InputFields?.formgroup && this.InputFields?.formcontrolname) {
|
|
395
|
-
// this.InputFields?.formgroup
|
|
396
|
-
// .get(this.InputFields?.formcontrolname)
|
|
397
|
-
// .patchValue(this.chipSelectedObj);
|
|
398
|
-
// }
|
|
399
|
-
// }
|
|
400
|
-
// }
|
|
401
|
-
}
|
|
402
|
-
searchparams(value) {
|
|
403
|
-
let params = '';
|
|
404
|
-
if (this.InputFields.params) {
|
|
405
|
-
params = this.InputFields.params;
|
|
406
|
-
}
|
|
407
|
-
let inpValue = value;
|
|
408
|
-
inpValue
|
|
409
|
-
? (params += '&' + this.InputFields.searchkey + '=' + inpValue)
|
|
410
|
-
: '';
|
|
411
|
-
return params;
|
|
412
|
-
}
|
|
413
|
-
removechip(obj) {
|
|
414
|
-
const index = this.chipSelectedObj.indexOf(obj);
|
|
415
|
-
if (index >= 0) {
|
|
416
|
-
this.chipSelectedObj.splice(index, 1);
|
|
417
|
-
console.log(this.chipSelectedObj);
|
|
418
|
-
this.chipSelectedId.splice(index, 1);
|
|
419
|
-
console.log(this.chipSelectedId);
|
|
420
|
-
this.formkeyarr.splice(index, 1);
|
|
421
|
-
console.log('this.formkeyarr', this.formkeyarr);
|
|
422
|
-
this.DropInput.nativeElement.value = '';
|
|
423
|
-
this.selected();
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
venSelected(datas) {
|
|
427
|
-
let data = !datas && datas === '' ? datas : datas.option.value;
|
|
428
|
-
this.isOptionSelected = true;
|
|
429
|
-
this.DropInput.nativeElement.value = '';
|
|
430
|
-
console.log('event.option.value', data);
|
|
431
|
-
this.selectvenByName(data[this.comparekey(data)]);
|
|
432
|
-
console.log('chipSelectedvenid', this.chipSelectedObj);
|
|
433
|
-
}
|
|
434
|
-
selectvenByName(ven) {
|
|
435
|
-
let foundemp1 = this.chipSelectedObj.filter((e) => e[this.comparekey(e)] == ven);
|
|
436
|
-
if (foundemp1.length) {
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
let foundemp = this.Dropdowndata.filter((e) => e[this.comparekey(e)] == ven);
|
|
440
|
-
if (foundemp.length) {
|
|
441
|
-
this.chipSelectedObj.push(foundemp[0]);
|
|
442
|
-
if (this.InputFields?.Outputkey) {
|
|
443
|
-
this.chipSelectedId.push(foundemp[0][this.InputFields?.Outputkey]);
|
|
444
|
-
}
|
|
445
|
-
else {
|
|
446
|
-
this.chipSelectedId.push(foundemp[0].id);
|
|
447
|
-
}
|
|
448
|
-
if (this.InputFields?.formkey) {
|
|
449
|
-
this.formkeyarr.push(foundemp[0][this.InputFields?.formkey]);
|
|
450
|
-
}
|
|
451
|
-
this.selected();
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
comparekey(e) {
|
|
455
|
-
if (this.InputFields?.comparekey) {
|
|
456
|
-
return this.InputFields?.comparekey;
|
|
457
|
-
}
|
|
458
|
-
else {
|
|
459
|
-
if (e?.id) {
|
|
460
|
-
return 'id';
|
|
461
|
-
}
|
|
462
|
-
else {
|
|
463
|
-
return this.InputFields.displaykey;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VsChipddCmpComponent, deps: [{ token: VsChipdropdownService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
468
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: VsChipddCmpComponent, selector: "lib-vs-chipdd-cmp", inputs: { InputFields: "InputFields", ResetForm: "ResetForm", Backendapi: "Backendapi", formGroup: "formGroup" }, outputs: { dataEvent: "dataEvent" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["autoCompleteInput"], descendants: true, read: MatAutocompleteTrigger }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }, { propertyName: "matAutocompleteApp", first: true, predicate: ["scrolll"], descendants: true }, { propertyName: "DropInput", first: true, predicate: ["DropInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div>\r\n <form [formGroup]=\"DropdownForm\" id=\"matChip-size\">\r\n <!-- class=\"mat-chipScroll\" -->\r\n <mat-form-field\r\n appearance=\"outline\"\r\n (click)=\"!this.InputFields?.fronentdata ? this.getdropdown('') : ''\"\r\n >\r\n <mat-label>{{ InputFields?.label | translate }}</mat-label>\r\n <!-- class=\"chip-container\" -->\r\n <mat-chip-grid multiple #chipListvendor>\r\n <!-- class=\"mat-chipEx\" -->\r\n <mat-chip-row\r\n *ngFor=\"let obj of chipSelectedObj\"\r\n [removable]=\"true\"\r\n (removed)=\"removechip(obj)\"\r\n >\r\n {{ obj[InputFields?.displaykey] }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip-row>\r\n <!-- class=\"matformfieldinputstyle\" -->\r\n <input\r\n #DropInput\r\n [matAutocomplete]=\"scrolll\"\r\n [matChipInputFor]=\"chipListvendor\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorsKeysCodes\"\r\n [matChipInputAddOnBlur]=\"true\"\r\n #autoCompleteInput=\"matAutocompleteTrigger\"\r\n [formControlName]=\"this.dynamciformcontrolparent()\"\r\n />\r\n </mat-chip-grid>\r\n <mat-autocomplete\r\n #scrolll=\"matAutocomplete\"\r\n (opened)=\"autocompleteAppScroll()\"\r\n (optionSelected)=\"venSelected($event)\"\r\n >\r\n <ng-container>\r\n <mat-option\r\n *ngFor=\"let dropvalues of Dropdowndata\"\r\n [value]=\"\r\n this.InputFields?.formkey\r\n ? dropvalues[this.InputFields?.formkey]\r\n : dropvalues\r\n \"\r\n >\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>\r\n<!-- (click)=\"selected()\"\r\n -->\r\n<!-- (optionSelected)=\"venSelected($event)\"\r\n -->\r\n<!-- (onSelectionChange)=\"venSelected(dropvalues)\"\r\n -->", styles: [""], dependencies: [{ kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i7.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i9.TranslatePipe, name: "translate" }] }); }
|
|
469
|
-
}
|
|
470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VsChipddCmpComponent, decorators: [{
|
|
471
|
-
type: Component,
|
|
472
|
-
args: [{ selector: 'lib-vs-chipdd-cmp', template: "<div>\r\n <form [formGroup]=\"DropdownForm\" id=\"matChip-size\">\r\n <!-- class=\"mat-chipScroll\" -->\r\n <mat-form-field\r\n appearance=\"outline\"\r\n (click)=\"!this.InputFields?.fronentdata ? this.getdropdown('') : ''\"\r\n >\r\n <mat-label>{{ InputFields?.label | translate }}</mat-label>\r\n <!-- class=\"chip-container\" -->\r\n <mat-chip-grid multiple #chipListvendor>\r\n <!-- class=\"mat-chipEx\" -->\r\n <mat-chip-row\r\n *ngFor=\"let obj of chipSelectedObj\"\r\n [removable]=\"true\"\r\n (removed)=\"removechip(obj)\"\r\n >\r\n {{ obj[InputFields?.displaykey] }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip-row>\r\n <!-- class=\"matformfieldinputstyle\" -->\r\n <input\r\n #DropInput\r\n [matAutocomplete]=\"scrolll\"\r\n [matChipInputFor]=\"chipListvendor\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorsKeysCodes\"\r\n [matChipInputAddOnBlur]=\"true\"\r\n #autoCompleteInput=\"matAutocompleteTrigger\"\r\n [formControlName]=\"this.dynamciformcontrolparent()\"\r\n />\r\n </mat-chip-grid>\r\n <mat-autocomplete\r\n #scrolll=\"matAutocomplete\"\r\n (opened)=\"autocompleteAppScroll()\"\r\n (optionSelected)=\"venSelected($event)\"\r\n >\r\n <ng-container>\r\n <mat-option\r\n *ngFor=\"let dropvalues of Dropdowndata\"\r\n [value]=\"\r\n this.InputFields?.formkey\r\n ? dropvalues[this.InputFields?.formkey]\r\n : dropvalues\r\n \"\r\n >\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>\r\n<!-- (click)=\"selected()\"\r\n -->\r\n<!-- (optionSelected)=\"venSelected($event)\"\r\n -->\r\n<!-- (onSelectionChange)=\"venSelected(dropvalues)\"\r\n -->" }]
|
|
473
|
-
}], ctorParameters: function () { return [{ type: VsChipdropdownService }, { type: i2.FormBuilder }]; }, propDecorators: { InputFields: [{
|
|
474
|
-
type: Input
|
|
475
|
-
}], ResetForm: [{
|
|
476
|
-
type: Input
|
|
477
|
-
}], Backendapi: [{
|
|
478
|
-
type: Input
|
|
479
|
-
}], trigger: [{
|
|
480
|
-
type: ViewChild,
|
|
481
|
-
args: ['autoCompleteInput', {
|
|
482
|
-
static: false,
|
|
483
|
-
read: MatAutocompleteTrigger,
|
|
484
|
-
}]
|
|
485
|
-
}], autocompleteTrigger: [{
|
|
486
|
-
type: ViewChild,
|
|
487
|
-
args: [MatAutocompleteTrigger]
|
|
488
|
-
}], matAutocompleteApp: [{
|
|
489
|
-
type: ViewChild,
|
|
490
|
-
args: ['scrolll']
|
|
491
|
-
}], dataEvent: [{
|
|
492
|
-
type: Output
|
|
493
|
-
}], DropInput: [{
|
|
494
|
-
type: ViewChild,
|
|
495
|
-
args: ['DropInput']
|
|
496
|
-
}], formGroup: [{
|
|
497
|
-
type: Input
|
|
87
|
+
class VsChipddCmpComponent {
|
|
88
|
+
constructor(service, fb) {
|
|
89
|
+
this.service = service;
|
|
90
|
+
this.fb = fb;
|
|
91
|
+
this.DrodownLoading = false;
|
|
92
|
+
this.Backendapi = true;
|
|
93
|
+
this.autocompleteTrigger = MatAutocompleteTrigger;
|
|
94
|
+
this.matAutocompleteApp = MatAutocomplete;
|
|
95
|
+
this.dataEvent = new EventEmitter();
|
|
96
|
+
this.separatorsKeysCodes = [ENTER, COMMA];
|
|
97
|
+
this.has_next = false;
|
|
98
|
+
this.currentpage = 1;
|
|
99
|
+
this.Dropdowndata = [];
|
|
100
|
+
this.has_previous = false;
|
|
101
|
+
this.DropdownForm = FormGroup;
|
|
102
|
+
this.chipSelectedId = [];
|
|
103
|
+
this.chipSelectedObj = [];
|
|
104
|
+
}
|
|
105
|
+
ngOnInit() {
|
|
106
|
+
this.DropdownForm = this.fb.group({
|
|
107
|
+
value: ''
|
|
108
|
+
});
|
|
109
|
+
// if (this.InputFields?.defaultvalue) {
|
|
110
|
+
// this.DropdownForm.get("value").patchValue(this.InputFields?.defaultvalue)
|
|
111
|
+
// this.chipSelectedObj = this.InputFields?.defaultvalue
|
|
112
|
+
// if (this.chipSelectedObj.length > 0) {
|
|
113
|
+
// for (let foundemp of this.chipSelectedObj) {
|
|
114
|
+
// if (this.InputFields?.Outputkey) {
|
|
115
|
+
// this.chipSelectedId.push(foundemp[this.InputFields?.Outputkey])
|
|
116
|
+
// }
|
|
117
|
+
// else {
|
|
118
|
+
// this.chipSelectedId.push(foundemp.id)
|
|
119
|
+
// }
|
|
120
|
+
// }
|
|
121
|
+
// this.selected()
|
|
122
|
+
// }
|
|
123
|
+
// }
|
|
124
|
+
// if (this.InputFields?.fronentdata) {
|
|
125
|
+
// this.Dropdowndata = this.InputFields?.data
|
|
126
|
+
// }
|
|
127
|
+
// else {
|
|
128
|
+
// this.getdropdown('')
|
|
129
|
+
// }
|
|
130
|
+
}
|
|
131
|
+
dupngonit() {
|
|
132
|
+
this.DropdownForm = this.fb.group({
|
|
133
|
+
value: ''
|
|
134
|
+
});
|
|
135
|
+
if (this.InputFields?.defaultvalue) {
|
|
136
|
+
this.DropdownForm.get("value").patchValue(this.InputFields?.defaultvalue);
|
|
137
|
+
this.chipSelectedObj = this.InputFields?.defaultvalue;
|
|
138
|
+
if (this.chipSelectedObj.length > 0) {
|
|
139
|
+
for (let foundemp of this.chipSelectedObj) {
|
|
140
|
+
if (this.InputFields?.Outputkey) {
|
|
141
|
+
this.chipSelectedId.push(foundemp[this.InputFields?.Outputkey]);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.chipSelectedId.push(foundemp.id);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
this.selected();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (this.InputFields?.fronentdata) {
|
|
151
|
+
this.Dropdowndata = this.InputFields?.data;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
this.getdropdown('');
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
ngOnChanges(changes) {
|
|
158
|
+
if (changes['InputFields'] && changes['InputFields'].currentValue) {
|
|
159
|
+
console.log("Summary Log Changes");
|
|
160
|
+
this.currentpage = 1;
|
|
161
|
+
this.dupngonit();
|
|
162
|
+
}
|
|
163
|
+
if (changes['ResetForm'] && changes['ResetForm'].currentValue) {
|
|
164
|
+
console.log("hitted");
|
|
165
|
+
this.DropdownForm.reset();
|
|
166
|
+
this.currentpage = 1;
|
|
167
|
+
this.dupngonit();
|
|
168
|
+
this.chipSelectedId = [];
|
|
169
|
+
this.chipSelectedObj = [];
|
|
170
|
+
this.dataEvent.emit([]);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// public displaydevelopclient(clt: any, key: string) {
|
|
174
|
+
// return key[clt];
|
|
175
|
+
// }
|
|
176
|
+
autocompleteAppScroll() {
|
|
177
|
+
if (!(this.InputFields?.fronentdata)) {
|
|
178
|
+
setTimeout(() => {
|
|
179
|
+
if (this.matAutocompleteApp &&
|
|
180
|
+
this.autocompleteTrigger &&
|
|
181
|
+
this.matAutocompleteApp.panel) {
|
|
182
|
+
fromEvent(this.matAutocompleteApp.panel.nativeElement, 'scroll')
|
|
183
|
+
.pipe(map(x => this.matAutocompleteApp.panel.nativeElement.scrollTop), takeUntil(this.autocompleteTrigger.panelClosingActions))
|
|
184
|
+
.subscribe(x => {
|
|
185
|
+
const scrollTop = this.matAutocompleteApp.panel.nativeElement.scrollTop;
|
|
186
|
+
const scrollHeight = this.matAutocompleteApp.panel.nativeElement.scrollHeight;
|
|
187
|
+
const elementHeight = this.matAutocompleteApp.panel.nativeElement.clientHeight;
|
|
188
|
+
const atBottom = scrollHeight - 1 <= scrollTop + elementHeight;
|
|
189
|
+
if (atBottom) {
|
|
190
|
+
if (this.has_next === true) {
|
|
191
|
+
let value = this.DropInput.nativeElement.value;
|
|
192
|
+
let params = this.searchparams(value);
|
|
193
|
+
this.currentpage = this.currentpage + 1;
|
|
194
|
+
if (this.currentpage > 1) {
|
|
195
|
+
this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params)
|
|
196
|
+
.subscribe((results) => {
|
|
197
|
+
let datas = results["data"];
|
|
198
|
+
let datapagination = results["pagination"];
|
|
199
|
+
this.Dropdowndata = this.Dropdowndata.concat(datas);
|
|
200
|
+
console.log("this.Dropdowndata", this.Dropdowndata);
|
|
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
|
+
}
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
dropdownsearch() {
|
|
216
|
+
if (!(this.InputFields?.fronentdata)) {
|
|
217
|
+
this.DropdownForm.get("value").valueChanges.pipe(debounceTime(100), distinctUntilChanged(), tap(() => {
|
|
218
|
+
this.DrodownLoading = true;
|
|
219
|
+
console.log("inside tap");
|
|
220
|
+
}), switchMap((value) => {
|
|
221
|
+
let params = this.searchparams(value);
|
|
222
|
+
this.currentpage = 1;
|
|
223
|
+
return this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params).pipe(finalize(() => {
|
|
224
|
+
this.DrodownLoading = false;
|
|
225
|
+
}));
|
|
226
|
+
})).subscribe((results) => {
|
|
227
|
+
let datas = results["data"];
|
|
228
|
+
this.Dropdowndata = datas;
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
getdropdown(value) {
|
|
233
|
+
if (this.InputFields.url) {
|
|
234
|
+
let params = this.searchparams(value);
|
|
235
|
+
this.service.GetApi(this.InputFields.url + "?page=" + this.currentpage, params)
|
|
236
|
+
.subscribe((results) => {
|
|
237
|
+
let datas = results["data"];
|
|
238
|
+
let datapagination = results["pagination"];
|
|
239
|
+
this.Dropdowndata = datas;
|
|
240
|
+
if (this.Dropdowndata.length >= 0) {
|
|
241
|
+
this.has_next = datapagination.has_next;
|
|
242
|
+
this.has_previous = datapagination.has_previous;
|
|
243
|
+
this.currentpage = datapagination.index;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
selected() {
|
|
249
|
+
// let data = this.DropdownForm.value.value
|
|
250
|
+
if (this.InputFields?.wholedata) {
|
|
251
|
+
this.dataEvent.emit(this.chipSelectedObj);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
if (this.InputFields?.Outputkey) {
|
|
255
|
+
this.dataEvent.emit(this.chipSelectedId);
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
this.dataEvent.emit(this.chipSelectedObj);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
searchparams(value) {
|
|
263
|
+
let params = '';
|
|
264
|
+
if (this.InputFields.params) {
|
|
265
|
+
params = this.InputFields.params;
|
|
266
|
+
}
|
|
267
|
+
let inpValue = value;
|
|
268
|
+
inpValue ? params += '&' + this.InputFields.searchkey + '=' + inpValue : '';
|
|
269
|
+
return params;
|
|
270
|
+
}
|
|
271
|
+
removechip(obj) {
|
|
272
|
+
const index = this.chipSelectedObj.indexOf(obj);
|
|
273
|
+
if (index >= 0) {
|
|
274
|
+
this.chipSelectedObj.splice(index, 1);
|
|
275
|
+
console.log(this.chipSelectedObj);
|
|
276
|
+
this.chipSelectedId.splice(index, 1);
|
|
277
|
+
console.log(this.chipSelectedId);
|
|
278
|
+
this.DropInput.nativeElement.value = '';
|
|
279
|
+
this.selected();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
venSelected(event) {
|
|
283
|
+
this.DropInput.nativeElement.value = '';
|
|
284
|
+
console.log('event.option.value', event.option.value);
|
|
285
|
+
this.selectvenByName(event.option.value[this.comparekey(event.option.value)]);
|
|
286
|
+
console.log('chipSelectedvenid', this.chipSelectedObj);
|
|
287
|
+
}
|
|
288
|
+
selectvenByName(ven) {
|
|
289
|
+
let foundemp1 = this.chipSelectedObj.filter((e) => e[this.comparekey(e)] == ven);
|
|
290
|
+
if (foundemp1.length) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
let foundemp = this.Dropdowndata.filter((e) => e[this.comparekey(e)] == ven);
|
|
294
|
+
if (foundemp.length) {
|
|
295
|
+
this.chipSelectedObj.push(foundemp[0]);
|
|
296
|
+
if (this.InputFields?.Outputkey) {
|
|
297
|
+
this.chipSelectedId.push(foundemp[0][this.InputFields?.Outputkey]);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
this.chipSelectedId.push(foundemp[0].id);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
comparekey(e) {
|
|
305
|
+
if (this.InputFields?.comparekey) {
|
|
306
|
+
return this.InputFields?.comparekey;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
if (e?.id) {
|
|
310
|
+
return "id";
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
return this.InputFields.displaykey;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipddCmpComponent, deps: [{ token: VsChipdropdownService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
318
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: VsChipddCmpComponent, selector: "lib-vs-chipdd-cmp", inputs: { InputFields: "InputFields", ResetForm: "ResetForm", Backendapi: "Backendapi" }, outputs: { dataEvent: "dataEvent" }, viewQueries: [{ propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }, { propertyName: "matAutocompleteApp", first: true, predicate: ["scrolll"], descendants: true }, { propertyName: "DropInput", first: true, predicate: ["DropInput"], descendants: true }], usesOnChanges: true, ngImport: i0, 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 | translate}}</mat-label>\r\n <mat-chip-grid multiple #chipListvendor class=\"chip-container\">\r\n <mat-chip-row *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-row>\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-grid>\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>\r\n", styles: [".mat-chipScroll{width:420px!important}.mat-chipEx{text-align:left}.chip-container::-webkit-scrollbar{width:6px;height:6px}.chip-container::-webkit-scrollbar-track{background:transparent}.chip-container::-webkit-scrollbar-thumb{border-radius:20px;background:#c3c3c3}.chip-container::-webkit-scrollbar-thumb:hover{background:#a6a6a6}.mat-chipScroll .mat-chip-list-wrapper{height:80px;overflow-y:scroll}mat-form-field{width:250px;font-family:var(--base-font-family)}\n"], dependencies: [{ kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i7.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i9.TranslatePipe, name: "translate" }] }); }
|
|
319
|
+
}
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipddCmpComponent, decorators: [{
|
|
321
|
+
type: Component,
|
|
322
|
+
args: [{ selector: 'lib-vs-chipdd-cmp', 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 | translate}}</mat-label>\r\n <mat-chip-grid multiple #chipListvendor class=\"chip-container\">\r\n <mat-chip-row *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-row>\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-grid>\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>\r\n", styles: [".mat-chipScroll{width:420px!important}.mat-chipEx{text-align:left}.chip-container::-webkit-scrollbar{width:6px;height:6px}.chip-container::-webkit-scrollbar-track{background:transparent}.chip-container::-webkit-scrollbar-thumb{border-radius:20px;background:#c3c3c3}.chip-container::-webkit-scrollbar-thumb:hover{background:#a6a6a6}.mat-chipScroll .mat-chip-list-wrapper{height:80px;overflow-y:scroll}mat-form-field{width:250px;font-family:var(--base-font-family)}\n"] }]
|
|
323
|
+
}], ctorParameters: () => [{ type: VsChipdropdownService }, { type: i2.FormBuilder }], propDecorators: { InputFields: [{
|
|
324
|
+
type: Input
|
|
325
|
+
}], ResetForm: [{
|
|
326
|
+
type: Input
|
|
327
|
+
}], Backendapi: [{
|
|
328
|
+
type: Input
|
|
329
|
+
}], autocompleteTrigger: [{
|
|
330
|
+
type: ViewChild,
|
|
331
|
+
args: [MatAutocompleteTrigger]
|
|
332
|
+
}], matAutocompleteApp: [{
|
|
333
|
+
type: ViewChild,
|
|
334
|
+
args: ['scrolll']
|
|
335
|
+
}], dataEvent: [{
|
|
336
|
+
type: Output
|
|
337
|
+
}], DropInput: [{
|
|
338
|
+
type: ViewChild,
|
|
339
|
+
args: ['DropInput']
|
|
498
340
|
}] } });
|
|
499
341
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
static { this.ɵ
|
|
503
|
-
|
|
504
|
-
TranslateModule,
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
TranslateModule
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
HttpClientModule,
|
|
524
|
-
TranslateModule.forRoot({
|
|
525
|
-
loader: {
|
|
526
|
-
provide: TranslateLoader,
|
|
527
|
-
useFactory: httpTranslateLoader,
|
|
528
|
-
deps: [HttpClient],
|
|
529
|
-
},
|
|
530
|
-
}),
|
|
531
|
-
|
|
532
|
-
exports: [
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
342
|
+
class VsChipdropdownModule {
|
|
343
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
344
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownModule, declarations: [VsChipdropdownComponent,
|
|
345
|
+
VsChipddCmpComponent], imports: [MatFormFieldModule, MatInputModule, MatSelectModule, MatAutocompleteModule, FormsModule, ReactiveFormsModule, CommonModule, MatGridListModule, MatChipsModule, MatIconModule,
|
|
346
|
+
HttpClientModule, i9.TranslateModule], exports: [VsChipddCmpComponent] }); }
|
|
347
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownModule, imports: [MatFormFieldModule, MatInputModule, MatSelectModule, MatAutocompleteModule, FormsModule, ReactiveFormsModule, CommonModule, MatGridListModule, MatChipsModule, MatIconModule,
|
|
348
|
+
HttpClientModule,
|
|
349
|
+
TranslateModule.forRoot({
|
|
350
|
+
loader: {
|
|
351
|
+
provide: TranslateLoader,
|
|
352
|
+
useFactory: httpTranslateLoader,
|
|
353
|
+
deps: [HttpClient],
|
|
354
|
+
},
|
|
355
|
+
})] }); }
|
|
356
|
+
}
|
|
357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: VsChipdropdownModule, decorators: [{
|
|
358
|
+
type: NgModule,
|
|
359
|
+
args: [{
|
|
360
|
+
declarations: [
|
|
361
|
+
VsChipdropdownComponent,
|
|
362
|
+
VsChipddCmpComponent
|
|
363
|
+
],
|
|
364
|
+
imports: [MatFormFieldModule, MatInputModule, MatSelectModule, MatAutocompleteModule, FormsModule, ReactiveFormsModule, CommonModule, MatGridListModule, MatChipsModule, MatIconModule,
|
|
365
|
+
HttpClientModule,
|
|
366
|
+
TranslateModule.forRoot({
|
|
367
|
+
loader: {
|
|
368
|
+
provide: TranslateLoader,
|
|
369
|
+
useFactory: httpTranslateLoader,
|
|
370
|
+
deps: [HttpClient],
|
|
371
|
+
},
|
|
372
|
+
}),
|
|
373
|
+
],
|
|
374
|
+
exports: [
|
|
375
|
+
VsChipddCmpComponent
|
|
376
|
+
]
|
|
377
|
+
}]
|
|
378
|
+
}] });
|
|
379
|
+
function httpTranslateLoader(http) {
|
|
380
|
+
return new TranslateHttpLoader(http);
|
|
537
381
|
}
|
|
538
382
|
|
|
539
|
-
/*
|
|
540
|
-
* Public API Surface of vs-chipdropdown
|
|
383
|
+
/*
|
|
384
|
+
* Public API Surface of vs-chipdropdown
|
|
541
385
|
*/
|
|
542
386
|
|
|
543
|
-
/**
|
|
544
|
-
* Generated bundle index. Do not edit.
|
|
387
|
+
/**
|
|
388
|
+
* Generated bundle index. Do not edit.
|
|
545
389
|
*/
|
|
546
390
|
|
|
547
391
|
export { VsChipddCmpComponent, VsChipdropdownComponent, VsChipdropdownModule, VsChipdropdownService, httpTranslateLoader };
|