@guajiritos/general-autocomplete 0.0.11 → 0.1.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 +3 -7
- package/esm2022/lib/guachos-general-autocomplete.component.mjs +352 -0
- package/esm2022/public-api.mjs +7 -0
- package/{esm2020 → esm2022}/utils/pipes/duration.pipe.mjs +5 -5
- package/{esm2020 → esm2022}/utils/pipes/humanize-duration.pipe.mjs +4 -4
- package/{esm2020 → esm2022}/utils/pipes/i18n-field.pipe.mjs +4 -4
- package/{esm2020 → esm2022}/utils/pipes/ida-return.pipe.mjs +5 -5
- package/esm2022/utils/pipes/pipes.module.mjs +84 -0
- package/esm2022/utils/pipes/resolve-property-path.pipe.mjs +80 -0
- package/{esm2020 → esm2022}/utils/pipes/show-roles.pipe.mjs +5 -5
- package/{esm2020 → esm2022}/utils/pipes/show-segments.pipe.mjs +5 -5
- package/{esm2020 → esm2022}/utils/pipes/show-transport-types.pipe.mjs +5 -5
- package/{esm2020 → esm2022}/utils/services/autocomplete.service.mjs +4 -4
- package/{esm2020 → esm2022}/utils/services/utils.service.mjs +4 -4
- package/{fesm2020 → fesm2022}/guajiritos-general-autocomplete.mjs +227 -224
- package/fesm2022/guajiritos-general-autocomplete.mjs.map +1 -0
- package/lib/guachos-general-autocomplete.component.d.ts +20 -18
- package/package.json +5 -11
- package/public-api.d.ts +0 -1
- package/utils/pipes/pipes.module.d.ts +15 -0
- package/esm2020/lib/guachos-general-autocomplete.component.mjs +0 -327
- package/esm2020/lib/guachos-general-autocomplete.module.mjs +0 -109
- package/esm2020/public-api.mjs +0 -8
- package/esm2020/utils/pipes/resolve-property-path.pipe.mjs +0 -80
- package/fesm2015/guajiritos-general-autocomplete.mjs +0 -862
- package/fesm2015/guajiritos-general-autocomplete.mjs.map +0 -1
- package/fesm2020/guajiritos-general-autocomplete.mjs.map +0 -1
- package/lib/guachos-general-autocomplete.module.d.ts +0 -24
- /package/{esm2020 → esm2022}/guajiritos-general-autocomplete.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/constants/contacts.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/interfaces/interfaces.mjs +0 -0
@@ -1,29 +1,29 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Injectable, Pipe, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ViewChild, Input, Output
|
3
|
-
import * as
|
4
|
-
import { UntypedFormControl, Validators, NG_VALUE_ACCESSOR,
|
2
|
+
import { Injectable, Pipe, NgModule, signal, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ViewChild, Input, Output } from '@angular/core';
|
3
|
+
import * as i7 from '@angular/forms';
|
4
|
+
import { UntypedFormControl, Validators, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
5
|
+
import * as i4 from '@angular/material/autocomplete';
|
6
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
7
|
+
import * as i3 from '@angular/material/form-field';
|
8
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
5
9
|
import * as i2 from '@ngx-translate/core';
|
6
10
|
import { TranslateModule } from '@ngx-translate/core';
|
7
11
|
import { Subject, takeUntil, debounceTime } from 'rxjs';
|
12
|
+
import * as i5 from '@angular/common';
|
13
|
+
import { CurrencyPipe, UpperCasePipe, NgClass, NgIf, NgForOf, NgStyle, NgTemplateOutlet } from '@angular/common';
|
14
|
+
import * as i6 from '@angular/material/input';
|
15
|
+
import { MatInputModule } from '@angular/material/input';
|
16
|
+
import * as i8 from '@angular/material/button';
|
17
|
+
import { MatButtonModule } from '@angular/material/button';
|
18
|
+
import * as i9 from '@angular/material/icon';
|
19
|
+
import { MatIconModule } from '@angular/material/icon';
|
20
|
+
import * as i10 from '@angular/material/progress-spinner';
|
21
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
8
22
|
import * as i1 from '@angular/common/http';
|
9
23
|
import { HttpParams } from '@angular/common/http';
|
10
24
|
import { map } from 'rxjs/operators';
|
11
25
|
import merge from 'lodash.merge';
|
12
|
-
import * as
|
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';
|
26
|
+
import * as i5$1 from '@angular/material/core';
|
27
27
|
|
28
28
|
var CustomPipes;
|
29
29
|
(function (CustomPipes) {
|
@@ -192,10 +192,10 @@ class AutocompleteService {
|
|
192
192
|
return result;
|
193
193
|
}));
|
194
194
|
}
|
195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: AutocompleteService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
196
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: AutocompleteService, providedIn: 'root' }); }
|
195
197
|
}
|
196
|
-
|
197
|
-
AutocompleteService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: AutocompleteService, providedIn: 'root' });
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: AutocompleteService, decorators: [{
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: AutocompleteService, decorators: [{
|
199
199
|
type: Injectable,
|
200
200
|
args: [{
|
201
201
|
providedIn: 'root'
|
@@ -238,16 +238,45 @@ class UtilsService {
|
|
238
238
|
return prev ? prev[curr] : null;
|
239
239
|
}, obj || self);
|
240
240
|
}
|
241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
242
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: UtilsService, providedIn: 'root' }); }
|
241
243
|
}
|
242
|
-
|
243
|
-
UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UtilsService, providedIn: 'root' });
|
244
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UtilsService, decorators: [{
|
244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: UtilsService, decorators: [{
|
245
245
|
type: Injectable,
|
246
246
|
args: [{
|
247
247
|
providedIn: 'root'
|
248
248
|
}]
|
249
249
|
}] });
|
250
250
|
|
251
|
+
class DurationTimePipe {
|
252
|
+
transform(value) {
|
253
|
+
return UtilsService.getTimePretty(value);
|
254
|
+
}
|
255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DurationTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
256
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: DurationTimePipe, name: "durationTime" }); }
|
257
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DurationTimePipe }); }
|
258
|
+
}
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DurationTimePipe, decorators: [{
|
260
|
+
type: Injectable
|
261
|
+
}, {
|
262
|
+
type: Pipe,
|
263
|
+
args: [{ name: 'durationTime' }]
|
264
|
+
}] });
|
265
|
+
|
266
|
+
class HumanizeDurationPipe {
|
267
|
+
transform(input) {
|
268
|
+
return UtilsService.humanizeDuration(input);
|
269
|
+
}
|
270
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: HumanizeDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
271
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: HumanizeDurationPipe, name: "humanizeDuration" }); }
|
272
|
+
}
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: HumanizeDurationPipe, decorators: [{
|
274
|
+
type: Pipe,
|
275
|
+
args: [{
|
276
|
+
name: 'humanizeDuration'
|
277
|
+
}]
|
278
|
+
}] });
|
279
|
+
|
251
280
|
class I18nFieldPipe {
|
252
281
|
transform(value, lang) {
|
253
282
|
if (!value) {
|
@@ -266,43 +295,14 @@ class I18nFieldPipe {
|
|
266
295
|
}
|
267
296
|
return value[lang] || 'No está definido';
|
268
297
|
}
|
298
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: I18nFieldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
299
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: I18nFieldPipe, name: "i18nField" }); }
|
269
300
|
}
|
270
|
-
|
271
|
-
I18nFieldPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: I18nFieldPipe, name: "i18nField" });
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: I18nFieldPipe, decorators: [{
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: I18nFieldPipe, decorators: [{
|
273
302
|
type: Pipe,
|
274
303
|
args: [{ name: 'i18nField' }]
|
275
304
|
}] });
|
276
305
|
|
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.5", ngImport: i0, type: DurationTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
283
|
-
DurationTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: DurationTimePipe, name: "durationTime" });
|
284
|
-
DurationTimePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: DurationTimePipe });
|
285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", 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.5", ngImport: i0, type: HumanizeDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
298
|
-
HumanizeDurationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: HumanizeDurationPipe, name: "humanizeDuration" });
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: HumanizeDurationPipe, decorators: [{
|
300
|
-
type: Pipe,
|
301
|
-
args: [{
|
302
|
-
name: 'humanizeDuration'
|
303
|
-
}]
|
304
|
-
}] });
|
305
|
-
|
306
306
|
class IdaReturnPipe {
|
307
307
|
transform(value) {
|
308
308
|
if (value === CustomPipes.IDA_RETURN) {
|
@@ -312,11 +312,11 @@ class IdaReturnPipe {
|
|
312
312
|
return 'solo Ida';
|
313
313
|
}
|
314
314
|
}
|
315
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: IdaReturnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
316
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: IdaReturnPipe, name: "idaReturn" }); }
|
317
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: IdaReturnPipe }); }
|
315
318
|
}
|
316
|
-
|
317
|
-
IdaReturnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: IdaReturnPipe, name: "idaReturn" });
|
318
|
-
IdaReturnPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: IdaReturnPipe });
|
319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: IdaReturnPipe, decorators: [{
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: IdaReturnPipe, decorators: [{
|
320
320
|
type: Injectable
|
321
321
|
}, {
|
322
322
|
type: Pipe,
|
@@ -334,11 +334,11 @@ class ShowRolesPipe {
|
|
334
334
|
}
|
335
335
|
return result;
|
336
336
|
}
|
337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowRolesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
338
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: ShowRolesPipe, name: "showSegments" }); }
|
339
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowRolesPipe }); }
|
337
340
|
}
|
338
|
-
|
339
|
-
ShowRolesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: ShowRolesPipe, name: "showSegments" });
|
340
|
-
ShowRolesPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ShowRolesPipe });
|
341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ShowRolesPipe, decorators: [{
|
341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowRolesPipe, decorators: [{
|
342
342
|
type: Injectable
|
343
343
|
}, {
|
344
344
|
type: Pipe,
|
@@ -356,11 +356,11 @@ class ShowSegmentsPipe {
|
|
356
356
|
}
|
357
357
|
return result;
|
358
358
|
}
|
359
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowSegmentsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
360
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: ShowSegmentsPipe, name: "showSegments" }); }
|
361
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowSegmentsPipe }); }
|
359
362
|
}
|
360
|
-
|
361
|
-
ShowSegmentsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: ShowSegmentsPipe, name: "showSegments" });
|
362
|
-
ShowSegmentsPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ShowSegmentsPipe });
|
363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ShowSegmentsPipe, decorators: [{
|
363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowSegmentsPipe, decorators: [{
|
364
364
|
type: Injectable
|
365
365
|
}, {
|
366
366
|
type: Pipe,
|
@@ -378,11 +378,11 @@ class ShowTransportTypesPipe {
|
|
378
378
|
}
|
379
379
|
return result;
|
380
380
|
}
|
381
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowTransportTypesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
382
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: ShowTransportTypesPipe, name: "showTransportTypes" }); }
|
383
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowTransportTypesPipe }); }
|
381
384
|
}
|
382
|
-
|
383
|
-
ShowTransportTypesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: ShowTransportTypesPipe, name: "showTransportTypes" });
|
384
|
-
ShowTransportTypesPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ShowTransportTypesPipe });
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ShowTransportTypesPipe, decorators: [{
|
385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ShowTransportTypesPipe, decorators: [{
|
386
386
|
type: Injectable
|
387
387
|
}, {
|
388
388
|
type: Pipe,
|
@@ -402,7 +402,7 @@ class ResolvePropertyPath {
|
|
402
402
|
}
|
403
403
|
transform(obj, path) {
|
404
404
|
let result = '';
|
405
|
-
path?.forEach(item => {
|
405
|
+
path?.forEach((item) => {
|
406
406
|
if (item?.type === 'divider') {
|
407
407
|
result += item?.divider;
|
408
408
|
}
|
@@ -443,35 +443,113 @@ class ResolvePropertyPath {
|
|
443
443
|
});
|
444
444
|
return result;
|
445
445
|
}
|
446
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ResolvePropertyPath, deps: [{ token: ShowSegmentsPipe }, { token: ShowRolesPipe }, { token: ShowTransportTypesPipe }, { token: IdaReturnPipe }, { token: i5.CurrencyPipe }, { token: HumanizeDurationPipe }, { token: i5.UpperCasePipe }, { token: DurationTimePipe }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
447
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: ResolvePropertyPath, name: "resolvePropertyPath" }); }
|
446
448
|
}
|
447
|
-
|
448
|
-
ResolvePropertyPath.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: ResolvePropertyPath, name: "resolvePropertyPath" });
|
449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ResolvePropertyPath, decorators: [{
|
449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ResolvePropertyPath, decorators: [{
|
450
450
|
type: Pipe,
|
451
451
|
args: [{ name: 'resolvePropertyPath' }]
|
452
|
-
}], ctorParameters: function () { return [{ type: ShowSegmentsPipe }, { type: ShowRolesPipe }, { type: ShowTransportTypesPipe }, { type: IdaReturnPipe }, { type:
|
452
|
+
}], ctorParameters: function () { return [{ type: ShowSegmentsPipe }, { type: ShowRolesPipe }, { type: ShowTransportTypesPipe }, { type: IdaReturnPipe }, { type: i5.CurrencyPipe }, { type: HumanizeDurationPipe }, { type: i5.UpperCasePipe }, { type: DurationTimePipe }]; } });
|
453
453
|
|
454
|
-
class
|
455
|
-
|
454
|
+
class PipesModule {
|
455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
456
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: PipesModule, declarations: [DurationTimePipe,
|
457
|
+
HumanizeDurationPipe,
|
458
|
+
I18nFieldPipe,
|
459
|
+
IdaReturnPipe,
|
460
|
+
ResolvePropertyPath,
|
461
|
+
ShowRolesPipe,
|
462
|
+
ShowSegmentsPipe,
|
463
|
+
ShowTransportTypesPipe], imports: [CurrencyPipe,
|
464
|
+
UpperCasePipe], exports: [DurationTimePipe,
|
465
|
+
HumanizeDurationPipe,
|
466
|
+
I18nFieldPipe,
|
467
|
+
IdaReturnPipe,
|
468
|
+
ResolvePropertyPath,
|
469
|
+
ShowRolesPipe,
|
470
|
+
ShowSegmentsPipe,
|
471
|
+
ShowTransportTypesPipe] }); }
|
472
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: PipesModule, providers: [
|
473
|
+
DurationTimePipe,
|
474
|
+
HumanizeDurationPipe,
|
475
|
+
I18nFieldPipe,
|
476
|
+
IdaReturnPipe,
|
477
|
+
ResolvePropertyPath,
|
478
|
+
ShowRolesPipe,
|
479
|
+
ShowSegmentsPipe,
|
480
|
+
ShowTransportTypesPipe,
|
481
|
+
CurrencyPipe,
|
482
|
+
UpperCasePipe
|
483
|
+
] }); }
|
484
|
+
}
|
485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: PipesModule, decorators: [{
|
486
|
+
type: NgModule,
|
487
|
+
args: [{
|
488
|
+
declarations: [
|
489
|
+
DurationTimePipe,
|
490
|
+
HumanizeDurationPipe,
|
491
|
+
I18nFieldPipe,
|
492
|
+
IdaReturnPipe,
|
493
|
+
ResolvePropertyPath,
|
494
|
+
ShowRolesPipe,
|
495
|
+
ShowSegmentsPipe,
|
496
|
+
ShowTransportTypesPipe,
|
497
|
+
],
|
498
|
+
imports: [
|
499
|
+
CurrencyPipe,
|
500
|
+
UpperCasePipe
|
501
|
+
],
|
502
|
+
exports: [
|
503
|
+
DurationTimePipe,
|
504
|
+
HumanizeDurationPipe,
|
505
|
+
I18nFieldPipe,
|
506
|
+
IdaReturnPipe,
|
507
|
+
ResolvePropertyPath,
|
508
|
+
ShowRolesPipe,
|
509
|
+
ShowSegmentsPipe,
|
510
|
+
ShowTransportTypesPipe
|
511
|
+
],
|
512
|
+
providers: [
|
513
|
+
DurationTimePipe,
|
514
|
+
HumanizeDurationPipe,
|
515
|
+
I18nFieldPipe,
|
516
|
+
IdaReturnPipe,
|
517
|
+
ResolvePropertyPath,
|
518
|
+
ShowRolesPipe,
|
519
|
+
ShowSegmentsPipe,
|
520
|
+
ShowTransportTypesPipe,
|
521
|
+
CurrencyPipe,
|
522
|
+
UpperCasePipe
|
523
|
+
]
|
524
|
+
}]
|
525
|
+
}] });
|
526
|
+
|
527
|
+
class GuajiritosGeneralAutocomplete {
|
528
|
+
constructor(_autocompleteService, _zone, translateService) {
|
456
529
|
this._autocompleteService = _autocompleteService;
|
457
|
-
this._cdRef = _cdRef;
|
458
530
|
this._zone = _zone;
|
459
531
|
this.translateService = translateService;
|
460
532
|
this.unsubscribeAll$ = new Subject();
|
461
|
-
this.firstCall =
|
462
|
-
this.
|
463
|
-
this.
|
533
|
+
this.firstCall = signal(false);
|
534
|
+
this.selectedElement = signal(null);
|
535
|
+
this._url = signal(null);
|
536
|
+
this.restrictionsFilters = signal([]);
|
537
|
+
this.value = signal(null);
|
538
|
+
this.disabledButton = signal(false);
|
539
|
+
this.loading = signal(false);
|
540
|
+
this.required = signal(false);
|
541
|
+
this.filteredOptions = signal([]);
|
464
542
|
this.component = new UntypedFormControl({
|
465
543
|
value: null, disabled: false
|
466
544
|
});
|
467
|
-
this.disabledButton = false;
|
468
|
-
this.loading = false;
|
469
545
|
/**
|
470
546
|
* Possible values 'never', 'auto' or 'always'
|
471
547
|
*/
|
472
548
|
this.floatLabel = 'auto';
|
473
549
|
this.debounceTimeValue = 250;
|
474
550
|
this.label = 'Seleccione';
|
551
|
+
this.appearance = 'outline';
|
552
|
+
this.color = 'accent';
|
475
553
|
this.placeholder = 'Seleccione un elemento';
|
476
554
|
this.field = ['name'];
|
477
555
|
this.filterString = 'filter[$and][name][$like]';
|
@@ -507,18 +585,17 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
507
585
|
};
|
508
586
|
}
|
509
587
|
set disable(flag) {
|
510
|
-
this.disabledButton
|
588
|
+
this.disabledButton.set(flag);
|
511
589
|
if (flag) {
|
512
590
|
this.component.disable();
|
513
591
|
}
|
514
592
|
else {
|
515
593
|
this.component.enable();
|
516
594
|
}
|
517
|
-
this._cdRef.detectChanges();
|
518
595
|
}
|
519
596
|
set url(data) {
|
520
597
|
if (data) {
|
521
|
-
this._url
|
598
|
+
this._url.set(data);
|
522
599
|
this.subscribeComponentChanges();
|
523
600
|
}
|
524
601
|
}
|
@@ -530,9 +607,9 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
530
607
|
.subscribe({
|
531
608
|
next: () => {
|
532
609
|
this.component.setValue(null);
|
533
|
-
this.selectedElement
|
610
|
+
this.selectedElement.set(null);
|
534
611
|
this.SelectElement.emit(null);
|
535
|
-
this.filteredOptions
|
612
|
+
this.filteredOptions.set([]);
|
536
613
|
this.onChanged(null);
|
537
614
|
}
|
538
615
|
});
|
@@ -543,16 +620,16 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
543
620
|
}
|
544
621
|
set restrictions(value) {
|
545
622
|
if (value) {
|
546
|
-
this.restrictionsFilters
|
623
|
+
this.restrictionsFilters.set(value);
|
547
624
|
}
|
548
625
|
else {
|
549
|
-
this.restrictionsFilters
|
626
|
+
this.restrictionsFilters.set([]);
|
550
627
|
}
|
551
628
|
}
|
552
629
|
set isRequired(value) {
|
553
|
-
this.required
|
554
|
-
if (
|
555
|
-
this.component.setValidators([Validators.required,
|
630
|
+
this.required.set(value);
|
631
|
+
if (value) {
|
632
|
+
this.component.setValidators([Validators.required, GuajiritosGeneralAutocomplete.autocompleteValidator]);
|
556
633
|
}
|
557
634
|
else {
|
558
635
|
this.component.clearValidators();
|
@@ -571,48 +648,49 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
571
648
|
next: () => {
|
572
649
|
this._zone.run(() => {
|
573
650
|
setTimeout(() => {
|
574
|
-
this.inputText
|
651
|
+
this.inputText?.nativeElement?.focus();
|
575
652
|
}, 500);
|
576
653
|
});
|
577
654
|
}
|
578
655
|
});
|
579
656
|
}
|
580
657
|
}
|
581
|
-
static
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
658
|
+
static autocompleteValidator() {
|
659
|
+
return (control) => {
|
660
|
+
if (control?.value?.constructor !== Object || !control?.value?.id) {
|
661
|
+
return { invalidSelection: true };
|
662
|
+
}
|
663
|
+
return null;
|
664
|
+
};
|
586
665
|
}
|
587
666
|
subscribeComponentChanges() {
|
588
667
|
this.component?.valueChanges
|
589
668
|
?.pipe(debounceTime(this.debounceTimeValue), takeUntil(this.unsubscribeAll$))
|
590
669
|
?.subscribe({
|
591
670
|
next: () => {
|
592
|
-
if (!this.firstCall) {
|
671
|
+
if (!this.firstCall()) {
|
593
672
|
this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());
|
594
673
|
}
|
595
674
|
else {
|
596
|
-
this.firstCall
|
675
|
+
this.firstCall.set(false);
|
597
676
|
}
|
598
677
|
}
|
599
678
|
});
|
600
679
|
}
|
601
680
|
getAutocompleteByTextHandler(text) {
|
602
681
|
this._autocompleteService
|
603
|
-
.getAutocompleteByText(this._url, text, this.filterString, this.restrictionsFilters, this.removeProperties, this.order, this.bodyRequest)
|
682
|
+
.getAutocompleteByText(this._url(), text, this.filterString, this.restrictionsFilters(), this.removeProperties, this.order, this.bodyRequest)
|
604
683
|
.then((resp) => {
|
605
684
|
resp?.subscribe({
|
606
685
|
next: (result) => {
|
607
|
-
this.filteredOptions
|
608
|
-
this.loading
|
609
|
-
this._cdRef.detectChanges();
|
686
|
+
this.filteredOptions.set(result?.payload?.data ?? result?.data);
|
687
|
+
this.loading.set(false);
|
610
688
|
}
|
611
689
|
});
|
612
690
|
});
|
613
691
|
}
|
614
692
|
getAutocompleteSearchText() {
|
615
|
-
this.loading
|
693
|
+
this.loading.set(true);
|
616
694
|
let text = null;
|
617
695
|
if (this.component?.value) {
|
618
696
|
if (typeof this.component.value === 'object') {
|
@@ -634,56 +712,50 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
634
712
|
writeValue(value) {
|
635
713
|
if (value) {
|
636
714
|
if (typeof value === 'number') {
|
637
|
-
this.value
|
715
|
+
this.value.set(value);
|
638
716
|
}
|
639
717
|
else if (typeof value === 'object') {
|
640
718
|
this.component.setValue(value);
|
641
|
-
this.value
|
719
|
+
this.value.set(value.id);
|
642
720
|
}
|
643
721
|
else {
|
644
|
-
this.value
|
722
|
+
this.value.set(value);
|
645
723
|
}
|
646
724
|
}
|
647
725
|
else {
|
648
|
-
this.value
|
726
|
+
this.value.set(null);
|
649
727
|
}
|
650
|
-
this._cdRef.detectChanges();
|
651
728
|
}
|
652
729
|
registerOnChange(fn) {
|
653
730
|
this.onChanged = fn;
|
654
|
-
this._cdRef.detectChanges();
|
655
731
|
}
|
656
732
|
registerOnTouched(fn) {
|
657
733
|
this.onTouched = fn;
|
658
|
-
this._cdRef.detectChanges();
|
659
734
|
}
|
660
735
|
clear(trigger) {
|
661
736
|
this.component.setValue(null);
|
662
|
-
this.selectedElement
|
737
|
+
this.selectedElement.set(null);
|
663
738
|
this.SelectElement.emit(null);
|
664
|
-
this._cdRef.detectChanges();
|
665
739
|
this.onChanged(null);
|
666
740
|
this._zone.run(() => {
|
667
741
|
setTimeout(() => {
|
668
742
|
trigger.openPanel();
|
669
|
-
|
670
|
-
}, 200);
|
743
|
+
}, 100);
|
671
744
|
});
|
672
745
|
}
|
673
746
|
onFocus() {
|
674
747
|
this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());
|
675
748
|
}
|
676
749
|
onSelectElement(item) {
|
677
|
-
this.selectedElement
|
750
|
+
this.selectedElement.set(item);
|
678
751
|
this.SelectElement.emit(item);
|
679
|
-
this.value
|
752
|
+
this.value.set(item);
|
680
753
|
if (this.valueId) {
|
681
754
|
this.onChanged(item?.id);
|
682
755
|
}
|
683
756
|
else {
|
684
757
|
this.onChanged(item);
|
685
758
|
}
|
686
|
-
this._cdRef.detectChanges();
|
687
759
|
}
|
688
760
|
ngOnInit() {
|
689
761
|
this.component.markAllAsTouched();
|
@@ -692,25 +764,40 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
692
764
|
this.unsubscribeAll$.next();
|
693
765
|
this.unsubscribeAll$.complete();
|
694
766
|
}
|
767
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: GuajiritosGeneralAutocomplete, deps: [{ token: AutocompleteService }, { token: i0.NgZone }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
768
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: GuajiritosGeneralAutocomplete, isStandalone: true, selector: "guajiritos-general-autocomplete", inputs: { floatLabel: "floatLabel", bodyRequest: "bodyRequest", debounceTimeValue: "debounceTimeValue", detailsTemplate: "detailsTemplate", label: "label", appearance: "appearance", color: "color", placeholder: "placeholder", field: "field", filterString: "filterString", displayOptions: "displayOptions", withoutPaddingBottom: "withoutPaddingBottom", valueId: "valueId", order: "order", removeProperties: "removeProperties", disable: "disable", url: "url", clearData: "clearData", initialValue: "initialValue", restrictions: "restrictions", isRequired: "isRequired", doFocus: "doFocus" }, outputs: { SelectElement: "SelectElement" }, providers: [
|
769
|
+
{
|
770
|
+
provide: NG_VALUE_ACCESSOR,
|
771
|
+
useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),
|
772
|
+
multi: true
|
773
|
+
}
|
774
|
+
], viewQueries: [{ propertyName: "inputText", first: true, predicate: ["inputText"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" [ngClass]=\"{'without-padding-bottom': withoutPaddingBottom}\" class=\"w-100\"\r\n [appearance]=\"appearance\" [color]=\"color\">\r\n\r\n <mat-label>{{label | translate}}</mat-label>\r\n <input #inputText #trigger=\"matAutocompleteTrigger\" (blur)=\"onTouched()\" (focus)=\"onFocus()\"\r\n [formControl]=\"component\" [matAutocomplete]=\"autocomplete\" [placeholder]=\"placeholder | translate\"\r\n aria-label=\"autocomplete\" autocomplete=\"off\" matInput type=\"text\">\r\n <button (click)=\"clear(trigger)\" *ngIf=\"!loading() && component?.value\" [disabled]=\"disabledButton()\"\r\n aria-label=\"Clear\" mat-icon-button matSuffix>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <button *ngIf=\"loading()\" aria-label=\"search\" 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\" (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 </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n", styles: [".w-100{width:100%}.display-options{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}::ng-deep .mat-mdc-form-field-flex{align-items:center!important}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { 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: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i10.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PipesModule }, { kind: "pipe", type: I18nFieldPipe, name: "i18nField" }, { kind: "pipe", type: ResolvePropertyPath, name: "resolvePropertyPath" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
695
775
|
}
|
696
|
-
|
697
|
-
GuajiritosGeneralAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: GuajiritosGeneralAutocompleteComponent, selector: "guajiritos-general-autocomplete", inputs: { floatLabel: "floatLabel", bodyRequest: "bodyRequest", debounceTimeValue: "debounceTimeValue", detailsTemplate: "detailsTemplate", label: "label", placeholder: "placeholder", field: "field", filterString: "filterString", displayOptions: "displayOptions", withoutPaddingBottom: "withoutPaddingBottom", valueId: "valueId", order: "order", removeProperties: "removeProperties", disable: "disable", url: "url", clearData: "clearData", initialValue: "initialValue", restrictions: "restrictions", isRequired: "isRequired", doFocus: "doFocus" }, outputs: { SelectElement: "SelectElement" }, providers: [
|
698
|
-
{
|
699
|
-
provide: NG_VALUE_ACCESSOR,
|
700
|
-
useExisting: forwardRef(() => GuajiritosGeneralAutocompleteComponent),
|
701
|
-
multi: true
|
702
|
-
}
|
703
|
-
], 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()\"\r\n [formControl]=\"component\" [matAutocomplete]=\"autocomplete\" [placeholder]=\"placeholder | translate\"\r\n aria-label=\"Number\" autocomplete=\"off\" matInput type=\"text\">\r\n <button (click)=\"clear(trigger)\" *ngIf=\"!loading && component?.value\" [disabled]=\"disabledButton\" 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 });
|
704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: GuajiritosGeneralAutocompleteComponent, decorators: [{
|
776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: GuajiritosGeneralAutocomplete, decorators: [{
|
705
777
|
type: Component,
|
706
|
-
args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush,
|
778
|
+
args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
779
|
+
MatFormFieldModule,
|
780
|
+
NgClass,
|
781
|
+
TranslateModule,
|
782
|
+
MatAutocompleteModule,
|
783
|
+
MatInputModule,
|
784
|
+
ReactiveFormsModule,
|
785
|
+
MatButtonModule,
|
786
|
+
MatIconModule,
|
787
|
+
MatProgressSpinnerModule,
|
788
|
+
NgIf,
|
789
|
+
NgForOf,
|
790
|
+
NgStyle,
|
791
|
+
PipesModule,
|
792
|
+
NgTemplateOutlet
|
793
|
+
], providers: [
|
707
794
|
{
|
708
795
|
provide: NG_VALUE_ACCESSOR,
|
709
|
-
useExisting: forwardRef(() =>
|
796
|
+
useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),
|
710
797
|
multi: true
|
711
798
|
}
|
712
|
-
], template: "<mat-form-field [floatLabel]=\"floatLabel\" [ngClass]=\"{'without-padding-bottom': withoutPaddingBottom}\"\r\n appearance=\"
|
713
|
-
}], ctorParameters: function () { return [{ type: AutocompleteService }, { type: i0.
|
799
|
+
], template: "<mat-form-field [floatLabel]=\"floatLabel\" [ngClass]=\"{'without-padding-bottom': withoutPaddingBottom}\" class=\"w-100\"\r\n [appearance]=\"appearance\" [color]=\"color\">\r\n\r\n <mat-label>{{label | translate}}</mat-label>\r\n <input #inputText #trigger=\"matAutocompleteTrigger\" (blur)=\"onTouched()\" (focus)=\"onFocus()\"\r\n [formControl]=\"component\" [matAutocomplete]=\"autocomplete\" [placeholder]=\"placeholder | translate\"\r\n aria-label=\"autocomplete\" autocomplete=\"off\" matInput type=\"text\">\r\n <button (click)=\"clear(trigger)\" *ngIf=\"!loading() && component?.value\" [disabled]=\"disabledButton()\"\r\n aria-label=\"Clear\" mat-icon-button matSuffix>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <button *ngIf=\"loading()\" aria-label=\"search\" 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\" (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 </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n", styles: [".w-100{width:100%}.display-options{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}::ng-deep .mat-mdc-form-field-flex{align-items:center!important}\n"] }]
|
800
|
+
}], ctorParameters: function () { return [{ type: AutocompleteService }, { type: i0.NgZone }, { type: i2.TranslateService }]; }, propDecorators: { inputText: [{
|
714
801
|
type: ViewChild,
|
715
802
|
args: ['inputText', { static: true }]
|
716
803
|
}], floatLabel: [{
|
@@ -723,6 +810,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
723
810
|
type: Input
|
724
811
|
}], label: [{
|
725
812
|
type: Input
|
813
|
+
}], appearance: [{
|
814
|
+
type: Input
|
815
|
+
}], color: [{
|
816
|
+
type: Input
|
726
817
|
}], placeholder: [{
|
727
818
|
type: Input
|
728
819
|
}], field: [{
|
@@ -757,94 +848,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
757
848
|
type: Input
|
758
849
|
}] } });
|
759
850
|
|
760
|
-
class GuajiritosGeneralAutocompleteModule {
|
761
|
-
}
|
762
|
-
GuajiritosGeneralAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
763
|
-
GuajiritosGeneralAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, declarations: [GuajiritosGeneralAutocompleteComponent,
|
764
|
-
DurationTimePipe,
|
765
|
-
I18nFieldPipe,
|
766
|
-
ResolvePropertyPath,
|
767
|
-
HumanizeDurationPipe,
|
768
|
-
IdaReturnPipe,
|
769
|
-
ShowRolesPipe,
|
770
|
-
ShowSegmentsPipe,
|
771
|
-
ShowTransportTypesPipe], imports: [CommonModule,
|
772
|
-
TranslateModule,
|
773
|
-
FormsModule,
|
774
|
-
ReactiveFormsModule,
|
775
|
-
MatFormFieldModule,
|
776
|
-
MatIconModule,
|
777
|
-
MatProgressSpinnerModule,
|
778
|
-
MatButtonModule,
|
779
|
-
MatInputModule,
|
780
|
-
MatAutocompleteModule], exports: [GuajiritosGeneralAutocompleteComponent] });
|
781
|
-
GuajiritosGeneralAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, providers: [
|
782
|
-
UpperCasePipe,
|
783
|
-
CurrencyPipe,
|
784
|
-
AutocompleteService,
|
785
|
-
DurationTimePipe,
|
786
|
-
I18nFieldPipe,
|
787
|
-
ResolvePropertyPath,
|
788
|
-
HumanizeDurationPipe,
|
789
|
-
IdaReturnPipe,
|
790
|
-
ShowRolesPipe,
|
791
|
-
ShowSegmentsPipe,
|
792
|
-
ShowTransportTypesPipe
|
793
|
-
], imports: [CommonModule,
|
794
|
-
TranslateModule,
|
795
|
-
FormsModule,
|
796
|
-
ReactiveFormsModule,
|
797
|
-
MatFormFieldModule,
|
798
|
-
MatIconModule,
|
799
|
-
MatProgressSpinnerModule,
|
800
|
-
MatButtonModule,
|
801
|
-
MatInputModule,
|
802
|
-
MatAutocompleteModule] });
|
803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: GuajiritosGeneralAutocompleteModule, decorators: [{
|
804
|
-
type: NgModule,
|
805
|
-
args: [{
|
806
|
-
declarations: [
|
807
|
-
GuajiritosGeneralAutocompleteComponent,
|
808
|
-
DurationTimePipe,
|
809
|
-
I18nFieldPipe,
|
810
|
-
ResolvePropertyPath,
|
811
|
-
HumanizeDurationPipe,
|
812
|
-
IdaReturnPipe,
|
813
|
-
ShowRolesPipe,
|
814
|
-
ShowSegmentsPipe,
|
815
|
-
ShowTransportTypesPipe
|
816
|
-
],
|
817
|
-
imports: [
|
818
|
-
CommonModule,
|
819
|
-
TranslateModule,
|
820
|
-
FormsModule,
|
821
|
-
ReactiveFormsModule,
|
822
|
-
MatFormFieldModule,
|
823
|
-
MatIconModule,
|
824
|
-
MatProgressSpinnerModule,
|
825
|
-
MatButtonModule,
|
826
|
-
MatInputModule,
|
827
|
-
MatAutocompleteModule
|
828
|
-
],
|
829
|
-
providers: [
|
830
|
-
UpperCasePipe,
|
831
|
-
CurrencyPipe,
|
832
|
-
AutocompleteService,
|
833
|
-
DurationTimePipe,
|
834
|
-
I18nFieldPipe,
|
835
|
-
ResolvePropertyPath,
|
836
|
-
HumanizeDurationPipe,
|
837
|
-
IdaReturnPipe,
|
838
|
-
ShowRolesPipe,
|
839
|
-
ShowSegmentsPipe,
|
840
|
-
ShowTransportTypesPipe
|
841
|
-
],
|
842
|
-
exports: [
|
843
|
-
GuajiritosGeneralAutocompleteComponent
|
844
|
-
]
|
845
|
-
}]
|
846
|
-
}] });
|
847
|
-
|
848
851
|
/*
|
849
852
|
* Public API Surface of guachos-general-autocomplete
|
850
853
|
*/
|
@@ -853,5 +856,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
853
856
|
* Generated bundle index. Do not edit.
|
854
857
|
*/
|
855
858
|
|
856
|
-
export { CustomPipes, GENERAL_DISPLAY_OPTIONS,
|
859
|
+
export { CustomPipes, GENERAL_DISPLAY_OPTIONS, GuajiritosGeneralAutocomplete };
|
857
860
|
//# sourceMappingURL=guajiritos-general-autocomplete.mjs.map
|