@firestitch/form 12.4.7 → 12.4.9
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/components/form-dialog-actions/form-dialog-actions.component.d.ts +23 -23
- package/app/consts/error-messages.const.d.ts +19 -19
- package/app/directives/button.directive.d.ts +34 -34
- package/app/directives/form/form.directive.d.ts +122 -122
- package/app/directives/form-dialog-close.directive.d.ts +12 -12
- package/app/directives/index.d.ts +2 -2
- package/app/directives/submit-button.directive.d.ts +6 -6
- package/app/directives/validators/compare.directive.d.ts +15 -15
- package/app/directives/validators/control.directive.d.ts +48 -48
- package/app/directives/validators/daterange.directive.d.ts +13 -13
- package/app/directives/validators/email.directive.d.ts +13 -13
- package/app/directives/validators/emails.directive.d.ts +13 -13
- package/app/directives/validators/function.directive.d.ts +15 -15
- package/app/directives/validators/greater.directive.d.ts +13 -13
- package/app/directives/validators/integer.directive.d.ts +13 -13
- package/app/directives/validators/lesser.directive.d.ts +13 -13
- package/app/directives/validators/max.directive.d.ts +13 -13
- package/app/directives/validators/maxlength.directive.d.ts +13 -13
- package/app/directives/validators/min.directive.d.ts +13 -13
- package/app/directives/validators/minlength.directive.d.ts +13 -13
- package/app/directives/validators/no-fs-validators.directive.d.ts +13 -13
- package/app/directives/validators/numeric.directive.d.ts +13 -13
- package/app/directives/validators/pattern.directive.d.ts +13 -13
- package/app/directives/validators/phone.directive.d.ts +13 -13
- package/app/directives/validators/required.directive.d.ts +16 -16
- package/app/directives/validators/url.directive.d.ts +14 -14
- package/app/directives/validators/validate.directive.d.ts +15 -15
- package/app/enums/confirm-result.d.ts +7 -7
- package/app/enums/form-status.d.ts +10 -10
- package/app/fs-form.module.d.ts +37 -37
- package/app/guards/form-deactivate.guard.d.ts +14 -14
- package/app/helpers/confirm-result-continue.d.ts +1 -1
- package/app/helpers/confirm-unsaved.d.ts +5 -5
- package/app/helpers/get-active-route.d.ts +2 -2
- package/app/helpers/get-form-errors.d.ts +2 -2
- package/app/helpers/index.d.ts +2 -2
- package/app/helpers/is-enabled.d.ts +1 -1
- package/app/interfaces/async-validator.d.ts +14 -14
- package/app/interfaces/confirm-config.d.ts +7 -7
- package/app/interfaces/confirm-tab-group.d.ts +10 -10
- package/app/interfaces/index.d.ts +4 -4
- package/app/interfaces/submit-event.d.ts +6 -6
- package/app/interfaces/submitted-event.d.ts +7 -7
- package/app/interfaces/validator.d.ts +13 -13
- package/app/providers/validate-messages.provider.d.ts +25 -25
- package/app/services/fsform.service.d.ts +16 -16
- package/app/validators/validators.d.ts +12 -12
- package/bundles/firestitch-form.umd.js +2836 -2834
- package/bundles/firestitch-form.umd.js.map +1 -1
- package/esm2015/app/components/form-dialog-actions/form-dialog-actions.component.js +91 -91
- package/esm2015/app/consts/error-messages.const.js +19 -19
- package/esm2015/app/directives/button.directive.js +149 -149
- package/esm2015/app/directives/form/form.directive.js +696 -694
- package/esm2015/app/directives/form-dialog-close.directive.js +30 -30
- package/esm2015/app/directives/index.js +2 -2
- package/esm2015/app/directives/submit-button.directive.js +13 -13
- package/esm2015/app/directives/validators/compare.directive.js +48 -48
- package/esm2015/app/directives/validators/control.directive.js +264 -264
- package/esm2015/app/directives/validators/daterange.directive.js +40 -40
- package/esm2015/app/directives/validators/email.directive.js +40 -40
- package/esm2015/app/directives/validators/emails.directive.js +40 -40
- package/esm2015/app/directives/validators/function.directive.js +40 -40
- package/esm2015/app/directives/validators/greater.directive.js +39 -39
- package/esm2015/app/directives/validators/integer.directive.js +40 -40
- package/esm2015/app/directives/validators/lesser.directive.js +39 -39
- package/esm2015/app/directives/validators/max.directive.js +35 -35
- package/esm2015/app/directives/validators/maxlength.directive.js +34 -34
- package/esm2015/app/directives/validators/min.directive.js +35 -35
- package/esm2015/app/directives/validators/minlength.directive.js +34 -34
- package/esm2015/app/directives/validators/no-fs-validators.directive.js +46 -46
- package/esm2015/app/directives/validators/numeric.directive.js +40 -40
- package/esm2015/app/directives/validators/pattern.directive.js +34 -34
- package/esm2015/app/directives/validators/phone.directive.js +40 -40
- package/esm2015/app/directives/validators/required.directive.js +70 -70
- package/esm2015/app/directives/validators/url.directive.js +46 -46
- package/esm2015/app/directives/validators/validate.directive.js +42 -42
- package/esm2015/app/enums/confirm-result.js +8 -8
- package/esm2015/app/enums/form-status.js +11 -11
- package/esm2015/app/fs-form.module.js +180 -180
- package/esm2015/app/guards/form-deactivate.guard.js +44 -44
- package/esm2015/app/helpers/confirm-result-continue.js +4 -4
- package/esm2015/app/helpers/confirm-unsaved.js +71 -71
- package/esm2015/app/helpers/get-active-route.js +6 -6
- package/esm2015/app/helpers/get-form-errors.js +24 -24
- package/esm2015/app/helpers/index.js +2 -2
- package/esm2015/app/helpers/is-enabled.js +3 -3
- package/esm2015/app/interfaces/async-validator.js +1 -1
- package/esm2015/app/interfaces/confirm-config.js +1 -1
- package/esm2015/app/interfaces/confirm-tab-group.js +1 -1
- package/esm2015/app/interfaces/index.js +4 -4
- package/esm2015/app/interfaces/submit-event.js +1 -1
- package/esm2015/app/interfaces/submitted-event.js +1 -1
- package/esm2015/app/interfaces/validator.js +1 -1
- package/esm2015/app/providers/validate-messages.provider.js +10 -10
- package/esm2015/app/services/fsform.service.js +39 -39
- package/esm2015/app/validators/validators.js +96 -96
- package/esm2015/firestitch-form.js +4 -4
- package/esm2015/public_api.js +36 -36
- package/fesm2015/firestitch-form.js +2273 -2271
- package/fesm2015/firestitch-form.js.map +1 -1
- package/firestitch-form.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +34 -34
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Directive, HostListener, HostBinding } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class FsFormDialogCloseDirective {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.clicked$ = new Subject();
|
|
7
|
-
this.registered = false;
|
|
8
|
-
this.type = 'button';
|
|
9
|
-
}
|
|
10
|
-
click() {
|
|
11
|
-
this.clicked$.next();
|
|
12
|
-
}
|
|
13
|
-
ngOnDestroy() {
|
|
14
|
-
this.clicked$.complete();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
FsFormDialogCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormDialogCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
-
FsFormDialogCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogCloseDirective, selector: "[fsFormDialogClose],[fs-form-dialog-close]", host: { listeners: { "click": "click($event.target)" }, properties: { "attr.type": "this.type" } }, ngImport: i0 });
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormDialogCloseDirective, decorators: [{
|
|
20
|
-
type: Directive,
|
|
21
|
-
args: [{
|
|
22
|
-
selector: '[fsFormDialogClose],[fs-form-dialog-close]'
|
|
23
|
-
}]
|
|
24
|
-
}], propDecorators: { type: [{
|
|
25
|
-
type: HostBinding,
|
|
26
|
-
args: ['attr.type']
|
|
27
|
-
}], click: [{
|
|
28
|
-
type: HostListener,
|
|
29
|
-
args: ['click', ['$event.target']]
|
|
30
|
-
}] } });
|
|
1
|
+
import { Directive, HostListener, HostBinding } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class FsFormDialogCloseDirective {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.clicked$ = new Subject();
|
|
7
|
+
this.registered = false;
|
|
8
|
+
this.type = 'button';
|
|
9
|
+
}
|
|
10
|
+
click() {
|
|
11
|
+
this.clicked$.next();
|
|
12
|
+
}
|
|
13
|
+
ngOnDestroy() {
|
|
14
|
+
this.clicked$.complete();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
FsFormDialogCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormDialogCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
FsFormDialogCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogCloseDirective, selector: "[fsFormDialogClose],[fs-form-dialog-close]", host: { listeners: { "click": "click($event.target)" }, properties: { "attr.type": "this.type" } }, ngImport: i0 });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormDialogCloseDirective, decorators: [{
|
|
20
|
+
type: Directive,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: '[fsFormDialogClose],[fs-form-dialog-close]'
|
|
23
|
+
}]
|
|
24
|
+
}], propDecorators: { type: [{
|
|
25
|
+
type: HostBinding,
|
|
26
|
+
args: ['attr.type']
|
|
27
|
+
}], click: [{
|
|
28
|
+
type: HostListener,
|
|
29
|
+
args: ['click', ['$event.target']]
|
|
30
|
+
}] } });
|
|
31
31
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1kaWFsb2ctY2xvc2UuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwcC9kaXJlY3RpdmVzL2Zvcm0tZGlhbG9nLWNsb3NlLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBYSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDaEYsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFNL0IsTUFBTSxPQUFPLDBCQUEwQjtJQUh2QztRQUtTLGFBQVEsR0FBRyxJQUFJLE9BQU8sRUFBRSxDQU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LCBbJyRldmVudC50YXJnZXQnXSlcbiAgcHVibGljIGNsaWNrKCkge1xuICAgIHRoaXMuY2xpY2tlZCQubmV4dCgpO1xuICB9XG5cbiAgcHVibGljIG5nT25EZXN0cm95KCkge1xuICAgIHRoaXMuY2xpY2tlZCQuY29tcGxldGUoKTtcbiAgfVxufVxuIl19
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './button.directive';
|
|
2
|
-
export * from './submit-button.directive';
|
|
1
|
+
export * from './button.directive';
|
|
2
|
+
export * from './submit-button.directive';
|
|
3
3
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2RpcmVjdGl2ZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9idXR0b24uZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vc3VibWl0LWJ1dHRvbi5kaXJlY3RpdmUnO1xuIl19
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import { FsButtonDirective } from './button.directive';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class FsSubmitButtonDirective extends FsButtonDirective {
|
|
5
|
-
}
|
|
6
|
-
FsSubmitButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSubmitButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
7
|
-
FsSubmitButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsSubmitButtonDirective, selector: "dummy-selector", usesInheritance: true, ngImport: i0 });
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSubmitButtonDirective, decorators: [{
|
|
9
|
-
type: Directive,
|
|
10
|
-
args: [{
|
|
11
|
-
selector: 'dummy-selector',
|
|
12
|
-
}]
|
|
13
|
-
}] });
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { FsButtonDirective } from './button.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class FsSubmitButtonDirective extends FsButtonDirective {
|
|
5
|
+
}
|
|
6
|
+
FsSubmitButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSubmitButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
7
|
+
FsSubmitButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsSubmitButtonDirective, selector: "dummy-selector", usesInheritance: true, ngImport: i0 });
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSubmitButtonDirective, decorators: [{
|
|
9
|
+
type: Directive,
|
|
10
|
+
args: [{
|
|
11
|
+
selector: 'dummy-selector',
|
|
12
|
+
}]
|
|
13
|
+
}] });
|
|
14
14
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VibWl0LWJ1dHRvbi5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2RpcmVjdGl2ZXMvc3VibWl0LWJ1dHRvbi5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUxQyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQzs7QUFNdkQsTUFBTSxPQUFPLHVCQUF3QixTQUFRLGlCQUFpQjs7cUhBQWpELHVCQUF1Qjt5R0FBdkIsdUJBQXVCOzRGQUF2Qix1QkFBdUI7a0JBSG5DLFNBQVM7bUJBQUM7b0JBQ1QsUUFBUSxFQUFFLGdCQUFnQjtpQkFDM0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEaXJlY3RpdmUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgRnNCdXR0b25EaXJlY3RpdmUgfSBmcm9tICcuL2J1dHRvbi5kaXJlY3RpdmUnO1xuXG5cbkBEaXJlY3RpdmUoe1xuICBzZWxlY3RvcjogJ2R1bW15LXNlbGVjdG9yJyxcbn0pXG5leHBvcnQgY2xhc3MgRnNTdWJtaXRCdXR0b25EaXJlY3RpdmUgZXh0ZW5kcyBGc0J1dHRvbkRpcmVjdGl2ZSB7XG59XG4iXX0=
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { Directive, Input } from '@angular/core';
|
|
2
|
-
import { FsControlDirective } from './control.directive';
|
|
3
|
-
import { VALIDATE_MESSAGE_PROVIDER } from '../../providers/validate-messages.provider';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class FsFormCompareDirective extends FsControlDirective {
|
|
6
|
-
set validationMessage(value) {
|
|
7
|
-
this._validateMessages.compare = value;
|
|
8
|
-
}
|
|
9
|
-
ngOnChanges() {
|
|
10
|
-
this._control.updateValueAndValidity();
|
|
11
|
-
}
|
|
12
|
-
validate(control) {
|
|
13
|
-
if (this.fsFormCompare.value === this.elementRef.nativeElement.value) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return { compare: true };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
ngAfterViewInit() {
|
|
21
|
-
this.fsFormCompare.addEventListener('keyup', () => {
|
|
22
|
-
this._control.updateValueAndValidity();
|
|
23
|
-
}, false);
|
|
24
|
-
}
|
|
25
|
-
ngOnDestroy() {
|
|
26
|
-
this.fsFormCompare.removeEventListener('keyup', () => {
|
|
27
|
-
this._control.updateValueAndValidity();
|
|
28
|
-
}, false);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
FsFormCompareDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormCompareDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
32
|
-
FsFormCompareDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormCompareDirective, selector: "[fsFormCompare]", inputs: { fsFormCompare: "fsFormCompare", validationMessage: ["fsFormCompareMessage", "validationMessage"] }, providers: [
|
|
33
|
-
VALIDATE_MESSAGE_PROVIDER,
|
|
34
|
-
], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormCompareDirective, decorators: [{
|
|
36
|
-
type: Directive,
|
|
37
|
-
args: [{
|
|
38
|
-
selector: '[fsFormCompare]',
|
|
39
|
-
providers: [
|
|
40
|
-
VALIDATE_MESSAGE_PROVIDER,
|
|
41
|
-
],
|
|
42
|
-
}]
|
|
43
|
-
}], propDecorators: { fsFormCompare: [{
|
|
44
|
-
type: Input
|
|
45
|
-
}], validationMessage: [{
|
|
46
|
-
type: Input,
|
|
47
|
-
args: ['fsFormCompareMessage']
|
|
48
|
-
}] } });
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
|
2
|
+
import { FsControlDirective } from './control.directive';
|
|
3
|
+
import { VALIDATE_MESSAGE_PROVIDER } from '../../providers/validate-messages.provider';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class FsFormCompareDirective extends FsControlDirective {
|
|
6
|
+
set validationMessage(value) {
|
|
7
|
+
this._validateMessages.compare = value;
|
|
8
|
+
}
|
|
9
|
+
ngOnChanges() {
|
|
10
|
+
this._control.updateValueAndValidity();
|
|
11
|
+
}
|
|
12
|
+
validate(control) {
|
|
13
|
+
if (this.fsFormCompare.value === this.elementRef.nativeElement.value) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return { compare: true };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
ngAfterViewInit() {
|
|
21
|
+
this.fsFormCompare.addEventListener('keyup', () => {
|
|
22
|
+
this._control.updateValueAndValidity();
|
|
23
|
+
}, false);
|
|
24
|
+
}
|
|
25
|
+
ngOnDestroy() {
|
|
26
|
+
this.fsFormCompare.removeEventListener('keyup', () => {
|
|
27
|
+
this._control.updateValueAndValidity();
|
|
28
|
+
}, false);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
FsFormCompareDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormCompareDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
32
|
+
FsFormCompareDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormCompareDirective, selector: "[fsFormCompare]", inputs: { fsFormCompare: "fsFormCompare", validationMessage: ["fsFormCompareMessage", "validationMessage"] }, providers: [
|
|
33
|
+
VALIDATE_MESSAGE_PROVIDER,
|
|
34
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormCompareDirective, decorators: [{
|
|
36
|
+
type: Directive,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: '[fsFormCompare]',
|
|
39
|
+
providers: [
|
|
40
|
+
VALIDATE_MESSAGE_PROVIDER,
|
|
41
|
+
],
|
|
42
|
+
}]
|
|
43
|
+
}], propDecorators: { fsFormCompare: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