@o3r/forms 12.3.0-prerelease.8 → 12.3.0-rc.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/README.md +14 -78
- package/fesm2022/o3r-forms.mjs +24 -24
- package/fesm2022/o3r-forms.mjs.map +1 -1
- package/package.json +5 -4
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +5 -13
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/schema.js.map +1 -0
package/README.md
CHANGED
|
@@ -12,7 +12,20 @@ This package is an [Otter Framework Module](https://github.com/AmadeusITGroup/ot
|
|
|
12
12
|
[](https://www.npmjs.com/package/@o3r/forms)
|
|
13
13
|
[](https://www.npmjs.com/package/@o3r/forms)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
One of the approaches for writing forms that Angular provides is called [model-driven or reactive forms](https://angular.io/guide/reactive-forms),
|
|
16
|
+
which _"provide a model-driven approach to handling form inputs whose values change over time"_. This type of form is applicable in many use cases,
|
|
17
|
+
but there are a couple of exceptions where additional utilities may be useful.
|
|
18
|
+
|
|
19
|
+
These use cases include:
|
|
20
|
+
* A container/presenter structure for components
|
|
21
|
+
* Handling form submission at page level
|
|
22
|
+
* Displaying the error message outside the form
|
|
23
|
+
|
|
24
|
+
To handle these, this module provides utilities to enhance the build of Angular reactive forms, including:
|
|
25
|
+
* An asynchronous decorator (`@AsyncInput`) to ensure subscriptions are handled if the references of the input observables change.
|
|
26
|
+
* Basic and custom validators to validate user input for accuracy and completeness.
|
|
27
|
+
* A dedicated NgRX store for form errors to have the possibility of displaying error messages outside the form component.
|
|
28
|
+
* Helper functions to handle the interactions with the forms.
|
|
16
29
|
|
|
17
30
|
## How to install
|
|
18
31
|
|
|
@@ -23,83 +36,6 @@ ng add @o3r/forms
|
|
|
23
36
|
> [!WARNING]
|
|
24
37
|
> This module requires [@o3r/core](https://www.npmjs.com/package/@o3r/core) to be installed.
|
|
25
38
|
|
|
26
|
-
## Container/presenter and form creation
|
|
27
|
-
|
|
28
|
-
A Container/presenter architecture was put in place to ensure best reusability/sharing
|
|
29
|
-
|
|
30
|
-
### Where the form object creation should be done?
|
|
31
|
-
|
|
32
|
-
* **form created in presenter** - it's the presenter that decides how the data is displayed
|
|
33
|
-
* **container** only values and errors are propagated from the presenter
|
|
34
|
-
* **container** can set the default value
|
|
35
|
-
|
|
36
|
-
### How the container and presenter will communicate in forms context
|
|
37
|
-
|
|
38
|
-
* **presenter** implements [ControlValueAccessor](https://angular.io/api/forms/ControlValueAccessor) and [Validator](https://angular.io/api/forms/Validator) (or [AsyncValidator](https://angular.io/api/forms/AsyncValidator)) interfaces
|
|
39
|
-
* **propagate** the value, the form status and the errors
|
|
40
|
-
* **container** applies [FormControlDirective](https://angular.io/api/forms/FormControlDirective) on the presenter html tag
|
|
41
|
-
* **container** sets the default value using **formControl** directive
|
|
42
|
-
* **listen** to the value and status changes using the same directive
|
|
43
|
-
|
|
44
|
-
See [FORM_STRUCTURE](https://github.com/AmadeusITGroup/otter/tree/main/docs/forms/FORM_STRUCTURE.md)
|
|
45
|
-
|
|
46
|
-
## You want to include form validation and display the errors
|
|
47
|
-
|
|
48
|
-
* interfaces for the error messages provided in **@o3r/forms**
|
|
49
|
-
|
|
50
|
-
### Display inline errors
|
|
51
|
-
|
|
52
|
-
* the error messages returned by validators are used in the inline error display
|
|
53
|
-
* **simple/basic/primitive** validators - set as a configuration of the **presenter**
|
|
54
|
-
* localization of the associated error messages from the presenter
|
|
55
|
-
* the error object associated is computed here and has to be compliant with the store object model
|
|
56
|
-
* _getFlatControlErrors_ function is available in **@o3r/forms** to help with the creation of the associated error object
|
|
57
|
-
* **custom** validators created at container level
|
|
58
|
-
* localization of the associated error messages from the container
|
|
59
|
-
* custom validators are passed as an input to the presenter
|
|
60
|
-
* the error returned by the validator has to be compliant with the form error store model
|
|
61
|
-
|
|
62
|
-
### Display errors on a messages panel
|
|
63
|
-
|
|
64
|
-
* a dedicated _FormErrorStore_ is available on **@o3r/forms**
|
|
65
|
-
* allows the display of errors anywhere on the page
|
|
66
|
-
* the error object model contains the translation key and params
|
|
67
|
-
See [FORM_VALIDATION](https://github.com/AmadeusITGroup/otter/tree/main/docs/forms/FORM_VALIDATION.md) and [FORM_ERRORS](https://github.com/AmadeusITGroup/otter/tree/main/docs/forms/FORM_ERRORS.md)
|
|
68
|
-
|
|
69
|
-
## Form submit
|
|
70
|
-
|
|
71
|
-
### You want to submit the form
|
|
72
|
-
|
|
73
|
-
* The submit is triggered by the submit button **in the presenter** and an event is emitted
|
|
74
|
-
* **container** captures the event and executes the submit form logic
|
|
75
|
-
|
|
76
|
-
### What happens when you have multiple forms and you want to submit?
|
|
77
|
-
|
|
78
|
-
The answer is that we should avoid as much as possible having multiple form tags in the same page as it adds a lot of complexity. We should try to have only one _form_ tag that encapsulates everything and one submit action.
|
|
79
|
-
|
|
80
|
-
If multiple forms are really needed, then we found the following solution:
|
|
81
|
-
|
|
82
|
-
* the submit button is hidden on the presenters
|
|
83
|
-
* the **submit** is **triggered from the page**
|
|
84
|
-
* an **observable** to trigger the submit is passed as **input** to the containers;
|
|
85
|
-
* _AsyncInput_ decorator is provided in **@o3r/forms** to be applied on the observable input to ensure performance
|
|
86
|
-
* the submit form logic is executed on the containers
|
|
87
|
-
* containers emit events when the submit is done
|
|
88
|
-
* the page (parent) captures the events and continues its logic
|
|
89
|
-
|
|
90
|
-
This can be applied also, with only one form on the page, when you don't want a submit button in the presenter.
|
|
91
|
-
|
|
92
|
-
### What happens when the submit is triggered by the page with pristine forms
|
|
93
|
-
|
|
94
|
-
At the first display of the form, the inline errors (if the form is invalid) are not displayed because the form element is **not touched** and **dirty**
|
|
95
|
-
In case you want to show the inline errors after the submit, you have to:
|
|
96
|
-
|
|
97
|
-
* register a function in the container to _mark touched and dirty_ the form
|
|
98
|
-
* pass the function via an _@Output_ from the presenter and call it before executing the submit logic
|
|
99
|
-
* use _markAllControlsDirtyAndTouched_ helper is available in **@o3r/forms** to mark interactions on given form
|
|
100
|
-
|
|
101
|
-
See [FORM_SUBMIT&INTERCOMMUNICATION](https://github.com/AmadeusITGroup/otter/tree/main/docs/forms/FORM_SUBMIT_AND_INTERCOMMUNICATION.md)
|
|
102
|
-
|
|
103
39
|
## Details
|
|
104
40
|
|
|
105
41
|
Find more information in the [documentation](https://github.com/AmadeusITGroup/otter/tree/main/docs/forms).
|
package/fesm2022/o3r-forms.mjs
CHANGED
|
@@ -232,13 +232,13 @@ class FormErrorMessagesStoreModule {
|
|
|
232
232
|
]
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
236
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
237
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
235
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: FormErrorMessagesStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
236
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: FormErrorMessagesStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
237
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: FormErrorMessagesStoreModule, providers: [
|
|
238
238
|
{ provide: FORM_ERROR_MESSAGES_REDUCER_TOKEN, useFactory: getDefaultFormErrorMessagesReducer }
|
|
239
239
|
], imports: [StoreModule.forFeature(FORM_ERROR_MESSAGES_STORE_NAME, FORM_ERROR_MESSAGES_REDUCER_TOKEN)] }); }
|
|
240
240
|
}
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: FormErrorMessagesStoreModule, decorators: [{
|
|
242
242
|
type: NgModule,
|
|
243
243
|
args: [{
|
|
244
244
|
imports: [
|
|
@@ -311,8 +311,8 @@ class MaxDateValidator {
|
|
|
311
311
|
};
|
|
312
312
|
return result;
|
|
313
313
|
}
|
|
314
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
315
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
314
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MaxDateValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
315
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.10", type: MaxDateValidator, isStandalone: true, selector: "[maxdate][formControlName],[maxdate][formControl],[maxdate][ngModel]", inputs: { maxdate: "maxdate" }, providers: [
|
|
316
316
|
{
|
|
317
317
|
provide: NG_VALIDATORS,
|
|
318
318
|
useExisting: forwardRef((() => MaxDateValidator)),
|
|
@@ -320,7 +320,7 @@ class MaxDateValidator {
|
|
|
320
320
|
}
|
|
321
321
|
], usesOnChanges: true, ngImport: i0 }); }
|
|
322
322
|
}
|
|
323
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MaxDateValidator, decorators: [{
|
|
324
324
|
type: Directive,
|
|
325
325
|
args: [{
|
|
326
326
|
selector: '[maxdate][formControlName],[maxdate][formControl],[maxdate][ngModel]',
|
|
@@ -381,8 +381,8 @@ class MinDateValidator {
|
|
|
381
381
|
};
|
|
382
382
|
return result;
|
|
383
383
|
}
|
|
384
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
385
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
384
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MinDateValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
385
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.10", type: MinDateValidator, isStandalone: true, selector: "[mindate][formControlName],[mindate][formControl],[mindate][ngModel]", inputs: { mindate: "mindate" }, providers: [
|
|
386
386
|
{
|
|
387
387
|
provide: NG_VALIDATORS,
|
|
388
388
|
useExisting: forwardRef((() => MinDateValidator)),
|
|
@@ -390,7 +390,7 @@ class MinDateValidator {
|
|
|
390
390
|
}
|
|
391
391
|
], usesOnChanges: true, ngImport: i0 }); }
|
|
392
392
|
}
|
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MinDateValidator, decorators: [{
|
|
394
394
|
type: Directive,
|
|
395
395
|
args: [{
|
|
396
396
|
selector: '[mindate][formControlName],[mindate][formControl],[mindate][ngModel]',
|
|
@@ -410,11 +410,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
410
410
|
* @deprecated MaxDateValidator and MinDateValidator are now standalone, this module will be removed in v14
|
|
411
411
|
*/
|
|
412
412
|
class DateValidatorsModule {
|
|
413
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
414
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
415
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
413
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DateValidatorsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
414
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: DateValidatorsModule, imports: [CommonModule, MaxDateValidator, MinDateValidator], exports: [MaxDateValidator, MinDateValidator] }); }
|
|
415
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DateValidatorsModule, imports: [CommonModule] }); }
|
|
416
416
|
}
|
|
417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DateValidatorsModule, decorators: [{
|
|
418
418
|
type: NgModule,
|
|
419
419
|
args: [{
|
|
420
420
|
imports: [CommonModule, MaxDateValidator, MinDateValidator],
|
|
@@ -456,8 +456,8 @@ class MaxValidator {
|
|
|
456
456
|
registerOnValidatorChange(fn) {
|
|
457
457
|
this.onChange = fn;
|
|
458
458
|
}
|
|
459
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
460
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
459
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MaxValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
460
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.10", type: MaxValidator, isStandalone: true, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: { max: "max" }, host: { properties: { "attr.max": "max ? max : null" } }, providers: [
|
|
461
461
|
{
|
|
462
462
|
provide: NG_VALIDATORS,
|
|
463
463
|
useExisting: forwardRef((() => MaxValidator)),
|
|
@@ -465,7 +465,7 @@ class MaxValidator {
|
|
|
465
465
|
}
|
|
466
466
|
], usesOnChanges: true, ngImport: i0 }); }
|
|
467
467
|
}
|
|
468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MaxValidator, decorators: [{
|
|
469
469
|
type: Directive,
|
|
470
470
|
args: [{
|
|
471
471
|
selector: '[max][formControlName],[max][formControl],[max][ngModel]',
|
|
@@ -516,8 +516,8 @@ class MinValidator {
|
|
|
516
516
|
registerOnValidatorChange(fn) {
|
|
517
517
|
this.onChange = fn;
|
|
518
518
|
}
|
|
519
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
520
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
519
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MinValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
520
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.10", type: MinValidator, isStandalone: true, selector: "[min][formControlName],[min][formControl],[min][ngModel]", inputs: { min: "min" }, host: { properties: { "attr.min": "min ? min : null" } }, providers: [
|
|
521
521
|
{
|
|
522
522
|
provide: NG_VALIDATORS,
|
|
523
523
|
useExisting: forwardRef((() => MinValidator)),
|
|
@@ -525,7 +525,7 @@ class MinValidator {
|
|
|
525
525
|
}
|
|
526
526
|
], usesOnChanges: true, ngImport: i0 }); }
|
|
527
527
|
}
|
|
528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MinValidator, decorators: [{
|
|
529
529
|
type: Directive,
|
|
530
530
|
args: [{
|
|
531
531
|
selector: '[min][formControlName],[min][formControl],[min][ngModel]',
|
|
@@ -546,11 +546,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
546
546
|
* @deprecated MaxValidator and MinValidator are now standalone, this module will be removed in v14
|
|
547
547
|
*/
|
|
548
548
|
class NumberValidatorsModule {
|
|
549
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
550
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
551
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
549
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NumberValidatorsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
550
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: NumberValidatorsModule, imports: [CommonModule, MaxValidator, MinValidator], exports: [MaxValidator, MinValidator] }); }
|
|
551
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NumberValidatorsModule, imports: [CommonModule] }); }
|
|
552
552
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NumberValidatorsModule, decorators: [{
|
|
554
554
|
type: NgModule,
|
|
555
555
|
args: [{
|
|
556
556
|
imports: [CommonModule, MaxValidator, MinValidator],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-forms.mjs","sources":["../../src/annotations/async-input.ts","../../src/core/extended-validator.ts","../../src/core/helpers.ts","../../src/stores/form-error-messages/form-error-messages.actions.ts","../../src/stores/form-error-messages/form-error-messages.reducer.ts","../../src/stores/form-error-messages/form-error-messages.state.ts","../../src/stores/form-error-messages/form-error-messages.module.ts","../../src/stores/form-error-messages/form-error-messages.selectors.ts","../../src/validators/date/max-date.directive.ts","../../src/validators/date/min-date.directive.ts","../../src/validators/date/date-validators.module.ts","../../src/validators/number/max.directive.ts","../../src/validators/number/min.directive.ts","../../src/validators/number/number-validators.module.ts","../../src/o3r-forms.ts"],"sourcesContent":["import {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\nimport {\n switchMap,\n} from 'rxjs/operators';\n\n/**\n * Decorator for @Input property\n * It considers the input as an async one.\n * When a change in the input happens, it unsubscribe from the previous value\n * and subscribe to the next one\n * @param privateFieldName\n * @example\n * ```typescript\n * \\@Input()\n * \\@AsyncInput()\n * myStream$: Observable<number>;\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- required convention for decorator\nexport function AsyncInput(privateFieldName?: string) {\n return (target: any, key: string) => {\n const privateSubjectField = `_subject_${privateFieldName || key}`;\n const privateStreamField = `_stream_${privateFieldName || key}`;\n if (delete target[key]) {\n Object.defineProperty(target, key, {\n get: function (this: any) {\n // Returning the same stream for reference check sake\n return this[privateStreamField];\n },\n set: function (this: any, value: Observable<any> | undefined) {\n if (value) {\n if (this[privateSubjectField]) {\n this[privateSubjectField].next(value);\n } else {\n this[privateSubjectField] = new BehaviorSubject<Observable<any>>(value);\n // Everytime the subject emits, we will discard the previous one\n // and subscribe to the new emission\n this[privateStreamField] = this[privateSubjectField].pipe(\n switchMap((stream$: Observable<any>) => stream$)\n );\n }\n } else {\n this[privateStreamField] = value;\n this[privateSubjectField] = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n}\n","import {\n AbstractControl,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from '@angular/forms';\n\nexport abstract class ExtendedValidator implements Validator {\n /**\n * Full list of validator functions\n */\n public abstract validators: ValidatorFn[];\n\n /**\n * Apply the list of validators on a specific Control\n * @param control\n */\n public validate(control: AbstractControl): ValidationErrors | null {\n const errors = Object.assign({}, ...this.validators.map((validatorFunctions) => validatorFunctions(control)));\n\n return Object.keys(errors).length > 0 ? errors : null;\n }\n}\n","import {\n AbstractControl,\n FormGroup,\n ValidationErrors,\n} from '@angular/forms';\nimport {\n ControlFlatErrors,\n FlatError,\n} from './flat-errors';\n\n/**\n * Checks if controls is a FormGroup\n * @param control\n */\nexport function isFormGroup(control: AbstractControl): control is FormGroup {\n return Object.prototype.hasOwnProperty.call(control, 'controls');\n}\n\n/**\n * Mark the controls in the given form as touched and dirty\n * @param control\n */\nexport function markAllControlsDirtyAndTouched(control: AbstractControl) {\n control.markAsDirty({ onlySelf: true });\n control.markAsTouched({ onlySelf: true });\n if (isFormGroup(control)) {\n Object.keys(control.controls).forEach((controlName) => {\n const currentControl = control.get(controlName);\n if (currentControl) {\n markAllControlsDirtyAndTouched(currentControl);\n }\n });\n }\n}\n\n/**\n * Mark the controls in the given form as untouched and pristine\n * @param control\n */\nexport function markAllControlsPristineAndUntouched(control: AbstractControl) {\n control.markAsUntouched({ onlySelf: true });\n control.markAsPristine({ onlySelf: true });\n if (isFormGroup(control)) {\n Object.keys(control.controls).forEach((controlName) => {\n const currentControl = control.get(controlName);\n if (currentControl) {\n markAllControlsPristineAndUntouched(currentControl);\n }\n });\n }\n}\n\n/**\n * Transforms ValidationErrors object into an array of FlatErrors.\n * @note It filters out the 'customErrors'\n * @param errors Validation errors in a control\n */\nconst getErrorList = (errors: ValidationErrors): FlatError[] => {\n return Object.keys(errors)\n .filter((errorKey) => errorKey !== 'customErrors')\n .map((errorKey) => {\n const errorValue = errors[errorKey];\n return {\n errorKey,\n errorValue,\n validationError: { [errorKey]: errorValue }\n };\n });\n};\n\n/**\n * Gets a flat list of all the errors in the form and it's descendents\n * @param form Form to be checked\n */\nexport function getFlatControlErrors(form: AbstractControl) {\n /**\n * Get a ControlFlatError of the control (or form) containing the name of the control, the validations errors and custom errors\n * @param control the control to be analyzed\n * @param controlName the name of the control. Optional since forms do not have names\n */\n const getControlErrors = (control: AbstractControl, controlName?: string): ControlFlatErrors => {\n return {\n controlName,\n customErrors: (control.errors && control.errors.customErrors) || null,\n errors: control.errors ? getErrorList(control.errors) : []\n };\n };\n\n /**\n * Recursion to get all the flat errors from the control and its descendents\n * @param control the control to be analyzed\n * @param controlName the name of the control. Optional since forms do not have names\n */\n const recursiveControlErrors = (control: AbstractControl, controlName?: string): ControlFlatErrors[] => {\n const controlErrors = [getControlErrors(control, controlName)];\n if (isFormGroup(control)) {\n return Object.keys(control.controls).reduce((allErrors, childControlName) => {\n const childName = controlName ? `${controlName}.${childControlName}` : childControlName;\n return allErrors.concat(\n recursiveControlErrors(control.get(childControlName)!, `${childName}`)\n );\n }, controlErrors);\n }\n return controlErrors;\n };\n\n return recursiveControlErrors(form).filter((errors) => !!errors.customErrors || errors.errors.length > 0);\n}\n","import {\n createAction,\n props,\n} from '@ngrx/store';\nimport {\n SetEntitiesActionPayload,\n} from '@o3r/core';\nimport {\n FormError,\n} from '../../core/index';\n\n/** StateDetailsActions */\nconst ACTION_RESET = '[FormErrorMessages] reset';\n\n/** Entity Actions */\nconst ACTION_CLEAR_ENTITIES = '[FormErrorMessages] clear entities';\nconst ACTION_UPSERT_ENTITIES = '[FormErrorMessages] upsert entities';\nconst ACTION_SET_ENTITIES = '[FormErrorMessages] set entities';\nconst ACTION_REMOVE_ENTITY = '[FormErrorMessages] remove entities';\n\n/** The payload of remove entity */\nexport interface RemoveFormErrorMessagesPayload {\n /** id of the FormErrorMessages to be removed */\n id: string;\n}\n\n/**\n * Action to remove an entity from the store\n */\nexport const removeFormErrorMessagesEntity = createAction(ACTION_REMOVE_ENTITY, props<RemoveFormErrorMessagesPayload>());\n\n/**\n * Action to reset the whole state, by returning it to initial state.\n */\nexport const resetFormErrorMessages = createAction(ACTION_RESET);\n\n/**\n * Clear all formErrorMessages and fill the store with the payload\n */\nexport const setFormErrorMessagesEntities = createAction(ACTION_SET_ENTITIES, props<SetEntitiesActionPayload<FormError>>());\n\n/**\n * Update formErrorMessages with known IDs, insert the new ones\n */\nexport const upsertFormErrorMessagesEntities = createAction(ACTION_UPSERT_ENTITIES, props<SetEntitiesActionPayload<FormError>>());\n\n/**\n * Clear only the entities, keeps the other attributes in the state\n */\nexport const clearFormErrorMessagesEntities = createAction(ACTION_CLEAR_ENTITIES);\n","import {\n createEntityAdapter,\n EntityAdapter,\n} from '@ngrx/entity';\nimport {\n ActionCreator,\n createReducer,\n on,\n ReducerTypes,\n} from '@ngrx/store';\nimport * as actions from './form-error-messages.actions';\nimport {\n FormErrorMessagesState,\n FormErrorModel,\n} from './form-error-messages.state';\n\n/**\n * FormErrorMessages Store adapter\n */\nexport const formErrorMessagesAdapter: EntityAdapter<FormErrorModel> = createEntityAdapter<FormErrorModel>({\n selectId: (model) => model.formId\n});\n\n/**\n * FormErrorMessages Store initial value\n */\nexport const formErrorMessagesInitialState: FormErrorMessagesState = formErrorMessagesAdapter.getInitialState({});\n\n/**\n * List of basic actions for FormErrorMessages Store\n */\nexport const formErrorMessagesReducerFeatures: ReducerTypes<FormErrorMessagesState, ActionCreator[]>[] = [\n on(actions.resetFormErrorMessages, () => formErrorMessagesInitialState),\n\n on(actions.setFormErrorMessagesEntities, (state, payload) => formErrorMessagesAdapter.addMany(payload.entities, formErrorMessagesAdapter.removeAll(state))),\n\n on(actions.upsertFormErrorMessagesEntities, (state, payload) => formErrorMessagesAdapter.upsertMany(payload.entities, state)),\n\n on(actions.clearFormErrorMessagesEntities, (state) => formErrorMessagesAdapter.removeAll(state)),\n\n on(actions.removeFormErrorMessagesEntity, (state, payload) => formErrorMessagesAdapter.removeOne(payload.id, state))\n];\n\n/**\n * FormErrorMessages Store reducer\n */\nexport const formErrorMessagesReducer = createReducer(\n formErrorMessagesInitialState,\n ...formErrorMessagesReducerFeatures\n);\n","import {\n EntityState,\n} from '@ngrx/entity';\nimport {\n FormError,\n} from '../../core/index';\n\n/**\n * FormError model\n */\nexport interface FormErrorModel extends FormError {\n\n}\n\n/**\n * FormError store state\n */\nexport interface FormErrorMessagesState extends EntityState<FormErrorModel> {}\n\n/**\n * Name of the FormError Store\n */\nexport const FORM_ERROR_MESSAGES_STORE_NAME = 'formErrorMessages';\n\n/**\n * FormError Store Interface\n */\nexport interface FormErrorMessagesStore {\n /** FormErrorMessages state */\n [FORM_ERROR_MESSAGES_STORE_NAME]: FormErrorMessagesState;\n}\n","import {\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n StoreModule,\n} from '@ngrx/store';\nimport {\n formErrorMessagesReducer,\n} from './form-error-messages.reducer';\nimport {\n FORM_ERROR_MESSAGES_STORE_NAME,\n FormErrorMessagesState,\n} from './form-error-messages.state';\n\n/** Token of the FormErrorMessages reducer */\nexport const FORM_ERROR_MESSAGES_REDUCER_TOKEN = new InjectionToken<ActionReducer<FormErrorMessagesState, Action>>('Feature FormErrorMessages Reducer');\n\n/** Provide default reducer for FormErrorMessages store */\nexport function getDefaultFormErrorMessagesReducer() {\n return formErrorMessagesReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(FORM_ERROR_MESSAGES_STORE_NAME, FORM_ERROR_MESSAGES_REDUCER_TOKEN)\n ],\n providers: [\n { provide: FORM_ERROR_MESSAGES_REDUCER_TOKEN, useFactory: getDefaultFormErrorMessagesReducer }\n ]\n})\nexport class FormErrorMessagesStoreModule {\n public static forRoot<T extends FormErrorMessagesState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<FormErrorMessagesStoreModule> {\n return {\n ngModule: FormErrorMessagesStoreModule,\n providers: [\n { provide: FORM_ERROR_MESSAGES_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import {\n createFeatureSelector,\n createSelector,\n} from '@ngrx/store';\nimport {\n ElementError,\n ErrorMessageObject,\n} from '../../core/index';\nimport {\n formErrorMessagesAdapter,\n} from './form-error-messages.reducer';\nimport {\n FORM_ERROR_MESSAGES_STORE_NAME,\n FormErrorMessagesState,\n} from './form-error-messages.state';\n\nconst { selectIds, selectEntities, selectAll, selectTotal } = formErrorMessagesAdapter.getSelectors();\n\n/** Select FormErrorMessages State */\nexport const selectFormErrorMessagesState = createFeatureSelector<FormErrorMessagesState>(FORM_ERROR_MESSAGES_STORE_NAME);\n\n/** Select the array of FormErrorMessages ids */\nexport const selectFormErrorMessagesIds = createSelector(selectFormErrorMessagesState, selectIds);\n\n/** Select the array of FormErrorMessages */\nexport const selectAllFormErrorMessages = createSelector(selectFormErrorMessagesState, selectAll);\n\n/** Select the dictionary of FormErrorMessages entities */\nexport const selectFormErrorMessagesEntities = createSelector(selectFormErrorMessagesState, selectEntities);\n\n/** Select the total FormErrorMessages count */\nexport const selectFormErrorMessagesTotal = createSelector(selectFormErrorMessagesState, selectTotal);\n\n/** Select the array of all ElementErrors */\nexport const selectAllElementErrors = createSelector(\n selectAllFormErrorMessages,\n (formErrorMessages) => formErrorMessages ? formErrorMessages.reduce((elementErrors: ElementError[], formErrorMessage) => [...elementErrors, ...formErrorMessage.errors], []) : []\n);\n\n/** Select the array of all ErrorMessageObjects */\nexport const selectAllErrorMessageObjects = createSelector(\n selectAllElementErrors,\n (elementErrors) => elementErrors ? elementErrors.reduce((errorMessageObjects: ErrorMessageObject[], elementError: ElementError) => [...errorMessageObjects, ...elementError.errorMessages], []) : []\n);\n","import {\n utils,\n} from '@ama-sdk/core';\nimport {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MaxDateValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `maxdate` attribute.\n */\n@Directive({\n selector: '[maxdate][formControlName],[maxdate][formControl],[maxdate][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxDateValidator),\n multi: true\n }\n ]\n})\nexport class MaxDateValidator implements Validator, OnChanges {\n /** Maximum date to compare to */\n @Input() public maxdate: utils.Date | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n this.validator = MaxDateValidator.maxDate(this.maxdate);\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('maxdate' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.maxdate == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n\n /**\n * Maximum Date validator\n * @param maxDate Maximum date to compare to\n */\n public static maxDate(maxDate: utils.Date | null): ValidatorFn {\n const result = (control: AbstractControl): ValidationErrors | null => {\n if (control.value instanceof utils.Date) {\n return maxDate && control.value.getTime() > maxDate.getTime() ? { maxdate: { requiredDate: maxDate, actualDate: control.value } } : null;\n }\n\n return null;\n };\n\n return result;\n }\n}\n","import {\n utils,\n} from '@ama-sdk/core';\nimport {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MinDateValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `mindate` attribute.\n */\n@Directive({\n selector: '[mindate][formControlName],[mindate][formControl],[mindate][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinDateValidator),\n multi: true\n }\n ]\n})\nexport class MinDateValidator implements Validator, OnChanges {\n /** Minimum date to compare to */\n @Input() public mindate: utils.Date | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n this.validator = MinDateValidator.minDate(this.mindate);\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('mindate' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.mindate == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n\n /**\n * Minimum Date validator\n * @param minDate Minimum date to compare to\n */\n public static minDate(minDate: utils.Date | null): ValidatorFn {\n const result = (control: AbstractControl): ValidationErrors | null => {\n if (control.value instanceof utils.Date) {\n return minDate && control.value.getTime() < minDate.getTime() ? { mindate: { requiredDate: minDate, actualDate: control.value } } : null;\n }\n\n return null;\n };\n\n return result;\n }\n}\n","import {\n CommonModule,\n} from '@angular/common';\nimport {\n NgModule,\n} from '@angular/core';\nimport {\n MaxDateValidator,\n} from './max-date.directive';\nimport {\n MinDateValidator,\n} from './min-date.directive';\n\n/**\n * @deprecated MaxDateValidator and MinDateValidator are now standalone, this module will be removed in v14\n */\n@NgModule({\n imports: [CommonModule, MaxDateValidator, MinDateValidator],\n exports: [MaxDateValidator, MinDateValidator]\n})\nexport class DateValidatorsModule {}\n","import {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MaxValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `max` attribute.\n */\n@Directive({\n selector: '[max][formControlName],[max][formControl],[max][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxValidator),\n multi: true\n }\n ],\n host: { '[attr.max]': 'max ? max : null' }\n})\nexport class MaxValidator implements Validator, OnChanges {\n /** Maximum date to compare to */\n @Input() public max: string | number | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n if (this.max !== null) {\n this.validator = Validators.max(+this.max);\n }\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('max' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.max == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n}\n","import {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MinValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `min` attribute.\n */\n@Directive({\n selector: '[min][formControlName],[min][formControl],[min][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinValidator),\n multi: true\n }\n ],\n host: { '[attr.min]': 'min ? min : null' }\n})\nexport class MinValidator implements Validator, OnChanges {\n /** Minimum date to compare to */\n @Input() public min: string | number | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n if (this.min !== null) {\n this.validator = Validators.min(+this.min);\n }\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('min' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.min == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n}\n","import {\n CommonModule,\n} from '@angular/common';\nimport {\n NgModule,\n} from '@angular/core';\nimport {\n MaxValidator,\n} from './max.directive';\nimport {\n MinValidator,\n} from './min.directive';\n\n/**\n * @deprecated MaxValidator and MinValidator are now standalone, this module will be removed in v14\n */\n@NgModule({\n imports: [CommonModule, MaxValidator, MinValidator],\n exports: [MaxValidator, MinValidator]\n})\nexport class NumberValidatorsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.resetFormErrorMessages","actions.setFormErrorMessagesEntities","actions.upsertFormErrorMessagesEntities","actions.clearFormErrorMessagesEntities","actions.removeFormErrorMessagesEntity"],"mappings":";;;;;;;;;;;AAQA;;;;;;;;;;;;AAYG;AACH;AACM,SAAU,UAAU,CAAC,gBAAyB,EAAA;AAClD,IAAA,OAAO,CAAC,MAAW,EAAE,GAAW,KAAI;AAClC,QAAA,MAAM,mBAAmB,GAAG,CAAA,SAAA,EAAY,gBAAgB,IAAI,GAAG,EAAE;AACjE,QAAA,MAAM,kBAAkB,GAAG,CAAA,QAAA,EAAW,gBAAgB,IAAI,GAAG,EAAE;AAC/D,QAAA,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE;AACtB,YAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;AACjC,gBAAA,GAAG,EAAE,YAAA;;AAEH,oBAAA,OAAO,IAA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AAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAHvB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGX,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY;AACrC,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"o3r-forms.mjs","sources":["../../src/annotations/async-input.ts","../../src/core/extended-validator.ts","../../src/core/helpers.ts","../../src/stores/form-error-messages/form-error-messages.actions.ts","../../src/stores/form-error-messages/form-error-messages.reducer.ts","../../src/stores/form-error-messages/form-error-messages.state.ts","../../src/stores/form-error-messages/form-error-messages.module.ts","../../src/stores/form-error-messages/form-error-messages.selectors.ts","../../src/validators/date/max-date.directive.ts","../../src/validators/date/min-date.directive.ts","../../src/validators/date/date-validators.module.ts","../../src/validators/number/max.directive.ts","../../src/validators/number/min.directive.ts","../../src/validators/number/number-validators.module.ts","../../src/o3r-forms.ts"],"sourcesContent":["import {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\nimport {\n switchMap,\n} from 'rxjs/operators';\n\n/**\n * Decorator for @Input property\n * It considers the input as an async one.\n * When a change in the input happens, it unsubscribe from the previous value\n * and subscribe to the next one\n * @param privateFieldName\n * @example\n * ```typescript\n * \\@Input()\n * \\@AsyncInput()\n * myStream$: Observable<number>;\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- required convention for decorator\nexport function AsyncInput(privateFieldName?: string) {\n return (target: any, key: string) => {\n const privateSubjectField = `_subject_${privateFieldName || key}`;\n const privateStreamField = `_stream_${privateFieldName || key}`;\n if (delete target[key]) {\n Object.defineProperty(target, key, {\n get: function (this: any) {\n // Returning the same stream for reference check sake\n return this[privateStreamField];\n },\n set: function (this: any, value: Observable<any> | undefined) {\n if (value) {\n if (this[privateSubjectField]) {\n this[privateSubjectField].next(value);\n } else {\n this[privateSubjectField] = new BehaviorSubject<Observable<any>>(value);\n // Everytime the subject emits, we will discard the previous one\n // and subscribe to the new emission\n this[privateStreamField] = this[privateSubjectField].pipe(\n switchMap((stream$: Observable<any>) => stream$)\n );\n }\n } else {\n this[privateStreamField] = value;\n this[privateSubjectField] = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n}\n","import {\n AbstractControl,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from '@angular/forms';\n\nexport abstract class ExtendedValidator implements Validator {\n /**\n * Full list of validator functions\n */\n public abstract validators: ValidatorFn[];\n\n /**\n * Apply the list of validators on a specific Control\n * @param control\n */\n public validate(control: AbstractControl): ValidationErrors | null {\n const errors = Object.assign({}, ...this.validators.map((validatorFunctions) => validatorFunctions(control)));\n\n return Object.keys(errors).length > 0 ? errors : null;\n }\n}\n","import {\n AbstractControl,\n FormGroup,\n ValidationErrors,\n} from '@angular/forms';\nimport {\n ControlFlatErrors,\n FlatError,\n} from './flat-errors';\n\n/**\n * Checks if controls is a FormGroup\n * @param control\n */\nexport function isFormGroup(control: AbstractControl): control is FormGroup {\n return Object.prototype.hasOwnProperty.call(control, 'controls');\n}\n\n/**\n * Mark the controls in the given form as touched and dirty\n * @param control\n */\nexport function markAllControlsDirtyAndTouched(control: AbstractControl) {\n control.markAsDirty({ onlySelf: true });\n control.markAsTouched({ onlySelf: true });\n if (isFormGroup(control)) {\n Object.keys(control.controls).forEach((controlName) => {\n const currentControl = control.get(controlName);\n if (currentControl) {\n markAllControlsDirtyAndTouched(currentControl);\n }\n });\n }\n}\n\n/**\n * Mark the controls in the given form as untouched and pristine\n * @param control\n */\nexport function markAllControlsPristineAndUntouched(control: AbstractControl) {\n control.markAsUntouched({ onlySelf: true });\n control.markAsPristine({ onlySelf: true });\n if (isFormGroup(control)) {\n Object.keys(control.controls).forEach((controlName) => {\n const currentControl = control.get(controlName);\n if (currentControl) {\n markAllControlsPristineAndUntouched(currentControl);\n }\n });\n }\n}\n\n/**\n * Transforms ValidationErrors object into an array of FlatErrors.\n * @note It filters out the 'customErrors'\n * @param errors Validation errors in a control\n */\nconst getErrorList = (errors: ValidationErrors): FlatError[] => {\n return Object.keys(errors)\n .filter((errorKey) => errorKey !== 'customErrors')\n .map((errorKey) => {\n const errorValue = errors[errorKey];\n return {\n errorKey,\n errorValue,\n validationError: { [errorKey]: errorValue }\n };\n });\n};\n\n/**\n * Gets a flat list of all the errors in the form and it's descendents\n * @param form Form to be checked\n */\nexport function getFlatControlErrors(form: AbstractControl) {\n /**\n * Get a ControlFlatError of the control (or form) containing the name of the control, the validations errors and custom errors\n * @param control the control to be analyzed\n * @param controlName the name of the control. Optional since forms do not have names\n */\n const getControlErrors = (control: AbstractControl, controlName?: string): ControlFlatErrors => {\n return {\n controlName,\n customErrors: (control.errors && control.errors.customErrors) || null,\n errors: control.errors ? getErrorList(control.errors) : []\n };\n };\n\n /**\n * Recursion to get all the flat errors from the control and its descendents\n * @param control the control to be analyzed\n * @param controlName the name of the control. Optional since forms do not have names\n */\n const recursiveControlErrors = (control: AbstractControl, controlName?: string): ControlFlatErrors[] => {\n const controlErrors = [getControlErrors(control, controlName)];\n if (isFormGroup(control)) {\n return Object.keys(control.controls).reduce((allErrors, childControlName) => {\n const childName = controlName ? `${controlName}.${childControlName}` : childControlName;\n return allErrors.concat(\n recursiveControlErrors(control.get(childControlName)!, `${childName}`)\n );\n }, controlErrors);\n }\n return controlErrors;\n };\n\n return recursiveControlErrors(form).filter((errors) => !!errors.customErrors || errors.errors.length > 0);\n}\n","import {\n createAction,\n props,\n} from '@ngrx/store';\nimport {\n SetEntitiesActionPayload,\n} from '@o3r/core';\nimport {\n FormError,\n} from '../../core/index';\n\n/** StateDetailsActions */\nconst ACTION_RESET = '[FormErrorMessages] reset';\n\n/** Entity Actions */\nconst ACTION_CLEAR_ENTITIES = '[FormErrorMessages] clear entities';\nconst ACTION_UPSERT_ENTITIES = '[FormErrorMessages] upsert entities';\nconst ACTION_SET_ENTITIES = '[FormErrorMessages] set entities';\nconst ACTION_REMOVE_ENTITY = '[FormErrorMessages] remove entities';\n\n/** The payload of remove entity */\nexport interface RemoveFormErrorMessagesPayload {\n /** id of the FormErrorMessages to be removed */\n id: string;\n}\n\n/**\n * Action to remove an entity from the store\n */\nexport const removeFormErrorMessagesEntity = createAction(ACTION_REMOVE_ENTITY, props<RemoveFormErrorMessagesPayload>());\n\n/**\n * Action to reset the whole state, by returning it to initial state.\n */\nexport const resetFormErrorMessages = createAction(ACTION_RESET);\n\n/**\n * Clear all formErrorMessages and fill the store with the payload\n */\nexport const setFormErrorMessagesEntities = createAction(ACTION_SET_ENTITIES, props<SetEntitiesActionPayload<FormError>>());\n\n/**\n * Update formErrorMessages with known IDs, insert the new ones\n */\nexport const upsertFormErrorMessagesEntities = createAction(ACTION_UPSERT_ENTITIES, props<SetEntitiesActionPayload<FormError>>());\n\n/**\n * Clear only the entities, keeps the other attributes in the state\n */\nexport const clearFormErrorMessagesEntities = createAction(ACTION_CLEAR_ENTITIES);\n","import {\n createEntityAdapter,\n EntityAdapter,\n} from '@ngrx/entity';\nimport {\n ActionCreator,\n createReducer,\n on,\n ReducerTypes,\n} from '@ngrx/store';\nimport * as actions from './form-error-messages.actions';\nimport {\n FormErrorMessagesState,\n FormErrorModel,\n} from './form-error-messages.state';\n\n/**\n * FormErrorMessages Store adapter\n */\nexport const formErrorMessagesAdapter: EntityAdapter<FormErrorModel> = createEntityAdapter<FormErrorModel>({\n selectId: (model) => model.formId\n});\n\n/**\n * FormErrorMessages Store initial value\n */\nexport const formErrorMessagesInitialState: FormErrorMessagesState = formErrorMessagesAdapter.getInitialState({});\n\n/**\n * List of basic actions for FormErrorMessages Store\n */\nexport const formErrorMessagesReducerFeatures: ReducerTypes<FormErrorMessagesState, ActionCreator[]>[] = [\n on(actions.resetFormErrorMessages, () => formErrorMessagesInitialState),\n\n on(actions.setFormErrorMessagesEntities, (state, payload) => formErrorMessagesAdapter.addMany(payload.entities, formErrorMessagesAdapter.removeAll(state))),\n\n on(actions.upsertFormErrorMessagesEntities, (state, payload) => formErrorMessagesAdapter.upsertMany(payload.entities, state)),\n\n on(actions.clearFormErrorMessagesEntities, (state) => formErrorMessagesAdapter.removeAll(state)),\n\n on(actions.removeFormErrorMessagesEntity, (state, payload) => formErrorMessagesAdapter.removeOne(payload.id, state))\n];\n\n/**\n * FormErrorMessages Store reducer\n */\nexport const formErrorMessagesReducer = createReducer(\n formErrorMessagesInitialState,\n ...formErrorMessagesReducerFeatures\n);\n","import {\n EntityState,\n} from '@ngrx/entity';\nimport {\n FormError,\n} from '../../core/index';\n\n/**\n * FormError model\n */\nexport interface FormErrorModel extends FormError {\n\n}\n\n/**\n * FormError store state\n */\nexport interface FormErrorMessagesState extends EntityState<FormErrorModel> {}\n\n/**\n * Name of the FormError Store\n */\nexport const FORM_ERROR_MESSAGES_STORE_NAME = 'formErrorMessages';\n\n/**\n * FormError Store Interface\n */\nexport interface FormErrorMessagesStore {\n /** FormErrorMessages state */\n [FORM_ERROR_MESSAGES_STORE_NAME]: FormErrorMessagesState;\n}\n","import {\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n StoreModule,\n} from '@ngrx/store';\nimport {\n formErrorMessagesReducer,\n} from './form-error-messages.reducer';\nimport {\n FORM_ERROR_MESSAGES_STORE_NAME,\n FormErrorMessagesState,\n} from './form-error-messages.state';\n\n/** Token of the FormErrorMessages reducer */\nexport const FORM_ERROR_MESSAGES_REDUCER_TOKEN = new InjectionToken<ActionReducer<FormErrorMessagesState, Action>>('Feature FormErrorMessages Reducer');\n\n/** Provide default reducer for FormErrorMessages store */\nexport function getDefaultFormErrorMessagesReducer() {\n return formErrorMessagesReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(FORM_ERROR_MESSAGES_STORE_NAME, FORM_ERROR_MESSAGES_REDUCER_TOKEN)\n ],\n providers: [\n { provide: FORM_ERROR_MESSAGES_REDUCER_TOKEN, useFactory: getDefaultFormErrorMessagesReducer }\n ]\n})\nexport class FormErrorMessagesStoreModule {\n public static forRoot<T extends FormErrorMessagesState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<FormErrorMessagesStoreModule> {\n return {\n ngModule: FormErrorMessagesStoreModule,\n providers: [\n { provide: FORM_ERROR_MESSAGES_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import {\n createFeatureSelector,\n createSelector,\n} from '@ngrx/store';\nimport {\n ElementError,\n ErrorMessageObject,\n} from '../../core/index';\nimport {\n formErrorMessagesAdapter,\n} from './form-error-messages.reducer';\nimport {\n FORM_ERROR_MESSAGES_STORE_NAME,\n FormErrorMessagesState,\n} from './form-error-messages.state';\n\nconst { selectIds, selectEntities, selectAll, selectTotal } = formErrorMessagesAdapter.getSelectors();\n\n/** Select FormErrorMessages State */\nexport const selectFormErrorMessagesState = createFeatureSelector<FormErrorMessagesState>(FORM_ERROR_MESSAGES_STORE_NAME);\n\n/** Select the array of FormErrorMessages ids */\nexport const selectFormErrorMessagesIds = createSelector(selectFormErrorMessagesState, selectIds);\n\n/** Select the array of FormErrorMessages */\nexport const selectAllFormErrorMessages = createSelector(selectFormErrorMessagesState, selectAll);\n\n/** Select the dictionary of FormErrorMessages entities */\nexport const selectFormErrorMessagesEntities = createSelector(selectFormErrorMessagesState, selectEntities);\n\n/** Select the total FormErrorMessages count */\nexport const selectFormErrorMessagesTotal = createSelector(selectFormErrorMessagesState, selectTotal);\n\n/** Select the array of all ElementErrors */\nexport const selectAllElementErrors = createSelector(\n selectAllFormErrorMessages,\n (formErrorMessages) => formErrorMessages ? formErrorMessages.reduce((elementErrors: ElementError[], formErrorMessage) => [...elementErrors, ...formErrorMessage.errors], []) : []\n);\n\n/** Select the array of all ErrorMessageObjects */\nexport const selectAllErrorMessageObjects = createSelector(\n selectAllElementErrors,\n (elementErrors) => elementErrors ? elementErrors.reduce((errorMessageObjects: ErrorMessageObject[], elementError: ElementError) => [...errorMessageObjects, ...elementError.errorMessages], []) : []\n);\n","import {\n utils,\n} from '@ama-sdk/core';\nimport {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MaxDateValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `maxdate` attribute.\n */\n@Directive({\n selector: '[maxdate][formControlName],[maxdate][formControl],[maxdate][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxDateValidator),\n multi: true\n }\n ]\n})\nexport class MaxDateValidator implements Validator, OnChanges {\n /** Maximum date to compare to */\n @Input() public maxdate: utils.Date | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n this.validator = MaxDateValidator.maxDate(this.maxdate);\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('maxdate' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.maxdate == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n\n /**\n * Maximum Date validator\n * @param maxDate Maximum date to compare to\n */\n public static maxDate(maxDate: utils.Date | null): ValidatorFn {\n const result = (control: AbstractControl): ValidationErrors | null => {\n if (control.value instanceof utils.Date) {\n return maxDate && control.value.getTime() > maxDate.getTime() ? { maxdate: { requiredDate: maxDate, actualDate: control.value } } : null;\n }\n\n return null;\n };\n\n return result;\n }\n}\n","import {\n utils,\n} from '@ama-sdk/core';\nimport {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MinDateValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `mindate` attribute.\n */\n@Directive({\n selector: '[mindate][formControlName],[mindate][formControl],[mindate][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinDateValidator),\n multi: true\n }\n ]\n})\nexport class MinDateValidator implements Validator, OnChanges {\n /** Minimum date to compare to */\n @Input() public mindate: utils.Date | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n this.validator = MinDateValidator.minDate(this.mindate);\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('mindate' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.mindate == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n\n /**\n * Minimum Date validator\n * @param minDate Minimum date to compare to\n */\n public static minDate(minDate: utils.Date | null): ValidatorFn {\n const result = (control: AbstractControl): ValidationErrors | null => {\n if (control.value instanceof utils.Date) {\n return minDate && control.value.getTime() < minDate.getTime() ? { mindate: { requiredDate: minDate, actualDate: control.value } } : null;\n }\n\n return null;\n };\n\n return result;\n }\n}\n","import {\n CommonModule,\n} from '@angular/common';\nimport {\n NgModule,\n} from '@angular/core';\nimport {\n MaxDateValidator,\n} from './max-date.directive';\nimport {\n MinDateValidator,\n} from './min-date.directive';\n\n/**\n * @deprecated MaxDateValidator and MinDateValidator are now standalone, this module will be removed in v14\n */\n@NgModule({\n imports: [CommonModule, MaxDateValidator, MinDateValidator],\n exports: [MaxDateValidator, MinDateValidator]\n})\nexport class DateValidatorsModule {}\n","import {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MaxValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `max` attribute.\n */\n@Directive({\n selector: '[max][formControlName],[max][formControl],[max][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxValidator),\n multi: true\n }\n ],\n host: { '[attr.max]': 'max ? max : null' }\n})\nexport class MaxValidator implements Validator, OnChanges {\n /** Maximum date to compare to */\n @Input() public max: string | number | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n if (this.max !== null) {\n this.validator = Validators.max(+this.max);\n }\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('max' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.max == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n}\n","import {\n Directive,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\n\n/**\n * A directive which installs the `MinValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `min` attribute.\n */\n@Directive({\n selector: '[min][formControlName],[min][formControl],[min][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinValidator),\n multi: true\n }\n ],\n host: { '[attr.min]': 'min ? min : null' }\n})\nexport class MinValidator implements Validator, OnChanges {\n /** Minimum date to compare to */\n @Input() public min: string | number | null = null;\n\n private validator: ValidatorFn = (_a) => null;\n private onChange: () => void = () => {};\n\n private createValidator(): void {\n if (this.min !== null) {\n this.validator = Validators.min(+this.min);\n }\n }\n\n /** @inheritDoc */\n public ngOnChanges(changes: SimpleChanges): void {\n if ('min' in changes) {\n this.createValidator();\n\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n\n /** @inheritDoc */\n public validate(c: AbstractControl): ValidationErrors | null {\n return this.min == null ? null : this.validator(c);\n }\n\n /** @inheritDoc */\n public registerOnValidatorChange(fn: () => void): void {\n this.onChange = fn;\n }\n}\n","import {\n CommonModule,\n} from '@angular/common';\nimport {\n NgModule,\n} from '@angular/core';\nimport {\n MaxValidator,\n} from './max.directive';\nimport {\n MinValidator,\n} from './min.directive';\n\n/**\n * @deprecated MaxValidator and MinValidator are now standalone, this module will be removed in v14\n */\n@NgModule({\n imports: [CommonModule, MaxValidator, MinValidator],\n exports: [MaxValidator, MinValidator]\n})\nexport class NumberValidatorsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.resetFormErrorMessages","actions.setFormErrorMessagesEntities","actions.upsertFormErrorMessagesEntities","actions.clearFormErrorMessagesEntities","actions.removeFormErrorMessagesEntity"],"mappings":";;;;;;;;;;;AAQA;;;;;;;;;;;;AAYG;AACH;AACM,SAAU,UAAU,CAAC,gBAAyB,EAAA;AAClD,IAAA,OAAO,CAAC,MAAW,EAAE,GAAW,KAAI;AAClC,QAAA,MAAM,mBAAmB,GAAG,CAAA,SAAA,EAAY,gBAAgB,IAAI,GAAG,EAAE;AACjE,QAAA,MAAM,kBAAkB,GAAG,CAAA,QAAA,EAAW,gBAAgB,IAAI,GAAG,EAAE;AAC/D,QAAA,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE;AACtB,YAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;AACjC,g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A,CAAA,CAAA;AAEzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAHvB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGX,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY;AACrC,iBAAA;;;ACnBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/forms",
|
|
3
|
-
"version": "12.3.0-
|
|
3
|
+
"version": "12.3.0-rc.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"otter-module"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@ama-sdk/core": "^12.3.0-
|
|
14
|
+
"@ama-sdk/core": "^12.3.0-rc.0",
|
|
15
15
|
"@angular-devkit/schematics": "^19.0.0",
|
|
16
16
|
"@angular/common": "^19.0.0",
|
|
17
17
|
"@angular/core": "^19.0.0",
|
|
18
18
|
"@angular/forms": "^19.0.0",
|
|
19
19
|
"@ngrx/entity": "^19.0.0",
|
|
20
20
|
"@ngrx/store": "^19.0.0",
|
|
21
|
-
"@o3r/core": "^12.3.0-
|
|
22
|
-
"@o3r/schematics": "^12.3.0-
|
|
21
|
+
"@o3r/core": "^12.3.0-rc.0",
|
|
22
|
+
"@o3r/schematics": "^12.3.0-rc.0",
|
|
23
23
|
"@schematics/angular": "^19.0.0",
|
|
24
24
|
"rxjs": "^7.8.1",
|
|
25
25
|
"ts-node": "~10.9.2"
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@o3r/schematics": "^12.3.0-rc.0",
|
|
39
40
|
"tslib": "^2.6.2"
|
|
40
41
|
},
|
|
41
42
|
"engines": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAMpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAkBlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -2,23 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAdd = void 0;
|
|
4
4
|
const path = require("node:path");
|
|
5
|
+
const schematics_1 = require("@o3r/schematics");
|
|
5
6
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
6
|
-
const reportMissingSchematicsDep = (logger) => (reason) => {
|
|
7
|
-
logger.error(`[ERROR]: Adding @o3r/form has failed.
|
|
8
|
-
You need to install '@o3r/core' package to be able to use the form package. Please run 'ng add @o3r/core'.`);
|
|
9
|
-
throw reason;
|
|
10
|
-
};
|
|
11
7
|
/**
|
|
12
8
|
* Add Otter forms to an Angular Project
|
|
13
9
|
* @param options
|
|
14
10
|
*/
|
|
15
11
|
function ngAddFn(options) {
|
|
16
12
|
/* ng add rules */
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
return setupDependencies({
|
|
13
|
+
return (tree) => {
|
|
14
|
+
return (0, schematics_1.setupDependencies)({
|
|
20
15
|
projectName: options.projectName,
|
|
21
|
-
dependencies: getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)
|
|
16
|
+
dependencies: (0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)
|
|
22
17
|
});
|
|
23
18
|
};
|
|
24
19
|
}
|
|
@@ -26,9 +21,6 @@ function ngAddFn(options) {
|
|
|
26
21
|
* Add Otter forms to an Angular Project
|
|
27
22
|
* @param options
|
|
28
23
|
*/
|
|
29
|
-
const ngAdd = (options) =>
|
|
30
|
-
const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
|
|
31
|
-
return createOtterSchematic(ngAddFn)(options);
|
|
32
|
-
};
|
|
24
|
+
const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options);
|
|
33
25
|
exports.ngAdd = ngAdd;
|
|
34
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAIlC,gDAIyB;AAKzB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAE5E;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,kBAAkB;IAClB,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,OAAO,IAAA,8BAAiB,EAAC;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,YAAY,EAAE,IAAA,oCAAuB,EAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;SACpH,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,MAAM,KAAK,GAAG,CAAC,OAA8B,EAAE,EAAE,CAAC,IAAA,iCAAoB,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AAAnF,QAAA,KAAK,SAA8E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":""}
|