@acorex/core 7.19.0 → 7.19.1
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,18 +1,18 @@
|
|
1
|
-
export * from './lib/
|
2
|
-
//
|
1
|
+
export * from './lib/rules/callback-rule';
|
3
2
|
export * from './lib/rules/regex-rule';
|
4
3
|
export * from './lib/rules/required-rule';
|
5
|
-
export * from './lib/rules/callback-rule';
|
6
4
|
//
|
7
|
-
export * from './lib/rules/minlength-rule';
|
8
|
-
export * from './lib/rules/maxlength-rule';
|
9
5
|
export * from './lib/rules/length-rule';
|
6
|
+
export * from './lib/rules/maxlength-rule';
|
7
|
+
export * from './lib/rules/minlength-rule';
|
10
8
|
//
|
9
|
+
export * from './lib/rules/between-rule';
|
11
10
|
export * from './lib/rules/equal-rule';
|
12
|
-
export * from './lib/rules/less-than-rule';
|
13
11
|
export * from './lib/rules/greater-than';
|
14
|
-
export * from './lib/rules/
|
12
|
+
export * from './lib/rules/less-than-rule';
|
15
13
|
//
|
16
|
-
export * from './lib/validation.
|
14
|
+
export * from './lib/validation.config';
|
17
15
|
export * from './lib/validation.module';
|
18
|
-
|
16
|
+
export * from './lib/validation.service';
|
17
|
+
export * from './lib/validation.types';
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvdmFsaWRhdGlvbi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsRUFBRTtBQUNGLGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLDRCQ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leHBvcnQgKiBmcm9tICcuL2xpYi92YWxpZGF0aW9uLnR5cGVzJztcbiJdfQ==
|
@@ -1,11 +1,32 @@
|
|
1
|
-
import { isString, isEmpty, isNull, isUndefined, isNumber, isArray, find, isEqual, merge } from 'lodash-es';
|
2
1
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
2
|
+
import { Injectable, inject, InjectionToken, Injector, NgModule, Inject } from '@angular/core';
|
3
|
+
import { isString, isEmpty, isNull, isUndefined, isNumber, isArray, find, isEqual, merge } from 'lodash-es';
|
4
4
|
import * as i1 from '@acorex/core/translation';
|
5
5
|
import { AXTranslationService } from '@acorex/core/translation';
|
6
6
|
|
7
|
-
class
|
7
|
+
class AXCallbackValidationRule {
|
8
|
+
get name() {
|
9
|
+
return 'callback';
|
10
|
+
}
|
11
|
+
async validate(value, options) {
|
12
|
+
const validationResult = options?.validate(value, options) || { result: false, message: "Invalid callback function" };
|
13
|
+
const createResult = (result) => ({
|
14
|
+
rule: this.name,
|
15
|
+
result: result.result,
|
16
|
+
message: result.message ?? options?.message ?? '',
|
17
|
+
value: value
|
18
|
+
});
|
19
|
+
if (validationResult instanceof Promise) {
|
20
|
+
return validationResult.then(createResult);
|
21
|
+
}
|
22
|
+
return createResult(validationResult);
|
23
|
+
}
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXCallbackValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
25
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXCallbackValidationRule }); }
|
8
26
|
}
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXCallbackValidationRule, decorators: [{
|
28
|
+
type: Injectable
|
29
|
+
}] });
|
9
30
|
|
10
31
|
class AXRegexValidationRule {
|
11
32
|
constructor() {
|
@@ -81,47 +102,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
81
102
|
type: Injectable
|
82
103
|
}] });
|
83
104
|
|
84
|
-
|
85
|
-
|
86
|
-
return 'callback';
|
87
|
-
}
|
88
|
-
async validate(value, options) {
|
89
|
-
const validationResult = options?.validate(value, options) || { result: false, message: "Invalid callback function" };
|
90
|
-
const createResult = (result) => ({
|
91
|
-
rule: this.name,
|
92
|
-
result: result.result,
|
93
|
-
message: result.message ?? options?.message ?? '',
|
94
|
-
value: value
|
95
|
-
});
|
96
|
-
if (validationResult instanceof Promise) {
|
97
|
-
return validationResult.then(createResult);
|
98
|
-
}
|
99
|
-
return createResult(validationResult);
|
100
|
-
}
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXCallbackValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
102
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXCallbackValidationRule }); }
|
103
|
-
}
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXCallbackValidationRule, decorators: [{
|
105
|
-
type: Injectable
|
106
|
-
}] });
|
107
|
-
|
108
|
-
class AXMinLengthValidationRule {
|
105
|
+
// ax-max-length-validation-rule.ts
|
106
|
+
class AXLengthValidationRule {
|
109
107
|
get name() {
|
110
|
-
return '
|
108
|
+
return 'length';
|
111
109
|
}
|
112
110
|
async validate(value, options) {
|
113
|
-
const isValid =
|
111
|
+
const isValid = value?.length >= options.min && value?.length <= options.max;
|
114
112
|
return {
|
115
113
|
rule: this.name,
|
116
114
|
result: isValid,
|
117
|
-
message: isValid ?
|
115
|
+
message: isValid ? null : options?.message ?? `The value must be between ${options.min} and ${options.max} chars`,
|
118
116
|
value: value
|
119
117
|
};
|
120
118
|
}
|
121
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
122
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXLengthValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
120
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXLengthValidationRule }); }
|
123
121
|
}
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXLengthValidationRule, decorators: [{
|
125
123
|
type: Injectable
|
126
124
|
}] });
|
127
125
|
|
@@ -146,69 +144,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
146
144
|
type: Injectable
|
147
145
|
}] });
|
148
146
|
|
149
|
-
|
150
|
-
class AXLengthValidationRule {
|
147
|
+
class AXMinLengthValidationRule {
|
151
148
|
get name() {
|
152
|
-
return '
|
149
|
+
return 'minLength';
|
153
150
|
}
|
154
151
|
async validate(value, options) {
|
155
|
-
const isValid = value
|
152
|
+
const isValid = isEmpty(value) ? true : (value?.length >= options.value);
|
156
153
|
return {
|
157
154
|
rule: this.name,
|
158
155
|
result: isValid,
|
159
|
-
message: isValid ?
|
156
|
+
message: isValid ? '' : options?.message ?? `The value must be at least ${options.value} characters long.`,
|
160
157
|
value: value
|
161
158
|
};
|
162
159
|
}
|
163
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
164
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
160
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXMinLengthValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
161
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXMinLengthValidationRule }); }
|
165
162
|
}
|
166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXMinLengthValidationRule, decorators: [{
|
167
164
|
type: Injectable
|
168
165
|
}] });
|
169
166
|
|
170
|
-
|
171
|
-
class AXEqualValidationRule {
|
167
|
+
class AXBetweenValidationRule {
|
172
168
|
get name() {
|
173
|
-
return '
|
169
|
+
return 'between';
|
174
170
|
}
|
175
171
|
async validate(value, options) {
|
176
|
-
|
177
|
-
|
178
|
-
|
172
|
+
let isValid;
|
173
|
+
if (options.inclusive) {
|
174
|
+
isValid = value >= options.lowerValue && value <= options.upperValue;
|
175
|
+
}
|
176
|
+
else {
|
177
|
+
isValid = value > options.lowerValue && value < options.upperValue;
|
178
|
+
}
|
179
|
+
const rangeType = options.inclusive ? 'inclusive' : 'exclusive';
|
180
|
+
const baseMessage = `The value must be within the ${rangeType} range of ${options.lowerValue} to ${options.upperValue}.`;
|
179
181
|
return {
|
180
182
|
rule: this.name,
|
181
|
-
result: isValid,
|
182
|
-
message: isValid ? '' : options?.message ??
|
183
|
+
result: isValid || isEmpty(value),
|
184
|
+
message: isValid ? '' : options?.message ?? baseMessage,
|
183
185
|
value: value
|
184
186
|
};
|
185
187
|
}
|
186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
187
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXBetweenValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
189
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXBetweenValidationRule }); }
|
188
190
|
}
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXBetweenValidationRule, decorators: [{
|
190
192
|
type: Injectable
|
191
193
|
}] });
|
192
194
|
|
193
|
-
// ax-
|
194
|
-
class
|
195
|
+
// ax-equal-validation-rule.ts
|
196
|
+
class AXEqualValidationRule {
|
195
197
|
get name() {
|
196
|
-
return '
|
198
|
+
return 'equal';
|
197
199
|
}
|
198
200
|
async validate(value, options) {
|
199
|
-
const
|
200
|
-
const
|
201
|
+
const isValueEqual = isEqual(value, options.value);
|
202
|
+
const isValid = options.not ? !isValueEqual : isValueEqual;
|
203
|
+
const defaultMessage = `The value must ${options.not ? 'not ' : ''}be equal to ${options.value}.`;
|
201
204
|
return {
|
202
205
|
rule: this.name,
|
203
206
|
result: isValid,
|
204
|
-
message: isValid ? '' : options?.message ??
|
207
|
+
message: isValid ? '' : options?.message ?? defaultMessage,
|
205
208
|
value: value
|
206
209
|
};
|
207
210
|
}
|
208
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
209
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
211
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXEqualValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
212
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXEqualValidationRule }); }
|
210
213
|
}
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXEqualValidationRule, decorators: [{
|
212
215
|
type: Injectable
|
213
216
|
}] });
|
214
217
|
|
@@ -234,31 +237,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
234
237
|
type: Injectable
|
235
238
|
}] });
|
236
239
|
|
237
|
-
|
240
|
+
// ax-less-than-validation-rule.ts
|
241
|
+
class AXLessThanValidationRule {
|
238
242
|
get name() {
|
239
|
-
return '
|
243
|
+
return 'lessThan';
|
240
244
|
}
|
241
245
|
async validate(value, options) {
|
242
|
-
|
243
|
-
|
244
|
-
isValid = value >= options.lowerValue && value <= options.upperValue;
|
245
|
-
}
|
246
|
-
else {
|
247
|
-
isValid = value > options.lowerValue && value < options.upperValue;
|
248
|
-
}
|
249
|
-
const rangeType = options.inclusive ? 'inclusive' : 'exclusive';
|
250
|
-
const baseMessage = `The value must be within the ${rangeType} range of ${options.lowerValue} to ${options.upperValue}.`;
|
246
|
+
const isValid = (isNull(value) || isUndefined(value)) ? true : (options.inclusive ? value <= options.value : value < options.value);
|
247
|
+
const baseMessage = `The value must be ${options.inclusive ? 'less than or equal to' : 'less than'} ${options.value}.`;
|
251
248
|
return {
|
252
249
|
rule: this.name,
|
253
|
-
result: isValid
|
250
|
+
result: isValid,
|
254
251
|
message: isValid ? '' : options?.message ?? baseMessage,
|
255
252
|
value: value
|
256
253
|
};
|
257
254
|
}
|
258
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
259
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXLessThanValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
256
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXLessThanValidationRule }); }
|
260
257
|
}
|
261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AXLessThanValidationRule, decorators: [{
|
262
259
|
type: Injectable
|
263
260
|
}] });
|
264
261
|
|
@@ -458,9 +455,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
458
455
|
args: ['AXValidationModuleFactory']
|
459
456
|
}] }] });
|
460
457
|
|
458
|
+
class AXValidationRule {
|
459
|
+
}
|
460
|
+
|
461
461
|
/**
|
462
462
|
* Generated bundle index. Do not edit.
|
463
463
|
*/
|
464
464
|
|
465
|
-
export { AXBetweenValidationRule, AXCallbackValidationRule, AXEqualValidationRule, AXGreaterThanValidationRule, AXLengthValidationRule, AXLessThanValidationRule, AXMaxLengthValidationRule, AXMinLengthValidationRule, AXRegexValidationRule, AXRequiredValidationRule, AXValidationModule, AXValidationRegistryService, AXValidationRule, AXValidationService };
|
465
|
+
export { AXBetweenValidationRule, AXCallbackValidationRule, AXEqualValidationRule, AXGreaterThanValidationRule, AXLengthValidationRule, AXLessThanValidationRule, AXMaxLengthValidationRule, AXMinLengthValidationRule, AXRegexValidationRule, AXRequiredValidationRule, AXValidationDefaultConfig, AXValidationModule, AXValidationRegistryService, AXValidationRule, AXValidationService, AX_VALIDATION_CONFIG, validationConfig };
|
466
466
|
//# sourceMappingURL=acorex-core-validation.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-validation.mjs","sources":["../../../../libs/core/validation/src/lib/validation.types.ts","../../../../libs/core/validation/src/lib/rules/regex-rule.ts","../../../../libs/core/validation/src/lib/rules/required-rule.ts","../../../../libs/core/validation/src/lib/rules/callback-rule.ts","../../../../libs/core/validation/src/lib/rules/minlength-rule.ts","../../../../libs/core/validation/src/lib/rules/maxlength-rule.ts","../../../../libs/core/validation/src/lib/rules/length-rule.ts","../../../../libs/core/validation/src/lib/rules/equal-rule.ts","../../../../libs/core/validation/src/lib/rules/less-than-rule.ts","../../../../libs/core/validation/src/lib/rules/greater-than.ts","../../../../libs/core/validation/src/lib/rules/between-rule.ts","../../../../libs/core/validation/src/lib/validation.config.ts","../../../../libs/core/validation/src/lib/validation.service.ts","../../../../libs/core/validation/src/lib/validation.module.ts","../../../../libs/core/validation/src/acorex-core-validation.ts"],"sourcesContent":["export interface AXValidationRuleOptions {\n message?: string\n [key: string]: unknown\n}\n\n\nexport interface AXValidationRuleOptionsMap {\n // initially empty, but will be extended by other modules\n}\n\n\nexport abstract class AXValidationRule {\n abstract get name(): string;\n abstract validate(value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult>;\n}\n\nexport interface AXValidationRuleResult {\n rule: string;\n value?: unknown;\n message?: string | null;\n result: boolean;\n [key: string]: unknown\n}\n\nexport interface AXValidationSummary {\n result: boolean;\n rules: AXValidationRuleResult[]\n}\n","import { isEmpty, isString } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable, inject } from \"@angular/core\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\n\n\nexport interface AXRegexValidationRuleOptions extends AXValidationRuleOptions {\n pattern: string | RegExp;\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'regex': AXRegexValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRegexValidationRule implements AXValidationRule {\n\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'regex';\n }\n\n async validate(value: string, options: AXRegexValidationRuleOptions): Promise<AXValidationRuleResult> {\n // Convert string pattern to RegExp if necessary\n const regexPattern = typeof options.pattern === 'string' ? new RegExp(options.pattern) : options.pattern;\n\n if (!value || (isString(value) && isEmpty(value.trim()))) {\n return {\n rule: this.name,\n result: true,\n message: null,\n value: value\n };\n }\n else if (!isString(value)) {\n return {\n rule: this.name,\n result: false,\n message: `${value} is not string value.`,\n value: value\n };\n }\n\n const isValid = regexPattern.test(value);\n const translatedMessage = await this.traslationService.translateAsync(\n options?.message ?? `The value does not match the pattern ${regexPattern}.`, { params: { title: options?.['title'] } });\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : translatedMessage,\n value: value\n };\n }\n\n}","import { find, isArray, isEmpty, isNull, isNumber, isString, isUndefined } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable, inject } from \"@angular/core\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\nimport { firstValueFrom, lastValueFrom } from \"rxjs\";\n\n\nexport interface AXRequiredValidationRuleOptions extends AXValidationRuleOptions {\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'required': AXRequiredValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRequiredValidationRule implements AXValidationRule {\n\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'required';\n }\n\n async validate(value?: unknown, options?: AXRequiredValidationRuleOptions): Promise<AXValidationRuleResult> {\n const rules = [\n { test: val => isNull(val) || isUndefined(val) },\n { test: val => isString(val) && isEmpty(val.trim()) },\n { test: val => isNumber(val) && isNaN(val) },\n { test: val => isArray(val) && isEmpty(val) }\n ];\n\n const failedRule = find(rules, rule => rule.test(value));\n const isValid = !failedRule;\n const translatedMessage = await this.traslationService.translateAsync(\"validation.messages.required\", { params: { title: options?.['title'] } });\n const message = failedRule ? options?.message ?? translatedMessage : null;\n\n return {\n rule: this.name,\n result: isValid,\n message: message,\n value\n };\n }\n}","import { Injectable } from \"@angular/core\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\n\nexport type AXCallbackValidation<T> = (value: T, options?: AXCallbackValidationRuleOptions<T>) => Promise<{ result: boolean, message?: string }> | { result: boolean, message?: string };\n\nexport interface AXCallbackValidationRuleOptions<T> extends AXValidationRuleOptions {\n validate: AXCallbackValidation<T>\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'callback': AXCallbackValidationRuleOptions<unknown>;\n }\n}\n\n@Injectable()\nexport class AXCallbackValidationRule<T> implements AXValidationRule {\n\n get name(): string {\n return 'callback';\n }\n\n async validate(value: T, options: AXCallbackValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n const validationResult = options?.validate(value, options) || { result: false, message: \"Invalid callback function\" };\n const createResult = (result: { result: boolean, message?: string }) => ({\n rule: this.name,\n result: result.result,\n message: result.message ?? options?.message ?? '',\n value: value\n });\n\n if (validationResult instanceof Promise) {\n return validationResult.then(createResult);\n }\n\n return createResult(validationResult);\n }\n}","import { isEmpty } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXMinLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'minLength': AXMinLengthValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXMinLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'minLength';\n }\n\n async validate(value: string, options: AXMinLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : (value?.length >= options.value);\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must be at least ${options.value} characters long.`,\n value: value\n };\n }\n}","// ax-max-length-validation-rule.ts\nimport { isEmpty } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXMaxLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'maxLength': AXMaxLengthValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXMaxLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'maxLength';\n }\n\n async validate(value: string, options: AXMaxLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : (value?.length <= options.value);\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must not exceed ${options.value} characters.`,\n value: value\n };\n }\n}\n","// ax-max-length-validation-rule.ts\nimport { Injectable } from \"@angular/core\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\n\nexport interface AXLengthValidationRuleOptions extends AXValidationRuleOptions {\n min: number;\n max: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'length': AXLengthValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'length';\n }\n\n async validate(value: string, options: AXLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = value?.length >= options.min && value?.length <= options.max;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : options?.message ?? `The value must be between ${options.min} and ${options.max} chars`,\n value: value\n };\n }\n}\n","// ax-equal-validation-rule.ts\nimport { isEqual } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXEqualValidationRuleOptions extends AXValidationRuleOptions {\n value: any;\n not?: boolean; // Optional flag to invert the validation logic\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'equal': AXEqualValidationRuleOptions;\n }\n}\n@Injectable()\nexport class AXEqualValidationRule implements AXValidationRule {\n get name(): string {\n return 'equal';\n }\n\n async validate(value: any, options: AXEqualValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValueEqual = isEqual(value, options.value);\n const isValid = options.not ? !isValueEqual : isValueEqual;\n\n const defaultMessage = `The value must ${options.not ? 'not ' : ''}be equal to ${options.value}.`;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? defaultMessage,\n value: value\n };\n }\n}\n","// ax-less-than-validation-rule.ts\nimport { isNull, isUndefined } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXLessThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'lessThan': AXLessThanValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXLessThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'lessThan';\n }\n\n async validate(value: number, options: AXLessThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = (isNull(value) || isUndefined(value)) ? true : (options.inclusive ? value <= options.value : value < options.value);\n const baseMessage = `The value must be ${options.inclusive ? 'less than or equal to' : 'less than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value\n };\n }\n}\n","// ax-greater-than-validation-rule.ts\nimport { isNull, isUndefined } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXGreaterThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'greaterThan': AXGreaterThanValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXGreaterThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'greaterThan';\n }\n\n async validate(value: number, options: AXGreaterThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = (isNull(value) || isUndefined(value)) ? true : (options.inclusive ? value >= options.value : value > options.value);\n const baseMessage = `The value must be ${options.inclusive ? 'greater than or equal to' : 'greater than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value\n };\n }\n}\n","import { isEmpty } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXBetweenValidationRuleOptions<T = number | Date> extends AXValidationRuleOptions {\n lowerValue: T;\n upperValue: T;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'between': AXBetweenValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXBetweenValidationRule<T = number | Date> implements AXValidationRule {\n get name(): string {\n return 'between';\n }\n\n async validate(value: T, options: AXBetweenValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n let isValid;\n if (options.inclusive) {\n isValid = value >= options.lowerValue && value <= options.upperValue;\n } else {\n isValid = value > options.lowerValue && value < options.upperValue;\n }\n\n const rangeType = options.inclusive ? 'inclusive' : 'exclusive';\n const baseMessage = `The value must be within the ${rangeType} range of ${options.lowerValue} to ${options.upperValue}.`;\n\n return {\n rule: this.name,\n result: isValid || isEmpty(value),\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value\n };\n }\n}","import { InjectionToken } from '@angular/core';\nimport { AXValidationRuleOptions, AXValidationRuleOptionsMap } from './validation.types';\n\nexport type AXValidationConfigRules = {\n [key: string]: {\n rule: keyof AXValidationRuleOptionsMap;\n options: AXValidationRuleOptions\n };\n}\n\nexport interface AXValidationConfig {\n rules: AXValidationConfigRules;\n}\n\nexport const AX_VALIDATION_CONFIG = new InjectionToken<AXValidationConfig>('AX_VALIDATION_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXValidationDefaultConfig;\n },\n});\n\nexport const AXValidationDefaultConfig: AXValidationConfig = {\n rules: {\n email: {\n rule: 'regex',\n options: {\n pattern:\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: 'validation.messages.email',\n }\n },\n phone: {\n rule: 'regex',\n options: {\n pattern: /^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$/,\n message: 'validation.messages.phone',\n }\n },\n },\n};\n\nexport type AXPartialValidationConfig = Partial<AXValidationConfig>;\n\nexport function validationConfig(config: AXPartialValidationConfig = {}): AXValidationConfig {\n const result = {\n ...AXValidationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { Injectable, Injector, inject } from \"@angular/core\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleOptionsMap, AXValidationRuleResult, AXValidationSummary } from \"./validation.types\";\nimport { AXValidationConfigRules, AX_VALIDATION_CONFIG } from \"./validation.config\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\nimport { merge } from \"lodash-es\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AXValidationRegistryService {\n private plugins: AXValidationRule[] = [];\n\n private configs = inject(AX_VALIDATION_CONFIG);\n\n public get customRules(): AXValidationConfigRules {\n return this.configs.rules;\n }\n\n private injector: Injector;\n\n constructor(injector: Injector) {\n this.injector = injector;\n }\n\n register(...plugins: (new () => AXValidationRule)[]) {\n plugins.forEach(t => {\n const childInjector = Injector.create({ providers: [{ provide: t, useClass: t, deps: [] }], parent: this.injector });\n const v = childInjector.get(t);\n\n if (v && !this.plugins.some(p => p.name == v.name)) {\n this.plugins.push(v);\n }\n })\n }\n\n get(ruleName: string): AXValidationRule | undefined {\n return this.plugins.find((c) => c.name == ruleName)\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXValidationService {\n constructor(\n private pluginRegistry: AXValidationRegistryService,\n private translationService: AXTranslationService,\n\n ) { }\n\n async validate(ruleName: string, value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult> {\n const customRule = this.pluginRegistry.customRules[ruleName];\n const validator = this.pluginRegistry.get(ruleName);\n\n if (!validator && !customRule) {\n return {\n rule: ruleName,\n result: false,\n message: await this.translationService.translateAsync('validation.messages.invalid-rull-name', { params: { name: ruleName } }),\n value\n };\n }\n\n if (options?.message) {\n options.message = await this.translationService.translateAsync(options.message)\n }\n //\n if (validator)\n return validator.validate(value, options);\n else {\n\n return this.validate(customRule.rule, value, merge(options, customRule.options));\n }\n\n }\n\n ruleFor(value: unknown): AXValidationRuleChain {\n return new AXValidationRuleChain(this, value);\n }\n}\n\nclass AXValidationRuleChain {\n private rules: { name: string, options?: AXValidationRuleOptions }[] = [];\n private validationSummary: AXValidationSummary = { result: true, rules: [] };\n\n constructor(private validationService: AXValidationService, private initialValue: unknown) { }\n\n addRule<K extends keyof AXValidationRuleOptionsMap>(name: K, options?: AXValidationRuleOptionsMap[K]): AXValidationRuleChain {\n this.rules.push({ name, options });\n return this;\n }\n\n async validate(): Promise<AXValidationSummary> {\n for (const rule of this.rules) {\n const result = await this.validationService.validate(rule.name, this.initialValue, rule.options);\n this.validationSummary.rules.push(result);\n if (!result.result) {\n this.validationSummary.result = false;\n }\n }\n return this.validationSummary;\n }\n}\n","import { APP_INITIALIZER, Inject, Injector, ModuleWithProviders, NgModule } from '@angular/core';\nimport { AXValidationRegistryService } from './validation.service';\nimport { AXValidationRule } from './validation.types';\nimport { AXRegexValidationRule } from './rules/regex-rule';\nimport { AXRequiredValidationRule } from './rules/required-rule';\nimport { AXCallbackValidationRule } from './rules/callback-rule';\nimport { AXMinLengthValidationRule } from './rules/minlength-rule';\nimport { AXMaxLengthValidationRule } from './rules/maxlength-rule';\nimport { AXLengthValidationRule } from './rules/length-rule';\nimport { AXEqualValidationRule } from './rules/equal-rule';\nimport { AXLessThanValidationRule } from './rules/less-than-rule';\nimport { AXGreaterThanValidationRule } from './rules/greater-than';\nimport { AXBetweenValidationRule } from './rules/between-rule';\n\n\n\nconst BUILT_IN_RULES = [\n AXRequiredValidationRule,\n AXRegexValidationRule,\n AXRequiredValidationRule,\n AXCallbackValidationRule,\n //\n AXMinLengthValidationRule,\n AXMaxLengthValidationRule,\n AXLengthValidationRule,\n //\n AXEqualValidationRule,\n AXLessThanValidationRule,\n AXGreaterThanValidationRule,\n AXBetweenValidationRule\n]\n\n\nexport interface AXValidationModuleConfigs {\n rules: (new () => AXValidationRule)[]\n}\n\n@NgModule({\n imports: [],\n providers: [\n ...BUILT_IN_RULES\n ]\n})\nexport class AXValidationModule {\n\n static forRoot(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true\n }\n ]\n };\n }\n\n static forChild(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true\n }\n\n ]\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Inject('AXValidationModuleFactory') instances: any[]) {\n instances.forEach(f => {\n f();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAWsB,gBAAgB,CAAA;AAGrC;;MCIY,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;AAGY,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAsC5D,KAAA;AApCG,IAAA,IAAI,IAAI,GAAA;AACJ,QAAA,OAAO,OAAO,CAAC;KAClB;AAED,IAAA,MAAM,QAAQ,CAAC,KAAa,EAAE,OAAqC,EAAA;;QAE/D,MAAM,YAAY,GAAG,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;AAEzG,QAAA,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;YACtD,OAAO;gBACH,IAAI,EAAE,IAAI,CAAC,IAAI;AACf,gBAAA,MAAM,EAAE,IAAI;AACZ,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,KAAK,EAAE,KAAK;aACf,CAAC;AACL,SAAA;AACI,aAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YACvB,OAAO;gBACH,IAAI,EAAE,IAAI,CAAC,IAAI;AACf,gBAAA,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,CAAG,EAAA,KAAK,CAAuB,qBAAA,CAAA;AACxC,gBAAA,KAAK,EAAE,KAAK;aACf,CAAC;AACL,SAAA;QAED,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzC,QAAA,MAAM,iBAAiB,GAAG,MAAM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AA,EAAA,CAAA;kBAN9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACP,wBAAA,GAAG,cAAc;AACpB,qBAAA;AACJ,iBAAA,CAAA;;0BAyCgB,MAAM;2BAAC,2BAA2B,CAAA;;;ACnFnD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-validation.mjs","sources":["../../../../libs/core/validation/src/lib/rules/callback-rule.ts","../../../../libs/core/validation/src/lib/rules/regex-rule.ts","../../../../libs/core/validation/src/lib/rules/required-rule.ts","../../../../libs/core/validation/src/lib/rules/length-rule.ts","../../../../libs/core/validation/src/lib/rules/maxlength-rule.ts","../../../../libs/core/validation/src/lib/rules/minlength-rule.ts","../../../../libs/core/validation/src/lib/rules/between-rule.ts","../../../../libs/core/validation/src/lib/rules/equal-rule.ts","../../../../libs/core/validation/src/lib/rules/greater-than.ts","../../../../libs/core/validation/src/lib/rules/less-than-rule.ts","../../../../libs/core/validation/src/lib/validation.config.ts","../../../../libs/core/validation/src/lib/validation.service.ts","../../../../libs/core/validation/src/lib/validation.module.ts","../../../../libs/core/validation/src/lib/validation.types.ts","../../../../libs/core/validation/src/acorex-core-validation.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\n\nexport type AXCallbackValidation<T> = (value: T, options?: AXCallbackValidationRuleOptions<T>) => Promise<{ result: boolean, message?: string }> | { result: boolean, message?: string };\n\nexport interface AXCallbackValidationRuleOptions<T> extends AXValidationRuleOptions {\n validate: AXCallbackValidation<T>\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'callback': AXCallbackValidationRuleOptions<unknown>;\n }\n}\n\n@Injectable()\nexport class AXCallbackValidationRule<T> implements AXValidationRule {\n\n get name(): string {\n return 'callback';\n }\n\n async validate(value: T, options: AXCallbackValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n const validationResult = options?.validate(value, options) || { result: false, message: \"Invalid callback function\" };\n const createResult = (result: { result: boolean, message?: string }) => ({\n rule: this.name,\n result: result.result,\n message: result.message ?? options?.message ?? '',\n value: value\n });\n\n if (validationResult instanceof Promise) {\n return validationResult.then(createResult);\n }\n\n return createResult(validationResult);\n }\n}","import { isEmpty, isString } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable, inject } from \"@angular/core\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\n\n\nexport interface AXRegexValidationRuleOptions extends AXValidationRuleOptions {\n pattern: string | RegExp;\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'regex': AXRegexValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRegexValidationRule implements AXValidationRule {\n\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'regex';\n }\n\n async validate(value: string, options: AXRegexValidationRuleOptions): Promise<AXValidationRuleResult> {\n // Convert string pattern to RegExp if necessary\n const regexPattern = typeof options.pattern === 'string' ? new RegExp(options.pattern) : options.pattern;\n\n if (!value || (isString(value) && isEmpty(value.trim()))) {\n return {\n rule: this.name,\n result: true,\n message: null,\n value: value\n };\n }\n else if (!isString(value)) {\n return {\n rule: this.name,\n result: false,\n message: `${value} is not string value.`,\n value: value\n };\n }\n\n const isValid = regexPattern.test(value);\n const translatedMessage = await this.traslationService.translateAsync(\n options?.message ?? `The value does not match the pattern ${regexPattern}.`, { params: { title: options?.['title'] } });\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : translatedMessage,\n value: value\n };\n }\n\n}","import { find, isArray, isEmpty, isNull, isNumber, isString, isUndefined } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable, inject } from \"@angular/core\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\nimport { firstValueFrom, lastValueFrom } from \"rxjs\";\n\n\nexport interface AXRequiredValidationRuleOptions extends AXValidationRuleOptions {\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'required': AXRequiredValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRequiredValidationRule implements AXValidationRule {\n\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'required';\n }\n\n async validate(value?: unknown, options?: AXRequiredValidationRuleOptions): Promise<AXValidationRuleResult> {\n const rules = [\n { test: val => isNull(val) || isUndefined(val) },\n { test: val => isString(val) && isEmpty(val.trim()) },\n { test: val => isNumber(val) && isNaN(val) },\n { test: val => isArray(val) && isEmpty(val) }\n ];\n\n const failedRule = find(rules, rule => rule.test(value));\n const isValid = !failedRule;\n const translatedMessage = await this.traslationService.translateAsync(\"validation.messages.required\", { params: { title: options?.['title'] } });\n const message = failedRule ? options?.message ?? translatedMessage : null;\n\n return {\n rule: this.name,\n result: isValid,\n message: message,\n value\n };\n }\n}","// ax-max-length-validation-rule.ts\nimport { Injectable } from \"@angular/core\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\n\nexport interface AXLengthValidationRuleOptions extends AXValidationRuleOptions {\n min: number;\n max: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'length': AXLengthValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'length';\n }\n\n async validate(value: string, options: AXLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = value?.length >= options.min && value?.length <= options.max;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : options?.message ?? `The value must be between ${options.min} and ${options.max} chars`,\n value: value\n };\n }\n}\n","// ax-max-length-validation-rule.ts\nimport { isEmpty } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXMaxLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'maxLength': AXMaxLengthValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXMaxLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'maxLength';\n }\n\n async validate(value: string, options: AXMaxLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : (value?.length <= options.value);\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must not exceed ${options.value} characters.`,\n value: value\n };\n }\n}\n","import { isEmpty } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXMinLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'minLength': AXMinLengthValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXMinLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'minLength';\n }\n\n async validate(value: string, options: AXMinLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : (value?.length >= options.value);\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must be at least ${options.value} characters long.`,\n value: value\n };\n }\n}","import { isEmpty } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXBetweenValidationRuleOptions<T = number | Date> extends AXValidationRuleOptions {\n lowerValue: T;\n upperValue: T;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'between': AXBetweenValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXBetweenValidationRule<T = number | Date> implements AXValidationRule {\n get name(): string {\n return 'between';\n }\n\n async validate(value: T, options: AXBetweenValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n let isValid;\n if (options.inclusive) {\n isValid = value >= options.lowerValue && value <= options.upperValue;\n } else {\n isValid = value > options.lowerValue && value < options.upperValue;\n }\n\n const rangeType = options.inclusive ? 'inclusive' : 'exclusive';\n const baseMessage = `The value must be within the ${rangeType} range of ${options.lowerValue} to ${options.upperValue}.`;\n\n return {\n rule: this.name,\n result: isValid || isEmpty(value),\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value\n };\n }\n}","// ax-equal-validation-rule.ts\nimport { isEqual } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXEqualValidationRuleOptions extends AXValidationRuleOptions {\n value: any;\n not?: boolean; // Optional flag to invert the validation logic\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'equal': AXEqualValidationRuleOptions;\n }\n}\n@Injectable()\nexport class AXEqualValidationRule implements AXValidationRule {\n get name(): string {\n return 'equal';\n }\n\n async validate(value: any, options: AXEqualValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValueEqual = isEqual(value, options.value);\n const isValid = options.not ? !isValueEqual : isValueEqual;\n\n const defaultMessage = `The value must ${options.not ? 'not ' : ''}be equal to ${options.value}.`;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? defaultMessage,\n value: value\n };\n }\n}\n","// ax-greater-than-validation-rule.ts\nimport { isNull, isUndefined } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXGreaterThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'greaterThan': AXGreaterThanValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXGreaterThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'greaterThan';\n }\n\n async validate(value: number, options: AXGreaterThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = (isNull(value) || isUndefined(value)) ? true : (options.inclusive ? value >= options.value : value > options.value);\n const baseMessage = `The value must be ${options.inclusive ? 'greater than or equal to' : 'greater than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value\n };\n }\n}\n","// ax-less-than-validation-rule.ts\nimport { isNull, isUndefined } from \"lodash-es\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from \"../validation.types\";\nimport { Injectable } from \"@angular/core\";\n\nexport interface AXLessThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n 'lessThan': AXLessThanValidationRuleOptions;\n }\n}\n\n\n@Injectable()\nexport class AXLessThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'lessThan';\n }\n\n async validate(value: number, options: AXLessThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = (isNull(value) || isUndefined(value)) ? true : (options.inclusive ? value <= options.value : value < options.value);\n const baseMessage = `The value must be ${options.inclusive ? 'less than or equal to' : 'less than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXValidationRuleOptions, AXValidationRuleOptionsMap } from './validation.types';\n\nexport type AXValidationConfigRules = {\n [key: string]: {\n rule: keyof AXValidationRuleOptionsMap;\n options: AXValidationRuleOptions\n };\n}\n\nexport interface AXValidationConfig {\n rules: AXValidationConfigRules;\n}\n\nexport const AX_VALIDATION_CONFIG = new InjectionToken<AXValidationConfig>('AX_VALIDATION_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXValidationDefaultConfig;\n },\n});\n\nexport const AXValidationDefaultConfig: AXValidationConfig = {\n rules: {\n email: {\n rule: 'regex',\n options: {\n pattern:\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: 'validation.messages.email',\n }\n },\n phone: {\n rule: 'regex',\n options: {\n pattern: /^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$/,\n message: 'validation.messages.phone',\n }\n },\n },\n};\n\nexport type AXPartialValidationConfig = Partial<AXValidationConfig>;\n\nexport function validationConfig(config: AXPartialValidationConfig = {}): AXValidationConfig {\n const result = {\n ...AXValidationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { Injectable, Injector, inject } from \"@angular/core\";\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleOptionsMap, AXValidationRuleResult, AXValidationSummary } from \"./validation.types\";\nimport { AXValidationConfigRules, AX_VALIDATION_CONFIG } from \"./validation.config\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\nimport { merge } from \"lodash-es\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AXValidationRegistryService {\n private plugins: AXValidationRule[] = [];\n\n private configs = inject(AX_VALIDATION_CONFIG);\n\n public get customRules(): AXValidationConfigRules {\n return this.configs.rules;\n }\n\n private injector: Injector;\n\n constructor(injector: Injector) {\n this.injector = injector;\n }\n\n register(...plugins: (new () => AXValidationRule)[]) {\n plugins.forEach(t => {\n const childInjector = Injector.create({ providers: [{ provide: t, useClass: t, deps: [] }], parent: this.injector });\n const v = childInjector.get(t);\n\n if (v && !this.plugins.some(p => p.name == v.name)) {\n this.plugins.push(v);\n }\n })\n }\n\n get(ruleName: string): AXValidationRule | undefined {\n return this.plugins.find((c) => c.name == ruleName)\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXValidationService {\n constructor(\n private pluginRegistry: AXValidationRegistryService,\n private translationService: AXTranslationService,\n\n ) { }\n\n async validate(ruleName: string, value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult> {\n const customRule = this.pluginRegistry.customRules[ruleName];\n const validator = this.pluginRegistry.get(ruleName);\n\n if (!validator && !customRule) {\n return {\n rule: ruleName,\n result: false,\n message: await this.translationService.translateAsync('validation.messages.invalid-rull-name', { params: { name: ruleName } }),\n value\n };\n }\n\n if (options?.message) {\n options.message = await this.translationService.translateAsync(options.message)\n }\n //\n if (validator)\n return validator.validate(value, options);\n else {\n\n return this.validate(customRule.rule, value, merge(options, customRule.options));\n }\n\n }\n\n ruleFor(value: unknown): AXValidationRuleChain {\n return new AXValidationRuleChain(this, value);\n }\n}\n\nclass AXValidationRuleChain {\n private rules: { name: string, options?: AXValidationRuleOptions }[] = [];\n private validationSummary: AXValidationSummary = { result: true, rules: [] };\n\n constructor(private validationService: AXValidationService, private initialValue: unknown) { }\n\n addRule<K extends keyof AXValidationRuleOptionsMap>(name: K, options?: AXValidationRuleOptionsMap[K]): AXValidationRuleChain {\n this.rules.push({ name, options });\n return this;\n }\n\n async validate(): Promise<AXValidationSummary> {\n for (const rule of this.rules) {\n const result = await this.validationService.validate(rule.name, this.initialValue, rule.options);\n this.validationSummary.rules.push(result);\n if (!result.result) {\n this.validationSummary.result = false;\n }\n }\n return this.validationSummary;\n }\n}\n","import { APP_INITIALIZER, Inject, Injector, ModuleWithProviders, NgModule } from '@angular/core';\nimport { AXValidationRegistryService } from './validation.service';\nimport { AXValidationRule } from './validation.types';\nimport { AXRegexValidationRule } from './rules/regex-rule';\nimport { AXRequiredValidationRule } from './rules/required-rule';\nimport { AXCallbackValidationRule } from './rules/callback-rule';\nimport { AXMinLengthValidationRule } from './rules/minlength-rule';\nimport { AXMaxLengthValidationRule } from './rules/maxlength-rule';\nimport { AXLengthValidationRule } from './rules/length-rule';\nimport { AXEqualValidationRule } from './rules/equal-rule';\nimport { AXLessThanValidationRule } from './rules/less-than-rule';\nimport { AXGreaterThanValidationRule } from './rules/greater-than';\nimport { AXBetweenValidationRule } from './rules/between-rule';\n\n\n\nconst BUILT_IN_RULES = [\n AXRequiredValidationRule,\n AXRegexValidationRule,\n AXRequiredValidationRule,\n AXCallbackValidationRule,\n //\n AXMinLengthValidationRule,\n AXMaxLengthValidationRule,\n AXLengthValidationRule,\n //\n AXEqualValidationRule,\n AXLessThanValidationRule,\n AXGreaterThanValidationRule,\n AXBetweenValidationRule\n]\n\n\nexport interface AXValidationModuleConfigs {\n rules: (new () => AXValidationRule)[]\n}\n\n@NgModule({\n imports: [],\n providers: [\n ...BUILT_IN_RULES\n ]\n})\nexport class AXValidationModule {\n\n static forRoot(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true\n }\n ]\n };\n }\n\n static forChild(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true\n }\n\n ]\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Inject('AXValidationModuleFactory') instances: any[]) {\n instances.forEach(f => {\n f();\n });\n }\n}\n","export interface AXValidationRuleOptions {\n message?: string\n [key: string]: unknown\n}\n\n\nexport interface AXValidationRuleOptionsMap {\n // initially empty, but will be extended by other modules\n}\n\n\nexport abstract class AXValidationRule {\n abstract get name(): string;\n abstract validate(value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult>;\n}\n\nexport interface AXValidationRuleResult {\n rule: string;\n value?: unknown;\n message?: string | null;\n result: boolean;\n [key: string]: unknown\n}\n\nexport interface AXValidationSummary {\n result: boolean;\n rules: AXValidationRuleResult[]\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAiBa,wBAAwB,CAAA;AAEjC,IAAA,IAAI,IAAI,GAAA;AACJ,QAAA,OAAO,UAAU,CAAC;KACrB;AAED,IAAA,MAAM,QAAQ,CAAC,KAAQ,EAAE,OAA2C,EAAA;QAChE,MAAM,gBAAgB,GAAG,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;AACtH,QAAA,MAAM,YAAY,GAAG,CAAC,MAA6C,MAAM;YACrE,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE;AACjD,YAAA,KAAK,EAAE,KAAK;AACf,SAAA,CAAC,CAAC;QAEH,IAAI,gBAAgB,YAAY,OAAO,EAAE;AACrC,YAAA,OAAO,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC9C,SAAA;AAED,QAAA,OAAO,YAAY,CAAC,gBAAgB,CAAC,CAAC;KACzC;8GApBQ,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAAxB,wBAAwB,EAAA,CAAA,CAAA,EAAA;;2FAAxB,wBAAwB,EAA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AA,EAAA,kBAAkB,EAJhB,SAAA,EAAA;AACP,YAAA,GAAG,cAAc;AACpB,SAAA,EAAA,CAAA,CAAA,EAAA;;2FAEQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACP,wBAAA,GAAG,cAAc;AACpB,qBAAA;AACJ,iBAAA,CAAA;;0BAyCgB,MAAM;2BAAC,2BAA2B,CAAA;;;MCxE7B,gBAAgB,CAAA;AAGrC;;ACdD;;AAEG;;;;"}
|
package/package.json
CHANGED
package/validation/index.d.ts
CHANGED
@@ -1,13 +1,14 @@
|
|
1
|
-
export * from './lib/
|
1
|
+
export * from './lib/rules/callback-rule';
|
2
2
|
export * from './lib/rules/regex-rule';
|
3
3
|
export * from './lib/rules/required-rule';
|
4
|
-
export * from './lib/rules/callback-rule';
|
5
|
-
export * from './lib/rules/minlength-rule';
|
6
|
-
export * from './lib/rules/maxlength-rule';
|
7
4
|
export * from './lib/rules/length-rule';
|
5
|
+
export * from './lib/rules/maxlength-rule';
|
6
|
+
export * from './lib/rules/minlength-rule';
|
7
|
+
export * from './lib/rules/between-rule';
|
8
8
|
export * from './lib/rules/equal-rule';
|
9
|
-
export * from './lib/rules/less-than-rule';
|
10
9
|
export * from './lib/rules/greater-than';
|
11
|
-
export * from './lib/rules/
|
12
|
-
export * from './lib/validation.
|
10
|
+
export * from './lib/rules/less-than-rule';
|
11
|
+
export * from './lib/validation.config';
|
13
12
|
export * from './lib/validation.module';
|
13
|
+
export * from './lib/validation.service';
|
14
|
+
export * from './lib/validation.types';
|