@sumaris-net/ngx-components 18.18.32 → 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.
Files changed (47) hide show
  1. package/doc/changelog.md +4 -0
  2. package/esm2022/src/app/core/form/form.utils.mjs +1 -1
  3. package/esm2022/src/app/core/form/list/list.form.mjs +1 -1
  4. package/esm2022/src/app/core/form/properties/properties-file.service.mjs +1 -1
  5. package/esm2022/src/app/core/services/config/core.config.mjs +1 -1
  6. package/esm2022/src/app/core/services/model/entity.decorators.mjs +1 -1
  7. package/esm2022/src/app/core/services/model/entity.model.mjs +1 -1
  8. package/esm2022/src/app/core/services/model/model.enum.mjs +2 -2
  9. package/esm2022/src/app/core/services/network.types.mjs +1 -1
  10. package/esm2022/src/app/shared/capacitor/plugins.mjs +1 -1
  11. package/esm2022/src/app/shared/dates.mjs +1 -1
  12. package/esm2022/src/app/shared/form/field.model.mjs +1 -1
  13. package/esm2022/src/app/shared/gesture/hammer.utils.mjs +1 -1
  14. package/esm2022/src/app/shared/graph/graph-colors.mjs +1 -1
  15. package/esm2022/src/app/shared/image/gallery/image-gallery.component.mjs +1 -1
  16. package/esm2022/src/app/shared/material/badge/badge.directive.mjs +1 -1
  17. package/esm2022/src/app/shared/material/latlong/latlong.utils.mjs +1 -1
  18. package/esm2022/src/app/shared/rx-state/rx-state.decorators.mjs +11 -10
  19. package/esm2022/src/app/shared/services/entity-service.class.mjs +1 -1
  20. package/esm2022/src/app/shared/services/progress-bar.service.mjs +1 -1
  21. package/esm2022/src/app/shared/types.mjs +1 -1
  22. package/esm2022/src/app/shared/upload-file/upload-file.model.mjs +1 -1
  23. package/esm2022/src/app/shared/validator/validators.mjs +1 -1
  24. package/fesm2022/sumaris-net.ngx-components.mjs +11 -10
  25. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/src/app/core/form/form.utils.d.ts +1 -1
  28. package/src/app/core/form/list/list.form.d.ts +1 -1
  29. package/src/app/core/form/properties/properties-file.service.d.ts +1 -1
  30. package/src/app/core/services/model/entity.decorators.d.ts +4 -5
  31. package/src/app/core/services/model/entity.model.d.ts +1 -1
  32. package/src/app/core/services/network.types.d.ts +1 -1
  33. package/src/app/shared/capacitor/plugins.d.ts +1 -1
  34. package/src/app/shared/dates.d.ts +1 -1
  35. package/src/app/shared/form/field.model.d.ts +2 -2
  36. package/src/app/shared/gesture/hammer.utils.d.ts +1 -1
  37. package/src/app/shared/graph/graph-colors.d.ts +1 -1
  38. package/src/app/shared/image/gallery/image-gallery.component.d.ts +1 -1
  39. package/src/app/shared/material/badge/badge.directive.d.ts +1 -1
  40. package/src/app/shared/material/latlong/latlong.utils.d.ts +4 -4
  41. package/src/app/shared/rx-state/rx-state.decorators.d.ts +3 -3
  42. package/src/app/shared/services/entity-service.class.d.ts +3 -3
  43. package/src/app/shared/services/progress-bar.service.d.ts +1 -1
  44. package/src/app/shared/types.d.ts +18 -17
  45. package/src/app/shared/upload-file/upload-file.model.d.ts +1 -1
  46. package/src/app/shared/validator/validators.d.ts +2 -2
  47. package/src/assets/manifest.json +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "18.18.32",
4
+ "version": "18.18.33",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -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 declare type IAppFormGetter = () => IAppForm;
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 declare type AppListFormOptions<T> = FormArrayHelperOptions & {
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 declare type ReferentialImportPolicy = 'insert-update' | 'insert-only' | 'update-only' | 'delete-only';
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
- declare type Constructor<T = any> = new (...args: any[]) => T;
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 declare type OmitFunctions<T> = {
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 declare type NetworkEventType = 'start' | 'peerChanged' | 'statusChanged' | 'resetCache' | 'beforeTryOnlineFinish';
3
+ export type NetworkEventType = 'start' | 'peerChanged' | 'statusChanged' | 'resetCache' | 'beforeTryOnlineFinish';
4
4
  export { ConnectionType };
@@ -1,4 +1,4 @@
1
- export declare type CapacitorPluginType = 'Camera' | 'StatusBar' | 'Keyboard' | 'BarcodeScanner';
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
- declare type MomentFn = {
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 declare type FormFieldType = 'integer' | 'double' | 'boolean' | 'string' | 'enum' | 'enums' | 'color' | 'peer' | 'entity' | 'entities' | 'date' | 'dateTime';
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 declare type FormFieldDefinitionMap = ObjectMap<FormFieldDefinition>;
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.
@@ -1,4 +1,4 @@
1
- export declare type HammerSwipeAction = 'swipeleft' | 'swiperight';
1
+ export type HammerSwipeAction = 'swipeleft' | 'swiperight';
2
2
  export declare interface HammerSwipeEvent extends Event {
3
3
  type: HammerSwipeAction;
4
4
  pointerType?: 'touch' | any;
@@ -1,5 +1,5 @@
1
1
  import { PredefinedColors } from '@ionic/core';
2
- export declare type ColorName = PredefinedColors | 'white' | 'red' | 'green' | 'blue';
2
+ export type ColorName = PredefinedColors | 'white' | 'red' | 'green' | 'blue';
3
3
  /**
4
4
  * Useful class for color conversion
5
5
  */
@@ -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 declare type GalleryMode = 'mosaic' | 'list';
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 declare type MatBadgeFill = 'clear' | 'solid';
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 declare type LatLongType = 'latitude' | 'longitude';
2
- export declare type LatLongPattern = 'DDMMSS' | 'DDMM' | 'DD';
1
+ export type LatLongType = 'latitude' | 'longitude';
2
+ export type LatLongPattern = 'DDMMSS' | 'DDMM' | 'DD';
3
3
  export declare const LAT_LONG_PATTERNS: LatLongPattern[];
4
- export declare type LatLongSign = '+' | '-';
5
- export declare type LatLongSignValue = 1 | -1;
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: any, propertyKey: K) => void;
5
- type StatePropertyDecorator<T> = <K extends PropertyKey>(target: any, propertyKey: K) => void;
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
  */
@@ -30,4 +31,3 @@ export declare function RxStateComputed<T extends object, K extends keyof T, R e
30
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 declare type FetchMoreFn<R, V = EmptyObject> = (variables?: V) => Promise<R>;
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 declare type SuggestFn<T, F> = (value: any, filter?: F, sortBy?: string | keyof T, sortDirection?: SortDirection, opts?: {
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 declare type LoadResultByPageFn<T> = (offset: number, size: number) => Promise<LoadResult<T>>;
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 declare type ProgressMode = ProgressBarMode;
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 declare type AppFloatLabelType = FloatLabelType | 'never';
6
- export declare type KeyType = string | number;
7
- export declare type KeyValueType<T> = {
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 declare type KeysEnum<T> = {
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 declare type PropertyMap<T = string> = ObjectMap<T>;
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 declare type PropertiesMap<T = string> = PropertyMap<T>;
26
- export declare type Property<T = string> = ObjectMapEntry<T>;
27
- export declare type PropertiesArray = Property[];
28
- export declare type AppColors = PredefinedColors | ThemePalette | string;
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 declare type FilterFn<T> = Predicate<T>;
36
- export declare type FilterFnFactory<T, F> = (filter: F) => FilterFn<T>;
37
- export declare type SimpleFunction<P, R> = (value: P) => R;
38
- export declare type BiFunction<P1, P2, R> = (v1: P1, v2: P2) => R;
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 declare type Function<P, R> = SimpleFunction<P, R>;
43
- export declare type DisplayFn<T = any> = (obj: T) => string;
44
- export declare type EqualsFn<T = any> = (o1: T, o2: T) => boolean;
45
- export declare type CompareFn<T = any> = (o1: T, o2: T) => number;
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 declare type FileEvent<T> = HttpProgressEvent | HttpResponse<T> | FileProgressEvent | FileResponse<T>;
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 declare type ObservableValidatorFn = (control: AbstractControl) => Observable<ValidationErrors | null>;
111
- export declare type PromiseValidatorFn = (control: AbstractControl) => Promise<ValidationErrors | null>;
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
  /**
@@ -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.32",
5
+ "version": "18.18.33",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{