@koalarx/ui 21.1.13 → 21.1.14
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.
|
@@ -22,11 +22,11 @@ class InputCpf extends InputFieldBase {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputCpf, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputCpf, isStandalone: true, selector: "kl-input-cpf", usesInheritance: true, ngImport: i0, template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n", dependencies: [{ kind: "component", type: InputText, selector: "kl-input-text", inputs: ["mask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputCpf, isStandalone: true, selector: "kl-input-cpf", usesInheritance: true, ngImport: i0, template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-text>\n", dependencies: [{ kind: "component", type: InputText, selector: "kl-input-text", inputs: ["mask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
26
26
|
}
|
|
27
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputCpf, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
|
-
args: [{ selector: 'kl-input-cpf', changeDetection: ChangeDetectionStrategy.OnPush, imports: [InputText], template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n" }]
|
|
29
|
+
args: [{ selector: 'kl-input-cpf', changeDetection: ChangeDetectionStrategy.OnPush, imports: [InputText], template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-text>\n" }]
|
|
30
30
|
}], ctorParameters: () => [] });
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-cpf.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-cpf/cpf.validator.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.html","../../projects/koala-ui/shared/components/input-field/input-cpf/koalarx-ui-shared-components-input-field-input-cpf.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\r\nimport { validateCpf } from '@koalarx/utils/KlString';\r\n\r\nexport function CPFValidator(control: AbstractControl) {\r\n if (control.value && !validateCpf(control.value)) {\r\n return { cpfInvalid: true };\r\n }\r\n\r\n return null;\r\n}\r\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n} from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputText } from '@koalarx/ui/shared/components/input-field/input-text';\nimport { CPFValidator } from './cpf.validator';\n\n@Component({\n selector: 'kl-input-cpf',\n templateUrl: './input-cpf.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [InputText],\n})\nexport class InputCpf extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(CPFValidator);\n });\n }\n}\n","<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGM,SAAU,YAAY,CAAC,OAAwB,EAAA;AACnD,IAAA,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChD,QAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG7B,IAAA,OAAO,IAAI;AACb;;ACQM,MAAO,QAAS,SAAQ,cAAc,CAAA;IACjC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAE9B,YAAA,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;AACrC,SAAC,CAAC;;uGAVO,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjBrB,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-cpf.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-cpf/cpf.validator.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.html","../../projects/koala-ui/shared/components/input-field/input-cpf/koalarx-ui-shared-components-input-field-input-cpf.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\r\nimport { validateCpf } from '@koalarx/utils/KlString';\r\n\r\nexport function CPFValidator(control: AbstractControl) {\r\n if (control.value && !validateCpf(control.value)) {\r\n return { cpfInvalid: true };\r\n }\r\n\r\n return null;\r\n}\r\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n} from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputText } from '@koalarx/ui/shared/components/input-field/input-text';\nimport { CPFValidator } from './cpf.validator';\n\n@Component({\n selector: 'kl-input-cpf',\n templateUrl: './input-cpf.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [InputText],\n})\nexport class InputCpf extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(CPFValidator);\n });\n }\n}\n","<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-text>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGM,SAAU,YAAY,CA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
24
24
|
constructor();
|
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputCpf, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputCpf, "kl-input-cpf", never, {}, {}, never,
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputCpf, "kl-input-cpf", never, {}, {}, never, ["[errors]"], true, never>;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export { CPFValidator, InputCpf };
|