@firestitch/form 13.1.2 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/consts/error-messages.const.d.ts +2 -0
- package/app/directives/validators/greater-equal.directive.d.ts +13 -0
- package/app/directives/validators/index.d.ts +2 -0
- package/app/directives/validators/lesser-equal.directive.d.ts +13 -0
- package/app/directives/validators/no-fs-validators.directive.d.ts +1 -1
- package/app/fs-form.module.d.ts +18 -16
- package/app/providers/validate-messages.provider.d.ts +2 -0
- package/esm2020/app/consts/error-messages.const.mjs +3 -1
- package/esm2020/app/directives/validators/greater-equal.directive.mjs +40 -0
- package/esm2020/app/directives/validators/index.mjs +3 -1
- package/esm2020/app/directives/validators/lesser-equal.directive.mjs +40 -0
- package/esm2020/app/directives/validators/no-fs-validators.directive.mjs +3 -2
- package/esm2020/app/fs-form.module.mjs +10 -2
- package/esm2020/public_api.mjs +2 -3
- package/fesm2015/firestitch-form.mjs +83 -2
- package/fesm2015/firestitch-form.mjs.map +1 -1
- package/fesm2020/firestitch-form.mjs +83 -2
- package/fesm2020/firestitch-form.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -2
|
@@ -892,6 +892,8 @@ const ERROR_MESSAGES = {
|
|
|
892
892
|
urlProtocol: 'Invalid URL. Proper http protocol is required. eg. https://google.com',
|
|
893
893
|
greater: 'Value must be greater than $(1)',
|
|
894
894
|
lesser: 'Value must be less than $(1)',
|
|
895
|
+
greaterEqual: 'Value must be greater than or equal $(1)',
|
|
896
|
+
lesserEqual: 'Value must be less than or equal $(1)',
|
|
895
897
|
};
|
|
896
898
|
|
|
897
899
|
const VALIDATE_MESSAGES = new InjectionToken('fs.form.validate-messages');
|
|
@@ -2183,7 +2185,7 @@ class FsFormNoFsValidatorsDirective extends FsControlDirective {
|
|
|
2183
2185
|
}
|
|
2184
2186
|
}
|
|
2185
2187
|
FsFormNoFsValidatorsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormNoFsValidatorsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2186
|
-
FsFormNoFsValidatorsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])", providers: [
|
|
2188
|
+
FsFormNoFsValidatorsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])", providers: [
|
|
2187
2189
|
VALIDATE_MESSAGE_PROVIDER
|
|
2188
2190
|
], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
2189
2191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormNoFsValidatorsDirective, decorators: [{
|
|
@@ -2198,6 +2200,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
2198
2200
|
':not([fsFormEmails])' +
|
|
2199
2201
|
':not([fsFormFunction])' +
|
|
2200
2202
|
':not([fsFormGreater])' +
|
|
2203
|
+
':not([fsFormGreaterEqual])' +
|
|
2201
2204
|
':not([fsFormInteger])' +
|
|
2202
2205
|
':not([fsFormLesser])' +
|
|
2203
2206
|
':not([fsFormMax])' +
|
|
@@ -2215,6 +2218,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
2215
2218
|
}]
|
|
2216
2219
|
}] });
|
|
2217
2220
|
|
|
2221
|
+
class FsFormGreaterEqualDirective extends FsControlDirective {
|
|
2222
|
+
set validationMessage(value) {
|
|
2223
|
+
this._validateMessages.greater = value;
|
|
2224
|
+
}
|
|
2225
|
+
ngOnChanges() {
|
|
2226
|
+
this._control.updateValueAndValidity();
|
|
2227
|
+
}
|
|
2228
|
+
validate(control) {
|
|
2229
|
+
const greater = parseFloat(this.fsFormGreaterEqual);
|
|
2230
|
+
const value = parseFloat(this._control.value);
|
|
2231
|
+
if (!isNaN(greater) && !isNaN(value) && value < greater) {
|
|
2232
|
+
return { greaterEqual: { greater, actual: value } };
|
|
2233
|
+
}
|
|
2234
|
+
return FsValidators.numeric(this._control);
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
FsFormGreaterEqualDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormGreaterEqualDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2238
|
+
FsFormGreaterEqualDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsFormGreaterEqualDirective, selector: "[fsFormGreaterEqual]", inputs: { fsFormGreaterEqual: "fsFormGreaterEqual", validationMessage: ["fsFormGreaterEqualMessage", "validationMessage"] }, providers: [
|
|
2239
|
+
VALIDATE_MESSAGE_PROVIDER
|
|
2240
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
2241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormGreaterEqualDirective, decorators: [{
|
|
2242
|
+
type: Directive,
|
|
2243
|
+
args: [{
|
|
2244
|
+
selector: '[fsFormGreaterEqual]',
|
|
2245
|
+
providers: [
|
|
2246
|
+
VALIDATE_MESSAGE_PROVIDER
|
|
2247
|
+
],
|
|
2248
|
+
}]
|
|
2249
|
+
}], propDecorators: { fsFormGreaterEqual: [{
|
|
2250
|
+
type: Input
|
|
2251
|
+
}], validationMessage: [{
|
|
2252
|
+
type: Input,
|
|
2253
|
+
args: ['fsFormGreaterEqualMessage']
|
|
2254
|
+
}] } });
|
|
2255
|
+
|
|
2256
|
+
class FsFormLesserEqualDirective extends FsControlDirective {
|
|
2257
|
+
set validationMessage(value) {
|
|
2258
|
+
this._validateMessages.lesser = value;
|
|
2259
|
+
}
|
|
2260
|
+
ngOnChanges() {
|
|
2261
|
+
this._control.updateValueAndValidity();
|
|
2262
|
+
}
|
|
2263
|
+
validate(control) {
|
|
2264
|
+
const lesser = parseFloat(this.fsFormLesserEqual);
|
|
2265
|
+
const value = parseFloat(this._control.value);
|
|
2266
|
+
if (!isNaN(lesser) && !isNaN(value) && value > lesser) {
|
|
2267
|
+
return { lesserEqual: { lesser, actual: value } };
|
|
2268
|
+
}
|
|
2269
|
+
return FsValidators.numeric(this._control);
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
FsFormLesserEqualDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormLesserEqualDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2273
|
+
FsFormLesserEqualDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsFormLesserEqualDirective, selector: "[fsFormLesserEqual]", inputs: { fsFormLesserEqual: "fsFormLesserEqual", validationMessage: ["fsFormLesserEqualMessage", "validationMessage"] }, providers: [
|
|
2274
|
+
VALIDATE_MESSAGE_PROVIDER
|
|
2275
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
2276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormLesserEqualDirective, decorators: [{
|
|
2277
|
+
type: Directive,
|
|
2278
|
+
args: [{
|
|
2279
|
+
selector: '[fsFormLesserEqual]',
|
|
2280
|
+
providers: [
|
|
2281
|
+
VALIDATE_MESSAGE_PROVIDER
|
|
2282
|
+
],
|
|
2283
|
+
}]
|
|
2284
|
+
}], propDecorators: { fsFormLesserEqual: [{
|
|
2285
|
+
type: Input
|
|
2286
|
+
}], validationMessage: [{
|
|
2287
|
+
type: Input,
|
|
2288
|
+
args: ['fsFormLesserEqualMessage']
|
|
2289
|
+
}] } });
|
|
2290
|
+
|
|
2218
2291
|
class FsFormTemplateDirective {
|
|
2219
2292
|
constructor() { }
|
|
2220
2293
|
ngAfterContentInit() {
|
|
@@ -2327,7 +2400,9 @@ FsFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
2327
2400
|
FsFormFunctionDirective,
|
|
2328
2401
|
FsFormDateRangeDirective,
|
|
2329
2402
|
FsFormGreaterDirective,
|
|
2403
|
+
FsFormGreaterEqualDirective,
|
|
2330
2404
|
FsFormLesserDirective,
|
|
2405
|
+
FsFormLesserEqualDirective,
|
|
2331
2406
|
FsFormUrlDirective,
|
|
2332
2407
|
FsFormDialogCloseDirective,
|
|
2333
2408
|
FsFormValidateDirective,
|
|
@@ -2357,7 +2432,9 @@ FsFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
2357
2432
|
FsFormFunctionDirective,
|
|
2358
2433
|
FsFormDateRangeDirective,
|
|
2359
2434
|
FsFormGreaterDirective,
|
|
2435
|
+
FsFormGreaterEqualDirective,
|
|
2360
2436
|
FsFormLesserDirective,
|
|
2437
|
+
FsFormLesserEqualDirective,
|
|
2361
2438
|
FsFormUrlDirective,
|
|
2362
2439
|
FsFormDialogCloseDirective,
|
|
2363
2440
|
FsFormValidateDirective,
|
|
@@ -2406,7 +2483,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
2406
2483
|
FsFormFunctionDirective,
|
|
2407
2484
|
FsFormDateRangeDirective,
|
|
2408
2485
|
FsFormGreaterDirective,
|
|
2486
|
+
FsFormGreaterEqualDirective,
|
|
2409
2487
|
FsFormLesserDirective,
|
|
2488
|
+
FsFormLesserEqualDirective,
|
|
2410
2489
|
FsFormUrlDirective,
|
|
2411
2490
|
FsFormDialogCloseDirective,
|
|
2412
2491
|
FsFormValidateDirective,
|
|
@@ -2436,7 +2515,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
2436
2515
|
FsFormFunctionDirective,
|
|
2437
2516
|
FsFormDateRangeDirective,
|
|
2438
2517
|
FsFormGreaterDirective,
|
|
2518
|
+
FsFormGreaterEqualDirective,
|
|
2439
2519
|
FsFormLesserDirective,
|
|
2520
|
+
FsFormLesserEqualDirective,
|
|
2440
2521
|
FsFormUrlDirective,
|
|
2441
2522
|
FsFormDialogCloseDirective,
|
|
2442
2523
|
FsFormValidateDirective,
|
|
@@ -2463,5 +2544,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
2463
2544
|
* Generated bundle index. Do not edit.
|
|
2464
2545
|
*/
|
|
2465
2546
|
|
|
2466
|
-
export { ConfirmResult, FormDeactivateGuard, FormStatus, FsButtonDirective, FsControlDirective, FsForm, FsFormCompareDirective, FsFormDateRangeDirective, FsFormDialogActionsComponent, FsFormDialogCloseDirective, FsFormDirective, FsFormEmailDirective, FsFormEmailsDirective, FsFormFunctionDirective, FsFormGreaterDirective, FsFormIntegerDirective, FsFormLesserDirective, FsFormMaxDirective, FsFormMaxLengthDirective, FsFormMinDirective, FsFormMinLengthDirective, FsFormModule, FsFormNoFsValidatorsDirective, FsFormNumericDirective, FsFormPatternDirective, FsFormPhoneDirective, FsFormRequiredDirective, FsFormTemplateComponent, FsFormTemplateDirective, FsFormTemplateOutletComponent, FsFormUrlDirective, FsFormValidateDirective, FsSubmitButtonDirective, FsValidators };
|
|
2547
|
+
export { ConfirmResult, FormDeactivateGuard, FormStatus, FsButtonDirective, FsControlDirective, FsForm, FsFormCompareDirective, FsFormDateRangeDirective, FsFormDialogActionsComponent, FsFormDialogCloseDirective, FsFormDirective, FsFormEmailDirective, FsFormEmailsDirective, FsFormFunctionDirective, FsFormGreaterDirective, FsFormGreaterEqualDirective, FsFormIntegerDirective, FsFormLesserDirective, FsFormLesserEqualDirective, FsFormMaxDirective, FsFormMaxLengthDirective, FsFormMinDirective, FsFormMinLengthDirective, FsFormModule, FsFormNoFsValidatorsDirective, FsFormNumericDirective, FsFormPatternDirective, FsFormPhoneDirective, FsFormRequiredDirective, FsFormTemplateComponent, FsFormTemplateDirective, FsFormTemplateOutletComponent, FsFormUrlDirective, FsFormValidateDirective, FsSubmitButtonDirective, FsValidators };
|
|
2467
2548
|
//# sourceMappingURL=firestitch-form.mjs.map
|