pjc-fields 0.0.2
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 +64 -0
- package/fesm2022/pjc-fields.mjs +745 -0
- package/fesm2022/pjc-fields.mjs.map +1 -0
- package/package.json +26 -0
- package/types/pjc-fields.d.ts +185 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# PjcFields
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build pjc-fields
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd dist/pjc-fields
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
40
|
+
```bash
|
|
41
|
+
npm publish
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Running unit tests
|
|
45
|
+
|
|
46
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
ng test
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Running end-to-end tests
|
|
53
|
+
|
|
54
|
+
For end-to-end (e2e) testing, run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
ng e2e
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
61
|
+
|
|
62
|
+
## Additional Resources
|
|
63
|
+
|
|
64
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, input, forwardRef, Input, inject, ElementRef, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
5
|
+
import * as i2 from 'primeng/inputmask';
|
|
6
|
+
import { InputMaskModule } from 'primeng/inputmask';
|
|
7
|
+
import * as i3 from 'primeng/floatlabel';
|
|
8
|
+
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
9
|
+
import { CommonModule } from '@angular/common';
|
|
10
|
+
import * as i2$1 from 'primeng/inputtext';
|
|
11
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
12
|
+
import * as i2$2 from 'primeng/datepicker';
|
|
13
|
+
import { DatePickerModule } from 'primeng/datepicker';
|
|
14
|
+
|
|
15
|
+
class PjcFields {
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcFields, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: PjcFields, isStandalone: true, selector: "lib-pjc-fields", ngImport: i0, template: ` <p>pjc-fields works!</p> `, isInline: true, styles: [""] });
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcFields, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{ selector: 'lib-pjc-fields', imports: [], template: ` <p>pjc-fields works!</p> ` }]
|
|
22
|
+
}] });
|
|
23
|
+
|
|
24
|
+
class PjcValidators {
|
|
25
|
+
static cpf() {
|
|
26
|
+
return (control) => {
|
|
27
|
+
const value = control.value?.replace(/\D/g, '');
|
|
28
|
+
if (!value)
|
|
29
|
+
return null;
|
|
30
|
+
if (value.length !== 11 || /^(\d)\1+$/.test(value)) {
|
|
31
|
+
return { cpfInvalid: true };
|
|
32
|
+
}
|
|
33
|
+
if (!PjcValidators.validateCpfDigits(value)) {
|
|
34
|
+
return { cpfInvalid: true };
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static validateCpfDigits(cpf) {
|
|
40
|
+
const calculateDigit = (slice, factor) => {
|
|
41
|
+
let total = 0;
|
|
42
|
+
for (const digit of slice) {
|
|
43
|
+
total += parseInt(digit) * factor--;
|
|
44
|
+
}
|
|
45
|
+
const remainder = total % 11;
|
|
46
|
+
return remainder < 2 ? 0 : 11 - remainder;
|
|
47
|
+
};
|
|
48
|
+
const digit1 = calculateDigit(cpf.substring(0, 9), 10);
|
|
49
|
+
const digit2 = calculateDigit(cpf.substring(0, 10), 11);
|
|
50
|
+
return digit1 === parseInt(cpf[9]) && digit2 === parseInt(cpf[10]);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Valida o algoritmo do CNPJ (Módulo 11)
|
|
54
|
+
*/
|
|
55
|
+
static cnpj() {
|
|
56
|
+
return (control) => {
|
|
57
|
+
const value = control.value?.replace(/\D/g, '');
|
|
58
|
+
if (!value)
|
|
59
|
+
return null;
|
|
60
|
+
// CNPJ deve ter 14 dígitos e não pode ser sequência repetida
|
|
61
|
+
if (value.length !== 14 || /^(\d)\1+$/.test(value)) {
|
|
62
|
+
return { cnpjInvalid: true };
|
|
63
|
+
}
|
|
64
|
+
if (!PjcValidators.validateCnpjDigits(value)) {
|
|
65
|
+
return { cnpjInvalid: true };
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static validateCnpjDigits(cnpj) {
|
|
71
|
+
const calculateDigit = (slice, weights) => {
|
|
72
|
+
let total = 0;
|
|
73
|
+
for (let i = 0; i < slice.length; i++) {
|
|
74
|
+
total += parseInt(slice[i]) * weights[i];
|
|
75
|
+
}
|
|
76
|
+
const remainder = total % 11;
|
|
77
|
+
return remainder < 2 ? 0 : 11 - remainder;
|
|
78
|
+
};
|
|
79
|
+
const weights1 = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
80
|
+
const weights2 = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
81
|
+
const digit1 = calculateDigit(cnpj.substring(0, 12), weights1);
|
|
82
|
+
const digit2 = calculateDigit(cnpj.substring(0, 13), weights2);
|
|
83
|
+
return digit1 === parseInt(cnpj[12]) && digit2 === parseInt(cnpj[13]);
|
|
84
|
+
}
|
|
85
|
+
static cpfCnpj() {
|
|
86
|
+
return (control) => {
|
|
87
|
+
const value = control.value?.replace(/\D/g, '');
|
|
88
|
+
if (!value)
|
|
89
|
+
return null;
|
|
90
|
+
if (value.length <= 11) {
|
|
91
|
+
return PjcValidators.cpf()(control);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return PjcValidators.cnpj()(control);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static telefone() {
|
|
99
|
+
return (control) => {
|
|
100
|
+
const digits = control.value?.replace(/\D/g, '');
|
|
101
|
+
if (!digits)
|
|
102
|
+
return null;
|
|
103
|
+
// Fixo: DDD (2) + 8 dígitos = 10 | Celular: DDD (2) + 9 dígitos = 11
|
|
104
|
+
if (digits.length !== 10 && digits.length !== 11) {
|
|
105
|
+
return { telefoneInvalid: true };
|
|
106
|
+
}
|
|
107
|
+
// Celular deve começar com 9 após o DDD
|
|
108
|
+
if (digits.length === 11 && digits[2] !== '9') {
|
|
109
|
+
return { telefoneInvalid: true };
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
static hora() {
|
|
115
|
+
return (control) => {
|
|
116
|
+
const value = control.value;
|
|
117
|
+
if (!value)
|
|
118
|
+
return null;
|
|
119
|
+
const match = value.match(/^(\d{2}):(\d{2})$/);
|
|
120
|
+
if (!match)
|
|
121
|
+
return { horaInvalid: true };
|
|
122
|
+
const hours = parseInt(match[1], 10);
|
|
123
|
+
const minutes = parseInt(match[2], 10);
|
|
124
|
+
if (hours > 23 || minutes > 59) {
|
|
125
|
+
return { horaInvalid: true };
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
static placaVeiculo() {
|
|
131
|
+
return (control) => {
|
|
132
|
+
const value = control.value?.toUpperCase().replace('-', '');
|
|
133
|
+
if (!value)
|
|
134
|
+
return null;
|
|
135
|
+
// Regex para Padrão Antigo (AAA9999) e Mercosul (AAA9A99)
|
|
136
|
+
const plateRegex = /^[A-Z]{3}[0-9][A-Z0-9][0-9]{2}$/;
|
|
137
|
+
return plateRegex.test(value) ? null : { plateInvalid: true };
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
class PjcCpfFieldComponent {
|
|
143
|
+
label = '';
|
|
144
|
+
hint = '';
|
|
145
|
+
placeholder = '000.000.000-00';
|
|
146
|
+
id = `pjc-cpf-${Math.random().toString(36).substring(2, 9)}`;
|
|
147
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
148
|
+
value = '';
|
|
149
|
+
disabled = false;
|
|
150
|
+
onChange = () => { };
|
|
151
|
+
onTouched = () => { };
|
|
152
|
+
// --- ControlValueAccessor ---
|
|
153
|
+
writeValue(val) {
|
|
154
|
+
this.value = val;
|
|
155
|
+
}
|
|
156
|
+
registerOnChange(fn) {
|
|
157
|
+
this.onChange = fn;
|
|
158
|
+
}
|
|
159
|
+
registerOnTouched(fn) {
|
|
160
|
+
this.onTouched = fn;
|
|
161
|
+
}
|
|
162
|
+
setDisabledState(isDisabled) {
|
|
163
|
+
this.disabled = isDisabled;
|
|
164
|
+
}
|
|
165
|
+
onModelChange() {
|
|
166
|
+
this.onChange(this.value);
|
|
167
|
+
}
|
|
168
|
+
onModelTouched() {
|
|
169
|
+
this.onTouched();
|
|
170
|
+
}
|
|
171
|
+
// --- Validator ---
|
|
172
|
+
validate(control) {
|
|
173
|
+
return PjcValidators.cpf()(control);
|
|
174
|
+
}
|
|
175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCpfFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcCpfFieldComponent, isStandalone: true, selector: "pjc-cpf-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
177
|
+
{
|
|
178
|
+
provide: NG_VALUE_ACCESSOR,
|
|
179
|
+
useExisting: forwardRef(() => PjcCpfFieldComponent),
|
|
180
|
+
multi: true,
|
|
181
|
+
},
|
|
182
|
+
{ provide: NG_VALIDATORS, useValue: PjcValidators.cpf(), multi: true },
|
|
183
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"999.999.999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"999.999.999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n\n @if (hint) {\n <small class=\"text-xs text-surface-500\">{{ hint }}</small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i2.InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] });
|
|
184
|
+
}
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCpfFieldComponent, decorators: [{
|
|
186
|
+
type: Component,
|
|
187
|
+
args: [{ selector: 'pjc-cpf-field', imports: [CommonModule, FormsModule, InputMaskModule, FloatLabelModule], providers: [
|
|
188
|
+
{
|
|
189
|
+
provide: NG_VALUE_ACCESSOR,
|
|
190
|
+
useExisting: forwardRef(() => PjcCpfFieldComponent),
|
|
191
|
+
multi: true,
|
|
192
|
+
},
|
|
193
|
+
{ provide: NG_VALIDATORS, useValue: PjcValidators.cpf(), multi: true },
|
|
194
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"999.999.999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"999.999.999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n\n @if (hint) {\n <small class=\"text-xs text-surface-500\">{{ hint }}</small>\n }\n</div>\n" }]
|
|
195
|
+
}], propDecorators: { label: [{
|
|
196
|
+
type: Input
|
|
197
|
+
}], hint: [{
|
|
198
|
+
type: Input
|
|
199
|
+
}], placeholder: [{
|
|
200
|
+
type: Input
|
|
201
|
+
}], id: [{
|
|
202
|
+
type: Input
|
|
203
|
+
}], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
204
|
+
|
|
205
|
+
class PjcCnpjFieldComponent {
|
|
206
|
+
label = '';
|
|
207
|
+
hint = '';
|
|
208
|
+
placeholder = '00.000.000/0000-00';
|
|
209
|
+
id = `pjc-cnpj-${Math.random().toString(36).substring(2, 9)}`;
|
|
210
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
211
|
+
value = '';
|
|
212
|
+
disabled = false;
|
|
213
|
+
onChange = () => { };
|
|
214
|
+
onTouched = () => { };
|
|
215
|
+
// ControlValueAccessor
|
|
216
|
+
writeValue(val) {
|
|
217
|
+
this.value = val;
|
|
218
|
+
}
|
|
219
|
+
registerOnChange(fn) {
|
|
220
|
+
this.onChange = fn;
|
|
221
|
+
}
|
|
222
|
+
registerOnTouched(fn) {
|
|
223
|
+
this.onTouched = fn;
|
|
224
|
+
}
|
|
225
|
+
setDisabledState(isDisabled) {
|
|
226
|
+
this.disabled = isDisabled;
|
|
227
|
+
}
|
|
228
|
+
onModelChange(event) {
|
|
229
|
+
this.onChange(this.value);
|
|
230
|
+
}
|
|
231
|
+
onModelTouched() {
|
|
232
|
+
this.onTouched();
|
|
233
|
+
}
|
|
234
|
+
// Integração com a validação da Lib
|
|
235
|
+
validate(control) {
|
|
236
|
+
return PjcValidators.cnpj()(control);
|
|
237
|
+
}
|
|
238
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCnpjFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
239
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcCnpjFieldComponent, isStandalone: true, selector: "pjc-cnpj-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
240
|
+
{
|
|
241
|
+
provide: NG_VALUE_ACCESSOR,
|
|
242
|
+
useExisting: forwardRef(() => PjcCnpjFieldComponent),
|
|
243
|
+
multi: true,
|
|
244
|
+
},
|
|
245
|
+
{ provide: NG_VALIDATORS, useValue: PjcValidators.cnpj(), multi: true },
|
|
246
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"99.999.999/9999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"99.999.999/9999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n\n @if (hint) {\n <small class=\"text-xs text-surface-500\">{{ hint }}</small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i2.InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] });
|
|
247
|
+
}
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCnpjFieldComponent, decorators: [{
|
|
249
|
+
type: Component,
|
|
250
|
+
args: [{ selector: 'pjc-cnpj-field', imports: [CommonModule, FormsModule, InputMaskModule, FloatLabelModule], providers: [
|
|
251
|
+
{
|
|
252
|
+
provide: NG_VALUE_ACCESSOR,
|
|
253
|
+
useExisting: forwardRef(() => PjcCnpjFieldComponent),
|
|
254
|
+
multi: true,
|
|
255
|
+
},
|
|
256
|
+
{ provide: NG_VALIDATORS, useValue: PjcValidators.cnpj(), multi: true },
|
|
257
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"99.999.999/9999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"99.999.999/9999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n\n @if (hint) {\n <small class=\"text-xs text-surface-500\">{{ hint }}</small>\n }\n</div>\n" }]
|
|
258
|
+
}], propDecorators: { label: [{
|
|
259
|
+
type: Input
|
|
260
|
+
}], hint: [{
|
|
261
|
+
type: Input
|
|
262
|
+
}], placeholder: [{
|
|
263
|
+
type: Input
|
|
264
|
+
}], id: [{
|
|
265
|
+
type: Input
|
|
266
|
+
}], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
267
|
+
|
|
268
|
+
class PjcCpfCnpjFieldComponent {
|
|
269
|
+
label = 'CPF/CNPJ';
|
|
270
|
+
id = `pjc-cpf-cnpj-${Math.random().toString(36).substring(2, 9)}`;
|
|
271
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
272
|
+
displayValue = '';
|
|
273
|
+
placeholder = '000.000.000-00';
|
|
274
|
+
disabled = false;
|
|
275
|
+
rawValue = '';
|
|
276
|
+
onChange = () => { };
|
|
277
|
+
onTouched = () => { };
|
|
278
|
+
writeValue(val) {
|
|
279
|
+
this.rawValue = val?.replaceAll(/\D/g, '') ?? '';
|
|
280
|
+
this.displayValue = this.formatValue(this.rawValue);
|
|
281
|
+
this.updatePlaceholder();
|
|
282
|
+
}
|
|
283
|
+
registerOnChange(fn) {
|
|
284
|
+
this.onChange = fn;
|
|
285
|
+
}
|
|
286
|
+
registerOnTouched(fn) {
|
|
287
|
+
this.onTouched = fn;
|
|
288
|
+
}
|
|
289
|
+
setDisabledState(isDisabled) {
|
|
290
|
+
this.disabled = isDisabled;
|
|
291
|
+
}
|
|
292
|
+
onInputChange(event) {
|
|
293
|
+
const input = event.target;
|
|
294
|
+
const cursorPos = input.selectionStart ?? 0;
|
|
295
|
+
const prevLength = this.displayValue.length;
|
|
296
|
+
this.rawValue = input.value.replaceAll(/\D/g, '').substring(0, 14);
|
|
297
|
+
this.displayValue = this.formatValue(this.rawValue);
|
|
298
|
+
this.updatePlaceholder();
|
|
299
|
+
this.onChange(this.rawValue);
|
|
300
|
+
const newLength = this.displayValue.length;
|
|
301
|
+
const newCursor = cursorPos + (newLength - prevLength);
|
|
302
|
+
setTimeout(() => input.setSelectionRange(newCursor, newCursor));
|
|
303
|
+
}
|
|
304
|
+
onModelTouched() {
|
|
305
|
+
this.onTouched();
|
|
306
|
+
}
|
|
307
|
+
formatValue(digits) {
|
|
308
|
+
if (!digits)
|
|
309
|
+
return '';
|
|
310
|
+
if (digits.length <= 11) {
|
|
311
|
+
return digits
|
|
312
|
+
.replace(/(\d{3})(\d)/, '$1.$2')
|
|
313
|
+
.replace(/(\d{3}\.\d{3})(\d)/, '$1.$2')
|
|
314
|
+
.replace(/(\d{3}\.\d{3}\.\d{3})(\d{1,2})/, '$1-$2');
|
|
315
|
+
}
|
|
316
|
+
return digits
|
|
317
|
+
.replace(/(\d{2})(\d)/, '$1.$2')
|
|
318
|
+
.replace(/(\d{2}\.\d{3})(\d)/, '$1.$2')
|
|
319
|
+
.replace(/(\d{2}\.\d{3}\.\d{3})(\d)/, '$1/$2')
|
|
320
|
+
.replace(/(\d{2}\.\d{3}\.\d{3}\/\d{4})(\d{1,2})/, '$1-$2');
|
|
321
|
+
}
|
|
322
|
+
updatePlaceholder() {
|
|
323
|
+
if (this.rawValue.length > 11) {
|
|
324
|
+
this.placeholder = '00.000.000/0000-00';
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
this.placeholder = '000.000.000-00';
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
validate(control) {
|
|
331
|
+
return PjcValidators.cpfCnpj()(control);
|
|
332
|
+
}
|
|
333
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCpfCnpjFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
334
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcCpfCnpjFieldComponent, isStandalone: true, selector: "pjc-cpf-cnpj-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
335
|
+
{
|
|
336
|
+
provide: NG_VALUE_ACCESSOR,
|
|
337
|
+
useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
|
|
338
|
+
multi: true,
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
provide: NG_VALIDATORS,
|
|
342
|
+
useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
|
|
343
|
+
multi: true,
|
|
344
|
+
},
|
|
345
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"18\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"18\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }] });
|
|
346
|
+
}
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCpfCnpjFieldComponent, decorators: [{
|
|
348
|
+
type: Component,
|
|
349
|
+
args: [{ selector: 'pjc-cpf-cnpj-field', imports: [CommonModule, FormsModule, FloatLabelModule, InputTextModule], providers: [
|
|
350
|
+
{
|
|
351
|
+
provide: NG_VALUE_ACCESSOR,
|
|
352
|
+
useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
|
|
353
|
+
multi: true,
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
provide: NG_VALIDATORS,
|
|
357
|
+
useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
|
|
358
|
+
multi: true,
|
|
359
|
+
},
|
|
360
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"18\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"18\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n }\n</div>\n" }]
|
|
361
|
+
}], propDecorators: { label: [{
|
|
362
|
+
type: Input
|
|
363
|
+
}], id: [{
|
|
364
|
+
type: Input
|
|
365
|
+
}], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
366
|
+
|
|
367
|
+
class PjcPlacaFieldComponent {
|
|
368
|
+
label = 'Placa do Veículo';
|
|
369
|
+
placeholder = 'ABC-1234';
|
|
370
|
+
id = `pjc-placa-${Math.random().toString(36).substring(2, 9)}`;
|
|
371
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
372
|
+
value = '';
|
|
373
|
+
onChange = () => { };
|
|
374
|
+
onTouched = () => { };
|
|
375
|
+
writeValue(val) {
|
|
376
|
+
this.value = val?.toUpperCase() || '';
|
|
377
|
+
}
|
|
378
|
+
registerOnChange(fn) {
|
|
379
|
+
this.onChange = fn;
|
|
380
|
+
}
|
|
381
|
+
registerOnTouched(fn) {
|
|
382
|
+
this.onTouched = fn;
|
|
383
|
+
}
|
|
384
|
+
onModelChange() {
|
|
385
|
+
// Força o valor para uppercase antes de enviar para o formulário
|
|
386
|
+
this.value = this.value.toUpperCase();
|
|
387
|
+
this.onChange(this.value);
|
|
388
|
+
}
|
|
389
|
+
validate(control) {
|
|
390
|
+
return PjcValidators.placaVeiculo()(control);
|
|
391
|
+
}
|
|
392
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcPlacaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
393
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcPlacaFieldComponent, isStandalone: true, selector: "pjc-placa-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
394
|
+
{
|
|
395
|
+
provide: NG_VALUE_ACCESSOR,
|
|
396
|
+
useExisting: forwardRef(() => PjcPlacaFieldComponent),
|
|
397
|
+
multi: true,
|
|
398
|
+
},
|
|
399
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => PjcPlacaFieldComponent), multi: true },
|
|
400
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"aaa-9*99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"aaa-9*99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i2.InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] });
|
|
401
|
+
}
|
|
402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcPlacaFieldComponent, decorators: [{
|
|
403
|
+
type: Component,
|
|
404
|
+
args: [{ selector: 'pjc-placa-field', imports: [CommonModule, FormsModule, InputMaskModule, FloatLabelModule], providers: [
|
|
405
|
+
{
|
|
406
|
+
provide: NG_VALUE_ACCESSOR,
|
|
407
|
+
useExisting: forwardRef(() => PjcPlacaFieldComponent),
|
|
408
|
+
multi: true,
|
|
409
|
+
},
|
|
410
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => PjcPlacaFieldComponent), multi: true },
|
|
411
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"aaa-9*99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"aaa-9*99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n }\n</div>\n" }]
|
|
412
|
+
}], propDecorators: { label: [{
|
|
413
|
+
type: Input
|
|
414
|
+
}], placeholder: [{
|
|
415
|
+
type: Input
|
|
416
|
+
}], id: [{
|
|
417
|
+
type: Input
|
|
418
|
+
}], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
419
|
+
|
|
420
|
+
class PjcTelefoneFieldComponent {
|
|
421
|
+
label = 'Telefone';
|
|
422
|
+
id = `pjc-telefone-${Math.random().toString(36).substring(2, 9)}`;
|
|
423
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
424
|
+
displayValue = '';
|
|
425
|
+
placeholder = '(00) 0000-0000';
|
|
426
|
+
disabled = false;
|
|
427
|
+
rawValue = '';
|
|
428
|
+
onChange = () => { };
|
|
429
|
+
onTouched = () => { };
|
|
430
|
+
writeValue(val) {
|
|
431
|
+
this.rawValue = val?.replaceAll(/\D/g, '') ?? '';
|
|
432
|
+
this.displayValue = this.formatValue(this.rawValue);
|
|
433
|
+
this.updatePlaceholder();
|
|
434
|
+
}
|
|
435
|
+
registerOnChange(fn) {
|
|
436
|
+
this.onChange = fn;
|
|
437
|
+
}
|
|
438
|
+
registerOnTouched(fn) {
|
|
439
|
+
this.onTouched = fn;
|
|
440
|
+
}
|
|
441
|
+
setDisabledState(isDisabled) {
|
|
442
|
+
this.disabled = isDisabled;
|
|
443
|
+
}
|
|
444
|
+
onInputChange(event) {
|
|
445
|
+
const input = event.target;
|
|
446
|
+
const cursorPos = input.selectionStart ?? 0;
|
|
447
|
+
const prevLength = this.displayValue.length;
|
|
448
|
+
this.rawValue = input.value.replaceAll(/\D/g, '').substring(0, 11);
|
|
449
|
+
this.displayValue = this.formatValue(this.rawValue);
|
|
450
|
+
this.updatePlaceholder();
|
|
451
|
+
this.onChange(this.rawValue);
|
|
452
|
+
const newLength = this.displayValue.length;
|
|
453
|
+
const newCursor = cursorPos + (newLength - prevLength);
|
|
454
|
+
setTimeout(() => input.setSelectionRange(newCursor, newCursor));
|
|
455
|
+
}
|
|
456
|
+
onModelTouched() {
|
|
457
|
+
this.onTouched();
|
|
458
|
+
}
|
|
459
|
+
formatValue(digits) {
|
|
460
|
+
if (!digits)
|
|
461
|
+
return '';
|
|
462
|
+
if (digits.length <= 10) {
|
|
463
|
+
// Fixo: (99) 9999-9999
|
|
464
|
+
return digits
|
|
465
|
+
.replace(/(\d{2})(\d)/, '($1) $2')
|
|
466
|
+
.replace(/(\(\d{2}\) \d{4})(\d)/, '$1-$2');
|
|
467
|
+
}
|
|
468
|
+
// Celular: (99) 99999-9999
|
|
469
|
+
return digits
|
|
470
|
+
.replace(/(\d{2})(\d)/, '($1) $2')
|
|
471
|
+
.replace(/(\(\d{2}\) \d{5})(\d)/, '$1-$2');
|
|
472
|
+
}
|
|
473
|
+
updatePlaceholder() {
|
|
474
|
+
if (this.rawValue.length > 10) {
|
|
475
|
+
this.placeholder = '(00) 90000-0000';
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
this.placeholder = '(00) 0000-0000';
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
validate(control) {
|
|
482
|
+
return PjcValidators.telefone()(control);
|
|
483
|
+
}
|
|
484
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcTelefoneFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
485
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcTelefoneFieldComponent, isStandalone: true, selector: "pjc-telefone-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
486
|
+
{
|
|
487
|
+
provide: NG_VALUE_ACCESSOR,
|
|
488
|
+
useExisting: forwardRef(() => PjcTelefoneFieldComponent),
|
|
489
|
+
multi: true,
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
provide: NG_VALIDATORS,
|
|
493
|
+
useExisting: forwardRef(() => PjcTelefoneFieldComponent),
|
|
494
|
+
multi: true,
|
|
495
|
+
},
|
|
496
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"15\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"15\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }] });
|
|
497
|
+
}
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcTelefoneFieldComponent, decorators: [{
|
|
499
|
+
type: Component,
|
|
500
|
+
args: [{ selector: 'pjc-telefone-field', imports: [CommonModule, FormsModule, FloatLabelModule, InputTextModule], providers: [
|
|
501
|
+
{
|
|
502
|
+
provide: NG_VALUE_ACCESSOR,
|
|
503
|
+
useExisting: forwardRef(() => PjcTelefoneFieldComponent),
|
|
504
|
+
multi: true,
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
provide: NG_VALIDATORS,
|
|
508
|
+
useExisting: forwardRef(() => PjcTelefoneFieldComponent),
|
|
509
|
+
multi: true,
|
|
510
|
+
},
|
|
511
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"15\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"15\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n }\n</div>\n" }]
|
|
512
|
+
}], propDecorators: { label: [{
|
|
513
|
+
type: Input
|
|
514
|
+
}], id: [{
|
|
515
|
+
type: Input
|
|
516
|
+
}], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
517
|
+
|
|
518
|
+
class PjcDataFieldComponent {
|
|
519
|
+
label = 'Data';
|
|
520
|
+
id = `pjc-data-${Math.random().toString(36).substring(2, 9)}`;
|
|
521
|
+
minDate;
|
|
522
|
+
maxDate;
|
|
523
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
524
|
+
value = null;
|
|
525
|
+
onChange = () => { };
|
|
526
|
+
onTouched = () => { };
|
|
527
|
+
el = inject(ElementRef);
|
|
528
|
+
isFormatting = false;
|
|
529
|
+
ngAfterViewInit() {
|
|
530
|
+
const input = this.el.nativeElement.querySelector('input');
|
|
531
|
+
if (input) {
|
|
532
|
+
input.addEventListener('input', this.handleDateInput);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
ngOnDestroy() {
|
|
536
|
+
const input = this.el.nativeElement.querySelector('input');
|
|
537
|
+
if (input) {
|
|
538
|
+
input.removeEventListener('input', this.handleDateInput);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
handleDateInput = (event) => {
|
|
542
|
+
if (this.isFormatting)
|
|
543
|
+
return;
|
|
544
|
+
const input = event.target;
|
|
545
|
+
const raw = input.value;
|
|
546
|
+
const cursor = input.selectionStart ?? raw.length;
|
|
547
|
+
const digits = raw.replace(/\D/g, '').substring(0, 8);
|
|
548
|
+
let formatted = digits;
|
|
549
|
+
if (digits.length > 2) {
|
|
550
|
+
formatted = `${digits.substring(0, 2)}/${digits.substring(2)}`;
|
|
551
|
+
}
|
|
552
|
+
if (digits.length > 4) {
|
|
553
|
+
formatted = `${digits.substring(0, 2)}/${digits.substring(2, 4)}/${digits.substring(4)}`;
|
|
554
|
+
}
|
|
555
|
+
if (raw === formatted)
|
|
556
|
+
return;
|
|
557
|
+
const digitsBeforeCursor = raw.substring(0, cursor).replace(/\D/g, '').length;
|
|
558
|
+
this.isFormatting = true;
|
|
559
|
+
input.value = formatted;
|
|
560
|
+
this.isFormatting = false;
|
|
561
|
+
// Restore cursor at the position after the same digit count
|
|
562
|
+
let newCursor = 0;
|
|
563
|
+
let digitCount = 0;
|
|
564
|
+
for (let i = 0; i < formatted.length; i++) {
|
|
565
|
+
if (/\d/.test(formatted[i]))
|
|
566
|
+
digitCount++;
|
|
567
|
+
if (digitCount === digitsBeforeCursor) {
|
|
568
|
+
newCursor = i + 1;
|
|
569
|
+
break;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
input.setSelectionRange(newCursor, newCursor);
|
|
573
|
+
};
|
|
574
|
+
writeValue(val) {
|
|
575
|
+
this.value = val ?? null;
|
|
576
|
+
}
|
|
577
|
+
registerOnChange(fn) {
|
|
578
|
+
this.onChange = fn;
|
|
579
|
+
}
|
|
580
|
+
registerOnTouched(fn) {
|
|
581
|
+
this.onTouched = fn;
|
|
582
|
+
}
|
|
583
|
+
onValueChange(date) {
|
|
584
|
+
this.onChange(date);
|
|
585
|
+
}
|
|
586
|
+
validate(_control) {
|
|
587
|
+
const value = this.value;
|
|
588
|
+
if (!value)
|
|
589
|
+
return null;
|
|
590
|
+
if (this.minDate && value < this.minDate) {
|
|
591
|
+
return { dataMinima: { min: this.minDate, atual: value } };
|
|
592
|
+
}
|
|
593
|
+
if (this.maxDate && value > this.maxDate) {
|
|
594
|
+
return { dataMaxima: { max: this.maxDate, atual: value } };
|
|
595
|
+
}
|
|
596
|
+
return null;
|
|
597
|
+
}
|
|
598
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcDataFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
599
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcDataFieldComponent, isStandalone: true, selector: "pjc-data-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
600
|
+
{
|
|
601
|
+
provide: NG_VALUE_ACCESSOR,
|
|
602
|
+
useExisting: forwardRef(() => PjcDataFieldComponent),
|
|
603
|
+
multi: true,
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
provide: NG_VALIDATORS,
|
|
607
|
+
useExisting: forwardRef(() => PjcDataFieldComponent),
|
|
608
|
+
multi: true,
|
|
609
|
+
},
|
|
610
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-datePicker\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n dateFormat=\"dd/mm/yy\"\n [showIcon]=\"true\"\n [showClear]=\"true\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n placeholder=\"dd/mm/aaaa\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n ></p-datePicker>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-datePicker\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n dateFormat=\"dd/mm/yy\"\n [showIcon]=\"true\"\n [showClear]=\"true\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n placeholder=\"dd/mm/aaaa\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n ></p-datePicker>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] });
|
|
611
|
+
}
|
|
612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcDataFieldComponent, decorators: [{
|
|
613
|
+
type: Component,
|
|
614
|
+
args: [{ selector: 'pjc-data-field', imports: [CommonModule, FormsModule, DatePickerModule, FloatLabelModule], providers: [
|
|
615
|
+
{
|
|
616
|
+
provide: NG_VALUE_ACCESSOR,
|
|
617
|
+
useExisting: forwardRef(() => PjcDataFieldComponent),
|
|
618
|
+
multi: true,
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
provide: NG_VALIDATORS,
|
|
622
|
+
useExisting: forwardRef(() => PjcDataFieldComponent),
|
|
623
|
+
multi: true,
|
|
624
|
+
},
|
|
625
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-datePicker\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n dateFormat=\"dd/mm/yy\"\n [showIcon]=\"true\"\n [showClear]=\"true\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n placeholder=\"dd/mm/aaaa\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n ></p-datePicker>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-datePicker\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n dateFormat=\"dd/mm/yy\"\n [showIcon]=\"true\"\n [showClear]=\"true\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n placeholder=\"dd/mm/aaaa\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n ></p-datePicker>\n }\n</div>\n" }]
|
|
626
|
+
}], propDecorators: { label: [{
|
|
627
|
+
type: Input
|
|
628
|
+
}], id: [{
|
|
629
|
+
type: Input
|
|
630
|
+
}], minDate: [{
|
|
631
|
+
type: Input
|
|
632
|
+
}], maxDate: [{
|
|
633
|
+
type: Input
|
|
634
|
+
}], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
635
|
+
|
|
636
|
+
class PjcHoraFieldComponent {
|
|
637
|
+
label = input('Hora', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
638
|
+
id = input(`pjc-hora-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
639
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
640
|
+
value = '';
|
|
641
|
+
onChange = () => { };
|
|
642
|
+
onTouched = () => { };
|
|
643
|
+
writeValue(val) {
|
|
644
|
+
this.value = val ?? '';
|
|
645
|
+
}
|
|
646
|
+
registerOnChange(fn) {
|
|
647
|
+
this.onChange = fn;
|
|
648
|
+
}
|
|
649
|
+
registerOnTouched(fn) {
|
|
650
|
+
this.onTouched = fn;
|
|
651
|
+
}
|
|
652
|
+
onInput() {
|
|
653
|
+
this.onChange(this.value);
|
|
654
|
+
}
|
|
655
|
+
validate(control) {
|
|
656
|
+
return PjcValidators.hora()(control);
|
|
657
|
+
}
|
|
658
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcHoraFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
659
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcHoraFieldComponent, isStandalone: true, selector: "pjc-hora-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
660
|
+
{
|
|
661
|
+
provide: NG_VALUE_ACCESSOR,
|
|
662
|
+
useExisting: forwardRef(() => PjcHoraFieldComponent),
|
|
663
|
+
multi: true,
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
provide: NG_VALIDATORS,
|
|
667
|
+
useExisting: forwardRef(() => PjcHoraFieldComponent),
|
|
668
|
+
multi: true,
|
|
669
|
+
},
|
|
670
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label()) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id()\"\n mask=\"99:99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onInput()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n placeholder=\"HH:MM\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id()\"\n mask=\"99:99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onInput()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n placeholder=\"HH:MM\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i2.InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
671
|
+
}
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcHoraFieldComponent, decorators: [{
|
|
673
|
+
type: Component,
|
|
674
|
+
args: [{ selector: 'pjc-hora-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, InputMaskModule, FloatLabelModule], providers: [
|
|
675
|
+
{
|
|
676
|
+
provide: NG_VALUE_ACCESSOR,
|
|
677
|
+
useExisting: forwardRef(() => PjcHoraFieldComponent),
|
|
678
|
+
multi: true,
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
provide: NG_VALIDATORS,
|
|
682
|
+
useExisting: forwardRef(() => PjcHoraFieldComponent),
|
|
683
|
+
multi: true,
|
|
684
|
+
},
|
|
685
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label()) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id()\"\n mask=\"99:99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onInput()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n placeholder=\"HH:MM\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id()\"\n mask=\"99:99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onInput()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n placeholder=\"HH:MM\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n</div>\n" }]
|
|
686
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
687
|
+
|
|
688
|
+
class PjcNomeFieldComponent {
|
|
689
|
+
label = 'Nome';
|
|
690
|
+
placeholder = 'Digite o nome';
|
|
691
|
+
id = `pjc-nome-${Math.random().toString(36).substring(2, 9)}`;
|
|
692
|
+
labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
693
|
+
value = '';
|
|
694
|
+
onChange = () => { };
|
|
695
|
+
onTouched = () => { };
|
|
696
|
+
writeValue(val) {
|
|
697
|
+
this.value = val?.toUpperCase() ?? '';
|
|
698
|
+
}
|
|
699
|
+
registerOnChange(fn) {
|
|
700
|
+
this.onChange = fn;
|
|
701
|
+
}
|
|
702
|
+
registerOnTouched(fn) {
|
|
703
|
+
this.onTouched = fn;
|
|
704
|
+
}
|
|
705
|
+
onInput(event) {
|
|
706
|
+
const upper = event.target.value.toUpperCase();
|
|
707
|
+
this.value = upper;
|
|
708
|
+
this.onChange(upper);
|
|
709
|
+
}
|
|
710
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcNomeFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
711
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcNomeFieldComponent, isStandalone: true, selector: "pjc-nome-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
712
|
+
{
|
|
713
|
+
provide: NG_VALUE_ACCESSOR,
|
|
714
|
+
useExisting: forwardRef(() => PjcNomeFieldComponent),
|
|
715
|
+
multi: true,
|
|
716
|
+
},
|
|
717
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500 uppercase\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500 uppercase\"\n />\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] });
|
|
718
|
+
}
|
|
719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcNomeFieldComponent, decorators: [{
|
|
720
|
+
type: Component,
|
|
721
|
+
args: [{ selector: 'pjc-nome-field', imports: [CommonModule, FormsModule, InputTextModule, FloatLabelModule], providers: [
|
|
722
|
+
{
|
|
723
|
+
provide: NG_VALUE_ACCESSOR,
|
|
724
|
+
useExisting: forwardRef(() => PjcNomeFieldComponent),
|
|
725
|
+
multi: true,
|
|
726
|
+
},
|
|
727
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500 uppercase\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500 uppercase\"\n />\n }\n</div>\n" }]
|
|
728
|
+
}], propDecorators: { label: [{
|
|
729
|
+
type: Input
|
|
730
|
+
}], placeholder: [{
|
|
731
|
+
type: Input
|
|
732
|
+
}], id: [{
|
|
733
|
+
type: Input
|
|
734
|
+
}], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
|
|
735
|
+
|
|
736
|
+
/*
|
|
737
|
+
* Public API Surface of pjc-fields
|
|
738
|
+
*/
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Generated bundle index. Do not edit.
|
|
742
|
+
*/
|
|
743
|
+
|
|
744
|
+
export { PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcFields, PjcHoraFieldComponent, PjcNomeFieldComponent, PjcPlacaFieldComponent, PjcTelefoneFieldComponent, PjcValidators };
|
|
745
|
+
//# sourceMappingURL=pjc-fields.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pjc-fields.mjs","sources":["../../../projects/pjc-fields/src/lib/pjc-fields.ts","../../../projects/pjc-fields/src/lib/validators/pjc-validators.ts","../../../projects/pjc-fields/src/lib/components/cpf-field/cpf-field.component.ts","../../../projects/pjc-fields/src/lib/components/cpf-field/cpf-field.component.html","../../../projects/pjc-fields/src/lib/components/cnpj-field/cnpj-field.component.ts","../../../projects/pjc-fields/src/lib/components/cnpj-field/cnpj-field.component.html","../../../projects/pjc-fields/src/lib/components/cpf-cnpj-field/cpf-cnpj-field.component.ts","../../../projects/pjc-fields/src/lib/components/cpf-cnpj-field/cpf-cnpj-field.component.html","../../../projects/pjc-fields/src/lib/components/placa-field/placa-field.component.ts","../../../projects/pjc-fields/src/lib/components/placa-field/placa-field.component.html","../../../projects/pjc-fields/src/lib/components/telefone-field/telefone-field.component.ts","../../../projects/pjc-fields/src/lib/components/telefone-field/telefone-field.component.html","../../../projects/pjc-fields/src/lib/components/data-field/data-field.component.ts","../../../projects/pjc-fields/src/lib/components/data-field/data-field.component.html","../../../projects/pjc-fields/src/lib/components/hora-field/hora-field.component.ts","../../../projects/pjc-fields/src/lib/components/hora-field/hora-field.component.html","../../../projects/pjc-fields/src/lib/components/nome-field/nome-field.component.ts","../../../projects/pjc-fields/src/lib/components/nome-field/nome-field.component.html","../../../projects/pjc-fields/src/public-api.ts","../../../projects/pjc-fields/src/pjc-fields.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-pjc-fields',\n imports: [],\n template: ` <p>pjc-fields works!</p> `,\n styles: ``,\n})\nexport class PjcFields {}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\nexport class PjcValidators {\n static cpf(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value?.replace(/\\D/g, '');\n\n if (!value) return null;\n\n if (value.length !== 11 || /^(\\d)\\1+$/.test(value)) {\n return { cpfInvalid: true };\n }\n\n if (!PjcValidators.validateCpfDigits(value)) {\n return { cpfInvalid: true };\n }\n\n return null;\n };\n }\n\n private static validateCpfDigits(cpf: string): boolean {\n const calculateDigit = (slice: string, factor: number) => {\n let total = 0;\n for (const digit of slice) {\n total += parseInt(digit) * factor--;\n }\n const remainder = total % 11;\n return remainder < 2 ? 0 : 11 - remainder;\n };\n\n const digit1 = calculateDigit(cpf.substring(0, 9), 10);\n const digit2 = calculateDigit(cpf.substring(0, 10), 11);\n\n return digit1 === parseInt(cpf[9]) && digit2 === parseInt(cpf[10]);\n }\n\n /**\n * Valida o algoritmo do CNPJ (Módulo 11)\n */\n static cnpj(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value?.replace(/\\D/g, '');\n\n if (!value) return null;\n\n // CNPJ deve ter 14 dígitos e não pode ser sequência repetida\n if (value.length !== 14 || /^(\\d)\\1+$/.test(value)) {\n return { cnpjInvalid: true };\n }\n\n if (!PjcValidators.validateCnpjDigits(value)) {\n return { cnpjInvalid: true };\n }\n\n return null;\n };\n }\n\n private static validateCnpjDigits(cnpj: string): boolean {\n const calculateDigit = (slice: string, weights: number[]) => {\n let total = 0;\n for (let i = 0; i < slice.length; i++) {\n total += parseInt(slice[i]) * weights[i];\n }\n const remainder = total % 11;\n return remainder < 2 ? 0 : 11 - remainder;\n };\n\n const weights1 = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\n const weights2 = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\n\n const digit1 = calculateDigit(cnpj.substring(0, 12), weights1);\n const digit2 = calculateDigit(cnpj.substring(0, 13), weights2);\n\n return digit1 === parseInt(cnpj[12]) && digit2 === parseInt(cnpj[13]);\n }\n\n static cpfCnpj(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value?.replace(/\\D/g, '');\n if (!value) return null;\n\n if (value.length <= 11) {\n return PjcValidators.cpf()(control);\n } else {\n return PjcValidators.cnpj()(control);\n }\n };\n }\n\n static telefone(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const digits = control.value?.replace(/\\D/g, '');\n if (!digits) return null;\n\n // Fixo: DDD (2) + 8 dígitos = 10 | Celular: DDD (2) + 9 dígitos = 11\n if (digits.length !== 10 && digits.length !== 11) {\n return { telefoneInvalid: true };\n }\n\n // Celular deve começar com 9 após o DDD\n if (digits.length === 11 && digits[2] !== '9') {\n return { telefoneInvalid: true };\n }\n\n return null;\n };\n }\n\n static hora(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value;\n if (!value) return null;\n\n const match = value.match(/^(\\d{2}):(\\d{2})$/);\n if (!match) return { horaInvalid: true };\n\n const hours = parseInt(match[1], 10);\n const minutes = parseInt(match[2], 10);\n\n if (hours > 23 || minutes > 59) {\n return { horaInvalid: true };\n }\n\n return null;\n };\n }\n\n static placaVeiculo(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value?.toUpperCase().replace('-', '');\n if (!value) return null;\n\n // Regex para Padrão Antigo (AAA9999) e Mercosul (AAA9A99)\n const plateRegex = /^[A-Z]{3}[0-9][A-Z0-9][0-9]{2}$/;\n\n return plateRegex.test(value) ? null : { plateInvalid: true };\n };\n }\n}\n","import { Component, forwardRef, input, Input, OnInit } from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n FormsModule,\n NG_VALIDATORS,\n Validator,\n FormControl,\n} from '@angular/forms';\nimport { InputMaskModule } from 'primeng/inputmask';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { CommonModule } from '@angular/common';\nimport { PjcValidators } from '../../validators/pjc-validators';\n@Component({\n selector: 'pjc-cpf-field',\n templateUrl: 'cpf-field.component.html',\n imports: [CommonModule, FormsModule, InputMaskModule, FloatLabelModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcCpfFieldComponent),\n multi: true,\n },\n { provide: NG_VALIDATORS, useValue: PjcValidators.cpf(), multi: true },\n ],\n})\nexport class PjcCpfFieldComponent implements ControlValueAccessor, Validator {\n @Input() label: string = '';\n @Input() hint: string = '';\n @Input() placeholder: string = '000.000.000-00';\n @Input() id: string = `pjc-cpf-${Math.random().toString(36).substring(2, 9)}`;\n labelVariant = input<'over' | 'in' | 'on'>('over');\n\n value: string = '';\n disabled: boolean = false;\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n // --- ControlValueAccessor ---\n writeValue(val: any): void {\n this.value = val;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onModelChange(): void {\n this.onChange(this.value);\n }\n\n onModelTouched(): void {\n this.onTouched();\n }\n\n // --- Validator ---\n validate(control: FormControl) {\n return PjcValidators.cpf()(control);\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"999.999.999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"999.999.999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n\n @if (hint) {\n <small class=\"text-xs text-surface-500\">{{ hint }}</small>\n }\n</div>\n","import { Component, input, Input, forwardRef } from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NG_VALIDATORS,\n FormControl,\n Validator,\n FormsModule,\n} from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { InputMaskModule } from 'primeng/inputmask';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { PjcValidators } from '../../validators/pjc-validators';\n\n@Component({\n selector: 'pjc-cnpj-field',\n templateUrl: 'cnpj-field.component.html',\n imports: [CommonModule, FormsModule, InputMaskModule, FloatLabelModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcCnpjFieldComponent),\n multi: true,\n },\n { provide: NG_VALIDATORS, useValue: PjcValidators.cnpj(), multi: true },\n ],\n})\nexport class PjcCnpjFieldComponent implements ControlValueAccessor, Validator {\n @Input() label: string = '';\n @Input() hint: string = '';\n @Input() placeholder: string = '00.000.000/0000-00';\n @Input() id: string = `pjc-cnpj-${Math.random().toString(36).substring(2, 9)}`;\n labelVariant = input<'over' | 'in' | 'on'>('over');\n\n value: string = '';\n disabled: boolean = false;\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n // ControlValueAccessor\n writeValue(val: any): void {\n this.value = val;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onModelChange(event: any): void {\n this.onChange(this.value);\n }\n\n onModelTouched(): void {\n this.onTouched();\n }\n\n // Integração com a validação da Lib\n validate(control: FormControl) {\n return PjcValidators.cnpj()(control);\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"99.999.999/9999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"99.999.999/9999-99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n [unmask]=\"true\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500 transition-colors\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n\n @if (hint) {\n <small class=\"text-xs text-surface-500\">{{ hint }}</small>\n }\n</div>\n","import { Component, forwardRef, input, Input } from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormsModule,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n Validator,\n} from '@angular/forms';\nimport { PjcValidators } from '../../validators/pjc-validators';\nimport { CommonModule } from '@angular/common';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@Component({\n selector: 'pjc-cpf-cnpj-field',\n templateUrl: 'cpf-cnpj-field.component.html',\n imports: [CommonModule, FormsModule, FloatLabelModule, InputTextModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),\n multi: true,\n },\n ],\n})\nexport class PjcCpfCnpjFieldComponent implements ControlValueAccessor, Validator {\n @Input() label: string = 'CPF/CNPJ';\n @Input() id: string = `pjc-cpf-cnpj-${Math.random().toString(36).substring(2, 9)}`;\n labelVariant = input<'over' | 'in' | 'on'>('over');\n\n displayValue: string = '';\n placeholder: string = '000.000.000-00';\n disabled: boolean = false;\n\n private rawValue: string = '';\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n writeValue(val: any): void {\n this.rawValue = val?.replaceAll(/\\D/g, '') ?? '';\n this.displayValue = this.formatValue(this.rawValue);\n this.updatePlaceholder();\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const cursorPos = input.selectionStart ?? 0;\n const prevLength = this.displayValue.length;\n\n this.rawValue = input.value.replaceAll(/\\D/g, '').substring(0, 14);\n this.displayValue = this.formatValue(this.rawValue);\n this.updatePlaceholder();\n this.onChange(this.rawValue);\n\n const newLength = this.displayValue.length;\n const newCursor = cursorPos + (newLength - prevLength);\n setTimeout(() => input.setSelectionRange(newCursor, newCursor));\n }\n\n onModelTouched(): void {\n this.onTouched();\n }\n\n private formatValue(digits: string): string {\n if (!digits) return '';\n\n if (digits.length <= 11) {\n return digits\n .replace(/(\\d{3})(\\d)/, '$1.$2')\n .replace(/(\\d{3}\\.\\d{3})(\\d)/, '$1.$2')\n .replace(/(\\d{3}\\.\\d{3}\\.\\d{3})(\\d{1,2})/, '$1-$2');\n }\n\n return digits\n .replace(/(\\d{2})(\\d)/, '$1.$2')\n .replace(/(\\d{2}\\.\\d{3})(\\d)/, '$1.$2')\n .replace(/(\\d{2}\\.\\d{3}\\.\\d{3})(\\d)/, '$1/$2')\n .replace(/(\\d{2}\\.\\d{3}\\.\\d{3}\\/\\d{4})(\\d{1,2})/, '$1-$2');\n }\n\n private updatePlaceholder(): void {\n if (this.rawValue.length > 11) {\n this.placeholder = '00.000.000/0000-00';\n } else {\n this.placeholder = '000.000.000-00';\n }\n }\n\n validate(control: FormControl) {\n return PjcValidators.cpfCnpj()(control);\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"18\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"18\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n }\n</div>\n","import { Component, forwardRef, input, Input, OnInit } from '@angular/core';\nimport {\n ControlValueAccessor,\n Validator,\n FormControl,\n FormsModule,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { PjcValidators } from '../../validators/pjc-validators';\nimport { CommonModule } from '@angular/common';\nimport { InputMaskModule } from 'primeng/inputmask';\nimport { FloatLabelModule } from 'primeng/floatlabel';\n\n@Component({\n selector: 'pjc-placa-field',\n templateUrl: 'placa-field.component.html',\n imports: [CommonModule, FormsModule, InputMaskModule, FloatLabelModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcPlacaFieldComponent),\n multi: true,\n },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => PjcPlacaFieldComponent), multi: true },\n ],\n})\nexport class PjcPlacaFieldComponent implements ControlValueAccessor, Validator {\n @Input() label: string = 'Placa do Veículo';\n @Input() placeholder: string = 'ABC-1234';\n @Input() id: string = `pjc-placa-${Math.random().toString(36).substring(2, 9)}`;\n labelVariant = input<'over' | 'in' | 'on'>('over');\n\n value: string = '';\n onChange: any = () => {};\n onTouched: any = () => {};\n\n writeValue(val: any): void {\n this.value = val?.toUpperCase() || '';\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n onModelChange(): void {\n // Força o valor para uppercase antes de enviar para o formulário\n this.value = this.value.toUpperCase();\n this.onChange(this.value);\n }\n\n validate(control: FormControl) {\n return PjcValidators.placaVeiculo()(control);\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id\"\n mask=\"aaa-9*99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id\"\n mask=\"aaa-9*99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onModelChange()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n [placeholder]=\"placeholder\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n }\n</div>\n","import { Component, forwardRef, input, Input } from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormsModule,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n Validator,\n} from '@angular/forms';\nimport { PjcValidators } from '../../validators/pjc-validators';\nimport { CommonModule } from '@angular/common';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@Component({\n selector: 'pjc-telefone-field',\n templateUrl: 'telefone-field.component.html',\n imports: [CommonModule, FormsModule, FloatLabelModule, InputTextModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcTelefoneFieldComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PjcTelefoneFieldComponent),\n multi: true,\n },\n ],\n})\nexport class PjcTelefoneFieldComponent implements ControlValueAccessor, Validator {\n @Input() label: string = 'Telefone';\n @Input() id: string = `pjc-telefone-${Math.random().toString(36).substring(2, 9)}`;\n labelVariant = input<'over' | 'in' | 'on'>('over');\n\n displayValue: string = '';\n placeholder: string = '(00) 0000-0000';\n disabled: boolean = false;\n\n private rawValue: string = '';\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n writeValue(val: any): void {\n this.rawValue = val?.replaceAll(/\\D/g, '') ?? '';\n this.displayValue = this.formatValue(this.rawValue);\n this.updatePlaceholder();\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const cursorPos = input.selectionStart ?? 0;\n const prevLength = this.displayValue.length;\n\n this.rawValue = input.value.replaceAll(/\\D/g, '').substring(0, 11);\n this.displayValue = this.formatValue(this.rawValue);\n this.updatePlaceholder();\n this.onChange(this.rawValue);\n\n const newLength = this.displayValue.length;\n const newCursor = cursorPos + (newLength - prevLength);\n setTimeout(() => input.setSelectionRange(newCursor, newCursor));\n }\n\n onModelTouched(): void {\n this.onTouched();\n }\n\n private formatValue(digits: string): string {\n if (!digits) return '';\n\n if (digits.length <= 10) {\n // Fixo: (99) 9999-9999\n return digits\n .replace(/(\\d{2})(\\d)/, '($1) $2')\n .replace(/(\\(\\d{2}\\) \\d{4})(\\d)/, '$1-$2');\n }\n\n // Celular: (99) 99999-9999\n return digits\n .replace(/(\\d{2})(\\d)/, '($1) $2')\n .replace(/(\\(\\d{2}\\) \\d{5})(\\d)/, '$1-$2');\n }\n\n private updatePlaceholder(): void {\n if (this.rawValue.length > 10) {\n this.placeholder = '(00) 90000-0000';\n } else {\n this.placeholder = '(00) 0000-0000';\n }\n }\n\n validate(control: FormControl) {\n return PjcValidators.telefone()(control);\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"15\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"displayValue\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onModelTouched()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n maxlength=\"15\"\n class=\"w-full p-2 outline-none bg-transparent border border-surface-300 rounded-md focus:border-primary-500\"\n />\n }\n</div>\n","import { AfterViewInit, Component, ElementRef, forwardRef, inject, input, Input, OnDestroy } from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormsModule,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { FloatLabelModule } from 'primeng/floatlabel';\n\n@Component({\n selector: 'pjc-data-field',\n templateUrl: 'data-field.component.html',\n imports: [CommonModule, FormsModule, DatePickerModule, FloatLabelModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcDataFieldComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PjcDataFieldComponent),\n multi: true,\n },\n ],\n})\nexport class PjcDataFieldComponent implements ControlValueAccessor, Validator, AfterViewInit, OnDestroy {\n @Input() label: string = 'Data';\n @Input() id: string = `pjc-data-${Math.random().toString(36).substring(2, 9)}`;\n @Input() minDate?: Date;\n @Input() maxDate?: Date;\n labelVariant = input<'over' | 'in' | 'on'>('over');\n\n value: Date | null = null;\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n private el = inject(ElementRef);\n private isFormatting = false;\n\n ngAfterViewInit(): void {\n const input = this.el.nativeElement.querySelector('input');\n if (input) {\n input.addEventListener('input', this.handleDateInput);\n }\n }\n\n ngOnDestroy(): void {\n const input = this.el.nativeElement.querySelector('input');\n if (input) {\n input.removeEventListener('input', this.handleDateInput);\n }\n }\n\n private handleDateInput = (event: Event): void => {\n if (this.isFormatting) return;\n const input = event.target as HTMLInputElement;\n const raw = input.value;\n const cursor = input.selectionStart ?? raw.length;\n\n const digits = raw.replace(/\\D/g, '').substring(0, 8);\n let formatted = digits;\n if (digits.length > 2) {\n formatted = `${digits.substring(0, 2)}/${digits.substring(2)}`;\n }\n if (digits.length > 4) {\n formatted = `${digits.substring(0, 2)}/${digits.substring(2, 4)}/${digits.substring(4)}`;\n }\n\n if (raw === formatted) return;\n\n const digitsBeforeCursor = raw.substring(0, cursor).replace(/\\D/g, '').length;\n\n this.isFormatting = true;\n input.value = formatted;\n this.isFormatting = false;\n\n // Restore cursor at the position after the same digit count\n let newCursor = 0;\n let digitCount = 0;\n for (let i = 0; i < formatted.length; i++) {\n if (/\\d/.test(formatted[i])) digitCount++;\n if (digitCount === digitsBeforeCursor) {\n newCursor = i + 1;\n break;\n }\n }\n input.setSelectionRange(newCursor, newCursor);\n };\n\n writeValue(val: Date | null): void {\n this.value = val ?? null;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n onValueChange(date: Date | null): void {\n this.onChange(date);\n }\n\n validate(_control: FormControl): ValidationErrors | null {\n const value = this.value;\n if (!value) return null;\n\n if (this.minDate && value < this.minDate) {\n return { dataMinima: { min: this.minDate, atual: value } };\n }\n\n if (this.maxDate && value > this.maxDate) {\n return { dataMaxima: { max: this.maxDate, atual: value } };\n }\n\n return null;\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-datePicker\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n dateFormat=\"dd/mm/yy\"\n [showIcon]=\"true\"\n [showClear]=\"true\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n placeholder=\"dd/mm/aaaa\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n ></p-datePicker>\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <p-datePicker\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n dateFormat=\"dd/mm/yy\"\n [showIcon]=\"true\"\n [showClear]=\"true\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n placeholder=\"dd/mm/aaaa\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n ></p-datePicker>\n }\n</div>\n","import { ChangeDetectionStrategy, Component, forwardRef, input } from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormsModule,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n Validator,\n} from '@angular/forms';\nimport { PjcValidators } from '../../validators/pjc-validators';\nimport { InputMaskModule } from 'primeng/inputmask';\nimport { FloatLabelModule } from 'primeng/floatlabel';\n\n@Component({\n selector: 'pjc-hora-field',\n templateUrl: 'hora-field.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, InputMaskModule, FloatLabelModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcHoraFieldComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PjcHoraFieldComponent),\n multi: true,\n },\n ],\n})\nexport class PjcHoraFieldComponent implements ControlValueAccessor, Validator {\n readonly label = input<string>('Hora');\n readonly id = input<string>(`pjc-hora-${Math.random().toString(36).substring(2, 9)}`);\n readonly labelVariant = input<'over' | 'in' | 'on'>('over');\n\n value: string = '';\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n writeValue(val: any): void {\n this.value = val ?? '';\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n onInput(): void {\n this.onChange(this.value);\n }\n\n validate(control: FormControl) {\n return PjcValidators.hora()(control);\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label()) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputMask\n [id]=\"id()\"\n mask=\"99:99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onInput()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n placeholder=\"HH:MM\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-inputMask\n [id]=\"id()\"\n mask=\"99:99\"\n [(ngModel)]=\"value\"\n (onInput)=\"onInput()\"\n (onBlur)=\"onTouched()\"\n [unmask]=\"false\"\n [autoClear]=\"false\"\n placeholder=\"HH:MM\"\n styleClass=\"w-full border border-surface-300 rounded-md focus:border-primary-500\"\n inputStyleClass=\"w-full p-2 outline-none bg-transparent\"\n ></p-inputMask>\n }\n</div>\n","import { Component, forwardRef, input, Input } from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { FloatLabelModule } from 'primeng/floatlabel';\n\n@Component({\n selector: 'pjc-nome-field',\n templateUrl: 'nome-field.component.html',\n imports: [CommonModule, FormsModule, InputTextModule, FloatLabelModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PjcNomeFieldComponent),\n multi: true,\n },\n ],\n})\nexport class PjcNomeFieldComponent implements ControlValueAccessor {\n @Input() label: string = 'Nome';\n @Input() placeholder: string = 'Digite o nome';\n @Input() id: string = `pjc-nome-${Math.random().toString(36).substring(2, 9)}`;\n labelVariant = input<'over' | 'in' | 'on'>('over');\n\n value: string = '';\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n writeValue(val: any): void {\n this.value = val?.toUpperCase() ?? '';\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n onInput(event: Event): void {\n const upper = (event.target as HTMLInputElement).value.toUpperCase();\n this.value = upper;\n this.onChange(upper);\n }\n}\n","<div class=\"flex flex-col gap-1 w-full\">\n @if (label) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <input\n pInputText\n [id]=\"id\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500 uppercase\"\n />\n <label [for]=\"id\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n [id]=\"id\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500 uppercase\"\n />\n }\n</div>\n","/*\n * Public API Surface of pjc-fields\n */\n\nexport * from './lib/pjc-fields';\nexport * from './lib/components/cpf-field/cpf-field.component';\nexport * from './lib/components/cnpj-field/cnpj-field.component';\nexport * from './lib/components/cpf-cnpj-field/cpf-cnpj-field.component';\nexport * from './lib/components/placa-field/placa-field.component';\nexport * from './lib/components/telefone-field/telefone-field.component';\nexport * from './lib/components/data-field/data-field.component';\nexport * from './lib/components/hora-field/hora-field.component';\nexport * from './lib/components/nome-field/nome-field.component';\nexport * from './lib/validators/pjc-validators';\n","/**\n * Generated bundle index. Do not edit.\n */\n\n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A;;sBAGA;;sBACA;;sBACA;;;AEzBH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pjc-fields",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^21.2.0",
|
|
6
|
+
"@angular/core": "^21.2.0",
|
|
7
|
+
"@angular/forms": "^21.2.0",
|
|
8
|
+
"@primeuix/themes": "^2.0.3",
|
|
9
|
+
"primeng": "^21.1.3"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"tslib": "^2.3.0"
|
|
13
|
+
},
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"module": "fesm2022/pjc-fields.mjs",
|
|
16
|
+
"typings": "types/pjc-fields.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
"./package.json": {
|
|
19
|
+
"default": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./types/pjc-fields.d.ts",
|
|
23
|
+
"default": "./fesm2022/pjc-fields.mjs"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import * as _angular_forms from '@angular/forms';
|
|
4
|
+
import { ControlValueAccessor, Validator, FormControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
declare class PjcFields {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcFields, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcFields, "lib-pjc-fields", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class PjcCpfFieldComponent implements ControlValueAccessor, Validator {
|
|
12
|
+
label: string;
|
|
13
|
+
hint: string;
|
|
14
|
+
placeholder: string;
|
|
15
|
+
id: string;
|
|
16
|
+
labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
17
|
+
value: string;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
onChange: any;
|
|
20
|
+
onTouched: any;
|
|
21
|
+
writeValue(val: any): void;
|
|
22
|
+
registerOnChange(fn: any): void;
|
|
23
|
+
registerOnTouched(fn: any): void;
|
|
24
|
+
setDisabledState(isDisabled: boolean): void;
|
|
25
|
+
onModelChange(): void;
|
|
26
|
+
onModelTouched(): void;
|
|
27
|
+
validate(control: FormControl): _angular_forms.ValidationErrors | null;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcCpfFieldComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcCpfFieldComponent, "pjc-cpf-field", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class PjcCnpjFieldComponent implements ControlValueAccessor, Validator {
|
|
33
|
+
label: string;
|
|
34
|
+
hint: string;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
id: string;
|
|
37
|
+
labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
38
|
+
value: string;
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
onChange: any;
|
|
41
|
+
onTouched: any;
|
|
42
|
+
writeValue(val: any): void;
|
|
43
|
+
registerOnChange(fn: any): void;
|
|
44
|
+
registerOnTouched(fn: any): void;
|
|
45
|
+
setDisabledState(isDisabled: boolean): void;
|
|
46
|
+
onModelChange(event: any): void;
|
|
47
|
+
onModelTouched(): void;
|
|
48
|
+
validate(control: FormControl): _angular_forms.ValidationErrors | null;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcCnpjFieldComponent, never>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcCnpjFieldComponent, "pjc-cnpj-field", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare class PjcCpfCnpjFieldComponent implements ControlValueAccessor, Validator {
|
|
54
|
+
label: string;
|
|
55
|
+
id: string;
|
|
56
|
+
labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
57
|
+
displayValue: string;
|
|
58
|
+
placeholder: string;
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
private rawValue;
|
|
61
|
+
onChange: any;
|
|
62
|
+
onTouched: any;
|
|
63
|
+
writeValue(val: any): void;
|
|
64
|
+
registerOnChange(fn: any): void;
|
|
65
|
+
registerOnTouched(fn: any): void;
|
|
66
|
+
setDisabledState(isDisabled: boolean): void;
|
|
67
|
+
onInputChange(event: Event): void;
|
|
68
|
+
onModelTouched(): void;
|
|
69
|
+
private formatValue;
|
|
70
|
+
private updatePlaceholder;
|
|
71
|
+
validate(control: FormControl): _angular_forms.ValidationErrors | null;
|
|
72
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcCpfCnpjFieldComponent, never>;
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcCpfCnpjFieldComponent, "pjc-cpf-cnpj-field", never, { "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare class PjcPlacaFieldComponent implements ControlValueAccessor, Validator {
|
|
77
|
+
label: string;
|
|
78
|
+
placeholder: string;
|
|
79
|
+
id: string;
|
|
80
|
+
labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
81
|
+
value: string;
|
|
82
|
+
onChange: any;
|
|
83
|
+
onTouched: any;
|
|
84
|
+
writeValue(val: any): void;
|
|
85
|
+
registerOnChange(fn: any): void;
|
|
86
|
+
registerOnTouched(fn: any): void;
|
|
87
|
+
onModelChange(): void;
|
|
88
|
+
validate(control: FormControl): _angular_forms.ValidationErrors | null;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcPlacaFieldComponent, never>;
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcPlacaFieldComponent, "pjc-placa-field", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare class PjcTelefoneFieldComponent implements ControlValueAccessor, Validator {
|
|
94
|
+
label: string;
|
|
95
|
+
id: string;
|
|
96
|
+
labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
97
|
+
displayValue: string;
|
|
98
|
+
placeholder: string;
|
|
99
|
+
disabled: boolean;
|
|
100
|
+
private rawValue;
|
|
101
|
+
onChange: any;
|
|
102
|
+
onTouched: any;
|
|
103
|
+
writeValue(val: any): void;
|
|
104
|
+
registerOnChange(fn: any): void;
|
|
105
|
+
registerOnTouched(fn: any): void;
|
|
106
|
+
setDisabledState(isDisabled: boolean): void;
|
|
107
|
+
onInputChange(event: Event): void;
|
|
108
|
+
onModelTouched(): void;
|
|
109
|
+
private formatValue;
|
|
110
|
+
private updatePlaceholder;
|
|
111
|
+
validate(control: FormControl): _angular_forms.ValidationErrors | null;
|
|
112
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcTelefoneFieldComponent, never>;
|
|
113
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcTelefoneFieldComponent, "pjc-telefone-field", never, { "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare class PjcDataFieldComponent implements ControlValueAccessor, Validator, AfterViewInit, OnDestroy {
|
|
117
|
+
label: string;
|
|
118
|
+
id: string;
|
|
119
|
+
minDate?: Date;
|
|
120
|
+
maxDate?: Date;
|
|
121
|
+
labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
122
|
+
value: Date | null;
|
|
123
|
+
onChange: any;
|
|
124
|
+
onTouched: any;
|
|
125
|
+
private el;
|
|
126
|
+
private isFormatting;
|
|
127
|
+
ngAfterViewInit(): void;
|
|
128
|
+
ngOnDestroy(): void;
|
|
129
|
+
private handleDateInput;
|
|
130
|
+
writeValue(val: Date | null): void;
|
|
131
|
+
registerOnChange(fn: any): void;
|
|
132
|
+
registerOnTouched(fn: any): void;
|
|
133
|
+
onValueChange(date: Date | null): void;
|
|
134
|
+
validate(_control: FormControl): ValidationErrors | null;
|
|
135
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcDataFieldComponent, never>;
|
|
136
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcDataFieldComponent, "pjc-data-field", never, { "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare class PjcHoraFieldComponent implements ControlValueAccessor, Validator {
|
|
140
|
+
readonly label: i0.InputSignal<string>;
|
|
141
|
+
readonly id: i0.InputSignal<string>;
|
|
142
|
+
readonly labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
143
|
+
value: string;
|
|
144
|
+
onChange: any;
|
|
145
|
+
onTouched: any;
|
|
146
|
+
writeValue(val: any): void;
|
|
147
|
+
registerOnChange(fn: any): void;
|
|
148
|
+
registerOnTouched(fn: any): void;
|
|
149
|
+
onInput(): void;
|
|
150
|
+
validate(control: FormControl): _angular_forms.ValidationErrors | null;
|
|
151
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcHoraFieldComponent, never>;
|
|
152
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcHoraFieldComponent, "pjc-hora-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
declare class PjcNomeFieldComponent implements ControlValueAccessor {
|
|
156
|
+
label: string;
|
|
157
|
+
placeholder: string;
|
|
158
|
+
id: string;
|
|
159
|
+
labelVariant: i0.InputSignal<"over" | "in" | "on">;
|
|
160
|
+
value: string;
|
|
161
|
+
onChange: any;
|
|
162
|
+
onTouched: any;
|
|
163
|
+
writeValue(val: any): void;
|
|
164
|
+
registerOnChange(fn: any): void;
|
|
165
|
+
registerOnTouched(fn: any): void;
|
|
166
|
+
onInput(event: Event): void;
|
|
167
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PjcNomeFieldComponent, never>;
|
|
168
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PjcNomeFieldComponent, "pjc-nome-field", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelVariant": { "alias": "labelVariant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare class PjcValidators {
|
|
172
|
+
static cpf(): ValidatorFn;
|
|
173
|
+
private static validateCpfDigits;
|
|
174
|
+
/**
|
|
175
|
+
* Valida o algoritmo do CNPJ (Módulo 11)
|
|
176
|
+
*/
|
|
177
|
+
static cnpj(): ValidatorFn;
|
|
178
|
+
private static validateCnpjDigits;
|
|
179
|
+
static cpfCnpj(): ValidatorFn;
|
|
180
|
+
static telefone(): ValidatorFn;
|
|
181
|
+
static hora(): ValidatorFn;
|
|
182
|
+
static placaVeiculo(): ValidatorFn;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export { PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcFields, PjcHoraFieldComponent, PjcNomeFieldComponent, PjcPlacaFieldComponent, PjcTelefoneFieldComponent, PjcValidators };
|