@@ -79,8 +79,8 @@ $ npm i ngfe
79
79
80
80
### Requirements
81
81
82
- * Angular 12.0 +
83
- * RxJs 6.6 +
82
+ * Angular 12+
83
+ * RxJs 7 +
84
84
85
85
86
86
@@ -355,7 +355,7 @@ Also emits event only if form has `valid` state.
355
355
356
356
For dynamic forms we need to setup values when some fields became visible, and remove such values on field hiding.
357
357
358
- Structural directive [ ` feIf ` ] ( ./projects/ngfe/src/lib/core/fe-if.directive. ts ) works similar to ` ngIf ` (except ` else ` part) and could set a model to some default / ` undefined ` .
358
+ Structural directive [ ` feIf ` ] ( ./projects/ngfe/src/lib/core/fe-if.ts ) works similar to ` ngIf ` (except ` else ` part) and could set a model to some default / ` undefined ` .
359
359
360
360
When Angular change detection runs, ` feIf ` directive checks that the condition is true/false, wait until template updates, then update bound model and renders conditional template. This allows us to keep this logic in template and not collide with rendering process.
361
361
@@ -452,172 +452,6 @@ Also, with this package, `feControl` provides `NgControl` and allows you to use
452
452
453
453
454
454
455
- ## Reference
456
-
457
- ### [ ` FeControl<MODEL, INPUT> ` ] ( ./projects/ngfe/src/lib/core/fe-control.ts )
458
-
459
- ```
460
- readonly modelValue: MODEL | undefined;
461
- readonly modelValue$: Observable<MODEL | undefined>;
462
- readonly inputValue: INPUT | undefined;
463
- readonly inputValue$: Observable<INPUT | undefined>;
464
- readonly toInputValue$: Observable<INPUT | undefined>;
465
- disabled: boolean;
466
- readonly disabled$: Observable<boolean>;
467
- standalone: boolean;
468
- readonly standalone$: Observable<boolean>;
469
- touched: boolean;
470
- readonly touched$: Observable<boolean>;
471
- dirty: boolean;
472
- readonly dirty$: Observable<boolean>;
473
- readonly validators: FeValidator<MODEL, INPUT>[];
474
- readonly validators$: Observable<FeValidator<MODEL, INPUT>[]>;
475
- readonly validity: boolean;
476
- readonly validity$: Observable<FeValidity>[]>;
477
- readonly valid: boolean;
478
- readonly valid$: Observable<boolean>;
479
- readonly invalid: boolean;
480
- readonly invalid$: Observable<boolean>;
481
- readonly pending: boolean;
482
- readonly pending$: Observable<boolean>;
483
- readonly errors: FeErrors | undefined;
484
- readonly errors$: Observable<FeErrors | undefined>;
485
- readonly visibleErrors: FeErrors | undefined;
486
- readonly visibleErrors$: Observable<FeErrors | undefined>;
487
- readonly destroy$: Observable<undefined>;
488
- adapter: FeAdapter<MODEL, INPUT> | undefined;
489
- debounce: debounce: number | undefined;
490
- update(modelValue: MODEL | undefined, source: VcSource = 'manual');
491
- input(inputValue: INPUT | undefined);
492
- touch();
493
- updateValidators({add = [], remove = []}: {
494
- add?: FeValidator<MODEL, INPUT>[];
495
- remove?: FeValidator<MODEL, INPUT>[];
496
- });
497
- addValidator(validator: FeValidator<MODEL, INPUT>);
498
- updateValidity();
499
- setAdapter(adapter: FeAdapter<MODEL, INPUT> | undefined);
500
- reset();
501
- ```
502
-
503
- ### [ ` FeControlDirective<MODEL, INPUT> ` ] ( ./projects/ngfe/src/lib/core/fe-control.directive.ts )
504
-
505
- ` exportAs: "feControl" `
506
-
507
- ```
508
- [(feControl)]: MODEL | undefined;
509
- [(disabled)]: boolean;
510
- [(standalone)]: boolean;
511
- [(touched)]: boolean;
512
- [(dirty)]: boolean;
513
- [extraValidators]: FeValidator<MODEL>[] | undefined;
514
- [debounce]: number | undefined;
515
- [adapter]: 'noop' | 'numberToString' | 'dateToDateString' | 'dateToDateLocalString' | 'deepCopy'
516
- | FeAdapter<MODEL, INPUT> | undefined;
517
- (destroy): undefined;
518
- readonly modelValue: MODEL | undefined;
519
- readonly modelValue$: Observable<MODEL | undefined>;
520
- readonly inputValue: INPUT | undefined;
521
- readonly inputValue$: Observable<INPUT | undefined>;
522
- disabled: boolean;
523
- readonly disabled$: Observable<boolean>;
524
- standalone: boolean;
525
- readonly standalone$: Observable<boolean>;
526
- touched: boolean;
527
- readonly touched$: Observable<boolean>;
528
- dirty: boolean;
529
- readonly dirty$: Observable<boolean>;
530
- readonly validity: boolean;
531
- readonly validity$: Observable<FeValidity>[]>;
532
- readonly valid: boolean;
533
- readonly valid$: Observable<boolean>;
534
- readonly invalid: boolean;
535
- readonly invalid$: Observable<boolean>;
536
- readonly pending: boolean;
537
- readonly pending$: Observable<boolean>;
538
- readonly errors: FeErrors | undefined;
539
- readonly errors$: Observable<FeErrors | undefined>;
540
- readonly visibleErrors: FeErrors | undefined;
541
- readonly visibleErrors$: Observable<FeErrors | undefined>;
542
- ```
543
-
544
- ### [ ` FeFormDirective ` ] ( ./projects/ngfe/src/lib/core/fe-form.directive.ts )
545
-
546
- ` exportAs: "feForm" `
547
-
548
- ```
549
- [disabled]: boolean;
550
- readonly change$: Observable<undefined>;
551
- readonly validity: FeValidity;
552
- readonly validity$: Observable<FeValidity>;
553
- readonly valid: boolean;
554
- readonly valid$: Observable<boolean>;
555
- readonly invalid: boolean;
556
- readonly invalid$: Observable<boolean>;
557
- readonly pending: boolean;
558
- readonly pending$: Observable<boolean>;
559
- readonly controls: FeControl[];
560
- readonly enabledControls: FeControl[];
561
- readonly touched: boolean;
562
- readonly dirty: boolean;
563
- touchAll();
564
- reset();
565
- ```
566
-
567
- ### [ ` FeSubmitDirective ` ] ( ./projects/ngfe/src/lib/core/fe-submit.directive.ts )
568
-
569
- ` exportAs: "feSubmit" `
570
-
571
- ```
572
- (feSubmit): void;
573
- ```
574
-
575
- ### [ ` FeIfDirective<T> ` ] ( ./projects/ngfe/src/lib/core/fe-if.directive.ts )
576
-
577
- ```
578
- [feIf]: any;
579
- [(ensure)]: T | undefined;
580
- [default]: T | undefined;
581
- [force]: boolean;
582
- ```
583
-
584
- ### [ ` FeInputDirective ` ] ( ./projects/ngfe/src/lib/value-accessors/fe-input.directive.ts )
585
-
586
- ```
587
- [type]: 'text' | 'color' | 'email' | 'password' | 'range' | 'search' | 'tel' | 'url' |
588
- 'number' |
589
- 'checkbox' |'radio' |
590
- 'date' | 'datetime-local' | 'time' | 'month' | 'week' |
591
- 'file' |
592
- 'hidden' | 'button' | 'image' | 'reset' = 'text';
593
- [name]: string;
594
- [value]: any;
595
- [updateOn]: 'change' | 'blur' = 'change'
596
- [touchOnBlur]: boolean | string = true;
597
- [touchOnChange]: boolean | string = false;
598
- [readFileAs]: 'DataURL' | 'Text' | 'ArrayBuffer' | 'BinaryString' = 'DataURL'
599
- (fileError): string;
600
- connected: boolean = true;
601
- ```
602
-
603
- ### [ ` FeSelectDirective ` ] ( ./projects/ngfe/src/lib/value-accessors/fe-select.directive.ts )
604
-
605
- ```
606
- [multiple]: boolean = false;
607
- [updateOn]: 'change' | 'blur' = 'change';
608
- [touchOnBlur]: boolean | string = true;
609
- [touchOnChange]: boolean | string = false;
610
- readonly options: Set<FeSelectOptionDirective>;
611
- connected: boolean = true;
612
- ```
613
-
614
- ### [ ` FeSelectOptionDirective ` ] ( ./projects/ngfe/src/lib/value-accessors/fe-select.directive.ts )
615
-
616
- ```
617
- [value]: any;
618
- ```
619
-
620
-
621
455
## LICENSE
622
456
623
457
MIT
0 commit comments