pjc-fields 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/pjc-fields.mjs +74 -6
- package/fesm2022/pjc-fields.mjs.map +1 -1
- package/package.json +1 -1
- package/types/pjc-fields.d.ts +36 -2
package/fesm2022/pjc-fields.mjs
CHANGED
|
@@ -695,11 +695,11 @@ class PjcCpfCnpjFieldComponent {
|
|
|
695
695
|
useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
|
|
696
696
|
multi: true,
|
|
697
697
|
},
|
|
698
|
-
], 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 [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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 [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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\n @if (errorMessage) {\n <
|
|
698
|
+
], 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 [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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 [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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\n @if (errorMessage) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">{{ errorMessage }}</p-message>\n }\n\n <ng-content></ng-content>\n</div>\n", dependencies: [{ 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: i1$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
699
699
|
}
|
|
700
700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCpfCnpjFieldComponent, decorators: [{
|
|
701
701
|
type: Component,
|
|
702
|
-
args: [{ selector: 'pjc-cpf-cnpj-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, FloatLabelModule, InputTextModule], providers: [
|
|
702
|
+
args: [{ selector: 'pjc-cpf-cnpj-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, FloatLabelModule, InputTextModule, MessageModule], providers: [
|
|
703
703
|
{
|
|
704
704
|
provide: NG_VALUE_ACCESSOR,
|
|
705
705
|
useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
|
|
@@ -710,7 +710,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
710
710
|
useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
|
|
711
711
|
multi: true,
|
|
712
712
|
},
|
|
713
|
-
], 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 [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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 [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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\n @if (errorMessage) {\n <
|
|
713
|
+
], 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 [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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 [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\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\n @if (errorMessage) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">{{ errorMessage }}</p-message>\n }\n\n <ng-content></ng-content>\n</div>\n" }]
|
|
714
714
|
}], 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 }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], erros: [{ type: i0.Input, args: [{ isSignal: true, alias: "erros", required: false }] }] } });
|
|
715
715
|
|
|
716
716
|
class PjcPlacaFieldComponent {
|
|
@@ -1567,7 +1567,7 @@ class PjcEmailFieldComponent {
|
|
|
1567
1567
|
useExisting: forwardRef(() => PjcEmailFieldComponent),
|
|
1568
1568
|
multi: true,
|
|
1569
1569
|
},
|
|
1570
|
-
], 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 type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n }\n\n @if (errorMessage) {\n <
|
|
1570
|
+
], 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 type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n }\n\n @if (errorMessage) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">{{ errorMessage }}</p-message>\n }\n\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i1$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"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1571
1571
|
}
|
|
1572
1572
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcEmailFieldComponent, decorators: [{
|
|
1573
1573
|
type: Component,
|
|
@@ -1582,7 +1582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
1582
1582
|
useExisting: forwardRef(() => PjcEmailFieldComponent),
|
|
1583
1583
|
multi: true,
|
|
1584
1584
|
},
|
|
1585
|
-
], 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 type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n }\n\n @if (errorMessage) {\n <
|
|
1585
|
+
], 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 type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <input\n pInputText\n type=\"email\"\n [id]=\"id()\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n class=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n }\n\n @if (errorMessage) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">{{ errorMessage }}</p-message>\n }\n\n <ng-content></ng-content>\n</div>\n" }]
|
|
1586
1586
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], erros: [{ type: i0.Input, args: [{ isSignal: true, alias: "erros", required: false }] }] } });
|
|
1587
1587
|
|
|
1588
1588
|
class PjcIntegerFieldComponent {
|
|
@@ -2417,6 +2417,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
2417
2417
|
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label()) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-autocomplete\n [inputId]=\"id()\"\n [suggestions]=\"filteredMunicipios()\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n (completeMethod)=\"filterMunicipios($event)\"\n dataKey=\"id\"\n optionLabel=\"nome\"\n [forceSelection]=\"true\"\n [disabled]=\"disabled || readonly() || !uf() || loading()\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n >\n <ng-template pTemplate=\"item\" let-option>\n {{ getMunicipioDisplay(option) }}\n </ng-template>\n </p-autocomplete>\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-autocomplete\n [inputId]=\"id()\"\n [suggestions]=\"filteredMunicipios()\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n (completeMethod)=\"filterMunicipios($event)\"\n dataKey=\"id\"\n optionLabel=\"nome\"\n [forceSelection]=\"true\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled || readonly() || !uf() || loading()\"\n appendTo=\"body\"\n styleClass=\"w-full\"\n inputStyleClass=\"w-full\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n >\n <ng-template pTemplate=\"item\" let-option>\n {{ getMunicipioDisplay(option) }}\n </ng-template>\n </p-autocomplete>\n }\n\n @if (hint()) {\n <small class=\"text-xs text-surface-500\">{{ hint() }}</small>\n }\n\n @if (errorMessage) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">{{ errorMessage }}</p-message>\n }\n\n <ng-content></ng-content>\n</div>\n" }]
|
|
2418
2418
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], uf: [{ type: i0.Input, args: [{ isSignal: true, alias: "uf", required: false }] }], erros: [{ type: i0.Input, args: [{ isSignal: true, alias: "erros", required: false }] }] } });
|
|
2419
2419
|
|
|
2420
|
+
const TIPOS_PESSOA = [
|
|
2421
|
+
{ label: 'Pessoa Fisica', value: 'FISICA' },
|
|
2422
|
+
{ label: 'Pessoa Juridica', value: 'JURIDICA' },
|
|
2423
|
+
];
|
|
2424
|
+
class PjcTipoPessoaFieldComponent {
|
|
2425
|
+
label = input('Tipo de Pessoa', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2426
|
+
placeholder = input('Selecione o tipo de pessoa', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2427
|
+
id = input(`pjc-tipo-pessoa-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
2428
|
+
labelVariant = input('on', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
|
|
2429
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
2430
|
+
erros = input({}, ...(ngDevMode ? [{ debugName: "erros" }] : /* istanbul ignore next */ []));
|
|
2431
|
+
injector = inject(Injector);
|
|
2432
|
+
cdr = inject(ChangeDetectorRef);
|
|
2433
|
+
destroyRef = inject(DestroyRef);
|
|
2434
|
+
ngControl = null;
|
|
2435
|
+
tiposPessoa = TIPOS_PESSOA;
|
|
2436
|
+
value = null;
|
|
2437
|
+
disabled = false;
|
|
2438
|
+
onChange = () => { };
|
|
2439
|
+
onTouched = () => { };
|
|
2440
|
+
ngOnInit() {
|
|
2441
|
+
this.ngControl = initFormValidation(this.injector, this.cdr, this.destroyRef);
|
|
2442
|
+
}
|
|
2443
|
+
get invalid() {
|
|
2444
|
+
return isFormControlInvalid(this.ngControl);
|
|
2445
|
+
}
|
|
2446
|
+
get errorMessage() {
|
|
2447
|
+
return getErrorMessage(this.ngControl, this.erros());
|
|
2448
|
+
}
|
|
2449
|
+
writeValue(val) {
|
|
2450
|
+
this.value = val;
|
|
2451
|
+
}
|
|
2452
|
+
registerOnChange(fn) {
|
|
2453
|
+
this.onChange = fn;
|
|
2454
|
+
}
|
|
2455
|
+
registerOnTouched(fn) {
|
|
2456
|
+
this.onTouched = fn;
|
|
2457
|
+
}
|
|
2458
|
+
setDisabledState(isDisabled) {
|
|
2459
|
+
this.disabled = isDisabled;
|
|
2460
|
+
}
|
|
2461
|
+
onModelChange(value) {
|
|
2462
|
+
this.value = value;
|
|
2463
|
+
this.onChange(value);
|
|
2464
|
+
}
|
|
2465
|
+
onModelTouched() {
|
|
2466
|
+
this.onTouched();
|
|
2467
|
+
}
|
|
2468
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcTipoPessoaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2469
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcTipoPessoaFieldComponent, isStandalone: true, selector: "pjc-tipo-pessoa-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, erros: { classPropertyName: "erros", publicName: "erros", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
2470
|
+
{
|
|
2471
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2472
|
+
useExisting: forwardRef(() => PjcTipoPessoaFieldComponent),
|
|
2473
|
+
multi: true,
|
|
2474
|
+
},
|
|
2475
|
+
], 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-select\n [inputId]=\"id()\"\n [options]=\"tiposPessoa\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n appendTo=\"body\"\n [disabled]=\"disabled || readonly()\"\n styleClass=\"w-full\"\n class=\"w-full\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-select\n [inputId]=\"id()\"\n [options]=\"tiposPessoa\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n appendTo=\"body\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n styleClass=\"w-full\"\n class=\"w-full\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n />\n }\n\n @if (errorMessage) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">{{ errorMessage }}</p-message>\n }\n\n <ng-content></ng-content>\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: SelectModule }, { kind: "component", type: i2$2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2476
|
+
}
|
|
2477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcTipoPessoaFieldComponent, decorators: [{
|
|
2478
|
+
type: Component,
|
|
2479
|
+
args: [{ selector: 'pjc-tipo-pessoa-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, SelectModule, FloatLabelModule, MessageModule], providers: [
|
|
2480
|
+
{
|
|
2481
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2482
|
+
useExisting: forwardRef(() => PjcTipoPessoaFieldComponent),
|
|
2483
|
+
multi: true,
|
|
2484
|
+
},
|
|
2485
|
+
], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label()) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-select\n [inputId]=\"id()\"\n [options]=\"tiposPessoa\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n appendTo=\"body\"\n [disabled]=\"disabled || readonly()\"\n styleClass=\"w-full\"\n class=\"w-full\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-select\n [inputId]=\"id()\"\n [options]=\"tiposPessoa\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onModelTouched()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n appendTo=\"body\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n styleClass=\"w-full\"\n class=\"w-full\"\n [class.ng-invalid]=\"invalid\"\n [class.ng-dirty]=\"invalid\"\n />\n }\n\n @if (errorMessage) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">{{ errorMessage }}</p-message>\n }\n\n <ng-content></ng-content>\n</div>\n" }]
|
|
2486
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], erros: [{ type: i0.Input, args: [{ isSignal: true, alias: "erros", required: false }] }] } });
|
|
2487
|
+
|
|
2420
2488
|
/*
|
|
2421
2489
|
* Public API Surface of pjc-fields
|
|
2422
2490
|
*/
|
|
@@ -2425,5 +2493,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
2425
2493
|
* Generated bundle index. Do not edit.
|
|
2426
2494
|
*/
|
|
2427
2495
|
|
|
2428
|
-
export { ESTADOS, PJC_CIDADE_SERVICE, PjcCepFieldComponent, PjcChassiFieldComponent, PjcChassiInputDirective, PjcCidadeFieldComponent, PjcCidadeService, PjcCnhFieldComponent, PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcDataHoraFieldComponent, PjcEmailFieldComponent, PjcErroValidacaoComponent, PjcFields, PjcHoraFieldComponent, PjcImeiFieldComponent, PjcIntegerFieldComponent, PjcMoedaFieldComponent, PjcNumeroCartaoFieldComponent, PjcPasswordFieldComponent, PjcPlacaFieldComponent, PjcRenavamFieldComponent, PjcTelefoneFieldComponent, PjcUfFieldComponent, PjcUppercaseFieldComponent, PjcValidators };
|
|
2496
|
+
export { ESTADOS, PJC_CIDADE_SERVICE, PjcCepFieldComponent, PjcChassiFieldComponent, PjcChassiInputDirective, PjcCidadeFieldComponent, PjcCidadeService, PjcCnhFieldComponent, PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcDataHoraFieldComponent, PjcEmailFieldComponent, PjcErroValidacaoComponent, PjcFields, PjcHoraFieldComponent, PjcImeiFieldComponent, PjcIntegerFieldComponent, PjcMoedaFieldComponent, PjcNumeroCartaoFieldComponent, PjcPasswordFieldComponent, PjcPlacaFieldComponent, PjcRenavamFieldComponent, PjcTelefoneFieldComponent, PjcTipoPessoaFieldComponent, PjcUfFieldComponent, PjcUppercaseFieldComponent, PjcValidators, TIPOS_PESSOA };
|
|
2429
2497
|
//# sourceMappingURL=pjc-fields.mjs.map
|