pjc-fields 0.0.9 → 0.0.11

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.
@@ -1,12 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, input, forwardRef, ChangeDetectionStrategy, Input, inject, ElementRef, output } from '@angular/core';
2
+ import { Component, input, forwardRef, ChangeDetectionStrategy, inject, ElementRef, output } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
4
  import { FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
5
5
  import * as i2 from 'primeng/inputmask';
6
6
  import { InputMaskModule } from 'primeng/inputmask';
7
7
  import * as i3 from 'primeng/floatlabel';
8
8
  import { FloatLabelModule } from 'primeng/floatlabel';
9
- import { CommonModule } from '@angular/common';
10
9
  import * as i2$1 from 'primeng/inputtext';
11
10
  import { InputTextModule } from 'primeng/inputtext';
12
11
  import * as i2$2 from 'primeng/datepicker';
@@ -18,6 +17,8 @@ import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
18
17
  import { ButtonModule } from 'primeng/button';
19
18
  import * as i2$3 from 'primeng/select';
20
19
  import { SelectModule } from 'primeng/select';
20
+ import * as i2$4 from 'primeng/inputnumber';
21
+ import { InputNumberModule } from 'primeng/inputnumber';
21
22
 
22
23
  class PjcFields {
23
24
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcFields, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -288,8 +289,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
288
289
  }], 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 }] }] } });
289
290
 
290
291
  class PjcCpfCnpjFieldComponent {
291
- label = 'CPF/CNPJ';
292
- id = `pjc-cpf-cnpj-${Math.random().toString(36).substring(2, 9)}`;
292
+ label = input('CPF/CNPJ', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
293
+ id = input(`pjc-cpf-cnpj-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
293
294
  labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
294
295
  displayValue = '';
295
296
  placeholder = '000.000.000-00';
@@ -314,13 +315,21 @@ class PjcCpfCnpjFieldComponent {
314
315
  onInputChange(event) {
315
316
  const input = event.target;
316
317
  const cursorPos = input.selectionStart ?? 0;
317
- const prevLength = this.displayValue.length;
318
+ const digitsBeforeCursor = input.value.substring(0, cursorPos).replace(/\D/g, '').length;
318
319
  this.rawValue = input.value.replaceAll(/\D/g, '').substring(0, 14);
319
320
  this.displayValue = this.formatValue(this.rawValue);
320
321
  this.updatePlaceholder();
321
322
  this.onChange(this.rawValue);
322
- const newLength = this.displayValue.length;
323
- const newCursor = cursorPos + (newLength - prevLength);
323
+ let newCursor = this.displayValue.length;
324
+ let digitCount = 0;
325
+ for (let i = 0; i < this.displayValue.length; i++) {
326
+ if (/\d/.test(this.displayValue[i]))
327
+ digitCount++;
328
+ if (digitCount === digitsBeforeCursor) {
329
+ newCursor = i + 1;
330
+ break;
331
+ }
332
+ }
324
333
  setTimeout(() => input.setSelectionRange(newCursor, newCursor));
325
334
  }
326
335
  onModelTouched() {
@@ -353,7 +362,7 @@ class PjcCpfCnpjFieldComponent {
353
362
  return PjcValidators.cpfCnpj()(control);
354
363
  }
355
364
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCpfCnpjFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
356
- 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: [
365
+ 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: 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: [
357
366
  {
358
367
  provide: NG_VALUE_ACCESSOR,
359
368
  useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
@@ -364,11 +373,11 @@ class PjcCpfCnpjFieldComponent {
364
373
  useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
365
374
  multi: true,
366
375
  },
367
- ], 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"] }] });
376
+ ], 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: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
368
377
  }
369
378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcCpfCnpjFieldComponent, decorators: [{
370
379
  type: Component,
371
- args: [{ selector: 'pjc-cpf-cnpj-field', imports: [CommonModule, FormsModule, FloatLabelModule, InputTextModule], providers: [
380
+ args: [{ selector: 'pjc-cpf-cnpj-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, FloatLabelModule, InputTextModule], providers: [
372
381
  {
373
382
  provide: NG_VALUE_ACCESSOR,
374
383
  useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
@@ -379,17 +388,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
379
388
  useExisting: forwardRef(() => PjcCpfCnpjFieldComponent),
380
389
  multi: true,
381
390
  },
382
- ], 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" }]
383
- }], propDecorators: { label: [{
384
- type: Input
385
- }], id: [{
386
- type: Input
387
- }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
391
+ ], 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" }]
392
+ }], 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 }] }] } });
388
393
 
389
394
  class PjcPlacaFieldComponent {
390
- label = 'Placa do Veículo';
391
- placeholder = 'ABC-1234';
392
- id = `pjc-placa-${Math.random().toString(36).substring(2, 9)}`;
395
+ label = input('Placa do Veículo', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
396
+ placeholder = input('ABC-1234', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
397
+ id = input(`pjc-placa-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
393
398
  labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
394
399
  value = '';
395
400
  onChange = () => { };
@@ -411,36 +416,38 @@ class PjcPlacaFieldComponent {
411
416
  return PjcValidators.placaVeiculo()(control);
412
417
  }
413
418
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcPlacaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
414
- 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: [
419
+ 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: 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 } }, providers: [
415
420
  {
416
421
  provide: NG_VALUE_ACCESSOR,
417
422
  useExisting: forwardRef(() => PjcPlacaFieldComponent),
418
423
  multi: true,
419
424
  },
420
- { provide: NG_VALIDATORS, useExisting: forwardRef(() => PjcPlacaFieldComponent), multi: true },
421
- ], 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($event)\"\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 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($event)\"\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 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"] }] });
425
+ {
426
+ provide: NG_VALIDATORS,
427
+ useExisting: forwardRef(() => PjcPlacaFieldComponent),
428
+ multi: true,
429
+ },
430
+ ], 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($event)\"\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 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($event)\"\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 p-2 outline-none bg-transparent uppercase\"\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 });
422
431
  }
423
432
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcPlacaFieldComponent, decorators: [{
424
433
  type: Component,
425
- args: [{ selector: 'pjc-placa-field', imports: [CommonModule, FormsModule, InputMaskModule, FloatLabelModule], providers: [
434
+ args: [{ selector: 'pjc-placa-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, InputMaskModule, FloatLabelModule], providers: [
426
435
  {
427
436
  provide: NG_VALUE_ACCESSOR,
428
437
  useExisting: forwardRef(() => PjcPlacaFieldComponent),
429
438
  multi: true,
430
439
  },
431
- { provide: NG_VALIDATORS, useExisting: forwardRef(() => PjcPlacaFieldComponent), multi: true },
432
- ], 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($event)\"\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 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($event)\"\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 p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n }\n</div>\n" }]
433
- }], propDecorators: { label: [{
434
- type: Input
435
- }], placeholder: [{
436
- type: Input
437
- }], id: [{
438
- type: Input
439
- }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
440
+ {
441
+ provide: NG_VALIDATORS,
442
+ useExisting: forwardRef(() => PjcPlacaFieldComponent),
443
+ multi: true,
444
+ },
445
+ ], 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($event)\"\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 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($event)\"\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 p-2 outline-none bg-transparent uppercase\"\n ></p-inputMask>\n }\n</div>\n" }]
446
+ }], 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 }] }] } });
440
447
 
441
448
  class PjcTelefoneFieldComponent {
442
- label = 'Telefone';
443
- id = `pjc-telefone-${Math.random().toString(36).substring(2, 9)}`;
449
+ label = input('Telefone', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
450
+ id = input(`pjc-telefone-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
444
451
  labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
445
452
  displayValue = '';
446
453
  placeholder = '(00) 0000-0000';
@@ -465,13 +472,21 @@ class PjcTelefoneFieldComponent {
465
472
  onInputChange(event) {
466
473
  const input = event.target;
467
474
  const cursorPos = input.selectionStart ?? 0;
468
- const prevLength = this.displayValue.length;
475
+ const digitsBeforeCursor = input.value.substring(0, cursorPos).replace(/\D/g, '').length;
469
476
  this.rawValue = input.value.replaceAll(/\D/g, '').substring(0, 11);
470
477
  this.displayValue = this.formatValue(this.rawValue);
471
478
  this.updatePlaceholder();
472
479
  this.onChange(this.rawValue);
473
- const newLength = this.displayValue.length;
474
- const newCursor = cursorPos + (newLength - prevLength);
480
+ let newCursor = this.displayValue.length;
481
+ let digitCount = 0;
482
+ for (let i = 0; i < this.displayValue.length; i++) {
483
+ if (/\d/.test(this.displayValue[i]))
484
+ digitCount++;
485
+ if (digitCount === digitsBeforeCursor) {
486
+ newCursor = i + 1;
487
+ break;
488
+ }
489
+ }
475
490
  setTimeout(() => input.setSelectionRange(newCursor, newCursor));
476
491
  }
477
492
  onModelTouched() {
@@ -503,7 +518,7 @@ class PjcTelefoneFieldComponent {
503
518
  return PjcValidators.telefone()(control);
504
519
  }
505
520
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcTelefoneFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
506
- 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: [
521
+ 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: 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: [
507
522
  {
508
523
  provide: NG_VALUE_ACCESSOR,
509
524
  useExisting: forwardRef(() => PjcTelefoneFieldComponent),
@@ -514,11 +529,11 @@ class PjcTelefoneFieldComponent {
514
529
  useExisting: forwardRef(() => PjcTelefoneFieldComponent),
515
530
  multi: true,
516
531
  },
517
- ], 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"] }] });
532
+ ], 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: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
518
533
  }
519
534
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcTelefoneFieldComponent, decorators: [{
520
535
  type: Component,
521
- args: [{ selector: 'pjc-telefone-field', imports: [CommonModule, FormsModule, FloatLabelModule, InputTextModule], providers: [
536
+ args: [{ selector: 'pjc-telefone-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, FloatLabelModule, InputTextModule], providers: [
522
537
  {
523
538
  provide: NG_VALUE_ACCESSOR,
524
539
  useExisting: forwardRef(() => PjcTelefoneFieldComponent),
@@ -529,18 +544,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
529
544
  useExisting: forwardRef(() => PjcTelefoneFieldComponent),
530
545
  multi: true,
531
546
  },
532
- ], 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" }]
533
- }], propDecorators: { label: [{
534
- type: Input
535
- }], id: [{
536
- type: Input
537
- }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
547
+ ], 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" }]
548
+ }], 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 }] }] } });
538
549
 
539
550
  class PjcDataFieldComponent {
540
- label = 'Data';
541
- id = `pjc-data-${Math.random().toString(36).substring(2, 9)}`;
542
- minDate;
543
- maxDate;
551
+ label = input('Data', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
552
+ id = input(`pjc-data-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
553
+ minDate = input(undefined, ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
554
+ maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
544
555
  labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
545
556
  value = null;
546
557
  onChange = () => { };
@@ -608,16 +619,18 @@ class PjcDataFieldComponent {
608
619
  const value = this.value;
609
620
  if (!value)
610
621
  return null;
611
- if (this.minDate && value < this.minDate) {
612
- return { dataMinima: { min: this.minDate, atual: value } };
622
+ const minDate = this.minDate();
623
+ if (minDate && value < minDate) {
624
+ return { dataMinima: { min: minDate, atual: value } };
613
625
  }
614
- if (this.maxDate && value > this.maxDate) {
615
- return { dataMaxima: { max: this.maxDate, atual: value } };
626
+ const maxDate = this.maxDate();
627
+ if (maxDate && value > maxDate) {
628
+ return { dataMaxima: { max: maxDate, atual: value } };
616
629
  }
617
630
  return null;
618
631
  }
619
632
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcDataFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
620
- 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: [
633
+ 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: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, labelVariant: { classPropertyName: "labelVariant", publicName: "labelVariant", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
621
634
  {
622
635
  provide: NG_VALUE_ACCESSOR,
623
636
  useExisting: forwardRef(() => PjcDataFieldComponent),
@@ -628,11 +641,11 @@ class PjcDataFieldComponent {
628
641
  useExisting: forwardRef(() => PjcDataFieldComponent),
629
642
  multi: true,
630
643
  },
631
- ], 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 class=\"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 class=\"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"] }] });
644
+ ], 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 class=\"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 class=\"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: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
632
645
  }
633
646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcDataFieldComponent, decorators: [{
634
647
  type: Component,
635
- args: [{ selector: 'pjc-data-field', imports: [CommonModule, FormsModule, DatePickerModule, FloatLabelModule], providers: [
648
+ args: [{ selector: 'pjc-data-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, DatePickerModule, FloatLabelModule], providers: [
636
649
  {
637
650
  provide: NG_VALUE_ACCESSOR,
638
651
  useExisting: forwardRef(() => PjcDataFieldComponent),
@@ -643,16 +656,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
643
656
  useExisting: forwardRef(() => PjcDataFieldComponent),
644
657
  multi: true,
645
658
  },
646
- ], 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 class=\"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 class=\"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" }]
647
- }], propDecorators: { label: [{
648
- type: Input
649
- }], id: [{
650
- type: Input
651
- }], minDate: [{
652
- type: Input
653
- }], maxDate: [{
654
- type: Input
655
- }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
659
+ ], 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 class=\"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 class=\"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" }]
660
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
656
661
 
657
662
  class PjcHoraFieldComponent {
658
663
  label = input('Hora', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -715,9 +720,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
715
720
  }], 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 }] }] } });
716
721
 
717
722
  class PjcUppercaseFieldComponent {
718
- label = 'Nome';
719
- placeholder = 'Digite o nome';
720
- id = `pjc-uppercase-${Math.random().toString(36).substring(2, 9)}`;
723
+ label = input('Nome', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
724
+ placeholder = input('Digite o nome', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
725
+ id = input(`pjc-uppercase-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
721
726
  labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
722
727
  value = '';
723
728
  onChange = () => { };
@@ -737,30 +742,24 @@ class PjcUppercaseFieldComponent {
737
742
  this.onChange(upper);
738
743
  }
739
744
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcUppercaseFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
740
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcUppercaseFieldComponent, isStandalone: true, selector: "pjc-uppercase-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: [
745
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcUppercaseFieldComponent, isStandalone: true, selector: "pjc-uppercase-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 } }, providers: [
741
746
  {
742
747
  provide: NG_VALUE_ACCESSOR,
743
748
  useExisting: forwardRef(() => PjcUppercaseFieldComponent),
744
749
  multi: true,
745
750
  },
746
- ], 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"] }] });
751
+ ], 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: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
747
752
  }
748
753
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcUppercaseFieldComponent, decorators: [{
749
754
  type: Component,
750
- args: [{ selector: 'pjc-uppercase-field', imports: [CommonModule, FormsModule, InputTextModule, FloatLabelModule], providers: [
755
+ args: [{ selector: 'pjc-uppercase-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, InputTextModule, FloatLabelModule], providers: [
751
756
  {
752
757
  provide: NG_VALUE_ACCESSOR,
753
758
  useExisting: forwardRef(() => PjcUppercaseFieldComponent),
754
759
  multi: true,
755
760
  },
756
- ], 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" }]
757
- }], propDecorators: { label: [{
758
- type: Input
759
- }], placeholder: [{
760
- type: Input
761
- }], id: [{
762
- type: Input
763
- }], labelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVariant", required: false }] }] } });
761
+ ], 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" }]
762
+ }], 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 }] }] } });
764
763
 
765
764
  class PjcCepFieldComponent {
766
765
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -949,11 +948,11 @@ class PjcEmailFieldComponent {
949
948
  useExisting: forwardRef(() => PjcEmailFieldComponent),
950
949
  multi: true,
951
950
  },
952
- ], 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 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=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\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"] }] });
951
+ ], 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 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=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n }\n</div>\n", dependencies: [{ 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
953
952
  }
954
953
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcEmailFieldComponent, decorators: [{
955
954
  type: Component,
956
- args: [{ selector: 'pjc-email-field', imports: [CommonModule, FormsModule, InputTextModule, FloatLabelModule], providers: [
955
+ args: [{ selector: 'pjc-email-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, InputTextModule, FloatLabelModule], providers: [
957
956
  {
958
957
  provide: NG_VALUE_ACCESSOR,
959
958
  useExisting: forwardRef(() => PjcEmailFieldComponent),
@@ -967,6 +966,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
967
966
  ], 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 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=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n />\n }\n</div>\n" }]
968
967
  }], 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 }] }] } });
969
968
 
969
+ class PjcIntegerFieldComponent {
970
+ label = input('Número', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
971
+ placeholder = input('Digite o número', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
972
+ id = input(`pjc-integer-${Math.random().toString(36).substring(2, 9)}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
973
+ labelVariant = input('over', ...(ngDevMode ? [{ debugName: "labelVariant" }] : /* istanbul ignore next */ []));
974
+ prefix = input('', ...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
975
+ suffix = input('', ...(ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []));
976
+ useGrouping = input(false, ...(ngDevMode ? [{ debugName: "useGrouping" }] : /* istanbul ignore next */ []));
977
+ min = input(null, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
978
+ max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
979
+ value = null;
980
+ disabled = false;
981
+ onChange = () => { };
982
+ onTouched = () => { };
983
+ writeValue(val) {
984
+ this.value = val;
985
+ }
986
+ registerOnChange(fn) {
987
+ this.onChange = fn;
988
+ }
989
+ registerOnTouched(fn) {
990
+ this.onTouched = fn;
991
+ }
992
+ setDisabledState(isDisabled) {
993
+ this.disabled = isDisabled;
994
+ }
995
+ onValueChange(value) {
996
+ this.value = value;
997
+ this.onChange(value);
998
+ }
999
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcIntegerFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1000
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: PjcIntegerFieldComponent, isStandalone: true, selector: "pjc-integer-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 }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
1001
+ {
1002
+ provide: NG_VALUE_ACCESSOR,
1003
+ useExisting: forwardRef(() => PjcIntegerFieldComponent),
1004
+ multi: true,
1005
+ },
1006
+ ], 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-inputnumber\n [inputId]=\"id()\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [prefix]=\"prefix()\"\n [suffix]=\"suffix()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [disabled]=\"disabled\"\n [maxFractionDigits]=\"0\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n styleClass=\"w-full\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-inputnumber\n [inputId]=\"id()\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [prefix]=\"prefix()\"\n [suffix]=\"suffix()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [disabled]=\"disabled\"\n [maxFractionDigits]=\"0\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n styleClass=\"w-full\"\n />\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: InputNumberModule }, { kind: "component", type: i2$4.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "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 });
1007
+ }
1008
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PjcIntegerFieldComponent, decorators: [{
1009
+ type: Component,
1010
+ args: [{ selector: 'pjc-integer-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, InputNumberModule, FloatLabelModule], providers: [
1011
+ {
1012
+ provide: NG_VALUE_ACCESSOR,
1013
+ useExisting: forwardRef(() => PjcIntegerFieldComponent),
1014
+ multi: true,
1015
+ },
1016
+ ], template: "<div class=\"flex flex-col gap-1 w-full\">\n @if (label()) {\n <p-floatlabel [variant]=\"labelVariant()\" class=\"w-full\">\n <p-inputnumber\n [inputId]=\"id()\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [prefix]=\"prefix()\"\n [suffix]=\"suffix()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [disabled]=\"disabled\"\n [maxFractionDigits]=\"0\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n styleClass=\"w-full\"\n />\n <label [for]=\"id()\">{{ label() }}</label>\n </p-floatlabel>\n } @else {\n <p-inputnumber\n [inputId]=\"id()\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [prefix]=\"prefix()\"\n [suffix]=\"suffix()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [disabled]=\"disabled\"\n [maxFractionDigits]=\"0\"\n inputStyleClass=\"w-full p-2 border border-surface-300 rounded-md outline-none bg-transparent focus:border-primary-500\"\n styleClass=\"w-full\"\n />\n }\n</div>\n" }]
1017
+ }], 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 }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], useGrouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "useGrouping", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }] } });
1018
+
970
1019
  /*
971
1020
  * Public API Surface of pjc-fields
972
1021
  */
@@ -975,5 +1024,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
975
1024
  * Generated bundle index. Do not edit.
976
1025
  */
977
1026
 
978
- export { PjcCepFieldComponent, PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcEmailFieldComponent, PjcFields, PjcHoraFieldComponent, PjcPlacaFieldComponent, PjcTelefoneFieldComponent, PjcUfFieldComponent, PjcUppercaseFieldComponent, PjcValidators };
1027
+ export { PjcCepFieldComponent, PjcCnpjFieldComponent, PjcCpfCnpjFieldComponent, PjcCpfFieldComponent, PjcDataFieldComponent, PjcEmailFieldComponent, PjcFields, PjcHoraFieldComponent, PjcIntegerFieldComponent, PjcPlacaFieldComponent, PjcTelefoneFieldComponent, PjcUfFieldComponent, PjcUppercaseFieldComponent, PjcValidators };
979
1028
  //# sourceMappingURL=pjc-fields.mjs.map