@guajiritos/general-autocomplete 0.0.11 → 0.1.0
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 +346 -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 +221 -224
- package/fesm2022/guajiritos-general-autocomplete.mjs.map +1 -0
- package/lib/guachos-general-autocomplete.component.d.ts +16 -17
- 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,29 +443,105 @@ 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
|
*/
|
@@ -507,18 +583,17 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
507
583
|
};
|
508
584
|
}
|
509
585
|
set disable(flag) {
|
510
|
-
this.disabledButton
|
586
|
+
this.disabledButton.set(flag);
|
511
587
|
if (flag) {
|
512
588
|
this.component.disable();
|
513
589
|
}
|
514
590
|
else {
|
515
591
|
this.component.enable();
|
516
592
|
}
|
517
|
-
this._cdRef.detectChanges();
|
518
593
|
}
|
519
594
|
set url(data) {
|
520
595
|
if (data) {
|
521
|
-
this._url
|
596
|
+
this._url.set(data);
|
522
597
|
this.subscribeComponentChanges();
|
523
598
|
}
|
524
599
|
}
|
@@ -530,9 +605,9 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
530
605
|
.subscribe({
|
531
606
|
next: () => {
|
532
607
|
this.component.setValue(null);
|
533
|
-
this.selectedElement
|
608
|
+
this.selectedElement.set(null);
|
534
609
|
this.SelectElement.emit(null);
|
535
|
-
this.filteredOptions
|
610
|
+
this.filteredOptions.set([]);
|
536
611
|
this.onChanged(null);
|
537
612
|
}
|
538
613
|
});
|
@@ -543,16 +618,16 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
543
618
|
}
|
544
619
|
set restrictions(value) {
|
545
620
|
if (value) {
|
546
|
-
this.restrictionsFilters
|
621
|
+
this.restrictionsFilters.set(value);
|
547
622
|
}
|
548
623
|
else {
|
549
|
-
this.restrictionsFilters
|
624
|
+
this.restrictionsFilters.set([]);
|
550
625
|
}
|
551
626
|
}
|
552
627
|
set isRequired(value) {
|
553
|
-
this.required
|
554
|
-
if (
|
555
|
-
this.component.setValidators([Validators.required,
|
628
|
+
this.required.set(value);
|
629
|
+
if (value) {
|
630
|
+
this.component.setValidators([Validators.required, GuajiritosGeneralAutocomplete.autocompleteValidator]);
|
556
631
|
}
|
557
632
|
else {
|
558
633
|
this.component.clearValidators();
|
@@ -571,48 +646,49 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
571
646
|
next: () => {
|
572
647
|
this._zone.run(() => {
|
573
648
|
setTimeout(() => {
|
574
|
-
this.inputText
|
649
|
+
this.inputText?.nativeElement?.focus();
|
575
650
|
}, 500);
|
576
651
|
});
|
577
652
|
}
|
578
653
|
});
|
579
654
|
}
|
580
655
|
}
|
581
|
-
static
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
656
|
+
static autocompleteValidator() {
|
657
|
+
return (control) => {
|
658
|
+
if (control?.value?.constructor !== Object || !control?.value?.id) {
|
659
|
+
return { invalidSelection: true };
|
660
|
+
}
|
661
|
+
return null;
|
662
|
+
};
|
586
663
|
}
|
587
664
|
subscribeComponentChanges() {
|
588
665
|
this.component?.valueChanges
|
589
666
|
?.pipe(debounceTime(this.debounceTimeValue), takeUntil(this.unsubscribeAll$))
|
590
667
|
?.subscribe({
|
591
668
|
next: () => {
|
592
|
-
if (!this.firstCall) {
|
669
|
+
if (!this.firstCall()) {
|
593
670
|
this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());
|
594
671
|
}
|
595
672
|
else {
|
596
|
-
this.firstCall
|
673
|
+
this.firstCall.set(false);
|
597
674
|
}
|
598
675
|
}
|
599
676
|
});
|
600
677
|
}
|
601
678
|
getAutocompleteByTextHandler(text) {
|
602
679
|
this._autocompleteService
|
603
|
-
.getAutocompleteByText(this._url, text, this.filterString, this.restrictionsFilters, this.removeProperties, this.order, this.bodyRequest)
|
680
|
+
.getAutocompleteByText(this._url(), text, this.filterString, this.restrictionsFilters(), this.removeProperties, this.order, this.bodyRequest)
|
604
681
|
.then((resp) => {
|
605
682
|
resp?.subscribe({
|
606
683
|
next: (result) => {
|
607
|
-
this.filteredOptions
|
608
|
-
this.loading
|
609
|
-
this._cdRef.detectChanges();
|
684
|
+
this.filteredOptions.set(result?.payload?.data ?? result?.data);
|
685
|
+
this.loading.set(false);
|
610
686
|
}
|
611
687
|
});
|
612
688
|
});
|
613
689
|
}
|
614
690
|
getAutocompleteSearchText() {
|
615
|
-
this.loading
|
691
|
+
this.loading.set(true);
|
616
692
|
let text = null;
|
617
693
|
if (this.component?.value) {
|
618
694
|
if (typeof this.component.value === 'object') {
|
@@ -634,56 +710,50 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
634
710
|
writeValue(value) {
|
635
711
|
if (value) {
|
636
712
|
if (typeof value === 'number') {
|
637
|
-
this.value
|
713
|
+
this.value.set(value);
|
638
714
|
}
|
639
715
|
else if (typeof value === 'object') {
|
640
716
|
this.component.setValue(value);
|
641
|
-
this.value
|
717
|
+
this.value.set(value.id);
|
642
718
|
}
|
643
719
|
else {
|
644
|
-
this.value
|
720
|
+
this.value.set(value);
|
645
721
|
}
|
646
722
|
}
|
647
723
|
else {
|
648
|
-
this.value
|
724
|
+
this.value.set(null);
|
649
725
|
}
|
650
|
-
this._cdRef.detectChanges();
|
651
726
|
}
|
652
727
|
registerOnChange(fn) {
|
653
728
|
this.onChanged = fn;
|
654
|
-
this._cdRef.detectChanges();
|
655
729
|
}
|
656
730
|
registerOnTouched(fn) {
|
657
731
|
this.onTouched = fn;
|
658
|
-
this._cdRef.detectChanges();
|
659
732
|
}
|
660
733
|
clear(trigger) {
|
661
734
|
this.component.setValue(null);
|
662
|
-
this.selectedElement
|
735
|
+
this.selectedElement.set(null);
|
663
736
|
this.SelectElement.emit(null);
|
664
|
-
this._cdRef.detectChanges();
|
665
737
|
this.onChanged(null);
|
666
738
|
this._zone.run(() => {
|
667
739
|
setTimeout(() => {
|
668
740
|
trigger.openPanel();
|
669
|
-
|
670
|
-
}, 200);
|
741
|
+
}, 100);
|
671
742
|
});
|
672
743
|
}
|
673
744
|
onFocus() {
|
674
745
|
this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());
|
675
746
|
}
|
676
747
|
onSelectElement(item) {
|
677
|
-
this.selectedElement
|
748
|
+
this.selectedElement.set(item);
|
678
749
|
this.SelectElement.emit(item);
|
679
|
-
this.value
|
750
|
+
this.value.set(item);
|
680
751
|
if (this.valueId) {
|
681
752
|
this.onChanged(item?.id);
|
682
753
|
}
|
683
754
|
else {
|
684
755
|
this.onChanged(item);
|
685
756
|
}
|
686
|
-
this._cdRef.detectChanges();
|
687
757
|
}
|
688
758
|
ngOnInit() {
|
689
759
|
this.component.markAllAsTouched();
|
@@ -692,25 +762,40 @@ class GuajiritosGeneralAutocompleteComponent {
|
|
692
762
|
this.unsubscribeAll$.next();
|
693
763
|
this.unsubscribeAll$.complete();
|
694
764
|
}
|
765
|
+
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 }); }
|
766
|
+
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", 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: [
|
767
|
+
{
|
768
|
+
provide: NG_VALUE_ACCESSOR,
|
769
|
+
useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),
|
770
|
+
multi: true
|
771
|
+
}
|
772
|
+
], 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()\"\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=\"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\" (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
773
|
}
|
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: [{
|
774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: GuajiritosGeneralAutocomplete, decorators: [{
|
705
775
|
type: Component,
|
706
|
-
args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush,
|
776
|
+
args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
777
|
+
MatFormFieldModule,
|
778
|
+
NgClass,
|
779
|
+
TranslateModule,
|
780
|
+
MatAutocompleteModule,
|
781
|
+
MatInputModule,
|
782
|
+
ReactiveFormsModule,
|
783
|
+
MatButtonModule,
|
784
|
+
MatIconModule,
|
785
|
+
MatProgressSpinnerModule,
|
786
|
+
NgIf,
|
787
|
+
NgForOf,
|
788
|
+
NgStyle,
|
789
|
+
PipesModule,
|
790
|
+
NgTemplateOutlet
|
791
|
+
], providers: [
|
707
792
|
{
|
708
793
|
provide: NG_VALUE_ACCESSOR,
|
709
|
-
useExisting: forwardRef(() =>
|
794
|
+
useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),
|
710
795
|
multi: true
|
711
796
|
}
|
712
|
-
], template: "<mat-form-field [floatLabel]=\"floatLabel\" [ngClass]=\"{'without-padding-bottom': withoutPaddingBottom}\"\r\n appearance=\"outline\" class=\"w-100\" color=\"accent\">\r\n\r\n
|
713
|
-
}], ctorParameters: function () { return [{ type: AutocompleteService }, { type: i0.
|
797
|
+
], 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()\"\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=\"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\" (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"] }]
|
798
|
+
}], ctorParameters: function () { return [{ type: AutocompleteService }, { type: i0.NgZone }, { type: i2.TranslateService }]; }, propDecorators: { inputText: [{
|
714
799
|
type: ViewChild,
|
715
800
|
args: ['inputText', { static: true }]
|
716
801
|
}], floatLabel: [{
|
@@ -757,94 +842,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
757
842
|
type: Input
|
758
843
|
}] } });
|
759
844
|
|
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
845
|
/*
|
849
846
|
* Public API Surface of guachos-general-autocomplete
|
850
847
|
*/
|
@@ -853,5 +850,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
853
850
|
* Generated bundle index. Do not edit.
|
854
851
|
*/
|
855
852
|
|
856
|
-
export { CustomPipes, GENERAL_DISPLAY_OPTIONS,
|
853
|
+
export { CustomPipes, GENERAL_DISPLAY_OPTIONS, GuajiritosGeneralAutocomplete };
|
857
854
|
//# sourceMappingURL=guajiritos-general-autocomplete.mjs.map
|