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