@sumaris-net/ngx-components 18.18.31 → 18.18.33
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/doc/changelog.md +4 -0
- package/esm2022/src/app/core/form/form.utils.mjs +1 -1
- package/esm2022/src/app/core/form/list/list.form.mjs +1 -1
- package/esm2022/src/app/core/form/properties/properties-file.service.mjs +1 -1
- package/esm2022/src/app/core/services/config/core.config.mjs +1 -1
- package/esm2022/src/app/core/services/model/entity.decorators.mjs +1 -1
- package/esm2022/src/app/core/services/model/entity.model.mjs +1 -1
- package/esm2022/src/app/core/services/model/model.enum.mjs +2 -2
- package/esm2022/src/app/core/services/network.types.mjs +1 -1
- package/esm2022/src/app/shared/capacitor/plugins.mjs +1 -1
- package/esm2022/src/app/shared/dates.mjs +1 -1
- package/esm2022/src/app/shared/form/field.model.mjs +1 -1
- package/esm2022/src/app/shared/gesture/hammer.utils.mjs +1 -1
- package/esm2022/src/app/shared/graph/graph-colors.mjs +1 -1
- package/esm2022/src/app/shared/image/gallery/image-gallery.component.mjs +1 -1
- package/esm2022/src/app/shared/material/badge/badge.directive.mjs +1 -1
- package/esm2022/src/app/shared/material/latlong/latlong.utils.mjs +1 -1
- package/esm2022/src/app/shared/rx-state/rx-state.decorators.mjs +11 -10
- package/esm2022/src/app/shared/services/entity-service.class.mjs +1 -1
- package/esm2022/src/app/shared/services/progress-bar.service.mjs +1 -1
- package/esm2022/src/app/shared/types.mjs +1 -1
- package/esm2022/src/app/shared/upload-file/upload-file.model.mjs +1 -1
- package/esm2022/src/app/shared/validator/validators.mjs +1 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +11 -10
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/form.utils.d.ts +1 -1
- package/src/app/core/form/list/list.form.d.ts +1 -1
- package/src/app/core/form/properties/properties-file.service.d.ts +1 -1
- package/src/app/core/services/model/entity.decorators.d.ts +4 -5
- package/src/app/core/services/model/entity.model.d.ts +1 -1
- package/src/app/core/services/network.types.d.ts +1 -1
- package/src/app/shared/capacitor/plugins.d.ts +1 -1
- package/src/app/shared/dates.d.ts +1 -1
- package/src/app/shared/form/field.model.d.ts +2 -2
- package/src/app/shared/gesture/hammer.utils.d.ts +1 -1
- package/src/app/shared/graph/graph-colors.d.ts +1 -1
- package/src/app/shared/image/gallery/image-gallery.component.d.ts +1 -1
- package/src/app/shared/material/badge/badge.directive.d.ts +1 -1
- package/src/app/shared/material/latlong/latlong.utils.d.ts +4 -4
- package/src/app/shared/rx-state/rx-state.decorators.d.ts +7 -7
- package/src/app/shared/services/entity-service.class.d.ts +3 -3
- package/src/app/shared/services/progress-bar.service.d.ts +1 -1
- package/src/app/shared/types.d.ts +18 -17
- package/src/app/shared/upload-file/upload-file.model.d.ts +1 -1
- package/src/app/shared/validator/validators.d.ts +2 -2
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { AbstractControl } from '@angular/forms';
|
|
|
2
2
|
import { filterNumberInput, selectInputContent, selectInputContentFromEvent } from '../../shared/inputs';
|
|
3
3
|
import { WaitForOptions } from '../../shared/observables';
|
|
4
4
|
import { addValueInArray, clearValueInArray, copyEntity2Form, disableAndClearControl, disableAndClearControls, disableControl, disableControls, enableControl, enableControls, filterFormErrors, filterFormErrorsByPath, filterFormErrorsByPrefix, getControlFromPath, getFormErrors, getFormValueFromEntity, logFormErrors, markAllAsTouched, markAsUntouched, removeValueInArray, resizeArray, setControlEnabled, setControlsEnabled, setFormErrors, updateValueAndValidity, waitIdle, waitWhilePending } from '../../shared/forms';
|
|
5
|
-
export
|
|
5
|
+
export type IAppFormGetter = () => IAppForm;
|
|
6
6
|
export declare interface OnReady {
|
|
7
7
|
ngOnReady(): any;
|
|
8
8
|
}
|
|
@@ -16,7 +16,7 @@ export declare interface ItemButton<T = any> {
|
|
|
16
16
|
color?: Color;
|
|
17
17
|
disabled?: Observable<boolean>;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type AppListFormOptions<T> = FormArrayHelperOptions & {
|
|
20
20
|
allowMultipleSelection?: boolean;
|
|
21
21
|
buttons?: ItemButton<T>[];
|
|
22
22
|
};
|
|
@@ -4,7 +4,7 @@ import { Property } from '../../../shared/types';
|
|
|
4
4
|
import { FileEvent } from '../../../shared/upload-file/upload-file.model';
|
|
5
5
|
import { ShowToastOptions } from '../../../shared/toast/toasts';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export
|
|
7
|
+
export type ReferentialImportPolicy = 'insert-update' | 'insert-only' | 'update-only' | 'delete-only';
|
|
8
8
|
export declare const IMPORT_POLICIES: ReferentialImportPolicy[];
|
|
9
9
|
export declare class PropertiesFileService {
|
|
10
10
|
private readonly logPrefix;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Entity } from './entity.model';
|
|
2
|
-
|
|
2
|
+
import { Constructor } from '../../../shared/types';
|
|
3
3
|
export declare class EntityClasses {
|
|
4
4
|
static CLASSES_BY_NAME: Map<string, Constructor<any>>;
|
|
5
|
-
static register(typename: string, entityClass: Constructor): void;
|
|
6
|
-
static get<T extends Entity<T>>(entityName: string): Constructor
|
|
5
|
+
static register<T>(typename: string, entityClass: Constructor<T>): void;
|
|
6
|
+
static get<T extends Entity<T>>(entityName: string): Constructor<T>;
|
|
7
7
|
static fromObject<T extends Entity<T>>(value: any, opts?: {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
typename?: string;
|
|
@@ -13,5 +13,4 @@ export declare class EntityClasses {
|
|
|
13
13
|
export declare function EntityClass(opts: {
|
|
14
14
|
typename: string;
|
|
15
15
|
fromObjectReuseStrategy?: 'default' | 'clone';
|
|
16
|
-
}): <T extends Constructor<any>>(constructor: T) => T;
|
|
17
|
-
export {};
|
|
16
|
+
}): <T extends Constructor<any> = Constructor<any>>(constructor: T) => T;
|
|
@@ -24,7 +24,7 @@ export interface IEntity<T, ID = number, AO extends EntityAsObjectOptions = Enti
|
|
|
24
24
|
asObject(opts?: AO): any;
|
|
25
25
|
fromObject(source: any, opts?: FO): void;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type OmitFunctions<T> = {
|
|
28
28
|
[K in keyof T as T[K] extends Function ? never : K]: T[K];
|
|
29
29
|
};
|
|
30
30
|
export declare abstract class Entity<T extends Entity<T, ID, AO, FO>, ID = number, AO extends EntityAsObjectOptions = EntityAsObjectOptions, FO = any> implements IEntity<T, ID, AO, FO> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ConnectionType } from '@capacitor/network';
|
|
2
2
|
export type AuthTokenType = 'token' | 'basic' | 'basic-and-token';
|
|
3
|
-
export
|
|
3
|
+
export type NetworkEventType = 'start' | 'peerChanged' | 'statusChanged' | 'resetCache' | 'beforeTryOnlineFinish';
|
|
4
4
|
export { ConnectionType };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type CapacitorPluginType = 'Camera' | 'StatusBar' | 'Keyboard' | 'BarcodeScanner';
|
|
2
2
|
export declare class CapacitorPlugins {
|
|
3
3
|
static readonly Camera = "Camera";
|
|
4
4
|
static readonly StatusBar = "StatusBar";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as momentImported from 'moment';
|
|
2
2
|
import { Duration, DurationInputArg1, DurationInputArg2, Moment, MomentFormatSpecification, MomentInput, unitOfTime } from 'moment/moment';
|
|
3
|
-
|
|
3
|
+
type MomentFn = {
|
|
4
4
|
(inp?: MomentInput, strict?: boolean): Moment;
|
|
5
5
|
(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
|
|
6
6
|
(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
|
|
@@ -2,7 +2,7 @@ import { DisplayFn, ObjectMap, Property } from '../types';
|
|
|
2
2
|
import { InjectionToken, Injector } from '@angular/core';
|
|
3
3
|
import { MatAutocompleteFieldConfig } from '../material/autocomplete/material.autocomplete.config';
|
|
4
4
|
import { UserProfileLabel } from '../../core/services/model/person.model';
|
|
5
|
-
export
|
|
5
|
+
export type FormFieldType = 'integer' | 'double' | 'boolean' | 'string' | 'enum' | 'enums' | 'color' | 'peer' | 'entity' | 'entities' | 'date' | 'dateTime';
|
|
6
6
|
export declare interface FormFieldDefinition<K = string, T = FormFieldType, E = any> {
|
|
7
7
|
key: K;
|
|
8
8
|
type: T;
|
|
@@ -39,7 +39,7 @@ export declare interface FormFieldDefinition<K = string, T = FormFieldType, E =
|
|
|
39
39
|
*/
|
|
40
40
|
deserialize?: (value: string) => E | Promise<E>;
|
|
41
41
|
}
|
|
42
|
-
export
|
|
42
|
+
export type FormFieldDefinitionMap = ObjectMap<FormFieldDefinition>;
|
|
43
43
|
export declare class FormFieldDefinitionUtils {
|
|
44
44
|
/**
|
|
45
45
|
* Prepares an array of form field definitions by using the specified injector to process each definition.
|
|
@@ -13,7 +13,7 @@ import { PredefinedColors } from '@ionic/core';
|
|
|
13
13
|
import { Swiper } from 'swiper/types';
|
|
14
14
|
import { ImageOptions } from '@capacitor/camera';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
|
-
export
|
|
16
|
+
export type GalleryMode = 'mosaic' | 'list';
|
|
17
17
|
export interface ISwiper extends Swiper {
|
|
18
18
|
activeIndex: number;
|
|
19
19
|
imagesLoaded: number;
|
|
@@ -4,7 +4,7 @@ import { AppColors } from '../../types';
|
|
|
4
4
|
import { AriaDescriber } from '@angular/cdk/a11y';
|
|
5
5
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export
|
|
7
|
+
export type MatBadgeFill = 'clear' | 'solid';
|
|
8
8
|
export declare class BadgeDirective extends MatBadge implements AfterViewInit, OnChanges, OnDestroy, OnInit {
|
|
9
9
|
protected el: ElementRef<HTMLElement>;
|
|
10
10
|
true: any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type LatLongType = 'latitude' | 'longitude';
|
|
2
|
+
export type LatLongPattern = 'DDMMSS' | 'DDMM' | 'DD';
|
|
3
3
|
export declare const LAT_LONG_PATTERNS: LatLongPattern[];
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type LatLongSign = '+' | '-';
|
|
5
|
+
export type LatLongSignValue = 1 | -1;
|
|
6
6
|
export interface ILatLongData {
|
|
7
7
|
degrees: number;
|
|
8
8
|
minutes: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ProjectValueReducer } from '@rx-angular/state';
|
|
3
|
+
import { Constructor } from '../types';
|
|
3
4
|
export declare function enableRxStateProdMode(): void;
|
|
4
|
-
type ObservablePropertyDecorator<T> = <K extends PropertyKey>(target:
|
|
5
|
-
type StatePropertyDecorator<T> = <K extends PropertyKey>(target:
|
|
5
|
+
export type ObservablePropertyDecorator<T> = <K extends PropertyKey>(target: Constructor<never>, propertyKey: K) => void;
|
|
6
|
+
export type StatePropertyDecorator<T> = <K extends PropertyKey>(target: Constructor<never>, propertyKey: K) => void;
|
|
6
7
|
/**
|
|
7
8
|
* Decorator to register the RxState property in a component
|
|
8
9
|
*/
|
|
@@ -10,24 +11,23 @@ export declare function RxStateRegister(): PropertyDecorator;
|
|
|
10
11
|
/**
|
|
11
12
|
* Decorator for RxState properties with getter/setter access
|
|
12
13
|
*/
|
|
13
|
-
export declare function RxStateProperty<T extends
|
|
14
|
+
export declare function RxStateProperty<T extends object, K extends keyof T, R extends T[K]>(statePropertyName?: string | K, projectValueReducer?: ProjectValueReducer<T, K, R>): StatePropertyDecorator<R>;
|
|
14
15
|
/**
|
|
15
16
|
* Decorator for RxState observable selectors
|
|
16
17
|
*/
|
|
17
|
-
export declare function RxStateSelect<T extends
|
|
18
|
+
export declare function RxStateSelect<T extends object, K extends keyof T, R extends T[K] = T[K]>(statePropertyName?: string | K | '$', opts?: {
|
|
18
19
|
stateName?: string;
|
|
19
20
|
}): ObservablePropertyDecorator<Observable<R>>;
|
|
20
21
|
/**
|
|
21
22
|
* Utility decorator to create computed observables from state
|
|
22
23
|
*/
|
|
23
|
-
export declare function RxStateComputed<T extends
|
|
24
|
+
export declare function RxStateComputed<T extends object, K extends keyof T, R extends T[K] = T[K]>(dependencies: K[], computeFn?: (slice: Pick<T, K>) => R, opts?: {
|
|
24
25
|
stateName?: string;
|
|
25
26
|
keyCompareMap?: any;
|
|
26
27
|
}): ObservablePropertyDecorator<Observable<R>>;
|
|
27
28
|
/**
|
|
28
29
|
* Decorator for RxState observable as output
|
|
29
30
|
*/
|
|
30
|
-
export declare function RxStateOutput<T extends
|
|
31
|
+
export declare function RxStateOutput<T extends object, K extends keyof T, R extends T[K] = T[K]>(statePropertyName?: string | K | '$', opts?: {
|
|
31
32
|
stateName?: string;
|
|
32
33
|
}): ObservablePropertyDecorator<Observable<R>>;
|
|
33
|
-
export {};
|
|
@@ -9,14 +9,14 @@ export declare interface Page {
|
|
|
9
9
|
sortBy?: string;
|
|
10
10
|
sortDirection?: SortDirection;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type FetchMoreFn<R, V = EmptyObject> = (variables?: V) => Promise<R>;
|
|
13
13
|
export declare interface LoadResult<T> {
|
|
14
14
|
data: T[];
|
|
15
15
|
total?: number;
|
|
16
16
|
errors?: any[];
|
|
17
17
|
fetchMore?: FetchMoreFn<LoadResult<T>>;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type SuggestFn<T, F> = (value: any, filter?: F, sortBy?: string | keyof T, sortDirection?: SortDirection, opts?: {
|
|
20
20
|
fetchPolicy?: FetchPolicy;
|
|
21
21
|
offset?: number;
|
|
22
22
|
size?: number;
|
|
@@ -89,7 +89,7 @@ export declare interface IEntitiesService<T, F, O extends EntitiesServiceWatchOp
|
|
|
89
89
|
deleteAll(data: T[], opts?: DO): Promise<any>;
|
|
90
90
|
asFilter(filter: Partial<F>): F;
|
|
91
91
|
}
|
|
92
|
-
export
|
|
92
|
+
export type LoadResultByPageFn<T> = (offset: number, size: number) => Promise<LoadResult<T>>;
|
|
93
93
|
export interface IEntityFullService<T, ID, F, O extends EntitiesServiceWatchOptions & EntityServiceLoadOptions> extends IEntityService<T, ID, O>, IEntitiesService<T, F, O> {
|
|
94
94
|
}
|
|
95
95
|
export declare function mergeLoadResult<T>(res1: LoadResult<T>, res2: LoadResult<T>): LoadResult<T>;
|
|
@@ -2,7 +2,7 @@ import { EventEmitter, InjectionToken } from '@angular/core';
|
|
|
2
2
|
import { ProgressBarMode } from '@angular/material/progress-bar';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare const APP_PROGRESS_BAR_SERVICE: InjectionToken<IProgressBarService>;
|
|
5
|
-
export
|
|
5
|
+
export type ProgressMode = ProgressBarMode;
|
|
6
6
|
export interface IProgressBarService {
|
|
7
7
|
onProgressChanged: EventEmitter<ProgressBarMode>;
|
|
8
8
|
list(): number;
|
|
@@ -2,12 +2,12 @@ import { ThemePalette } from '@angular/material/core';
|
|
|
2
2
|
import { PredefinedColors } from '@ionic/core';
|
|
3
3
|
import { Predicate } from '@angular/core';
|
|
4
4
|
import { FloatLabelType } from '@angular/material/form-field';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type AppFloatLabelType = FloatLabelType | 'never';
|
|
6
|
+
export type KeyType = string | number;
|
|
7
|
+
export type KeyValueType<T> = {
|
|
8
8
|
[key in KeyType]: T;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type KeysEnum<T> = {
|
|
11
11
|
[P in keyof Required<T>]: boolean;
|
|
12
12
|
};
|
|
13
13
|
export declare interface ObjectMap<T = any> {
|
|
@@ -17,29 +17,30 @@ export declare interface ObjectMapEntry<T = any> {
|
|
|
17
17
|
key: string;
|
|
18
18
|
value?: T;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type PropertyMap<T = string> = ObjectMap<T>;
|
|
21
21
|
/**
|
|
22
22
|
* Same as PropertyMap
|
|
23
23
|
* @deprecated Use PropertyMap instead
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
25
|
+
export type PropertiesMap<T = string> = PropertyMap<T>;
|
|
26
|
+
export type Property<T = string> = ObjectMapEntry<T>;
|
|
27
|
+
export type PropertiesArray = Property[];
|
|
28
|
+
export type AppColors = PredefinedColors | ThemePalette | string;
|
|
29
29
|
export declare interface IconRef {
|
|
30
30
|
icon?: string;
|
|
31
31
|
matIcon?: string;
|
|
32
32
|
matSvgIcon?: string;
|
|
33
33
|
color?: AppColors;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
35
|
+
export type FilterFn<T> = Predicate<T>;
|
|
36
|
+
export type FilterFnFactory<T, F> = (filter: F) => FilterFn<T>;
|
|
37
|
+
export type SimpleFunction<P, R> = (value: P) => R;
|
|
38
|
+
export type BiFunction<P1, P2, R> = (v1: P1, v2: P2) => R;
|
|
39
|
+
export type Constructor<T> = new (...args: any[]) => T;
|
|
39
40
|
/**
|
|
40
41
|
* @deprecated Use SimpleFunction instead
|
|
41
42
|
*/
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
43
|
+
export type Function<P, R> = SimpleFunction<P, R>;
|
|
44
|
+
export type DisplayFn<T = any> = (obj: T) => string;
|
|
45
|
+
export type EqualsFn<T = any> = (o1: T, o2: T) => boolean;
|
|
46
|
+
export type CompareFn<T = any> = (o1: T, o2: T) => number;
|
|
@@ -25,6 +25,6 @@ export declare class FileResponse<T> {
|
|
|
25
25
|
status?: number;
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export type FileEvent<T> = HttpProgressEvent | HttpResponse<T> | FileProgressEvent | FileResponse<T>;
|
|
29
29
|
export declare function isProgressEvent(event: HttpEvent<any> | FileEvent<any>): event is HttpProgressEvent | FileProgressEvent;
|
|
30
30
|
export declare function isResponseEvent<T>(event: HttpEvent<T> | FileEvent<T>): event is HttpResponse<T> | FileResponse<T>;
|
|
@@ -107,8 +107,8 @@ export declare class SharedFormArrayValidators {
|
|
|
107
107
|
*/
|
|
108
108
|
static validSumMaxValue(controlName: string, max: number): ValidatorFn;
|
|
109
109
|
}
|
|
110
|
-
export
|
|
111
|
-
export
|
|
110
|
+
export type ObservableValidatorFn = (control: AbstractControl) => Observable<ValidationErrors | null>;
|
|
111
|
+
export type PromiseValidatorFn = (control: AbstractControl) => Promise<ValidationErrors | null>;
|
|
112
112
|
export declare class SharedAsyncValidators {
|
|
113
113
|
private static DEBOUNCE_TIME_VALIDATOR_ID;
|
|
114
114
|
/**
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "18.18.
|
|
5
|
+
"version": "18.18.33",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|