@guajiritos/general-autocomplete 0.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.
Files changed (40) hide show
  1. package/README.md +29 -0
  2. package/esm2020/guajiritos-general-autocomplete.mjs +5 -0
  3. package/esm2020/lib/guachos-general-autocomplete.component.mjs +306 -0
  4. package/esm2020/lib/guachos-general-autocomplete.module.mjs +73 -0
  5. package/esm2020/public-api.mjs +7 -0
  6. package/esm2020/utils/constants/contracts.mjs +10 -0
  7. package/esm2020/utils/interfaces/interfaces.mjs +12 -0
  8. package/esm2020/utils/pipes/duration.pipe.mjs +18 -0
  9. package/esm2020/utils/pipes/humanize-duration.pipe.mjs +17 -0
  10. package/esm2020/utils/pipes/i18n-field.pipe.mjs +28 -0
  11. package/esm2020/utils/pipes/ida-return.pipe.mjs +23 -0
  12. package/esm2020/utils/pipes/pipes.module.mjs +78 -0
  13. package/esm2020/utils/pipes/resolve-property-path.pipe.mjs +80 -0
  14. package/esm2020/utils/pipes/show-roles.pipe.mjs +24 -0
  15. package/esm2020/utils/pipes/show-segments.pipe.mjs +24 -0
  16. package/esm2020/utils/pipes/show-transport-types.pipe.mjs +24 -0
  17. package/esm2020/utils/services/autocomplete.service.mjs +161 -0
  18. package/esm2020/utils/services/utils.service.mjs +48 -0
  19. package/fesm2015/guajiritos-general-autocomplete.mjs +878 -0
  20. package/fesm2015/guajiritos-general-autocomplete.mjs.map +1 -0
  21. package/fesm2020/guajiritos-general-autocomplete.mjs +874 -0
  22. package/fesm2020/guajiritos-general-autocomplete.mjs.map +1 -0
  23. package/index.d.ts +5 -0
  24. package/lib/guachos-general-autocomplete.component.d.ts +71 -0
  25. package/lib/guachos-general-autocomplete.module.d.ts +17 -0
  26. package/package.json +54 -0
  27. package/public-api.d.ts +3 -0
  28. package/utils/constants/contracts.d.ts +2 -0
  29. package/utils/interfaces/interfaces.d.ts +33 -0
  30. package/utils/pipes/duration.pipe.d.ts +8 -0
  31. package/utils/pipes/humanize-duration.pipe.d.ts +7 -0
  32. package/utils/pipes/i18n-field.pipe.d.ts +7 -0
  33. package/utils/pipes/ida-return.pipe.d.ts +8 -0
  34. package/utils/pipes/pipes.module.d.ts +15 -0
  35. package/utils/pipes/resolve-property-path.pipe.d.ts +24 -0
  36. package/utils/pipes/show-roles.pipe.d.ts +8 -0
  37. package/utils/pipes/show-segments.pipe.d.ts +8 -0
  38. package/utils/pipes/show-transport-types.pipe.d.ts +8 -0
  39. package/utils/services/autocomplete.service.d.ts +15 -0
  40. package/utils/services/utils.service.d.ts +25 -0
@@ -0,0 +1,874 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Pipe, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ViewChild, Input, Output, NgModule } from '@angular/core';
3
+ import * as i4 from '@angular/forms';
4
+ import { FormControl, Validators, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i2 from '@ngx-translate/core';
6
+ import { TranslateModule } from '@ngx-translate/core';
7
+ import { Subject, takeUntil, debounceTime } from 'rxjs';
8
+ import * as i1 from '@angular/common/http';
9
+ import { HttpParams } from '@angular/common/http';
10
+ import { map } from 'rxjs/operators';
11
+ import * as _ from 'lodash';
12
+ import * as i3 from '@angular/common';
13
+ import { CommonModule, UpperCasePipe, CurrencyPipe } from '@angular/common';
14
+ import * as i5 from '@angular/material/form-field';
15
+ import { MatFormFieldModule } from '@angular/material/form-field';
16
+ import * as i6 from '@angular/material/icon';
17
+ import { MatIconModule } from '@angular/material/icon';
18
+ import * as i7 from '@angular/material/progress-spinner';
19
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
20
+ import * as i8 from '@angular/material/button';
21
+ import { MatButtonModule } from '@angular/material/button';
22
+ import * as i9 from '@angular/material/input';
23
+ import { MatInputModule } from '@angular/material/input';
24
+ import * as i10 from '@angular/material/autocomplete';
25
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
26
+ import * as i11 from '@angular/material/core';
27
+
28
+ var CustomPipes;
29
+ (function (CustomPipes) {
30
+ CustomPipes["SHOW_SEGMENTS"] = "showSegments";
31
+ CustomPipes["DURATION_TIME"] = "durationTime";
32
+ CustomPipes["HUMANIZE_DURATION"] = "humanizeDuration";
33
+ CustomPipes["SHOW_TRANSPORT_TYPES"] = "showTransportTypes";
34
+ CustomPipes["SHOW_ROLES"] = "showRoles";
35
+ CustomPipes["IDA_RETURN"] = "idaReturn";
36
+ CustomPipes["CURRENCY"] = "currency";
37
+ CustomPipes["UPPERCASE"] = "uppercase";
38
+ })(CustomPipes || (CustomPipes = {}));
39
+
40
+ const GENERAL_DISPLAY_OPTIONS = {
41
+ firthLabel: [
42
+ {
43
+ type: 'path',
44
+ path: ['name']
45
+ }
46
+ ],
47
+ applyTranslate: true
48
+ };
49
+
50
+ class AutocompleteService {
51
+ constructor(_httpClient) {
52
+ this._httpClient = _httpClient;
53
+ this.httpOptions = {};
54
+ }
55
+ processParams(filters, value) {
56
+ return new Promise((resolve, reject) => {
57
+ setTimeout(async () => {
58
+ let filter = {};
59
+ if (Array.isArray(filters)) {
60
+ for (const f of filters) {
61
+ await this.processFilterString(f, value).then((resp) => {
62
+ if (Object.keys(filter)?.length) {
63
+ _.merge(filter, resp);
64
+ }
65
+ else {
66
+ filter = {
67
+ ...filter,
68
+ ...resp
69
+ };
70
+ }
71
+ if (f === filters[filters?.length - 1]) {
72
+ resolve(filter);
73
+ }
74
+ });
75
+ }
76
+ }
77
+ else if (typeof filters === 'string') {
78
+ await this.processFilterString(filters, value).then((resp) => {
79
+ filter = {
80
+ ...filter,
81
+ ...resp
82
+ };
83
+ resolve(filter);
84
+ });
85
+ }
86
+ else {
87
+ reject(null);
88
+ }
89
+ }, 100);
90
+ });
91
+ }
92
+ async processFilterString(filter, value) {
93
+ let f = {};
94
+ const arrayFilters = filter?.split('[');
95
+ if (arrayFilters?.findIndex((a) => a === 'filter') >= 0) {
96
+ arrayFilters?.splice(0, 1);
97
+ }
98
+ await this.createObjectFilters(arrayFilters, value).then((data) => {
99
+ f = data;
100
+ });
101
+ return f;
102
+ }
103
+ async createObjectFilters(array, value) {
104
+ for (let filter of array) {
105
+ filter = filter?.replace(']', '');
106
+ if (array.length > 1) {
107
+ array.splice(0, 1);
108
+ return { [filter]: await this.createObjectFilters(array, value) };
109
+ }
110
+ else {
111
+ if (filter === '$like') {
112
+ return { [filter]: '%' + value + '%' };
113
+ }
114
+ else {
115
+ return { [filter]: value };
116
+ }
117
+ }
118
+ }
119
+ }
120
+ async getAutocompleteByText(url, text, field, restrictions, removeProperties, order, bodyRequest) {
121
+ let httpParams = new HttpParams().set('offset', '0');
122
+ httpParams = httpParams.append('limit', '20');
123
+ if (order) {
124
+ httpParams = httpParams.append('order', order);
125
+ }
126
+ if (!text) {
127
+ text = '';
128
+ }
129
+ if (bodyRequest) {
130
+ let body = {};
131
+ if (text && text !== '') {
132
+ await this.processParams(field, text)
133
+ .then((data) => {
134
+ body = {
135
+ ...bodyRequest,
136
+ filter: data
137
+ };
138
+ });
139
+ }
140
+ else {
141
+ body = JSON.parse(JSON.stringify(bodyRequest));
142
+ }
143
+ if (restrictions?.length) {
144
+ for (let r of restrictions) {
145
+ await this.processParams(r?.filter, r?.value?.toString())
146
+ .then((data) => {
147
+ let filtersAux = { ...body?.filter };
148
+ _.merge(filtersAux, data);
149
+ body = {
150
+ ...body,
151
+ filter: filtersAux
152
+ };
153
+ httpParams = httpParams.set('form', JSON.stringify(body));
154
+ });
155
+ }
156
+ }
157
+ else {
158
+ httpParams = httpParams.append('form', JSON.stringify(body));
159
+ }
160
+ }
161
+ else {
162
+ if (text && text !== '') {
163
+ if (Array.isArray(field)) {
164
+ for (const f of field) {
165
+ httpParams = httpParams.append(f, '%' + text + '%');
166
+ }
167
+ }
168
+ else {
169
+ if (field?.includes('$like')) {
170
+ httpParams = httpParams.append(field, '%' + text + '%');
171
+ }
172
+ else if (field) {
173
+ httpParams = httpParams.append(field, text);
174
+ }
175
+ }
176
+ }
177
+ restrictions?.forEach((restriction) => {
178
+ if (restriction?.value) {
179
+ httpParams = httpParams.append(restriction?.filter, restriction.value?.toString());
180
+ }
181
+ });
182
+ }
183
+ this.httpOptions = { params: httpParams };
184
+ return this._httpClient
185
+ .get(url, this.httpOptions)
186
+ .pipe(map((result) => {
187
+ result?.data?.map((item) => {
188
+ removeProperties?.forEach((property) => {
189
+ delete item[property];
190
+ });
191
+ });
192
+ return result;
193
+ }));
194
+ }
195
+ }
196
+ AutocompleteService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AutocompleteService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
197
+ AutocompleteService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AutocompleteService, providedIn: 'root' });
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AutocompleteService, decorators: [{
199
+ type: Injectable,
200
+ args: [{
201
+ providedIn: 'root'
202
+ }]
203
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
204
+
205
+ class UtilsService {
206
+ /**
207
+ * Convierte el tiempo pasado por parámetro en horas y minutos
208
+ *
209
+ * @param time - Tiempo
210
+ * @returns Devuelve las horas y minutos
211
+ */
212
+ static getTime(time) {
213
+ const hours = parseInt(Number(time) / 3600 + '', 10);
214
+ time = Number(time) - (hours * 3600);
215
+ const minutes = parseInt(Number(time) / 60 + '', 10);
216
+ return { hours, minutes };
217
+ }
218
+ /**
219
+ * Devuelve el tiempo en formato 'hh:mm'
220
+ *
221
+ * @param time - Tiempo
222
+ */
223
+ static getTimePretty(time) {
224
+ const { hours, minutes } = UtilsService.getTime(time);
225
+ return (hours < 10 ? '0' + hours : hours) + ':' + (minutes < 10 ? '0' + minutes : minutes);
226
+ }
227
+ /**
228
+ * Devuelve el tiempo en formato 'hhh : mmm'
229
+ *
230
+ * @param time - Tiempo
231
+ */
232
+ static humanizeDuration(time) {
233
+ const { hours, minutes } = UtilsService.getTime(time);
234
+ return (hours < 10 ? '0' + hours : hours) + 'h : ' + (minutes < 10 ? '0' + minutes : minutes) + 'm';
235
+ }
236
+ static resolvePropertyByPath(obj, path) {
237
+ return path.reduce((prev, curr) => {
238
+ return prev ? prev[curr] : null;
239
+ }, obj || self);
240
+ }
241
+ }
242
+ UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
243
+ UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: UtilsService, providedIn: 'root' });
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: UtilsService, decorators: [{
245
+ type: Injectable,
246
+ args: [{
247
+ providedIn: 'root'
248
+ }]
249
+ }] });
250
+
251
+ class I18nFieldPipe {
252
+ transform(value, lang) {
253
+ if (!value) {
254
+ return '';
255
+ }
256
+ if (typeof value === 'string') {
257
+ return value;
258
+ }
259
+ const keys = Object.keys(value);
260
+ if (!value[lang]) {
261
+ let i = 0;
262
+ while (i < keys?.length && (value[keys[i]] === null || value[keys[i]] === '')) {
263
+ i++;
264
+ }
265
+ return keys?.length > i ? value[keys[i]] : 'No está definido';
266
+ }
267
+ return value[lang] || 'No está definido';
268
+ }
269
+ }
270
+ I18nFieldPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: I18nFieldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
271
+ I18nFieldPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: I18nFieldPipe, name: "i18nField" });
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: I18nFieldPipe, decorators: [{
273
+ type: Pipe,
274
+ args: [{ name: 'i18nField' }]
275
+ }] });
276
+
277
+ class DurationTimePipe {
278
+ transform(value) {
279
+ return UtilsService.getTimePretty(value);
280
+ }
281
+ }
282
+ DurationTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DurationTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
283
+ DurationTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: DurationTimePipe, name: "durationTime" });
284
+ DurationTimePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DurationTimePipe });
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DurationTimePipe, decorators: [{
286
+ type: Injectable
287
+ }, {
288
+ type: Pipe,
289
+ args: [{ name: 'durationTime' }]
290
+ }] });
291
+
292
+ class HumanizeDurationPipe {
293
+ transform(input) {
294
+ return UtilsService.humanizeDuration(input);
295
+ }
296
+ }
297
+ HumanizeDurationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: HumanizeDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
298
+ HumanizeDurationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: HumanizeDurationPipe, name: "humanizeDuration" });
299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: HumanizeDurationPipe, decorators: [{
300
+ type: Pipe,
301
+ args: [{
302
+ name: 'humanizeDuration'
303
+ }]
304
+ }] });
305
+
306
+ class IdaReturnPipe {
307
+ transform(value) {
308
+ if (value === CustomPipes.IDA_RETURN) {
309
+ return 'Ida y Vuelta';
310
+ }
311
+ else {
312
+ return 'solo Ida';
313
+ }
314
+ }
315
+ }
316
+ IdaReturnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: IdaReturnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
317
+ IdaReturnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: IdaReturnPipe, name: "idaReturn" });
318
+ IdaReturnPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: IdaReturnPipe });
319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: IdaReturnPipe, decorators: [{
320
+ type: Injectable
321
+ }, {
322
+ type: Pipe,
323
+ args: [{ name: 'idaReturn' }]
324
+ }] });
325
+
326
+ class ShowRolesPipe {
327
+ transform(value) {
328
+ let result = '';
329
+ if (value?.length) {
330
+ value.forEach(item => {
331
+ result += item?.Rol?.name + ', ';
332
+ });
333
+ result = result.substring(0, result?.length - 2);
334
+ }
335
+ return result;
336
+ }
337
+ }
338
+ ShowRolesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowRolesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
339
+ ShowRolesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ShowRolesPipe, name: "showSegments" });
340
+ ShowRolesPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowRolesPipe });
341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowRolesPipe, decorators: [{
342
+ type: Injectable
343
+ }, {
344
+ type: Pipe,
345
+ args: [{ name: 'showSegments' }]
346
+ }] });
347
+
348
+ class ShowSegmentsPipe {
349
+ transform(value) {
350
+ let result = '';
351
+ if (value?.length) {
352
+ value.forEach(item => {
353
+ result += item?.Segment?.PlaceOrigin?.alpha3 + '-' + item?.Segment?.PlaceDestination?.alpha3 + ', ';
354
+ });
355
+ result = result.substring(0, result?.length - 2);
356
+ }
357
+ return result;
358
+ }
359
+ }
360
+ ShowSegmentsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowSegmentsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
361
+ ShowSegmentsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ShowSegmentsPipe, name: "showSegments" });
362
+ ShowSegmentsPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowSegmentsPipe });
363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowSegmentsPipe, decorators: [{
364
+ type: Injectable
365
+ }, {
366
+ type: Pipe,
367
+ args: [{ name: 'showSegments' }]
368
+ }] });
369
+
370
+ class ShowTransportTypesPipe {
371
+ transform(value) {
372
+ let result = '';
373
+ if (value?.length) {
374
+ value.forEach(item => {
375
+ result += item?.TransportType?.name['es'] + ', ';
376
+ });
377
+ result = result.substring(0, result?.length - 2);
378
+ }
379
+ return result;
380
+ }
381
+ }
382
+ ShowTransportTypesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowTransportTypesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
383
+ ShowTransportTypesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ShowTransportTypesPipe, name: "showTransportTypes" });
384
+ ShowTransportTypesPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowTransportTypesPipe });
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ShowTransportTypesPipe, decorators: [{
386
+ type: Injectable
387
+ }, {
388
+ type: Pipe,
389
+ args: [{ name: 'showTransportTypes' }]
390
+ }] });
391
+
392
+ class ResolvePropertyPath {
393
+ constructor(_showSegmentPipe, _showRolesPipe, _showTransportTypesPipe, _idaReturnPipe, _currencyPipe, _humanizeDurationPipe, _upperCasePipe, _durationPipe) {
394
+ this._showSegmentPipe = _showSegmentPipe;
395
+ this._showRolesPipe = _showRolesPipe;
396
+ this._showTransportTypesPipe = _showTransportTypesPipe;
397
+ this._idaReturnPipe = _idaReturnPipe;
398
+ this._currencyPipe = _currencyPipe;
399
+ this._humanizeDurationPipe = _humanizeDurationPipe;
400
+ this._upperCasePipe = _upperCasePipe;
401
+ this._durationPipe = _durationPipe;
402
+ }
403
+ transform(obj, path) {
404
+ let result = '';
405
+ path?.forEach(item => {
406
+ if (item?.type === 'divider') {
407
+ result += item?.divider;
408
+ }
409
+ else {
410
+ if (item?.path) {
411
+ let value = UtilsService.resolvePropertyByPath(obj, item.path);
412
+ switch (item?.customPipe) {
413
+ case CustomPipes.SHOW_SEGMENTS:
414
+ value = this._showSegmentPipe.transform(value);
415
+ break;
416
+ case CustomPipes.DURATION_TIME:
417
+ value = this._durationPipe.transform(value);
418
+ break;
419
+ case CustomPipes.HUMANIZE_DURATION:
420
+ value = this._humanizeDurationPipe.transform(value);
421
+ break;
422
+ case CustomPipes.SHOW_TRANSPORT_TYPES:
423
+ value = this._showTransportTypesPipe.transform(value);
424
+ break;
425
+ case CustomPipes.SHOW_ROLES:
426
+ value = this._showRolesPipe.transform(value);
427
+ break;
428
+ case CustomPipes.IDA_RETURN:
429
+ value = this._idaReturnPipe.transform(value);
430
+ break;
431
+ case CustomPipes.CURRENCY:
432
+ value = this._currencyPipe.transform(value);
433
+ break;
434
+ case CustomPipes.UPPERCASE:
435
+ value = this._upperCasePipe.transform(value);
436
+ break;
437
+ default:
438
+ break;
439
+ }
440
+ result += value;
441
+ }
442
+ }
443
+ });
444
+ return result;
445
+ }
446
+ }
447
+ ResolvePropertyPath.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResolvePropertyPath, deps: [{ token: ShowSegmentsPipe }, { token: ShowRolesPipe }, { token: ShowTransportTypesPipe }, { token: IdaReturnPipe }, { token: i3.CurrencyPipe }, { token: HumanizeDurationPipe }, { token: i3.UpperCasePipe }, { token: DurationTimePipe }], target: i0.ɵɵFactoryTarget.Pipe });
448
+ ResolvePropertyPath.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ResolvePropertyPath, name: "resolvePropertyPath" });
449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResolvePropertyPath, decorators: [{
450
+ type: Pipe,
451
+ args: [{ name: 'resolvePropertyPath' }]
452
+ }], ctorParameters: function () { return [{ type: ShowSegmentsPipe }, { type: ShowRolesPipe }, { type: ShowTransportTypesPipe }, { type: IdaReturnPipe }, { type: i3.CurrencyPipe }, { type: HumanizeDurationPipe }, { type: i3.UpperCasePipe }, { type: DurationTimePipe }]; } });
453
+
454
+ class GuajiritosGeneralAutocompleteComponent {
455
+ constructor(_autocompleteService, _cdRef, translateService) {
456
+ this._autocompleteService = _autocompleteService;
457
+ this._cdRef = _cdRef;
458
+ this.translateService = translateService;
459
+ this.unsubscribeAll$ = new Subject();
460
+ this.firstCall = true;
461
+ this.restrictionsFilters = [];
462
+ this.required = true;
463
+ this.component = new FormControl({
464
+ value: null, disabled: false
465
+ });
466
+ this.disabled = false;
467
+ this.loading = false;
468
+ /**
469
+ * Possible values 'never', 'auto' or 'always'
470
+ */
471
+ this.floatLabel = 'auto';
472
+ this.debounceTimeValue = 250;
473
+ this.label = 'Selecciona un elemento';
474
+ this.field = ['name'];
475
+ this.filterString = 'filter[$and][name][$like]';
476
+ this.displayOptions = GENERAL_DISPLAY_OPTIONS;
477
+ this.withoutPaddingBottom = true;
478
+ this.valueId = false;
479
+ this.disable = false;
480
+ this.order = null;
481
+ this.removeProperties = [];
482
+ this.SelectElement = new EventEmitter();
483
+ this.onChanged = () => {
484
+ };
485
+ this.onTouched = () => {
486
+ };
487
+ this.displayFn = (value) => {
488
+ if (value) {
489
+ if (typeof value === 'string') {
490
+ return value;
491
+ }
492
+ let displayText = '';
493
+ if (!this.displayOptions) {
494
+ this.displayOptions = GENERAL_DISPLAY_OPTIONS;
495
+ }
496
+ this.displayOptions?.firthLabel?.forEach((field) => {
497
+ if (field?.type === 'path') {
498
+ displayText += UtilsService.resolvePropertyByPath(value, field?.path);
499
+ }
500
+ else {
501
+ displayText += field?.divider;
502
+ }
503
+ });
504
+ return displayText;
505
+ }
506
+ };
507
+ }
508
+ set url(data) {
509
+ if (data) {
510
+ this._url = data;
511
+ this.subscribeComponentChanges();
512
+ }
513
+ }
514
+ set clearData(value) {
515
+ this.clearData$ = value;
516
+ if (this.clearData$) {
517
+ this.clearData$
518
+ .pipe(takeUntil(this.unsubscribeAll$))
519
+ .subscribe(() => {
520
+ this.component.setValue(null);
521
+ this.selectedElement = null;
522
+ this.SelectElement.emit(null);
523
+ this.filteredOptions = [];
524
+ this.onChanged(null);
525
+ });
526
+ }
527
+ }
528
+ set initialValue(value) {
529
+ this.component.setValue(value);
530
+ }
531
+ set restrictions(value) {
532
+ if (value) {
533
+ this.restrictionsFilters = value;
534
+ }
535
+ else {
536
+ this.restrictionsFilters = [];
537
+ }
538
+ }
539
+ set isRequired(value) {
540
+ this.required = value;
541
+ if (this.required) {
542
+ this.component.setValidators([Validators.required, GuajiritosGeneralAutocompleteComponent.ValidateAutocomplete]);
543
+ }
544
+ else {
545
+ this.component.clearValidators();
546
+ }
547
+ this.component.updateValueAndValidity();
548
+ }
549
+ get doFocus() {
550
+ return this.doFocusSubject;
551
+ }
552
+ set doFocus(value) {
553
+ this.doFocusSubject = value;
554
+ if (value) {
555
+ this.doFocusSubject
556
+ .pipe(takeUntil(this.unsubscribeAll$))
557
+ .subscribe(() => {
558
+ setTimeout(() => {
559
+ this.inputText.nativeElement.focus();
560
+ }, 500);
561
+ });
562
+ }
563
+ }
564
+ static ValidateAutocomplete(control) {
565
+ if (control?.value?.constructor !== Object || !control?.value?.id) {
566
+ return { invalidSelection: true };
567
+ }
568
+ return null;
569
+ }
570
+ subscribeComponentChanges() {
571
+ this.component?.valueChanges
572
+ ?.pipe(debounceTime(this.debounceTimeValue), takeUntil(this.unsubscribeAll$))
573
+ ?.subscribe(() => {
574
+ if (!this.firstCall) {
575
+ this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());
576
+ }
577
+ else {
578
+ this.firstCall = false;
579
+ }
580
+ });
581
+ }
582
+ getAutocompleteByTextHandler(text) {
583
+ this._autocompleteService
584
+ .getAutocompleteByText(this._url, text, this.filterString, this.restrictionsFilters, this.removeProperties, this.order, this.bodyRequest)
585
+ .then((resp) => {
586
+ resp?.subscribe((result) => {
587
+ this.filteredOptions = result?.data;
588
+ this.loading = false;
589
+ this._cdRef.detectChanges();
590
+ });
591
+ });
592
+ }
593
+ getAutocompleteSearchText() {
594
+ this.loading = true;
595
+ let text = null;
596
+ if (this.component?.value) {
597
+ if (typeof this.component.value === 'object') {
598
+ const componentValue = this.component?.value[this.field[0]];
599
+ if (typeof componentValue === 'object') {
600
+ let lang = 'es';
601
+ if (this.field[1]) {
602
+ lang = this.field[1];
603
+ }
604
+ text = componentValue[lang];
605
+ }
606
+ }
607
+ else if (typeof this.component?.value === 'string') {
608
+ text = this.component.value;
609
+ }
610
+ }
611
+ return text;
612
+ }
613
+ clear(trigger) {
614
+ this.component.setValue(null);
615
+ this.selectedElement = null;
616
+ this.SelectElement.emit(null);
617
+ this._cdRef.detectChanges();
618
+ this.onChanged(null);
619
+ setTimeout(() => {
620
+ trigger.openPanel();
621
+ this._cdRef.detectChanges();
622
+ }, 200);
623
+ }
624
+ onFocus() {
625
+ this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());
626
+ }
627
+ onSelectElement(item) {
628
+ this.selectedElement = item;
629
+ this.SelectElement.emit(item);
630
+ this.value = item;
631
+ if (this.valueId) {
632
+ this.onChanged(item?.id);
633
+ }
634
+ else {
635
+ this.onChanged(item);
636
+ }
637
+ this._cdRef.detectChanges();
638
+ }
639
+ writeValue(value) {
640
+ if (value) {
641
+ if (typeof value === 'number') {
642
+ this.value = value;
643
+ }
644
+ else if (typeof value === 'object') {
645
+ this.component.setValue(value);
646
+ this.value = value.id;
647
+ }
648
+ else {
649
+ this.value = value;
650
+ }
651
+ }
652
+ else {
653
+ this.value = null;
654
+ }
655
+ this._cdRef.detectChanges();
656
+ }
657
+ registerOnChange(fn) {
658
+ this.onChanged = fn;
659
+ this._cdRef.detectChanges();
660
+ }
661
+ registerOnTouched(fn) {
662
+ this.onTouched = fn;
663
+ this._cdRef.detectChanges();
664
+ }
665
+ setDisabledState(isDisabled) {
666
+ this.disabled = isDisabled;
667
+ this._cdRef.detectChanges();
668
+ }
669
+ ngOnInit() {
670
+ this.component.markAllAsTouched();
671
+ }
672
+ ngOnDestroy() {
673
+ this.unsubscribeAll$.next();
674
+ this.unsubscribeAll$.complete();
675
+ }
676
+ }
677
+ GuajiritosGeneralAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: GuajiritosGeneralAutocompleteComponent, deps: [{ token: AutocompleteService }, { token: i0.ChangeDetectorRef }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
678
+ GuajiritosGeneralAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: GuajiritosGeneralAutocompleteComponent, selector: "guajiritos-general-autocomplete", inputs: { floatLabel: "floatLabel", bodyRequest: "bodyRequest", debounceTimeValue: "debounceTimeValue", detailsTemplate: "detailsTemplate", label: "label", field: "field", filterString: "filterString", displayOptions: "displayOptions", withoutPaddingBottom: "withoutPaddingBottom", valueId: "valueId", disable: "disable", order: "order", removeProperties: "removeProperties", url: "url", clearData: "clearData", initialValue: "initialValue", restrictions: "restrictions", isRequired: "isRequired", doFocus: "doFocus" }, outputs: { SelectElement: "SelectElement" }, providers: [
679
+ {
680
+ provide: NG_VALUE_ACCESSOR,
681
+ useExisting: forwardRef(() => GuajiritosGeneralAutocompleteComponent),
682
+ multi: true
683
+ }
684
+ ], viewQueries: [{ propertyName: "inputText", first: true, predicate: ["inputText"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" [ngClass]=\"{'without-padding-bottom': withoutPaddingBottom}\"\r\n appearance=\"outline\" class=\"w-100\" color=\"accent\">\r\n\r\n <mat-label>{{label | translate}}</mat-label>\r\n <input #inputText #trigger=\"matAutocompleteTrigger\" (blur)=\"onTouched()\" (focus)=\"onFocus()\" [disabled]=\"disable\"\r\n [formControl]=\"component\" [matAutocomplete]=\"autocomplete\" [placeholder]=\"label | translate\"\r\n aria-label=\"Number\" autocomplete=\"off\" matInput type=\"text\">\r\n <button (click)=\"clear(trigger)\" *ngIf=\"!loading && component?.value\" [disabled]=\"disable\" aria-label=\"Clear\"\r\n mat-icon-button matSuffix>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <button *ngIf=\"loading\" aria-label=\"Clear\" mat-icon-button matSuffix>\r\n <mat-spinner [value]=\"90\" color=\"accent\" diameter=\"25\"></mat-spinner>\r\n </button>\r\n <mat-autocomplete #autocomplete=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option\"\r\n (onSelectionChange)=\"onSelectElement(option)\">\r\n\r\n <ng-container *ngIf=\"!displayOptions && !detailsTemplate\">\r\n {{ option?.name | i18nField: translateService.currentLang }}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!detailsTemplate\">\r\n <div class=\"display-options\">\r\n <span [ngStyle]=\"{'line-height': displayOptions?.secondLabel ? '16px' : ''}\">\r\n {{option | resolvePropertyPath:displayOptions?.firthLabel | i18nField: translateService.currentLang}}\r\n </span>\r\n <span *ngIf=\"displayOptions?.secondLabel\" class=\"mat-caption\">\r\n {{option | resolvePropertyPath: displayOptions?.secondLabel | i18nField: translateService.currentLang}}\r\n </span>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"detailsTemplate\">\r\n <ng-container *ngTemplateOutlet=\"detailsTemplate;context:{$implicit: option }\"></ng-container>\r\n </ng-container>\r\n\r\n </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n", styles: ["::ng-deep .without-padding-bottom .mat-form-field-wrapper{padding-bottom:0!important}.w-100{width:100%}.display-options{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i11.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i10.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "pipe", type: I18nFieldPipe, name: "i18nField" }, { kind: "pipe", type: ResolvePropertyPath, name: "resolvePropertyPath" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: GuajiritosGeneralAutocompleteComponent, decorators: [{
686
+ type: Component,
687
+ args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
688
+ {
689
+ provide: NG_VALUE_ACCESSOR,
690
+ useExisting: forwardRef(() => GuajiritosGeneralAutocompleteComponent),
691
+ multi: true
692
+ }
693
+ ], template: "<mat-form-field [floatLabel]=\"floatLabel\" [ngClass]=\"{'without-padding-bottom': withoutPaddingBottom}\"\r\n appearance=\"outline\" class=\"w-100\" color=\"accent\">\r\n\r\n <mat-label>{{label | translate}}</mat-label>\r\n <input #inputText #trigger=\"matAutocompleteTrigger\" (blur)=\"onTouched()\" (focus)=\"onFocus()\" [disabled]=\"disable\"\r\n [formControl]=\"component\" [matAutocomplete]=\"autocomplete\" [placeholder]=\"label | translate\"\r\n aria-label=\"Number\" autocomplete=\"off\" matInput type=\"text\">\r\n <button (click)=\"clear(trigger)\" *ngIf=\"!loading && component?.value\" [disabled]=\"disable\" aria-label=\"Clear\"\r\n mat-icon-button matSuffix>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <button *ngIf=\"loading\" aria-label=\"Clear\" mat-icon-button matSuffix>\r\n <mat-spinner [value]=\"90\" color=\"accent\" diameter=\"25\"></mat-spinner>\r\n </button>\r\n <mat-autocomplete #autocomplete=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option\"\r\n (onSelectionChange)=\"onSelectElement(option)\">\r\n\r\n <ng-container *ngIf=\"!displayOptions && !detailsTemplate\">\r\n {{ option?.name | i18nField: translateService.currentLang }}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!detailsTemplate\">\r\n <div class=\"display-options\">\r\n <span [ngStyle]=\"{'line-height': displayOptions?.secondLabel ? '16px' : ''}\">\r\n {{option | resolvePropertyPath:displayOptions?.firthLabel | i18nField: translateService.currentLang}}\r\n </span>\r\n <span *ngIf=\"displayOptions?.secondLabel\" class=\"mat-caption\">\r\n {{option | resolvePropertyPath: displayOptions?.secondLabel | i18nField: translateService.currentLang}}\r\n </span>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"detailsTemplate\">\r\n <ng-container *ngTemplateOutlet=\"detailsTemplate;context:{$implicit: option }\"></ng-container>\r\n </ng-container>\r\n\r\n </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n", styles: ["::ng-deep .without-padding-bottom .mat-form-field-wrapper{padding-bottom:0!important}.w-100{width:100%}.display-options{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}\n"] }]
694
+ }], ctorParameters: function () { return [{ type: AutocompleteService }, { type: i0.ChangeDetectorRef }, { type: i2.TranslateService }]; }, propDecorators: { inputText: [{
695
+ type: ViewChild,
696
+ args: ['inputText', { static: true }]
697
+ }], floatLabel: [{
698
+ type: Input
699
+ }], bodyRequest: [{
700
+ type: Input
701
+ }], debounceTimeValue: [{
702
+ type: Input
703
+ }], detailsTemplate: [{
704
+ type: Input
705
+ }], label: [{
706
+ type: Input
707
+ }], field: [{
708
+ type: Input
709
+ }], filterString: [{
710
+ type: Input
711
+ }], displayOptions: [{
712
+ type: Input
713
+ }], withoutPaddingBottom: [{
714
+ type: Input
715
+ }], valueId: [{
716
+ type: Input
717
+ }], disable: [{
718
+ type: Input
719
+ }], order: [{
720
+ type: Input
721
+ }], removeProperties: [{
722
+ type: Input
723
+ }], SelectElement: [{
724
+ type: Output
725
+ }], url: [{
726
+ type: Input
727
+ }], clearData: [{
728
+ type: Input
729
+ }], initialValue: [{
730
+ type: Input
731
+ }], restrictions: [{
732
+ type: Input
733
+ }], isRequired: [{
734
+ type: Input
735
+ }], doFocus: [{
736
+ type: Input
737
+ }] } });
738
+
739
+ class PipesModule {
740
+ }
741
+ PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
742
+ PipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: PipesModule, declarations: [DurationTimePipe,
743
+ I18nFieldPipe,
744
+ ResolvePropertyPath,
745
+ HumanizeDurationPipe,
746
+ IdaReturnPipe,
747
+ ShowRolesPipe,
748
+ ShowSegmentsPipe,
749
+ ShowTransportTypesPipe], imports: [CommonModule], exports: [DurationTimePipe,
750
+ I18nFieldPipe,
751
+ ResolvePropertyPath,
752
+ HumanizeDurationPipe,
753
+ IdaReturnPipe,
754
+ ShowRolesPipe,
755
+ ShowSegmentsPipe,
756
+ ShowTransportTypesPipe] });
757
+ PipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: PipesModule, providers: [
758
+ DurationTimePipe,
759
+ HumanizeDurationPipe,
760
+ I18nFieldPipe,
761
+ IdaReturnPipe,
762
+ ResolvePropertyPath,
763
+ ShowRolesPipe,
764
+ ShowSegmentsPipe,
765
+ ShowTransportTypesPipe
766
+ ], imports: [CommonModule] });
767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: PipesModule, decorators: [{
768
+ type: NgModule,
769
+ args: [{
770
+ declarations: [
771
+ DurationTimePipe,
772
+ I18nFieldPipe,
773
+ ResolvePropertyPath,
774
+ HumanizeDurationPipe,
775
+ IdaReturnPipe,
776
+ ShowRolesPipe,
777
+ ShowSegmentsPipe,
778
+ ShowTransportTypesPipe
779
+ ],
780
+ exports: [
781
+ DurationTimePipe,
782
+ I18nFieldPipe,
783
+ ResolvePropertyPath,
784
+ HumanizeDurationPipe,
785
+ IdaReturnPipe,
786
+ ShowRolesPipe,
787
+ ShowSegmentsPipe,
788
+ ShowTransportTypesPipe
789
+ ],
790
+ imports: [
791
+ CommonModule
792
+ ],
793
+ providers: [
794
+ DurationTimePipe,
795
+ HumanizeDurationPipe,
796
+ I18nFieldPipe,
797
+ IdaReturnPipe,
798
+ ResolvePropertyPath,
799
+ ShowRolesPipe,
800
+ ShowSegmentsPipe,
801
+ ShowTransportTypesPipe
802
+ ]
803
+ }]
804
+ }] });
805
+
806
+ class GuajiritosGeneralAutocompleteModule {
807
+ }
808
+ GuajiritosGeneralAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
809
+ GuajiritosGeneralAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, declarations: [GuajiritosGeneralAutocompleteComponent], imports: [CommonModule,
810
+ TranslateModule,
811
+ FormsModule,
812
+ ReactiveFormsModule,
813
+ MatFormFieldModule,
814
+ MatIconModule,
815
+ MatProgressSpinnerModule,
816
+ MatButtonModule,
817
+ MatInputModule,
818
+ MatAutocompleteModule,
819
+ PipesModule], exports: [GuajiritosGeneralAutocompleteComponent] });
820
+ GuajiritosGeneralAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, providers: [
821
+ UpperCasePipe,
822
+ CurrencyPipe,
823
+ AutocompleteService
824
+ ], imports: [CommonModule,
825
+ TranslateModule,
826
+ FormsModule,
827
+ ReactiveFormsModule,
828
+ MatFormFieldModule,
829
+ MatIconModule,
830
+ MatProgressSpinnerModule,
831
+ MatButtonModule,
832
+ MatInputModule,
833
+ MatAutocompleteModule,
834
+ PipesModule] });
835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, decorators: [{
836
+ type: NgModule,
837
+ args: [{
838
+ declarations: [
839
+ GuajiritosGeneralAutocompleteComponent
840
+ ],
841
+ imports: [
842
+ CommonModule,
843
+ TranslateModule,
844
+ FormsModule,
845
+ ReactiveFormsModule,
846
+ MatFormFieldModule,
847
+ MatIconModule,
848
+ MatProgressSpinnerModule,
849
+ MatButtonModule,
850
+ MatInputModule,
851
+ MatAutocompleteModule,
852
+ PipesModule
853
+ ],
854
+ providers: [
855
+ UpperCasePipe,
856
+ CurrencyPipe,
857
+ AutocompleteService
858
+ ],
859
+ exports: [
860
+ GuajiritosGeneralAutocompleteComponent
861
+ ]
862
+ }]
863
+ }] });
864
+
865
+ /*
866
+ * Public API Surface of guachos-general-autocomplete
867
+ */
868
+
869
+ /**
870
+ * Generated bundle index. Do not edit.
871
+ */
872
+
873
+ export { CustomPipes, GuajiritosGeneralAutocompleteComponent, GuajiritosGeneralAutocompleteModule };
874
+ //# sourceMappingURL=guajiritos-general-autocomplete.mjs.map