@lagoshny/ngx-validation-messages 17.1.0 → 18.0.0
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/esm2022/lib/components/ngx-custom-message/ngx-custom-message.component.mjs +3 -3
- package/esm2022/lib/components/ngx-validation-messages/ngx-validation-messages.component.mjs +3 -3
- package/esm2022/lib/directivies/ngx-validator-name.directive.mjs +3 -3
- package/esm2022/lib/service/ngx-validation-messages.service.mjs +3 -3
- package/fesm2022/lagoshny-ngx-validation-messages.mjs +13 -13
- package/fesm2022/lagoshny-ngx-validation-messages.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -16,13 +16,13 @@ export class NgxCustomMessageComponent {
|
|
|
16
16
|
* Contains overridden message for validator.
|
|
17
17
|
*/
|
|
18
18
|
message;
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxCustomMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: NgxCustomMessageComponent, isStandalone: true, selector: "ngx-custom-message", inputs: { validatorName: ["forValidator", "validatorName"] }, viewQueries: [{ propertyName: "message", first: true, predicate: ["message"], descendants: true }], ngImport: i0, template: `
|
|
21
21
|
<div #message>
|
|
22
22
|
<ng-content></ng-content>
|
|
23
23
|
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxCustomMessageComponent, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
27
|
args: [{
|
|
28
28
|
standalone: true,
|
package/esm2022/lib/components/ngx-validation-messages/ngx-validation-messages.component.mjs
CHANGED
|
@@ -92,10 +92,10 @@ export class NgxValidationMessagesComponent {
|
|
|
92
92
|
: this.formControl.errors[msg.validatorName] = { customMessage: message };
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesComponent, deps: [{ token: NGX_VALIDATION_MESSAGES_CONFIG }, { token: i1.NgxValidationMessagesService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: NgxValidationMessagesComponent, isStandalone: true, selector: "ngx-validation-messages, [ngxValidationMessages]", inputs: { formControl: ["for", "formControl"] }, queries: [{ propertyName: "customMsgComponent", predicate: NgxCustomMessageComponent }, { propertyName: "customMsgDirective", predicate: NgxValidatorNameDirective }], ngImport: i0, template: "<!--To show error messages standalone without component-->\n<div *ngIf=\"!formControl && customMsgComponent.length == 0 && customMsgDirective.length == 0\"\n [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n <ng-content></ng-content>\n </span>\n</div>\n\n<ng-container *ngIf=\"errorMessages.length > 0\">\n\n <!--To show error messages in material ui style-->\n <ng-container *ngIf=\"isMaterialError; else withoutMaterial\">\n <ng-container *ngFor=\"let message of errorMessages\">\n <mat-error>{{ message }}</mat-error>\n </ng-container>\n </ng-container>\n\n <!--To show error messages in user style-->\n <ng-template #withoutMaterial>\n <div [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <div *ngFor=\"let message of errorMessages\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n {{ message }}\n </span>\n </div>\n </div>\n </ng-template>\n\n</ng-container>\n", styles: [".ngx_vm__def_error_block{position:relative;display:inline-block;width:100%;margin-bottom:10px;margin-top:2px;padding:8px;border-radius:0;background:#c51244;box-shadow:1px 1px 1px #aaa;opacity:.8}.ngx_vm__def_error_text{color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }] });
|
|
97
97
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesComponent, decorators: [{
|
|
99
99
|
type: Component,
|
|
100
100
|
args: [{ standalone: true, selector: 'ngx-validation-messages, [ngxValidationMessages]', imports: [
|
|
101
101
|
CommonModule,
|
|
@@ -24,10 +24,10 @@ export class NgxValidatorNameDirective {
|
|
|
24
24
|
ngAfterViewInit() {
|
|
25
25
|
this.message = this.elem.nativeElement.innerText;
|
|
26
26
|
}
|
|
27
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
27
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidatorNameDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
28
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: NgxValidatorNameDirective, isStandalone: true, selector: "[ngxValidatorName]", inputs: { validatorName: "validatorName" }, ngImport: i0 });
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidatorNameDirective, decorators: [{
|
|
31
31
|
type: Directive,
|
|
32
32
|
args: [{
|
|
33
33
|
standalone: true,
|
|
@@ -61,10 +61,10 @@ export class NgxValidationMessagesService {
|
|
|
61
61
|
return m && typeof m === 'object' ? m[i] : '';
|
|
62
62
|
}, obj);
|
|
63
63
|
}
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
65
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesService, deps: [{ token: NGX_VALIDATION_MESSAGES_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
65
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesService, providedIn: 'root' });
|
|
66
66
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesService, decorators: [{
|
|
68
68
|
type: Injectable,
|
|
69
69
|
args: [{
|
|
70
70
|
providedIn: 'root',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
2
|
+
import { InjectionToken, Component, Input, ViewChild, Directive, Injectable, Inject, ContentChildren } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3 from '@angular/material/form-field';
|
|
@@ -22,13 +22,13 @@ class NgxCustomMessageComponent {
|
|
|
22
22
|
* Contains overridden message for validator.
|
|
23
23
|
*/
|
|
24
24
|
message;
|
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxCustomMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: NgxCustomMessageComponent, isStandalone: true, selector: "ngx-custom-message", inputs: { validatorName: ["forValidator", "validatorName"] }, viewQueries: [{ propertyName: "message", first: true, predicate: ["message"], descendants: true }], ngImport: i0, template: `
|
|
27
27
|
<div #message>
|
|
28
28
|
<ng-content></ng-content>
|
|
29
29
|
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxCustomMessageComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
33
|
args: [{
|
|
34
34
|
standalone: true,
|
|
@@ -73,10 +73,10 @@ class NgxValidatorNameDirective {
|
|
|
73
73
|
ngAfterViewInit() {
|
|
74
74
|
this.message = this.elem.nativeElement.innerText;
|
|
75
75
|
}
|
|
76
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
76
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidatorNameDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
77
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: NgxValidatorNameDirective, isStandalone: true, selector: "[ngxValidatorName]", inputs: { validatorName: "validatorName" }, ngImport: i0 });
|
|
78
78
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidatorNameDirective, decorators: [{
|
|
80
80
|
type: Directive,
|
|
81
81
|
args: [{
|
|
82
82
|
standalone: true,
|
|
@@ -146,10 +146,10 @@ class NgxValidationMessagesService {
|
|
|
146
146
|
return m && typeof m === 'object' ? m[i] : '';
|
|
147
147
|
}, obj);
|
|
148
148
|
}
|
|
149
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
150
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesService, deps: [{ token: NGX_VALIDATION_MESSAGES_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
150
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesService, providedIn: 'root' });
|
|
151
151
|
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesService, decorators: [{
|
|
153
153
|
type: Injectable,
|
|
154
154
|
args: [{
|
|
155
155
|
providedIn: 'root',
|
|
@@ -242,10 +242,10 @@ class NgxValidationMessagesComponent {
|
|
|
242
242
|
: this.formControl.errors[msg.validatorName] = { customMessage: message };
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
246
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
245
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesComponent, deps: [{ token: NGX_VALIDATION_MESSAGES_CONFIG }, { token: NgxValidationMessagesService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
246
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: NgxValidationMessagesComponent, isStandalone: true, selector: "ngx-validation-messages, [ngxValidationMessages]", inputs: { formControl: ["for", "formControl"] }, queries: [{ propertyName: "customMsgComponent", predicate: NgxCustomMessageComponent }, { propertyName: "customMsgDirective", predicate: NgxValidatorNameDirective }], ngImport: i0, template: "<!--To show error messages standalone without component-->\n<div *ngIf=\"!formControl && customMsgComponent.length == 0 && customMsgDirective.length == 0\"\n [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n <ng-content></ng-content>\n </span>\n</div>\n\n<ng-container *ngIf=\"errorMessages.length > 0\">\n\n <!--To show error messages in material ui style-->\n <ng-container *ngIf=\"isMaterialError; else withoutMaterial\">\n <ng-container *ngFor=\"let message of errorMessages\">\n <mat-error>{{ message }}</mat-error>\n </ng-container>\n </ng-container>\n\n <!--To show error messages in user style-->\n <ng-template #withoutMaterial>\n <div [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <div *ngFor=\"let message of errorMessages\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n {{ message }}\n </span>\n </div>\n </div>\n </ng-template>\n\n</ng-container>\n", styles: [".ngx_vm__def_error_block{position:relative;display:inline-block;width:100%;margin-bottom:10px;margin-top:2px;padding:8px;border-radius:0;background:#c51244;box-shadow:1px 1px 1px #aaa;opacity:.8}.ngx_vm__def_error_text{color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }] });
|
|
247
247
|
}
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxValidationMessagesComponent, decorators: [{
|
|
249
249
|
type: Component,
|
|
250
250
|
args: [{ standalone: true, selector: 'ngx-validation-messages, [ngxValidationMessages]', imports: [
|
|
251
251
|
CommonModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lagoshny-ngx-validation-messages.mjs","sources":["../../../projects/ngx-validation-messages/src/lib/interface/ngx-validation-messages.config.ts","../../../projects/ngx-validation-messages/src/lib/components/ngx-custom-message/ngx-custom-message.component.ts","../../../projects/ngx-validation-messages/src/lib/directivies/ngx-validator-name.directive.ts","../../../projects/ngx-validation-messages/src/lib/service/ngx-validation-messages.service.ts","../../../projects/ngx-validation-messages/src/lib/components/ngx-validation-messages/ngx-validation-messages.component.ts","../../../projects/ngx-validation-messages/src/lib/components/ngx-validation-messages/ngx-validation-messages.component.html","../../../projects/ngx-validation-messages/src/lib/ngx-validation-messages.providers.ts","../../../projects/ngx-validation-messages/src/public-api.ts","../../../projects/ngx-validation-messages/src/lagoshny-ngx-validation-messages.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const NGX_VALIDATION_MESSAGES_CONFIG: InjectionToken<NgxValidationMessagesConfig>\n = new InjectionToken<NgxValidationMessagesConfig>('NgxValidationMessagesConfig');\n\nexport interface NgxValidationMessagesConfig {\n\n /**\n * Object contains validation messages in validatorName: validatorMessage format.\n */\n messages: {\n [validatorName: string]: string;\n };\n\n /**\n * Define custom styles to display validation messages.\n */\n validationMessagesStyle?: {\n blockClassNames?: string;\n textClassNames?: string;\n };\n\n}\n","import {Component, ElementRef, Input, ViewChild} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\n/**\n * Component allows specifying custom validation message for the specified\n * validator to override default message.\n *\n * Use this component as child in {@link NgxValidationMessagesComponent}.\n */\n@Component({\n standalone: true,\n selector: 'ngx-custom-message',\n template: `\n <div #message>\n <ng-content></ng-content>\n </div>`,\n imports: [\n CommonModule,\n ]\n})\nexport class NgxCustomMessageComponent {\n\n /**\n * The name of the validator for which you want to override the message.\n */\n @Input('forValidator')\n public validatorName: string;\n\n /**\n * Contains overridden message for validator.\n */\n @ViewChild('message')\n public message: ElementRef;\n\n}\n","import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\n\n/**\n * Allows to specify custom validator message to override default message.\n *\n * It's alternative for {@link NgxCustomMessageComponent}.\n * If you want to use standard html tags to define custom message, use this directive on html tag within\n * {@link NgxValidationMessagesComponent} specifying validator name as directive parameter,\n * otherwise use {@link NgxCustomMessageComponent}.\n */\n@Directive({\n standalone: true,\n selector: '[ngxValidatorName]'\n})\nexport class NgxValidatorNameDirective implements AfterViewInit {\n\n /**\n * The name of the validator for which you want to override the message.\n */\n @Input()\n public validatorName: string;\n\n /**\n * Contains overridden message for validator.\n */\n public message: string;\n\n constructor(private elem: ElementRef) {\n }\n\n public ngAfterViewInit(): void {\n this.message = this.elem.nativeElement.innerText;\n }\n\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { NGX_VALIDATION_MESSAGES_CONFIG, NgxValidationMessagesConfig } from '../interface/ngx-validation-messages.config';\n\n/**\n * Service allows getting validation messages from client's settings.\n * Injecting {@link NgxValidationMessagesConfig} to get client's configuration with validation messages.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NgxValidationMessagesService {\n\n public static SERVER_ERRORS = 'serverErrors';\n\n /**\n * Regular expression to find params placeholder '#[paramName]'.\n */\n private paramsRegExp = new RegExp(/#[[a-zA-Z_\\\\-]*]/);\n\n constructor(@Inject(NGX_VALIDATION_MESSAGES_CONFIG) private messagesConfig: NgxValidationMessagesConfig) {\n }\n\n /**\n * Get validation message for specified validator.\n *\n * @param validatorName for which to get message\n * @param params passed from validator for more detailed validation message\n *\n * @returns string validation message\n */\n public getValidatorErrorMessages(validatorName: string, params?: object): string {\n const validationMessages = this.messagesConfig.messages;\n const validationMessage: string = validationMessages[validatorName];\n\n if (!validationMessage) {\n throw new Error('Validation message for validator: ' + validatorName\n + ' cannot be found, please check validation message key for validator it is case sensitive.');\n }\n\n if (params) {\n return this.expandParameterizedTemplateMessage(validationMessage, params);\n }\n\n return validationMessage;\n }\n\n public expandParameterizedTemplateMessage(msg: string, params: object): string {\n while (this.paramsRegExp.test(msg)) {\n const foundParams = this.paramsRegExp.exec(msg);\n foundParams.forEach(value => {\n const paramPlaceholder = value;\n value = value.replace('#[', '').replace(']', '');\n msg = msg.replace(paramPlaceholder, this.getParameter(params, value));\n });\n }\n\n return msg;\n }\n\n /**\n * A utilitarian method to get a property from an object.\n * if there is no property, an empty string is returned.\n *\n * @param obj from which the property must be obtained\n * @param prop property name\n *\n * @return property value or empty string\n */\n private getParameter(obj: object, prop: string): string {\n return prop.split('.')\n .reduce((m, i) => {\n return m && typeof m === 'object' ? m[i] : '';\n }, obj);\n }\n\n // public static applyServerError(control: AbstractControl | null, serverError: ServerError): void {\n // if (!control) {\n // return;\n // }\n // if (control.getError(NgxValidationMessagesService.SERVER_ERRORS)) {\n // const existingErrorMessages = control.getError(NgxValidationMessagesService.SERVER_ERRORS);\n // if (_.isArray(existingErrorMessages.customMessages) &&\n // existingErrorMessages.customMessages.indexOf(serverError.message) === -1) {\n // existingErrorMessages.customMessages.push(serverError.message);\n // }\n // } else {\n // control.setErrors({[NgxValidationMessagesService.SERVER_ERRORS]: {customMessages: [serverError.message]}});\n // }\n // control.markAsTouched();\n // }\n\n}\n","import {AfterViewInit, Component, ContentChildren, ElementRef, Inject, Input, QueryList} from '@angular/core';\nimport {NgxValidatorNameDirective} from '../../directivies/ngx-validator-name.directive';\nimport {\n NGX_VALIDATION_MESSAGES_CONFIG,\n NgxValidationMessagesConfig\n} from '../../interface/ngx-validation-messages.config';\nimport {NgxValidationMessagesService} from '../../service/ngx-validation-messages.service';\nimport {NgxCustomMessageComponent} from '../ngx-custom-message/ngx-custom-message.component';\nimport {CommonModule} from '@angular/common';\nimport {MatFormFieldModule} from '@angular/material/form-field';\n\n/**\n * Component for displaying validation messages, supports child components of type {@link NgxCustomMessageComponent}\n * and html elements with directive {@link NgxValidatorNameDirective} to override validation messages.\n */\n@Component({\n standalone: true,\n selector: 'ngx-validation-messages, [ngxValidationMessages]',\n templateUrl: './ngx-validation-messages.component.html',\n styleUrls: ['./ngx-validation-messages.component.scss'],\n imports: [\n CommonModule,\n MatFormFieldModule,\n ]\n})\nexport class NgxValidationMessagesComponent implements AfterViewInit {\n\n /**\n * Form control for which need to show validation messages.\n */\n @Input('for')\n public formControl: any;\n\n /**\n * Contains {@link NgxCustomMessageComponent} if present.\n */\n @ContentChildren(NgxCustomMessageComponent)\n public customMsgComponent: any;\n\n /**\n * Contains {@link NgxValidatorNameDirective} if present.\n */\n @ContentChildren(NgxValidatorNameDirective)\n public customMsgDirective: any;\n\n public isMaterialError = false;\n\n /**\n * Key to get default validation message.\n */\n private defaultError = 'error';\n\n private materialErrorElement = 'MAT-ERROR';\n\n constructor(@Inject(NGX_VALIDATION_MESSAGES_CONFIG) public ngxValidationConfig: NgxValidationMessagesConfig,\n private ngxValidationMessagesService: NgxValidationMessagesService,\n private directiveElementRef: ElementRef) {\n }\n\n public ngAfterViewInit(): void {\n if (this.directiveElementRef && this.directiveElementRef.nativeElement\n && this.directiveElementRef.nativeElement.nodeName) {\n this.isMaterialError = this.materialErrorElement.toLocaleUpperCase()\n === this.directiveElementRef.nativeElement.nodeName.toLocaleUpperCase();\n }\n }\n\n /**\n * Get all validation messages for specified form control.\n */\n public get errorMessages(): Array<string> {\n const result: Array<string> = [];\n\n if (!this.formControl || !this.formControl.errors) {\n return result;\n }\n if (this.customMsgComponent && this.customMsgComponent.length > 0) {\n this.processingCustomMessages(this.customMsgComponent);\n }\n if (this.customMsgDirective && this.customMsgDirective.length > 0) {\n this.processingCustomMessages(this.customMsgDirective);\n }\n\n for (const property in this.formControl.errors) {\n if (this.formControl.errors.hasOwnProperty(property)\n && (this.formControl.touched || this.formControl.dirty)) {\n if (this.formControl.errors[property].customMessages instanceof Array) {\n result.push(...this.formControl.errors[property].customMessages);\n continue;\n }\n if (this.formControl.errors[property].customMessage) {\n result.push(this.formControl.errors[property].customMessage);\n continue;\n }\n const validationMessage: string =\n this.ngxValidationMessagesService.getValidatorErrorMessages(property, this.formControl.errors[property]);\n result.push(validationMessage || this.formControl.errors[property].message\n || this.ngxValidationMessagesService.getValidatorErrorMessages(this.defaultError));\n }\n }\n return result;\n }\n\n private processingCustomMessages(customMessage: QueryList<any>): void {\n customMessage.forEach((msg: any) => {\n if (!this.formControl.errors[msg.validatorName]) {\n return;\n }\n let message = (msg instanceof NgxCustomMessageComponent)\n ? msg.message.nativeElement.innerText : msg.message;\n message = this.ngxValidationMessagesService.expandParameterizedTemplateMessage(message, this.formControl.errors[msg.validatorName]);\n\n typeof this.formControl.errors[msg.validatorName] === 'object'\n ? this.formControl.errors[msg.validatorName].customMessage = message\n : this.formControl.errors[msg.validatorName] = {customMessage: message};\n });\n }\n\n}\n","<!--To show error messages standalone without component-->\n<div *ngIf=\"!formControl && customMsgComponent.length == 0 && customMsgDirective.length == 0\"\n [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n <ng-content></ng-content>\n </span>\n</div>\n\n<ng-container *ngIf=\"errorMessages.length > 0\">\n\n <!--To show error messages in material ui style-->\n <ng-container *ngIf=\"isMaterialError; else withoutMaterial\">\n <ng-container *ngFor=\"let message of errorMessages\">\n <mat-error>{{ message }}</mat-error>\n </ng-container>\n </ng-container>\n\n <!--To show error messages in user style-->\n <ng-template #withoutMaterial>\n <div [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <div *ngFor=\"let message of errorMessages\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n {{ message }}\n </span>\n </div>\n </div>\n </ng-template>\n\n</ng-container>\n","import { Provider } from '@angular/core';\r\nimport { NGX_VALIDATION_MESSAGES_CONFIG, NgxValidationMessagesConfig } from './interface/ngx-validation-messages.config';\r\n\r\nexport {NGX_VALIDATION_MESSAGES_CONFIG, NgxValidationMessagesConfig} from './interface/ngx-validation-messages.config';\r\nexport {NgxCustomMessageComponent} from './components/ngx-custom-message/ngx-custom-message.component';\r\nexport {NgxValidationMessagesComponent} from './components/ngx-validation-messages/ngx-validation-messages.component';\r\nexport {NgxValidatorNameDirective} from './directivies/ngx-validator-name.directive';\r\n\r\nexport function provideNgxValidationMessages(config: NgxValidationMessagesConfig): Provider[] {\r\n return [\r\n {\r\n provide: NGX_VALIDATION_MESSAGES_CONFIG,\r\n useValue: config\r\n }\r\n ];\r\n}\r\n","/*\n * Public API Surface of ngx-validation-messages\n */\nexport * from './lib/ngx-validation-messages.providers';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NgxValidationMessagesService"],"mappings":";;;;;;;MAEa,8BAA8B,GACvC,IAAI,cAAc,CAA8B,6BAA6B;;ACAjF;;;;;AAKG;MAYU,yBAAyB,CAAA;AAEpC;;AAEG;AAEI,IAAA,aAAa;AAEpB;;AAEG;AAEI,IAAA,OAAO;wGAZH,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,CAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,SAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAR1B;;;AAGD,UAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAEP,YAAY,EAAA,CAAA,EAAA,CAAA;;4FAGH,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;AAAC,YAAA,IAAA,E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A,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,kBAAkB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGT,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAV1C,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,kDAAkD,EAAA,OAAA,EAGnD;wBACP,YAAY;wBACZ,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,0sCAAA,EAAA,MAAA,EAAA,CAAA,0OAAA,CAAA,EAAA;;0BA+BY,MAAM;2BAAC,8BAA8B;0GAvB3C,WAAW,EAAA,CAAA;sBADjB,KAAK;uBAAC,KAAK;gBAOL,kBAAkB,EAAA,CAAA;sBADxB,eAAe;uBAAC,yBAAyB;gBAOnC,kBAAkB,EAAA,CAAA;sBADxB,eAAe;uBAAC,yBAAyB;;;AElCtC,SAAU,4BAA4B,CAAC,MAAmC,EAAA;IAC9E,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,8BAA8B;AACvC,YAAA,QAAQ,EAAE;AACX;KACF;AACH;;ACfA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lagoshny-ngx-validation-messages.mjs","sources":["../../../projects/ngx-validation-messages/src/lib/interface/ngx-validation-messages.config.ts","../../../projects/ngx-validation-messages/src/lib/components/ngx-custom-message/ngx-custom-message.component.ts","../../../projects/ngx-validation-messages/src/lib/directivies/ngx-validator-name.directive.ts","../../../projects/ngx-validation-messages/src/lib/service/ngx-validation-messages.service.ts","../../../projects/ngx-validation-messages/src/lib/components/ngx-validation-messages/ngx-validation-messages.component.ts","../../../projects/ngx-validation-messages/src/lib/components/ngx-validation-messages/ngx-validation-messages.component.html","../../../projects/ngx-validation-messages/src/lib/ngx-validation-messages.providers.ts","../../../projects/ngx-validation-messages/src/public-api.ts","../../../projects/ngx-validation-messages/src/lagoshny-ngx-validation-messages.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const NGX_VALIDATION_MESSAGES_CONFIG: InjectionToken<NgxValidationMessagesConfig>\n = new InjectionToken<NgxValidationMessagesConfig>('NgxValidationMessagesConfig');\n\nexport interface NgxValidationMessagesConfig {\n\n /**\n * Object contains validation messages in validatorName: validatorMessage format.\n */\n messages: {\n [validatorName: string]: string;\n };\n\n /**\n * Define custom styles to display validation messages.\n */\n validationMessagesStyle?: {\n blockClassNames?: string;\n textClassNames?: string;\n };\n\n}\n","import {Component, ElementRef, Input, ViewChild} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\n/**\n * Component allows specifying custom validation message for the specified\n * validator to override default message.\n *\n * Use this component as child in {@link NgxValidationMessagesComponent}.\n */\n@Component({\n standalone: true,\n selector: 'ngx-custom-message',\n template: `\n <div #message>\n <ng-content></ng-content>\n </div>`,\n imports: [\n CommonModule,\n ]\n})\nexport class NgxCustomMessageComponent {\n\n /**\n * The name of the validator for which you want to override the message.\n */\n @Input('forValidator')\n public validatorName: string;\n\n /**\n * Contains overridden message for validator.\n */\n @ViewChild('message')\n public message: ElementRef;\n\n}\n","import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\n\n/**\n * Allows to specify custom validator message to override default message.\n *\n * It's alternative for {@link NgxCustomMessageComponent}.\n * If you want to use standard html tags to define custom message, use this directive on html tag within\n * {@link NgxValidationMessagesComponent} specifying validator name as directive parameter,\n * otherwise use {@link NgxCustomMessageComponent}.\n */\n@Directive({\n standalone: true,\n selector: '[ngxValidatorName]'\n})\nexport class NgxValidatorNameDirective implements AfterViewInit {\n\n /**\n * The name of the validator for which you want to override the message.\n */\n @Input()\n public validatorName: string;\n\n /**\n * Contains overridden message for validator.\n */\n public message: string;\n\n constructor(private elem: ElementRef) {\n }\n\n public ngAfterViewInit(): void {\n this.message = this.elem.nativeElement.innerText;\n }\n\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { NGX_VALIDATION_MESSAGES_CONFIG, NgxValidationMessagesConfig } from '../interface/ngx-validation-messages.config';\n\n/**\n * Service allows getting validation messages from client's settings.\n * Injecting {@link NgxValidationMessagesConfig} to get client's configuration with validation messages.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NgxValidationMessagesService {\n\n public static SERVER_ERRORS = 'serverErrors';\n\n /**\n * Regular expression to find params placeholder '#[paramName]'.\n */\n private paramsRegExp = new RegExp(/#[[a-zA-Z_\\\\-]*]/);\n\n constructor(@Inject(NGX_VALIDATION_MESSAGES_CONFIG) private messagesConfig: NgxValidationMessagesConfig) {\n }\n\n /**\n * Get validation message for specified validator.\n *\n * @param validatorName for which to get message\n * @param params passed from validator for more detailed validation message\n *\n * @returns string validation message\n */\n public getValidatorErrorMessages(validatorName: string, params?: object): string {\n const validationMessages = this.messagesConfig.messages;\n const validationMessage: string = validationMessages[validatorName];\n\n if (!validationMessage) {\n throw new Error('Validation message for validator: ' + validatorName\n + ' cannot be found, please check validation message key for validator it is case sensitive.');\n }\n\n if (params) {\n return this.expandParameterizedTemplateMessage(validationMessage, params);\n }\n\n return validationMessage;\n }\n\n public expandParameterizedTemplateMessage(msg: string, params: object): string {\n while (this.paramsRegExp.test(msg)) {\n const foundParams = this.paramsRegExp.exec(msg);\n foundParams.forEach(value => {\n const paramPlaceholder = value;\n value = value.replace('#[', '').replace(']', '');\n msg = msg.replace(paramPlaceholder, this.getParameter(params, value));\n });\n }\n\n return msg;\n }\n\n /**\n * A utilitarian method to get a property from an object.\n * if there is no property, an empty string is returned.\n *\n * @param obj from which the property must be obtained\n * @param prop property name\n *\n * @return property value or empty string\n */\n private getParameter(obj: object, prop: string): string {\n return prop.split('.')\n .reduce((m, i) => {\n return m && typeof m === 'object' ? m[i] : '';\n }, obj);\n }\n\n // public static applyServerError(control: AbstractControl | null, serverError: ServerError): void {\n // if (!control) {\n // return;\n // }\n // if (control.getError(NgxValidationMessagesService.SERVER_ERRORS)) {\n // const existingErrorMessages = control.getError(NgxValidationMessagesService.SERVER_ERRORS);\n // if (_.isArray(existingErrorMessages.customMessages) &&\n // existingErrorMessages.customMessages.indexOf(serverError.message) === -1) {\n // existingErrorMessages.customMessages.push(serverError.message);\n // }\n // } else {\n // control.setErrors({[NgxValidationMessagesService.SERVER_ERRORS]: {customMessages: [serverError.message]}});\n // }\n // control.markAsTouched();\n // }\n\n}\n","import {AfterViewInit, Component, ContentChildren, ElementRef, Inject, Input, QueryList} from '@angular/core';\nimport {NgxValidatorNameDirective} from '../../directivies/ngx-validator-name.directive';\nimport {\n NGX_VALIDATION_MESSAGES_CONFIG,\n NgxValidationMessagesConfig\n} from '../../interface/ngx-validation-messages.config';\nimport {NgxValidationMessagesService} from '../../service/ngx-validation-messages.service';\nimport {NgxCustomMessageComponent} from '../ngx-custom-message/ngx-custom-message.component';\nimport {CommonModule} from '@angular/common';\nimport {MatFormFieldModule} from '@angular/material/form-field';\n\n/**\n * Component for displaying validation messages, supports child components of type {@link NgxCustomMessageComponent}\n * and html elements with directive {@link NgxValidatorNameDirective} to override validation messages.\n */\n@Component({\n standalone: true,\n selector: 'ngx-validation-messages, [ngxValidationMessages]',\n templateUrl: './ngx-validation-messages.component.html',\n styleUrls: ['./ngx-validation-messages.component.scss'],\n imports: [\n CommonModule,\n MatFormFieldModule,\n ]\n})\nexport class NgxValidationMessagesComponent implements AfterViewInit {\n\n /**\n * Form control for which need to show validation messages.\n */\n @Input('for')\n public formControl: any;\n\n /**\n * Contains {@link NgxCustomMessageComponent} if present.\n */\n @ContentChildren(NgxCustomMessageComponent)\n public customMsgComponent: any;\n\n /**\n * Contains {@link NgxValidatorNameDirective} if present.\n */\n @ContentChildren(NgxValidatorNameDirective)\n public customMsgDirective: any;\n\n public isMaterialError = false;\n\n /**\n * Key to get default validation message.\n */\n private defaultError = 'error';\n\n private materialErrorElement = 'MAT-ERROR';\n\n constructor(@Inject(NGX_VALIDATION_MESSAGES_CONFIG) public ngxValidationConfig: NgxValidationMessagesConfig,\n private ngxValidationMessagesService: NgxValidationMessagesService,\n private directiveElementRef: ElementRef) {\n }\n\n public ngAfterViewInit(): void {\n if (this.directiveElementRef && this.directiveElementRef.nativeElement\n && this.directiveElementRef.nativeElement.nodeName) {\n this.isMaterialError = this.materialErrorElement.toLocaleUpperCase()\n === this.directiveElementRef.nativeElement.nodeName.toLocaleUpperCase();\n }\n }\n\n /**\n * Get all validation messages for specified form control.\n */\n public get errorMessages(): Array<string> {\n const result: Array<string> = [];\n\n if (!this.formControl || !this.formControl.errors) {\n return result;\n }\n if (this.customMsgComponent && this.customMsgComponent.length > 0) {\n this.processingCustomMessages(this.customMsgComponent);\n }\n if (this.customMsgDirective && this.customMsgDirective.length > 0) {\n this.processingCustomMessages(this.customMsgDirective);\n }\n\n for (const property in this.formControl.errors) {\n if (this.formControl.errors.hasOwnProperty(property)\n && (this.formControl.touched || this.formControl.dirty)) {\n if (this.formControl.errors[property].customMessages instanceof Array) {\n result.push(...this.formControl.errors[property].customMessages);\n continue;\n }\n if (this.formControl.errors[property].customMessage) {\n result.push(this.formControl.errors[property].customMessage);\n continue;\n }\n const validationMessage: string =\n this.ngxValidationMessagesService.getValidatorErrorMessages(property, this.formControl.errors[property]);\n result.push(validationMessage || this.formControl.errors[property].message\n || this.ngxValidationMessagesService.getValidatorErrorMessages(this.defaultError));\n }\n }\n return result;\n }\n\n private processingCustomMessages(customMessage: QueryList<any>): void {\n customMessage.forEach((msg: any) => {\n if (!this.formControl.errors[msg.validatorName]) {\n return;\n }\n let message = (msg instanceof NgxCustomMessageComponent)\n ? msg.message.nativeElement.innerText : msg.message;\n message = this.ngxValidationMessagesService.expandParameterizedTemplateMessage(message, this.formControl.errors[msg.validatorName]);\n\n typeof this.formControl.errors[msg.validatorName] === 'object'\n ? this.formControl.errors[msg.validatorName].customMessage = message\n : this.formControl.errors[msg.validatorName] = {customMessage: message};\n });\n }\n\n}\n","<!--To show error messages standalone without component-->\n<div *ngIf=\"!formControl && customMsgComponent.length == 0 && customMsgDirective.length == 0\"\n [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n <ng-content></ng-content>\n </span>\n</div>\n\n<ng-container *ngIf=\"errorMessages.length > 0\">\n\n <!--To show error messages in material ui style-->\n <ng-container *ngIf=\"isMaterialError; else withoutMaterial\">\n <ng-container *ngFor=\"let message of errorMessages\">\n <mat-error>{{ message }}</mat-error>\n </ng-container>\n </ng-container>\n\n <!--To show error messages in user style-->\n <ng-template #withoutMaterial>\n <div [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.blockClassNames || 'ngx_vm__def_error_block'\">\n <div *ngFor=\"let message of errorMessages\">\n <span [ngClass]=\"ngxValidationConfig?.validationMessagesStyle?.textClassNames || 'ngx_vm__def_error_text'\">\n {{ message }}\n </span>\n </div>\n </div>\n </ng-template>\n\n</ng-container>\n","import { Provider } from '@angular/core';\r\nimport { NGX_VALIDATION_MESSAGES_CONFIG, NgxValidationMessagesConfig } from './interface/ngx-validation-messages.config';\r\n\r\nexport {NGX_VALIDATION_MESSAGES_CONFIG, NgxValidationMessagesConfig} from './interface/ngx-validation-messages.config';\r\nexport {NgxCustomMessageComponent} from './components/ngx-custom-message/ngx-custom-message.component';\r\nexport {NgxValidationMessagesComponent} from './components/ngx-validation-messages/ngx-validation-messages.component';\r\nexport {NgxValidatorNameDirective} from './directivies/ngx-validator-name.directive';\r\n\r\nexport function provideNgxValidationMessages(config: NgxValidationMessagesConfig): Provider[] {\r\n return [\r\n {\r\n provide: NGX_VALIDATION_MESSAGES_CONFIG,\r\n useValue: config\r\n }\r\n ];\r\n}\r\n","/*\n * Public API Surface of ngx-validation-messages\n */\nexport * from './lib/ngx-validation-messages.providers';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NgxValidationMessagesService"],"mappings":";;;;;;;MAEa,8BAA8B,GACvC,IAAI,cAAc,CAA8B,6BAA6B;;ACAjF;;;;;AAKG;MAYU,yBAAyB,CAAA;AAEpC;;AAEG;AAEI,IAAA,aAAa,CAAS;AAE7B;;AAEG;AAEI,IAAA,OAAO,CAAa;wGAZhB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,EAR1B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,CAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,SAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;AAGD,UAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAEP,YAAY,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAGH,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,CAAA;;;AAGD,UAAA,CAAA;AACT,oBAAA,OAAO,EAAE;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;ACfA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lagoshny/ngx-validation-messages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"description": "This module allows to simplify display form validator validation messages using single component.",
|
|
5
5
|
"readme": "README.md",
|
|
6
6
|
"author": "Ilya Lagoshny <ilya@lagoshny.ru>",
|