@anglr/common 12.0.0-beta.20220413104159 → 12.0.0-beta.20220414093434
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/changelog.md +50 -2
- package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +53 -0
- package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -0
- package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +75 -0
- package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -0
- package/es2015/forms/src/components/index.js +3 -0
- package/es2015/forms/src/components/index.js.map +1 -0
- package/es2015/forms/src/directives/hasError/hasError.directive.js +16 -6
- package/es2015/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2015/forms/src/index.js +3 -1
- package/es2015/forms/src/index.js.map +1 -1
- package/es2015/forms/src/misc/formModel/interfaces/modelDecoratorMetadata.js.map +1 -1
- package/es2015/forms/src/misc/formModel/misc/utils.js +11 -8
- package/es2015/forms/src/misc/formModel/misc/utils.js.map +1 -1
- package/es2015/forms/src/misc/tokens.js +14 -0
- package/es2015/forms/src/misc/tokens.js.map +1 -0
- package/es2015/forms/src/misc/validationErrorsContainerView.js +31 -0
- package/es2015/forms/src/misc/validationErrorsContainerView.js.map +1 -0
- package/es2015/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +1 -1
- package/es2015/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
- package/es2015/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +1 -1
- package/es2015/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map +1 -1
- package/es2015/forms/src/modules/hasError.module.js +15 -4
- package/es2015/forms/src/modules/hasError.module.js.map +1 -1
- package/es2015/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +18 -9
- package/es2015/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2015/forms/src/services/validationErrorRenderer/validationErrorRenderer.interface.js.map +1 -1
- package/es2015/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +31 -145
- package/es2015/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +53 -0
- package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -0
- package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +75 -0
- package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -0
- package/es2020/forms/src/components/index.js +3 -0
- package/es2020/forms/src/components/index.js.map +1 -0
- package/es2020/forms/src/directives/hasError/hasError.directive.js +15 -6
- package/es2020/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2020/forms/src/index.js +3 -1
- package/es2020/forms/src/index.js.map +1 -1
- package/es2020/forms/src/misc/formModel/interfaces/modelDecoratorMetadata.js.map +1 -1
- package/es2020/forms/src/misc/formModel/misc/utils.js +8 -5
- package/es2020/forms/src/misc/formModel/misc/utils.js.map +1 -1
- package/es2020/forms/src/misc/tokens.js +14 -0
- package/es2020/forms/src/misc/tokens.js.map +1 -0
- package/es2020/forms/src/misc/validationErrorsContainerView.js +31 -0
- package/es2020/forms/src/misc/validationErrorsContainerView.js.map +1 -0
- package/es2020/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +1 -1
- package/es2020/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
- package/es2020/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +1 -1
- package/es2020/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map +1 -1
- package/es2020/forms/src/modules/hasError.module.js +15 -4
- package/es2020/forms/src/modules/hasError.module.js.map +1 -1
- package/es2020/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +18 -9
- package/es2020/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2020/forms/src/services/validationErrorRenderer/validationErrorRenderer.interface.js.map +1 -1
- package/es2020/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +31 -143
- package/es2020/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.css +4 -0
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts +32 -0
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -0
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html +3 -0
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.css +4 -0
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts +51 -0
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -0
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.html +0 -0
- package/forms/src/components/index.d.ts +3 -0
- package/forms/src/components/index.d.ts.map +1 -0
- package/forms/src/directives/hasError/hasError.directive.d.ts +6 -3
- package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
- package/forms/src/index.d.ts +3 -1
- package/forms/src/index.d.ts.map +1 -1
- package/forms/src/misc/formModel/interfaces/modelDecoratorMetadata.d.ts +6 -1
- package/forms/src/misc/formModel/interfaces/modelDecoratorMetadata.d.ts.map +1 -1
- package/forms/src/misc/formModel/misc/utils.d.ts.map +1 -1
- package/forms/src/misc/tokens.d.ts +16 -0
- package/forms/src/misc/tokens.d.ts.map +1 -0
- package/forms/src/misc/validationErrorsContainerView.d.ts +25 -0
- package/forms/src/misc/validationErrorsContainerView.d.ts.map +1 -0
- package/forms/src/modules/hasError.module.d.ts +4 -1
- package/forms/src/modules/hasError.module.d.ts.map +1 -1
- package/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.d.ts +4 -7
- package/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.d.ts.map +1 -1
- package/forms/src/services/validationErrorRenderer/validationErrorRenderer.interface.d.ts +43 -12
- package/forms/src/services/validationErrorRenderer/validationErrorRenderer.interface.d.ts.map +1 -1
- package/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.d.ts +15 -63
- package/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/version.bak +1 -1
- package/es2015/forms/src/misc/types.js +0 -6
- package/es2015/forms/src/misc/types.js.map +0 -1
- package/es2020/forms/src/misc/types.js +0 -6
- package/es2020/forms/src/misc/types.js.map +0 -1
- package/forms/src/misc/types.d.ts +0 -7
- package/forms/src/misc/types.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,qCAAqC,EAAC,MAAM,uEAAuE,CAAC;AAE5H;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,gBAAgB,CAAqE,CAAC;AAE7I;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,MAAM,EAAE,CAA8G,CAAC;AAE9K;;GAEG;AACH,eAAO,MAAM,yCAAyC,EAAE,cAAc,CAAC,qCAAqC,CAA0G,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Class that holds validation errors view container
|
|
5
|
+
*/
|
|
6
|
+
export declare class ValidationErrorsContainerView {
|
|
7
|
+
/**
|
|
8
|
+
* Current instance of view container
|
|
9
|
+
*/
|
|
10
|
+
private _viewContainer;
|
|
11
|
+
/**
|
|
12
|
+
* Used for emitting viewContainer changes
|
|
13
|
+
*/
|
|
14
|
+
private _viewContainerChange;
|
|
15
|
+
/**
|
|
16
|
+
* Gets or sets current instance of view container
|
|
17
|
+
*/
|
|
18
|
+
get viewContainer(): ViewContainerRef;
|
|
19
|
+
set viewContainer(value: ViewContainerRef);
|
|
20
|
+
/**
|
|
21
|
+
* Occurs when view container instance changes
|
|
22
|
+
*/
|
|
23
|
+
get viewContainerChange(): Observable<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=validationErrorsContainerView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validationErrorsContainerView.d.ts","sourceRoot":"","sources":["validationErrorsContainerView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAU,MAAM,MAAM,CAAC;AAEzC;;GAEG;AACH,qBAAa,6BAA6B;IAItC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAmB;IAEzC;;OAEG;IACH,OAAO,CAAC,oBAAoB,CAAsC;IAIlE;;OAEG;IACH,IAAW,aAAa,IAAI,gBAAgB,CAG3C;IACD,IAAW,aAAa,CAAC,KAAK,EAAE,gBAAgB,EAI/C;IAED;;OAEG;IACH,IAAW,mBAAmB,IAAI,UAAU,CAAC,IAAI,CAAC,CAGjD;CACJ"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "../directives/hasError/hasError.directive";
|
|
3
3
|
import * as i2 from "../directives/groupHasError/groupHasError.directive";
|
|
4
|
+
import * as i3 from "../components/defaultValidationErrors/defaultValidationErrors.component";
|
|
5
|
+
import * as i4 from "../components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component";
|
|
6
|
+
import * as i5 from "@angular/common";
|
|
4
7
|
/**
|
|
5
8
|
* Module for input validation directives
|
|
6
9
|
*/
|
|
7
10
|
export declare class HasErrorModule {
|
|
8
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<HasErrorModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<HasErrorModule, [typeof i1.HasErrorDirective, typeof i2.GroupHasErrorDirective],
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HasErrorModule, [typeof i1.HasErrorDirective, typeof i2.GroupHasErrorDirective, typeof i3.DefaultValidationErrorsComponent, typeof i4.DefaultValidationErrorsContainerComponent], [typeof i5.CommonModule], [typeof i1.HasErrorDirective, typeof i2.GroupHasErrorDirective]>;
|
|
10
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<HasErrorModule>;
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=hasError.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasError.module.d.ts","sourceRoot":"","sources":["hasError.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hasError.module.d.ts","sourceRoot":"","sources":["hasError.module.ts"],"names":[],"mappings":";;;;;;AAOA;;GAEG;AACH,qBAmBa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAE1B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
1
|
import { FormControl } from '@angular/forms';
|
|
3
2
|
import { StringLocalization } from '@anglr/common';
|
|
4
3
|
import { StringDictionary } from '@jscrpt/common';
|
|
@@ -8,22 +7,20 @@ import * as i0 from "@angular/core";
|
|
|
8
7
|
* Service used for extracting error messages from form control
|
|
9
8
|
*/
|
|
10
9
|
export declare class ErrorMessagesExtractor {
|
|
10
|
+
protected _stringLocalization: StringLocalization;
|
|
11
|
+
protected _ignoredValidationErrors: string[];
|
|
11
12
|
/**
|
|
12
13
|
* Dictionary with error names that have defined message
|
|
13
14
|
*/
|
|
14
15
|
protected _errorMessages: StringDictionary;
|
|
15
|
-
|
|
16
|
-
* String localization service
|
|
17
|
-
*/
|
|
18
|
-
protected _stringLocalization: StringLocalization;
|
|
19
|
-
constructor(injector: Injector, globalErrorMessages?: StringDictionary);
|
|
16
|
+
constructor(_stringLocalization: StringLocalization, _ignoredValidationErrors: string[], globalErrorMessages?: StringDictionary);
|
|
20
17
|
/**
|
|
21
18
|
* Gets validation errors result for provided control, or null of no errors are present
|
|
22
19
|
* @param control - Form control instance that should be inspected for errors
|
|
23
20
|
* @param messages - Object containing error messages that should patch existing error messages
|
|
24
21
|
*/
|
|
25
22
|
getErrors(control: FormControl, messages?: StringDictionary): ValidationErrorsResult;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMessagesExtractor, [null, { optional: true; }]>;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMessagesExtractor, [null, null, { optional: true; }]>;
|
|
27
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorMessagesExtractor>;
|
|
28
25
|
}
|
|
29
26
|
//# sourceMappingURL=errorMessagesExtractor.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessagesExtractor.service.d.ts","sourceRoot":"","sources":["errorMessagesExtractor.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errorMessagesExtractor.service.d.ts","sourceRoot":"","sources":["errorMessagesExtractor.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,kBAAkB,EAAsB,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAGlE,OAAO,EAAC,sBAAsB,EAAC,MAAM,oCAAoC,CAAC;;AAgB1E;;GAEG;AACH,qBACa,sBAAsB;IAUU,SAAS,CAAC,mBAAmB,EAAE,kBAAkB;IAC3C,SAAS,CAAC,wBAAwB,EAAE,MAAM,EAAE;IAP3F;;OAEG;IACH,SAAS,CAAC,cAAc,EAAE,gBAAgB,CAAC;gBAGQ,mBAAmB,EAAE,kBAAkB,EACjC,wBAAwB,EAAE,MAAM,EAAE,EAChC,mBAAmB,CAAC,EAAE,gBAAgB;IAOjG;;;;OAIG;IACI,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,gBAAgB,GAAG,sBAAsB;yCAxBlF,sBAAsB;6CAAtB,sBAAsB;CAqElC"}
|
|
@@ -3,6 +3,7 @@ import { FormControl } from '@angular/forms';
|
|
|
3
3
|
import { StringDictionary } from '@jscrpt/common';
|
|
4
4
|
import { ErrorMessagesExtractor } from '../errorMessagesExtractor/errorMessagesExtractor.service';
|
|
5
5
|
import { ValidationErrorsResult } from '../errorMessagesExtractor/errorMessagesExtractor.interface';
|
|
6
|
+
import { ValidationErrorsContainerView } from '../../misc/validationErrorsContainerView';
|
|
6
7
|
/**
|
|
7
8
|
* Describes function that is used for performing actions when form is submitted or dirty
|
|
8
9
|
*/
|
|
@@ -21,9 +22,10 @@ export interface IsSubmittedOrDirtyFunc {
|
|
|
21
22
|
export interface ValidationErrorsComponent {
|
|
22
23
|
/**
|
|
23
24
|
* Shows validation errors in component
|
|
24
|
-
* @param errors - Errors to be shown
|
|
25
|
+
* @param errors - Errors to be shown
|
|
26
|
+
* @param options - Options used for displaying validation errors
|
|
25
27
|
*/
|
|
26
|
-
show(errors: ValidationErrorsResult): void;
|
|
28
|
+
show(errors: ValidationErrorsResult, options: ValidationErrorsOptions): void;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Context passed to template that is used for rendering validation errors
|
|
@@ -33,11 +35,30 @@ export interface ValidationErrorsTemplateContext {
|
|
|
33
35
|
* Errors to be shown
|
|
34
36
|
*/
|
|
35
37
|
$implicit: ValidationErrorsResult;
|
|
38
|
+
/**
|
|
39
|
+
* Options used for displaying validation errors
|
|
40
|
+
*/
|
|
41
|
+
options: ValidationErrorsOptions;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
|
-
*
|
|
44
|
+
* Component that is used for rendering validation errors container
|
|
39
45
|
*/
|
|
40
|
-
export interface
|
|
46
|
+
export interface ValidationErrorsContainerComponent {
|
|
47
|
+
/**
|
|
48
|
+
* Shows validation errors
|
|
49
|
+
* @param errors - Errors to be shown
|
|
50
|
+
* @param options - Options used for displaying validation errors
|
|
51
|
+
*/
|
|
52
|
+
show(errors: ValidationErrorsResult, options: ValidationErrorsContainerOptions): void;
|
|
53
|
+
/**
|
|
54
|
+
* Hides validation errors
|
|
55
|
+
*/
|
|
56
|
+
hide(): void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Options for displayed validation errors
|
|
60
|
+
*/
|
|
61
|
+
export interface ValidationErrorsOptions {
|
|
41
62
|
/**
|
|
42
63
|
* Prefix of css classes applied to element
|
|
43
64
|
*/
|
|
@@ -50,6 +71,11 @@ export interface ValidationErrorsRendererOptions {
|
|
|
50
71
|
* Css class attached to wrapper div
|
|
51
72
|
*/
|
|
52
73
|
wrapperDivClass?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Options for validation errors container
|
|
77
|
+
*/
|
|
78
|
+
export interface ValidationErrorsContainerOptions extends ValidationErrorsOptions {
|
|
53
79
|
/**
|
|
54
80
|
* Component used for rendering validation errors
|
|
55
81
|
*/
|
|
@@ -59,6 +85,15 @@ export interface ValidationErrorsRendererOptions {
|
|
|
59
85
|
*/
|
|
60
86
|
template?: TemplateRef<ValidationErrorsTemplateContext>;
|
|
61
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Options for ValidationErrorRenderer
|
|
90
|
+
*/
|
|
91
|
+
export interface ValidationErrorsRendererOptions extends ValidationErrorsContainerOptions {
|
|
92
|
+
/**
|
|
93
|
+
* Component used for rendering validation errors container
|
|
94
|
+
*/
|
|
95
|
+
container?: Type<ValidationErrorsContainerComponent>;
|
|
96
|
+
}
|
|
62
97
|
/**
|
|
63
98
|
* Options for ValidationErrorRendererFactory
|
|
64
99
|
*/
|
|
@@ -76,30 +111,26 @@ export interface ValidationErrorRendererCtor {
|
|
|
76
111
|
* Creates instance of ValidationErrorRenderer
|
|
77
112
|
* @param errorMessagesExtractor - Instance of service used for extracting errors from control
|
|
78
113
|
* @param control - Control that is being processed for errors
|
|
79
|
-
* @param
|
|
80
|
-
* @param document - Html document instance, used for manipulation with html
|
|
114
|
+
* @param containerView - Class that stores view container for rendering errors
|
|
81
115
|
* @param injector - Injector used for obtaining dependencies
|
|
82
116
|
* @param isSubmittedOrDirty - Function used for testing if control is submitted or dirty
|
|
83
117
|
* @param options - Options for validation errors renderer
|
|
84
118
|
*/
|
|
85
|
-
new (errorMessagesExtractor: ErrorMessagesExtractor, control: FormControl,
|
|
119
|
+
new (errorMessagesExtractor: ErrorMessagesExtractor, control: FormControl, containerView: ValidationErrorsContainerView, injector: Injector, isSubmittedOrDirty: IsSubmittedOrDirtyFunc, options: ValidationErrorsRendererOptions): ValidationErrorRenderer;
|
|
86
120
|
}
|
|
87
121
|
/**
|
|
88
122
|
* Describes service that is used for rendering validation errors
|
|
89
123
|
*/
|
|
90
124
|
export interface ValidationErrorRenderer {
|
|
91
|
-
/**
|
|
92
|
-
* Html element that is wrapping errors
|
|
93
|
-
*/
|
|
94
|
-
wrapperElement: HTMLElement;
|
|
95
125
|
/**
|
|
96
126
|
* Destroys renderer and everything that was rendered
|
|
97
127
|
*/
|
|
98
128
|
destroy(): void;
|
|
99
129
|
/**
|
|
100
130
|
* Updates rendered errors for current state and returns true if errors were rendered, otherwise false
|
|
131
|
+
* @param options - Options for validation errors renderer
|
|
101
132
|
* @param errorMessages - Object storing error messages to be used as override
|
|
102
133
|
*/
|
|
103
|
-
update(errorMessages?: StringDictionary): boolean;
|
|
134
|
+
update(options: ValidationErrorsRendererOptions, errorMessages?: StringDictionary): boolean;
|
|
104
135
|
}
|
|
105
136
|
//# sourceMappingURL=validationErrorRenderer.interface.d.ts.map
|
package/forms/src/services/validationErrorRenderer/validationErrorRenderer.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationErrorRenderer.interface.d.ts","sourceRoot":"","sources":["validationErrorRenderer.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,sBAAsB,EAAC,MAAM,0DAA0D,CAAC;AAChG,OAAO,EAAC,sBAAsB,EAAC,MAAM,4DAA4D,CAAC;
|
|
1
|
+
{"version":3,"file":"validationErrorRenderer.interface.d.ts","sourceRoot":"","sources":["validationErrorRenderer.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,sBAAsB,EAAC,MAAM,0DAA0D,CAAC;AAChG,OAAO,EAAC,sBAAsB,EAAC,MAAM,4DAA4D,CAAC;AAClG,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IAEnC;;;;;OAKG;IACH,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,IAAI,EAAE,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACvF;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IAEtC;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAC;CAChF;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAE5C;;OAEG;IACH,SAAS,EAAE,sBAAsB,CAAC;IAElC;;OAEG;IACH,OAAO,EAAE,uBAAuB,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAE/C;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,gCAAgC,GAAG,IAAI,CAAC;IAEtF;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IAEpC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,gCAAiC,SAAQ,uBAAuB;IAE7E;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,+BAA+B,CAAC,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,gCAAgC;IAErF;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,kCAAkC,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,qCAAsC,SAAQ,+BAA+B;IAE1F;;OAEG;IACH,YAAY,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAExC;;;;;;;;OAQG;IACH,KAAI,sBAAsB,EAAE,sBAAsB,EAC9C,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,6BAA6B,EAC5C,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,sBAAsB,EAC1C,OAAO,EAAE,+BAA+B,GAAG,uBAAuB,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IAEpC;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,+BAA+B,EAAE,aAAa,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC;CAC/F"}
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injector, ComponentRef } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { StringDictionary } from '@jscrpt/common';
|
|
4
4
|
import { ErrorMessagesExtractor } from '../errorMessagesExtractor/errorMessagesExtractor.service';
|
|
5
|
-
import { ValidationErrorRenderer, IsSubmittedOrDirtyFunc, ValidationErrorsRendererOptions, ValidationErrorRendererFactoryOptions,
|
|
5
|
+
import { ValidationErrorRenderer, IsSubmittedOrDirtyFunc, ValidationErrorsRendererOptions, ValidationErrorRendererFactoryOptions, ValidationErrorsContainerComponent } from './validationErrorRenderer.interface';
|
|
6
6
|
import { ValidationErrorsResult } from '../errorMessagesExtractor/errorMessagesExtractor.interface';
|
|
7
|
+
import { ValidationErrorsContainerView } from '../../misc/validationErrorsContainerView';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* Injection token used for injecting global options for ValidationErrorRendererFactory
|
|
10
|
-
*/
|
|
11
|
-
export declare const VALIDATION_ERROR_RENDERER_FACTORY_OPTIONS: InjectionToken<ValidationErrorRendererFactoryOptions>;
|
|
12
9
|
/**
|
|
13
10
|
* Service used for creating validation errors renderer
|
|
14
11
|
*/
|
|
15
12
|
export declare class ValidationErrorRendererFactory {
|
|
16
13
|
protected _errorMessagesExtractor: ErrorMessagesExtractor;
|
|
17
|
-
protected _document: Document;
|
|
18
14
|
/**
|
|
19
15
|
* Options for validation error renderer factory
|
|
20
16
|
*/
|
|
21
17
|
protected _options: ValidationErrorRendererFactoryOptions;
|
|
22
|
-
constructor(_errorMessagesExtractor: ErrorMessagesExtractor,
|
|
18
|
+
constructor(_errorMessagesExtractor: ErrorMessagesExtractor, options: ValidationErrorRendererFactoryOptions);
|
|
23
19
|
/**
|
|
24
20
|
* Creates new instance of ValidationErrorRenderer
|
|
25
21
|
* @param control - Control that is being processed for errors
|
|
26
|
-
* @param
|
|
22
|
+
* @param containerView - Class that stores view container for rendering errors
|
|
23
|
+
* @param injector - Injector for obtaining dependencies
|
|
27
24
|
* @param isSubmittedOrDirty - Function used for testing if control is submitted or dirty
|
|
28
|
-
* @param options - Options for validation errors renderer factory
|
|
29
25
|
*/
|
|
30
|
-
create(control: FormControl,
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorRendererFactory, [null,
|
|
26
|
+
create(control: FormControl, containerView: ValidationErrorsContainerView, injector: Injector, isSubmittedOrDirty: IsSubmittedOrDirtyFunc): ValidationErrorRenderer;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorRendererFactory, [null, { optional: true; }]>;
|
|
32
28
|
static ɵprov: i0.ɵɵInjectableDeclaration<ValidationErrorRendererFactory>;
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
@@ -37,74 +33,30 @@ export declare class ValidationErrorRendererFactory {
|
|
|
37
33
|
export declare class DefaultValidationErrorRenderer implements ValidationErrorRenderer {
|
|
38
34
|
protected _errorMessagesExtractor: ErrorMessagesExtractor;
|
|
39
35
|
protected _control: FormControl;
|
|
40
|
-
protected
|
|
41
|
-
protected _document: Document;
|
|
36
|
+
protected _containerView: ValidationErrorsContainerView;
|
|
42
37
|
protected _injector: Injector;
|
|
43
38
|
protected _isSubmittedOrDirty: IsSubmittedOrDirtyFunc;
|
|
44
39
|
protected _options: ValidationErrorsRendererOptions;
|
|
45
|
-
/**
|
|
46
|
-
* Html element attribute storing error messages
|
|
47
|
-
*/
|
|
48
|
-
protected _errorMessageAttr: Attr;
|
|
49
40
|
/**
|
|
50
41
|
* Object storing last obtained errors
|
|
51
42
|
*/
|
|
52
43
|
protected _lastErrors: ValidationErrorsResult;
|
|
53
44
|
/**
|
|
54
|
-
* Component used
|
|
55
|
-
*/
|
|
56
|
-
protected _component: ComponentRef<ValidationErrorsComponent>;
|
|
57
|
-
/**
|
|
58
|
-
* Html element that is wrapping errors
|
|
45
|
+
* Component used as validation errors container
|
|
59
46
|
*/
|
|
60
|
-
|
|
61
|
-
constructor(_errorMessagesExtractor: ErrorMessagesExtractor, _control: FormControl,
|
|
47
|
+
protected _container: ComponentRef<ValidationErrorsContainerComponent>;
|
|
48
|
+
constructor(_errorMessagesExtractor: ErrorMessagesExtractor, _control: FormControl, _containerView: ValidationErrorsContainerView, _injector: Injector, _isSubmittedOrDirty: IsSubmittedOrDirtyFunc, _options: ValidationErrorsRendererOptions);
|
|
62
49
|
/**
|
|
63
|
-
*
|
|
50
|
+
* @inheritdoc
|
|
64
51
|
*/
|
|
65
52
|
destroy(): void;
|
|
66
53
|
/**
|
|
67
|
-
*
|
|
68
|
-
* @param errorMessages - Object storing error messages to be used as override
|
|
69
|
-
* @param onlyShow - Indication that update performs only displaying of existing errors
|
|
70
|
-
*/
|
|
71
|
-
update(errorMessages?: StringDictionary): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Toggles css classes for errors that are currently set
|
|
74
|
-
* @param add - Indication whether add or remove errors
|
|
54
|
+
* @inheritdoc
|
|
75
55
|
*/
|
|
76
|
-
|
|
56
|
+
update(options: ValidationErrorsRendererOptions, errorMessages?: StringDictionary): boolean;
|
|
77
57
|
/**
|
|
78
58
|
* Initialize renderer
|
|
79
59
|
*/
|
|
80
60
|
protected _initialize(): void;
|
|
81
|
-
/**
|
|
82
|
-
* Renders error messages
|
|
83
|
-
* @param add - Indication whether add or remove errors
|
|
84
|
-
*/
|
|
85
|
-
protected _render(add: boolean): void;
|
|
86
|
-
/**
|
|
87
|
-
* Renders divs with errors
|
|
88
|
-
* @param add - Indication whether add or remove errors
|
|
89
|
-
*/
|
|
90
|
-
protected _renderDivs(add?: boolean): void;
|
|
91
|
-
/**
|
|
92
|
-
* Renders component with errors
|
|
93
|
-
* @param add - Indication whether add or remove errors
|
|
94
|
-
*/
|
|
95
|
-
protected _renderComponent(add?: boolean): void;
|
|
96
|
-
/**
|
|
97
|
-
* Renders template with errors
|
|
98
|
-
* @param add - Indication whether add or remove errors
|
|
99
|
-
*/
|
|
100
|
-
protected _renderTemplate(_add?: boolean): void;
|
|
101
|
-
/**
|
|
102
|
-
* Shows wrapper element
|
|
103
|
-
*/
|
|
104
|
-
protected _show(): void;
|
|
105
|
-
/**
|
|
106
|
-
* Hides wrapper element
|
|
107
|
-
*/
|
|
108
|
-
protected _hide(): void;
|
|
109
61
|
}
|
|
110
62
|
//# sourceMappingURL=validationErrorRenderer.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationErrorRenderer.service.d.ts","sourceRoot":"","sources":["validationErrorRenderer.service.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"validationErrorRenderer.service.d.ts","sourceRoot":"","sources":["validationErrorRenderer.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,QAAQ,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACnF,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAC,sBAAsB,EAAC,MAAM,0DAA0D,CAAC;AAChG,OAAO,EAAC,uBAAuB,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,qCAAqC,EAAE,kCAAkC,EAAC,MAAM,qCAAqC,CAAC;AAChN,OAAO,EAAC,sBAAsB,EAAC,MAAM,4DAA4D,CAAC;AAElG,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;;AAGvF;;GAEG;AACH,qBACa,8BAA8B;IAU3B,SAAS,CAAC,uBAAuB,EAAE,sBAAsB;IANrE;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,qCAAqC,CAAC;gBAGpC,uBAAuB,EAAE,sBAAsB,EACM,OAAO,EAAE,qCAAqC;IAOzH;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,6BAA6B,EAC5C,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,sBAAsB,GAAG,uBAAuB;yCA5BzE,8BAA8B;6CAA9B,8BAA8B;CAqC1C;AAED;;GAEG;AACH,qBAAa,8BAA+B,YAAW,uBAAuB;IAe9D,SAAS,CAAC,uBAAuB,EAAE,sBAAsB;IACzD,SAAS,CAAC,QAAQ,EAAE,WAAW;IAC/B,SAAS,CAAC,cAAc,EAAE,6BAA6B;IACvD,SAAS,CAAC,SAAS,EAAE,QAAQ;IAC7B,SAAS,CAAC,mBAAmB,EAAE,sBAAsB;IACrD,SAAS,CAAC,QAAQ,EAAE,+BAA+B;IAhB/D;;OAEG;IACH,SAAS,CAAC,WAAW,EAAE,sBAAsB,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,YAAY,CAAC,kCAAkC,CAAC,CAAC;gBAGjD,uBAAuB,EAAE,sBAAsB,EAC/C,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,6BAA6B,EAC7C,SAAS,EAAE,QAAQ,EACnB,mBAAmB,EAAE,sBAAsB,EAC3C,QAAQ,EAAE,+BAA+B;IAO/D;;OAEG;IACI,OAAO,IAAI,IAAI;IAMtB;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,+BAA+B,EAAE,aAAa,CAAC,EAAE,gBAAgB,GAAG,OAAO;IA+BlG;;OAEG;IACH,SAAS,CAAC,WAAW,IAAI,IAAI;CAKhC"}
|
package/package.json
CHANGED
package/version.bak
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
12.0.0-beta.
|
|
1
|
+
12.0.0-beta.20220414093434
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../forms/src/misc/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAG7C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAqC,IAAI,cAAc,CAAmB,2BAA2B,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {StringDictionary} from '@jscrpt/common';\n\n/**\n * Injection token containing validation error messages\n */\nexport const VALIDATION_ERROR_MESSAGES: InjectionToken<StringDictionary> = new InjectionToken<StringDictionary>('VALIDATION_ERROR_MESSAGES');"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../forms/src/misc/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAG7C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAqC,IAAI,cAAc,CAAmB,2BAA2B,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {StringDictionary} from '@jscrpt/common';\n\n/**\n * Injection token containing validation error messages\n */\nexport const VALIDATION_ERROR_MESSAGES: InjectionToken<StringDictionary> = new InjectionToken<StringDictionary>('VALIDATION_ERROR_MESSAGES');"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { StringDictionary } from '@jscrpt/common';
|
|
3
|
-
/**
|
|
4
|
-
* Injection token containing validation error messages
|
|
5
|
-
*/
|
|
6
|
-
export declare const VALIDATION_ERROR_MESSAGES: InjectionToken<StringDictionary>;
|
|
7
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,gBAAgB,CAAqE,CAAC"}
|