pjc-fields 0.0.25 → 0.0.31
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 +283 -5
- package/fesm2022/pjc-fields.mjs.map +1 -1
- package/package.json +1 -1
- package/types/pjc-fields.d.ts +87 -4
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>;
|
|
@@ -126,8 +128,11 @@ declare class PjcDataFieldComponent implements ControlValueAccessor, Validator,
|
|
|
126
128
|
maxDate: _angular_core.InputSignal<Date | undefined>;
|
|
127
129
|
labelVariant: _angular_core.InputSignal<"over" | "in" | "on">;
|
|
128
130
|
readonly: _angular_core.InputSignal<boolean>;
|
|
131
|
+
mostrarAniversario: _angular_core.InputSignal<boolean>;
|
|
129
132
|
value: Date | null;
|
|
130
133
|
disabled: boolean;
|
|
134
|
+
valueSignal: _angular_core.WritableSignal<Date | null>;
|
|
135
|
+
age: _angular_core.Signal<number | null>;
|
|
131
136
|
onChange: (value: Date | null) => void;
|
|
132
137
|
onTouched: () => void;
|
|
133
138
|
private el;
|
|
@@ -140,9 +145,36 @@ declare class PjcDataFieldComponent implements ControlValueAccessor, Validator,
|
|
|
140
145
|
registerOnTouched(fn: () => void): void;
|
|
141
146
|
setDisabledState(isDisabled: boolean): void;
|
|
142
147
|
onValueChange(date: Date | null): void;
|
|
148
|
+
private calculateAge;
|
|
143
149
|
validate(_control: AbstractControl): ValidationErrors | null;
|
|
144
150
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PjcDataFieldComponent, never>;
|
|
145
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PjcDataFieldComponent, "pjc-data-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
151
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PjcDataFieldComponent, "pjc-data-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "mostrarAniversario": { "alias": "mostrarAniversario"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
declare class PjcDataHoraFieldComponent implements ControlValueAccessor, Validator, AfterViewInit, OnDestroy {
|
|
155
|
+
label: _angular_core.InputSignal<string>;
|
|
156
|
+
id: _angular_core.InputSignal<string>;
|
|
157
|
+
minDate: _angular_core.InputSignal<Date | undefined>;
|
|
158
|
+
maxDate: _angular_core.InputSignal<Date | undefined>;
|
|
159
|
+
labelVariant: _angular_core.InputSignal<"over" | "in" | "on">;
|
|
160
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
161
|
+
value: Date | null;
|
|
162
|
+
disabled: boolean;
|
|
163
|
+
onChange: (value: Date | null) => void;
|
|
164
|
+
onTouched: () => void;
|
|
165
|
+
private el;
|
|
166
|
+
private isFormatting;
|
|
167
|
+
ngAfterViewInit(): void;
|
|
168
|
+
ngOnDestroy(): void;
|
|
169
|
+
private handleDateInput;
|
|
170
|
+
writeValue(val: Date | null): void;
|
|
171
|
+
registerOnChange(fn: (value: Date | null) => void): void;
|
|
172
|
+
registerOnTouched(fn: () => void): void;
|
|
173
|
+
setDisabledState(isDisabled: boolean): void;
|
|
174
|
+
onValueChange(date: Date | null): void;
|
|
175
|
+
validate(_control: AbstractControl): ValidationErrors | null;
|
|
176
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PjcDataHoraFieldComponent, never>;
|
|
177
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PjcDataHoraFieldComponent, "pjc-data-hora-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
146
178
|
}
|
|
147
179
|
|
|
148
180
|
declare class PjcHoraFieldComponent implements ControlValueAccessor, Validator {
|
|
@@ -214,6 +246,8 @@ interface PjcUf {
|
|
|
214
246
|
uf: string;
|
|
215
247
|
descricao: string;
|
|
216
248
|
}
|
|
249
|
+
declare const ESTADOS: PjcUf[];
|
|
250
|
+
|
|
217
251
|
declare class PjcUfFieldComponent implements ControlValueAccessor {
|
|
218
252
|
label: _angular_core.InputSignal<string>;
|
|
219
253
|
hint: _angular_core.InputSignal<string>;
|
|
@@ -435,6 +469,55 @@ declare class PjcErroValidacaoComponent implements OnInit {
|
|
|
435
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>;
|
|
436
470
|
}
|
|
437
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
|
+
|
|
438
521
|
declare class PjcValidators {
|
|
439
522
|
static cpf(): ValidatorFn;
|
|
440
523
|
private static validateCpfDigits;
|
|
@@ -470,5 +553,5 @@ declare class PjcValidators {
|
|
|
470
553
|
static decimalMenorIgualZero(): ValidatorFn;
|
|
471
554
|
}
|
|
472
555
|
|
|
473
|
-
export { PjcCepFieldComponent, PjcChassiFieldComponent, PjcChassiInputDirective, PjcCnhFieldComponent, PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcEmailFieldComponent, PjcErroValidacaoComponent, PjcFields, PjcHoraFieldComponent, PjcIntegerFieldComponent, PjcMoedaFieldComponent, PjcNumeroCartaoFieldComponent, PjcPasswordFieldComponent, PjcPlacaFieldComponent, PjcRenavamFieldComponent, PjcTelefoneFieldComponent, PjcUfFieldComponent, PjcUppercaseFieldComponent, PjcValidators };
|
|
474
|
-
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 };
|