@sumaris-net/ngx-components 2.12.26-alpha1 → 2.12.26-alpha2
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/esm2022/src/app/admin/services/validator/person.validator.mjs +8 -11
- package/esm2022/src/app/core/form/properties/properties.table.mjs +6 -8
- package/esm2022/src/app/core/form/properties/property.validator.mjs +5 -8
- package/esm2022/src/app/core/services/testing/referential.validator.mjs +5 -8
- package/esm2022/src/app/core/services/validator/account.validator.mjs +8 -18
- package/esm2022/src/app/core/services/validator/base.validator.class.mjs +9 -11
- package/esm2022/src/app/core/services/validator/local-settings.validator.mjs +8 -10
- package/esm2022/src/app/core/services/validator/user-settings.validator.mjs +5 -6
- package/esm2022/src/app/core/services/validator/user-token.validator.mjs +5 -6
- package/esm2022/src/app/core/table/testing/table-validator.service.mjs +5 -8
- package/esm2022/src/app/core/table/testing/table2-validator.service.mjs +5 -8
- package/fesm2022/sumaris-net.ngx-components.mjs +67 -88
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/admin/services/validator/person.validator.d.ts +2 -3
- package/src/app/core/form/properties/properties.table.d.ts +1 -2
- package/src/app/core/form/properties/property.validator.d.ts +1 -3
- package/src/app/core/services/testing/referential.validator.d.ts +2 -3
- package/src/app/core/services/validator/account.validator.d.ts +2 -8
- package/src/app/core/services/validator/base.validator.class.d.ts +3 -3
- package/src/app/core/services/validator/local-settings.validator.d.ts +3 -4
- package/src/app/core/services/validator/user-settings.validator.d.ts +2 -2
- package/src/app/core/services/validator/user-token.validator.d.ts +2 -2
- package/src/app/core/table/testing/table-validator.service.d.ts +2 -3
- package/src/app/core/table/testing/table2-validator.service.d.ts +1 -3
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
2
|
import { Person } from '../../../core/services/model/person.model';
|
|
3
3
|
import { AccountService } from '../../../core/services/account.service';
|
|
4
4
|
import { FormFieldDefinition } from '../../../shared/form/field.model';
|
|
5
5
|
import { AppValidatorService } from '../../../core/services/validator/base.validator.class';
|
|
6
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
export interface PersonValidatorOptions {
|
|
9
8
|
withAvatar?: boolean;
|
|
@@ -12,7 +11,7 @@ export interface PersonValidatorOptions {
|
|
|
12
11
|
}
|
|
13
12
|
export declare class PersonValidatorService<T extends Person = Person, O extends PersonValidatorOptions = PersonValidatorOptions> extends AppValidatorService<T> {
|
|
14
13
|
protected accountService: AccountService;
|
|
15
|
-
constructor(
|
|
14
|
+
constructor();
|
|
16
15
|
getFormGroupConfig(data?: T, opts?: O): {
|
|
17
16
|
[key: string]: any;
|
|
18
17
|
};
|
|
@@ -30,8 +30,7 @@ export declare class PropertyEntityFilter extends EntityFilter<PropertyEntityFil
|
|
|
30
30
|
protected isCriteriaNotEmpty(key: string, value: any): boolean;
|
|
31
31
|
}
|
|
32
32
|
export declare class PropertyEntityValidator extends AppValidatorService<PropertyEntity> {
|
|
33
|
-
|
|
34
|
-
constructor(formBuilder: UntypedFormBuilder);
|
|
33
|
+
constructor();
|
|
35
34
|
getFormGroupConfig(data?: PropertyEntity): {
|
|
36
35
|
[p: string]: any;
|
|
37
36
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { UntypedFormBuilder } from '@angular/forms';
|
|
2
1
|
import { Property } from '../../../shared/types';
|
|
3
2
|
import { AppValidatorService } from '../../services/validator/base.validator.class';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class PropertyValidator extends AppValidatorService<Property> {
|
|
6
|
-
|
|
7
|
-
constructor(formBuilder: UntypedFormBuilder);
|
|
5
|
+
constructor();
|
|
8
6
|
getFormGroupConfig(data?: Property): {
|
|
9
7
|
[p: string]: any;
|
|
10
8
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AbstractControlOptions,
|
|
1
|
+
import { AbstractControlOptions, UntypedFormGroup } from '@angular/forms';
|
|
2
2
|
import { Referential } from '../model/referential.model';
|
|
3
3
|
import { AppValidatorService } from '../validator/base.validator.class';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ReferentialValidatorService<T extends Referential = Referential> extends AppValidatorService<T> {
|
|
6
|
-
|
|
7
|
-
constructor(formBuilder: UntypedFormBuilder);
|
|
6
|
+
constructor();
|
|
8
7
|
getRowValidator(): UntypedFormGroup;
|
|
9
8
|
getFormGroup(data?: T, opts?: {
|
|
10
9
|
withDescription?: boolean;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { UntypedFormBuilder } from '@angular/forms';
|
|
2
1
|
import { Account } from '../model/account.model';
|
|
3
|
-
import { AccountService } from '../account.service';
|
|
4
2
|
import { UserSettingsValidatorService } from './user-settings.validator';
|
|
5
3
|
import { PersonValidatorOptions, PersonValidatorService } from '../../../admin/services/validator/person.validator';
|
|
6
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
7
4
|
import * as i0 from "@angular/core";
|
|
8
5
|
export interface AccountValidatorOptions extends PersonValidatorOptions {
|
|
9
6
|
withSettings?: boolean;
|
|
10
7
|
withTokens?: boolean;
|
|
11
8
|
}
|
|
12
9
|
export declare class AccountValidatorService<T extends Account = Account, O extends AccountValidatorOptions = AccountValidatorOptions> extends PersonValidatorService<T, O> {
|
|
13
|
-
protected
|
|
14
|
-
|
|
15
|
-
protected accountService: AccountService;
|
|
16
|
-
protected userSettingsValidatorService: UserSettingsValidatorService;
|
|
17
|
-
constructor(formBuilder: UntypedFormBuilder, translate: TranslateService, accountService: AccountService, userSettingsValidatorService: UserSettingsValidatorService);
|
|
10
|
+
protected readonly userSettingsValidatorService: UserSettingsValidatorService;
|
|
11
|
+
constructor();
|
|
18
12
|
getFormGroupConfig(data?: T, opts?: O): {
|
|
19
13
|
[key: string]: any[];
|
|
20
14
|
};
|
|
@@ -5,9 +5,9 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
5
5
|
import { FormErrors } from '../../../shared/forms';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare abstract class AppValidatorService<T = any> extends ValidatorService implements IValidatorService<T> {
|
|
8
|
-
protected formBuilder: UntypedFormBuilder;
|
|
9
|
-
protected translate
|
|
10
|
-
protected constructor(
|
|
8
|
+
protected readonly formBuilder: UntypedFormBuilder;
|
|
9
|
+
protected readonly translate: TranslateService;
|
|
10
|
+
protected constructor();
|
|
11
11
|
getRowValidator(): UntypedFormGroup;
|
|
12
12
|
getFormGroup(data?: T): UntypedFormGroup;
|
|
13
13
|
getFormGroupConfig(data?: T): {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { AbstractControl,
|
|
1
|
+
import { AbstractControl, UntypedFormGroup, ValidationErrors } from '@angular/forms';
|
|
2
2
|
import { LocalSettings } from '../model/settings.model';
|
|
3
|
-
import { NetworkService } from '../network.service';
|
|
4
3
|
import { AppValidatorService } from './base.validator.class';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class LocalSettingsValidatorService extends AppValidatorService<LocalSettings> {
|
|
7
|
-
private networkService;
|
|
8
|
-
constructor(
|
|
6
|
+
private readonly networkService;
|
|
7
|
+
constructor();
|
|
9
8
|
getFormGroup(data?: LocalSettings): UntypedFormGroup;
|
|
10
9
|
getPropertiesArray(array?: any): import("@angular/forms").UntypedFormArray;
|
|
11
10
|
getPropertyFormGroup(data?: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UntypedFormGroup } from '@angular/forms';
|
|
2
2
|
import { AppValidatorService } from './base.validator.class';
|
|
3
3
|
import { UserSettings } from '../model/account.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class UserSettingsValidatorService extends AppValidatorService<UserSettings> {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor();
|
|
7
7
|
getFormGroup(data?: UserSettings): UntypedFormGroup;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserSettingsValidatorService, never>;
|
|
9
9
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserSettingsValidatorService>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UntypedFormControl, UntypedFormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
2
2
|
import { AppValidatorService } from './base.validator.class';
|
|
3
3
|
import { UserToken } from '../model/token.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class UserTokenValidatorService extends AppValidatorService<UserToken> {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor();
|
|
7
7
|
getFormGroup(data?: UserToken): UntypedFormGroup;
|
|
8
8
|
updateFormGroup(formGroup: UntypedFormGroup, existingNames: string[]): void;
|
|
9
9
|
static notAlreadyExists(existingNames: string[]): ValidatorFn;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ReferentialValidatorService } from '../../services/testing/referential.validator';
|
|
2
|
-
import {
|
|
2
|
+
import { UntypedFormGroup } from '@angular/forms';
|
|
3
3
|
import { Referential } from '../../services/model/referential.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TableValidatorService extends ReferentialValidatorService {
|
|
6
|
-
|
|
7
|
-
constructor(formBuilder: UntypedFormBuilder);
|
|
6
|
+
constructor();
|
|
8
7
|
getFormGroup(data?: Referential, opts?: {
|
|
9
8
|
withDescription?: boolean;
|
|
10
9
|
withComments?: boolean;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ReferentialValidatorService } from '../../services/testing/referential.validator';
|
|
2
|
-
import { UntypedFormBuilder } from '@angular/forms';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class Table2ValidatorService extends ReferentialValidatorService {
|
|
5
|
-
|
|
6
|
-
constructor(formBuilder: UntypedFormBuilder);
|
|
4
|
+
constructor();
|
|
7
5
|
getFormGroupConfig(data?: any, opts?: {
|
|
8
6
|
withDescription?: boolean;
|
|
9
7
|
withComments?: boolean;
|