pjc-fields 0.0.29 → 0.0.32
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/fesm2022/pjc-fields.mjs +141 -2
- package/fesm2022/pjc-fields.mjs.map +1 -1
- package/package.json +1 -1
- package/types/pjc-fields.d.ts +56 -3
package/package.json
CHANGED
package/types/pjc-fields.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy, OnInit, InjectionToken } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
4
|
+
import { AutoCompleteCompleteEvent } from 'primeng/autocomplete';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
4
6
|
|
|
5
7
|
declare class PjcFields {
|
|
6
8
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PjcFields, never>;
|
|
@@ -244,6 +246,8 @@ interface PjcUf {
|
|
|
244
246
|
uf: string;
|
|
245
247
|
descricao: string;
|
|
246
248
|
}
|
|
249
|
+
declare const ESTADOS: PjcUf[];
|
|
250
|
+
|
|
247
251
|
declare class PjcUfFieldComponent implements ControlValueAccessor {
|
|
248
252
|
label: _angular_core.InputSignal<string>;
|
|
249
253
|
hint: _angular_core.InputSignal<string>;
|
|
@@ -465,6 +469,55 @@ declare class PjcErroValidacaoComponent implements OnInit {
|
|
|
465
469
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PjcErroValidacaoComponent, "pjc-erro-validacao", never, { "controlName": { "alias": "controlName"; "required": true; "isSignal": true; }; "erros": { "alias": "erros"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
466
470
|
}
|
|
467
471
|
|
|
472
|
+
interface PjcMunicipio {
|
|
473
|
+
id: number;
|
|
474
|
+
nome?: string;
|
|
475
|
+
descricao?: string;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
declare class PjcCidadeFieldComponent implements ControlValueAccessor {
|
|
479
|
+
label: _angular_core.InputSignal<string>;
|
|
480
|
+
hint: _angular_core.InputSignal<string>;
|
|
481
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
482
|
+
id: _angular_core.InputSignal<string>;
|
|
483
|
+
labelVariant: _angular_core.InputSignal<"over" | "in" | "on">;
|
|
484
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
485
|
+
uf: _angular_core.InputSignal<string>;
|
|
486
|
+
private readonly service;
|
|
487
|
+
municipios: _angular_core.WritableSignal<PjcMunicipio[]>;
|
|
488
|
+
filteredMunicipios: _angular_core.WritableSignal<PjcMunicipio[]>;
|
|
489
|
+
loading: _angular_core.WritableSignal<boolean>;
|
|
490
|
+
value: PjcMunicipio | null;
|
|
491
|
+
disabled: boolean;
|
|
492
|
+
onChange: (value: PjcMunicipio | null) => void;
|
|
493
|
+
onTouched: () => void;
|
|
494
|
+
constructor();
|
|
495
|
+
writeValue(val: PjcMunicipio | string | null): void;
|
|
496
|
+
registerOnChange(fn: (value: PjcMunicipio | null) => void): void;
|
|
497
|
+
registerOnTouched(fn: () => void): void;
|
|
498
|
+
setDisabledState(isDisabled: boolean): void;
|
|
499
|
+
onModelChange(value: PjcMunicipio | string | null): void;
|
|
500
|
+
onModelTouched(): void;
|
|
501
|
+
getMunicipioDisplay(m: PjcMunicipio): string;
|
|
502
|
+
filterMunicipios(event: AutoCompleteCompleteEvent): void;
|
|
503
|
+
private fetchMunicipios;
|
|
504
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PjcCidadeFieldComponent, never>;
|
|
505
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PjcCidadeFieldComponent, "pjc-cidade-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "uf": { "alias": "uf"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
declare class PjcCidadeService {
|
|
509
|
+
private http;
|
|
510
|
+
private readonly API_URL;
|
|
511
|
+
getMunicipiosByUf(uf: string): Observable<PjcMunicipio[]>;
|
|
512
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PjcCidadeService, never>;
|
|
513
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PjcCidadeService>;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
interface PjcCidadeServiceContract {
|
|
517
|
+
getMunicipiosByUf(uf: string): Observable<PjcMunicipio[]>;
|
|
518
|
+
}
|
|
519
|
+
declare const PJC_CIDADE_SERVICE: InjectionToken<PjcCidadeServiceContract>;
|
|
520
|
+
|
|
468
521
|
declare class PjcValidators {
|
|
469
522
|
static cpf(): ValidatorFn;
|
|
470
523
|
private static validateCpfDigits;
|
|
@@ -500,5 +553,5 @@ declare class PjcValidators {
|
|
|
500
553
|
static decimalMenorIgualZero(): ValidatorFn;
|
|
501
554
|
}
|
|
502
555
|
|
|
503
|
-
export { PjcCepFieldComponent, PjcChassiFieldComponent, PjcChassiInputDirective, PjcCnhFieldComponent, PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcDataHoraFieldComponent, PjcEmailFieldComponent, PjcErroValidacaoComponent, PjcFields, PjcHoraFieldComponent, PjcIntegerFieldComponent, PjcMoedaFieldComponent, PjcNumeroCartaoFieldComponent, PjcPasswordFieldComponent, PjcPlacaFieldComponent, PjcRenavamFieldComponent, PjcTelefoneFieldComponent, PjcUfFieldComponent, PjcUppercaseFieldComponent, PjcValidators };
|
|
504
|
-
export type { PjcUf };
|
|
556
|
+
export { ESTADOS, PJC_CIDADE_SERVICE, PjcCepFieldComponent, PjcChassiFieldComponent, PjcChassiInputDirective, PjcCidadeFieldComponent, PjcCidadeService, PjcCnhFieldComponent, PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcDataHoraFieldComponent, PjcEmailFieldComponent, PjcErroValidacaoComponent, PjcFields, PjcHoraFieldComponent, PjcIntegerFieldComponent, PjcMoedaFieldComponent, PjcNumeroCartaoFieldComponent, PjcPasswordFieldComponent, PjcPlacaFieldComponent, PjcRenavamFieldComponent, PjcTelefoneFieldComponent, PjcUfFieldComponent, PjcUppercaseFieldComponent, PjcValidators };
|
|
557
|
+
export type { PjcCidadeServiceContract, PjcMunicipio, PjcUf };
|