@sumaris-net/ngx-components 2.9.0-alpha1 → 2.9.0-alpha3

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 (63) hide show
  1. package/doc/changelog.md +3 -0
  2. package/esm2022/src/app/core/account/account.page.mjs +2 -1
  3. package/esm2022/src/app/core/auth/auth.form.mjs +2 -1
  4. package/esm2022/src/app/core/form/entity/entity-editor-modal.class.mjs +2 -1
  5. package/esm2022/src/app/core/form/entity/entity-editor.class.mjs +2 -1
  6. package/esm2022/src/app/core/form/entity/tab-editor.class.mjs +2 -1
  7. package/esm2022/src/app/core/form/form.class.mjs +4 -4
  8. package/esm2022/src/app/core/form/text-popover/text-popover.component.mjs +2 -1
  9. package/esm2022/src/app/core/home/home.mjs +4 -3
  10. package/esm2022/src/app/core/menu/menu.component.mjs +2 -1
  11. package/esm2022/src/app/core/menu/menu.service.mjs +2 -1
  12. package/esm2022/src/app/core/peer/select-peer.modal.mjs +26 -15
  13. package/esm2022/src/app/core/register/register.form.mjs +3 -3
  14. package/esm2022/src/app/core/services/config.service.mjs +2 -1
  15. package/esm2022/src/app/core/services/network.service.mjs +2 -1
  16. package/esm2022/src/app/core/services/platform.service.mjs +4 -3
  17. package/esm2022/src/app/core/settings/settings.page.mjs +5 -2
  18. package/esm2022/src/app/core/table/async-table.class.mjs +4 -3
  19. package/esm2022/src/app/core/table/entities-table-datasource.class.mjs +2 -1
  20. package/esm2022/src/app/core/table/table.class.mjs +4 -3
  21. package/esm2022/src/app/shared/form/field.component.mjs +2 -1
  22. package/esm2022/src/app/shared/functions.mjs +2 -1
  23. package/esm2022/src/app/shared/image/gallery/image-gallery.component.mjs +2 -1
  24. package/esm2022/src/app/shared/material/autocomplete/material.autocomplete.mjs +19 -12
  25. package/esm2022/src/app/shared/material/autocomplete/material.autocomplete.module.mjs +6 -3
  26. package/esm2022/src/app/shared/material/boolean/material.boolean.mjs +2 -1
  27. package/esm2022/src/app/shared/material/datetime/material.date.mjs +2 -1
  28. package/esm2022/src/app/shared/material/datetime/material.dateshort.mjs +2 -1
  29. package/esm2022/src/app/shared/material/datetime/material.datetime.mjs +9 -8
  30. package/esm2022/src/app/shared/material/duration/material.duration.mjs +2 -1
  31. package/esm2022/src/app/shared/material/latlong/material.latlong.mjs +2 -1
  32. package/esm2022/src/app/shared/material/latlong/testing/latlong.test.mjs +2 -1
  33. package/esm2022/src/app/shared/material/swipe/material.swipe.mjs +2 -1
  34. package/esm2022/src/app/shared/pipes/form.pipes.mjs +39 -14
  35. package/esm2022/src/app/shared/pipes/pipes.module.mjs +6 -3
  36. package/esm2022/src/app/shared/toolbar/toolbar.mjs +2 -1
  37. package/esm2022/src/app/shared/upload-file/testing/upload-file.testing.mjs +2 -1
  38. package/esm2022/src/app/shared/validator/form-error-adapter.class.mjs +6 -6
  39. package/esm2022/src/app/shared/validator/validators.mjs +6 -8
  40. package/esm2022/src/app/social/job/progression/job-progression.icon.mjs +2 -1
  41. package/esm2022/src/app/social/message/message.modal.mjs +2 -1
  42. package/esm2022/src/environments/environment.class.mjs +3 -1
  43. package/fesm2022/sumaris-net.ngx-components.mjs +202 -153
  44. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  45. package/package.json +4 -4
  46. package/src/app/core/form/form.class.d.ts +3 -3
  47. package/src/app/core/peer/select-peer.modal.d.ts +13 -7
  48. package/src/app/core/table/async-table.class.d.ts +3 -3
  49. package/src/app/core/table/table.class.d.ts +3 -3
  50. package/src/app/shared/material/autocomplete/material.autocomplete.module.d.ts +1 -1
  51. package/src/app/shared/pipes/form.pipes.d.ts +15 -5
  52. package/src/app/shared/pipes/pipes.module.d.ts +1 -1
  53. package/src/app/shared/validator/form-error-adapter.class.d.ts +5 -5
  54. package/src/app/shared/validator/validators.d.ts +1 -5
  55. package/src/assets/manifest.json +1 -1
  56. package/src/environments/environment.class.d.ts +1 -0
  57. package/src/theme/_functions.scss +15 -0
  58. package/src/theme/_mixins.scss +28 -12
  59. package/src/theme/_ngx-components.forms.scss +18 -0
  60. package/src/theme/_ngx-components.globals.scss +1 -0
  61. package/src/theme/_ngx-components.scss +4 -4
  62. package/src/theme/_ngx-components.table.scss +5 -2
  63. package/src/theme/_theme.variables.scss +94 -72
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": "2.9.0-alpha1",
4
+ "version": "2.9.0-alpha3",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -19,9 +19,9 @@
19
19
  "@noble/ed25519": "^1.7.3",
20
20
  "@polkadot/util": "~12.6.2",
21
21
  "@polkadot/util-crypto": "~12.6.2",
22
- "@rx-angular/cdk": "~17.0.1",
23
- "@rx-angular/state": "~17.0.1",
24
- "@rx-angular/template": "~17.1.0",
22
+ "@rx-angular/cdk": "~17.1.0",
23
+ "@rx-angular/state": "~17.2.0",
24
+ "@rx-angular/template": "~17.3.1",
25
25
  "clone": "~2.1.2",
26
26
  "@maskito/angular": "~2.0.2",
27
27
  "@maskito/core": "~2.0.2",
@@ -4,11 +4,11 @@ import { BehaviorSubject, Subject, Subscription } from 'rxjs';
4
4
  import { IAppForm } from './form.utils';
5
5
  import { LocalSettingsService } from '../services/local-settings.service';
6
6
  import { WaitForOptions } from '../../shared/observables';
7
- import { FormErrorTranslator, FormErrorTranslatorOptions, IFormControlPathTranslator } from '../../shared/validator/form-error-adapter.class';
7
+ import { FormErrorTranslator, FormErrorTranslatorOptions, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
8
8
  import { TranslateService } from '@ngx-translate/core';
9
9
  import { MatAutocompleteConfigHolder, MatAutocompleteFieldAddOptions, MatAutocompleteFieldConfig } from '../../shared/material/autocomplete/material.autocomplete.config';
10
10
  import * as i0 from "@angular/core";
11
- export declare class AppForm<T> implements IAppForm<T>, OnInit, OnDestroy, IFormControlPathTranslator {
11
+ export declare class AppForm<T> implements IAppForm<T>, OnInit, OnDestroy, IFormPathTranslator {
12
12
  private _subscription;
13
13
  protected _form: UntypedFormGroup;
14
14
  protected _enabled: boolean;
@@ -131,7 +131,7 @@ export declare class AppForm<T> implements IAppForm<T>, OnInit, OnDestroy, IForm
131
131
  onlySelf?: boolean;
132
132
  emitEvent?: boolean;
133
133
  }): void;
134
- translateControlPath(path: string): any;
134
+ translateFormPath(path: string): any;
135
135
  protected getFormError(form: UntypedFormGroup, opts?: FormErrorTranslatorOptions): string;
136
136
  protected getI18nFieldName(path: string): string;
137
137
  protected registerSubscription(sub: Subscription): void;
@@ -13,6 +13,7 @@ export interface ISelectPeerModalOptions {
13
13
  allowSelectDownPeer: boolean;
14
14
  onRefresh: EventEmitter<Event>;
15
15
  showSetManuallyButton: boolean;
16
+ selectedPeer?: string;
16
17
  }
17
18
  export declare class SelectPeerModal implements OnDestroy, ISelectPeerModalOptions {
18
19
  private modalCtrl;
@@ -24,14 +25,16 @@ export declare class SelectPeerModal implements OnDestroy, ISelectPeerModalOptio
24
25
  protected loggingService?: ILoggingService;
25
26
  private _subscription;
26
27
  private readonly _logger;
27
- loading: boolean;
28
- mobile: boolean;
29
- $peers: Subject<Peer[]>;
30
- peerMinVersion: string;
28
+ protected loading: boolean;
29
+ protected mobile: boolean;
30
+ protected $peers: Subject<Peer[]>;
31
+ protected peerMinVersion: string;
32
+ protected peerDefaultPrefix: string;
33
+ selectedPeer: string;
31
34
  canCancel: boolean;
32
35
  allowSelectDownPeer: boolean;
33
- onRefresh: EventEmitter<Event>;
34
36
  showSetManuallyButton: boolean;
37
+ onRefresh: EventEmitter<Event>;
35
38
  constructor(modalCtrl: ModalController, popoverController: PopoverController, translate: TranslateService, http: HttpClient, cd: ChangeDetectorRef, environment: Environment, loggingService?: ILoggingService);
36
39
  set peers(peers: Observable<Peer[]>);
37
40
  cancel(): void;
@@ -43,12 +46,15 @@ export declare class SelectPeerModal implements OnDestroy, ISelectPeerModalOptio
43
46
  * @param peer
44
47
  */
45
48
  isCompatible(peer: Peer): boolean;
46
- refresh(event: any): void;
49
+ refresh(event: Event): void;
47
50
  clickSetManually(event?: Event): Promise<void>;
48
51
  refreshPeers(peers: Peer[]): Promise<void>;
49
52
  protected refreshPeer(peer: Peer): Promise<Peer>;
50
53
  protected openPeerUrlPopover(event: Event, opts?: Partial<TextPopoverOptions>): Promise<any>;
51
54
  protected markForCheck(): void;
52
55
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectPeerModal, [null, null, null, null, null, null, { optional: true; }]>;
53
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectPeerModal, "select-peer-modal", never, { "canCancel": { "alias": "canCancel"; "required": false; }; "allowSelectDownPeer": { "alias": "allowSelectDownPeer"; "required": false; }; "onRefresh": { "alias": "onRefresh"; "required": false; }; "showSetManuallyButton": { "alias": "showSetManuallyButton"; "required": false; }; }, {}, never, never, false, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectPeerModal, "select-peer-modal", never, { "selectedPeer": { "alias": "selectedPeer"; "required": false; }; "canCancel": { "alias": "canCancel"; "required": false; }; "allowSelectDownPeer": { "alias": "allowSelectDownPeer"; "required": false; }; "showSetManuallyButton": { "alias": "showSetManuallyButton"; "required": false; }; "onRefresh": { "alias": "onRefresh"; "required": false; }; }, {}, never, never, false, never>;
57
+ static ngAcceptInputType_canCancel: unknown;
58
+ static ngAcceptInputType_allowSelectDownPeer: unknown;
59
+ static ngAcceptInputType_showSetManuallyButton: unknown;
54
60
  }
@@ -18,12 +18,12 @@ import { WaitForOptions } from '../../shared/observables';
18
18
  import { ShowToastOptions } from '../../shared/toast/toasts';
19
19
  import { CdkColumnDef } from '@angular/cdk/table';
20
20
  import { LoadResult } from '../../shared/services/entity-service.class';
21
- import { FormErrorTranslator, FormErrorTranslatorOptions, IFormControlPathTranslator } from '../../shared/validator/form-error-adapter.class';
21
+ import { FormErrorTranslator, FormErrorTranslatorOptions, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
22
22
  import { SaveActionType } from './table.model';
23
23
  import { AsyncTableElement } from '@e-is/ngx-material-table';
24
24
  import { EntitiesAsyncTableDataSource } from './entities-async-table-datasource.class';
25
25
  import * as i0 from "@angular/core";
26
- export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm, CanSave, IFormControlPathTranslator {
26
+ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm, CanSave, IFormPathTranslator {
27
27
  protected columns: string[];
28
28
  protected _dataSource?: EntitiesAsyncTableDataSource<T, F, ID>;
29
29
  private _filter?;
@@ -275,7 +275,7 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
275
275
  doRefresh(event?: CompletableEvent): void;
276
276
  getCurrentColumns(): ColumnItem[];
277
277
  escapeEditingRow(event?: Event, row?: AsyncTableElement<T>): Promise<void>;
278
- translateControlPath(path: string): string;
278
+ translateFormPath(path: string): string;
279
279
  protected editRow(event: Event | undefined, row: AsyncTableElement<T>, opts?: {
280
280
  focusColumn?: string;
281
281
  }): Promise<boolean>;
@@ -18,12 +18,12 @@ import { WaitForOptions } from '../../shared/observables';
18
18
  import { ShowToastOptions } from '../../shared/toast/toasts';
19
19
  import { CdkColumnDef } from '@angular/cdk/table';
20
20
  import { LoadResult } from '../../shared/services/entity-service.class';
21
- import { FormErrorTranslator, FormErrorTranslatorOptions, IFormControlPathTranslator } from '../../shared/validator/form-error-adapter.class';
21
+ import { FormErrorTranslator, FormErrorTranslatorOptions, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
22
22
  import { SaveActionType } from './table.model';
23
23
  import { MatPaginator } from '@angular/material/paginator';
24
24
  import { MatTable } from '@angular/material/table';
25
25
  import * as i0 from "@angular/core";
26
- export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm, CanSave, IFormControlPathTranslator {
26
+ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm, CanSave, IFormPathTranslator {
27
27
  protected columns: string[];
28
28
  protected _dataSource?: EntitiesTableDataSource<T, F, ID>;
29
29
  private _filter?;
@@ -281,7 +281,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
281
281
  doRefresh(event?: CompletableEvent): void;
282
282
  getCurrentColumns(): ColumnItem[];
283
283
  escapeEditingRow(event?: Event, row?: TableElement<T>): void;
284
- translateControlPath(path: string): string;
284
+ translateFormPath(path: string): string;
285
285
  protected editRow(event: Event | undefined, row: TableElement<T>, opts?: {
286
286
  focusColumn?: string;
287
287
  }): boolean;
@@ -17,6 +17,6 @@ import * as i15 from "@angular/material/select";
17
17
  import * as i16 from "@ngx-translate/core";
18
18
  export declare class SharedMatAutocompleteModule {
19
19
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedMatAutocompleteModule, never>;
20
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatAutocompleteModule, [typeof i1.MatAutocompleteField], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.ScrollingModule, typeof i5.ReactiveFormsModule, typeof i6.SharedPipesModule, typeof i7.SharedDirectivesModule, typeof i8.RxStateModule, typeof i9.MatCommonModule, typeof i10.MatAutocompleteModule, typeof i11.MatFormFieldModule, typeof i12.MatInputModule, typeof i13.MatIconModule, typeof i14.MatButtonModule, typeof i15.MatSelectModule, typeof i16.TranslateModule], [typeof i10.MatAutocompleteModule, typeof i1.MatAutocompleteField]>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatAutocompleteModule, [typeof i1.MatAutocompleteField], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.ScrollingModule, typeof i5.ReactiveFormsModule, typeof i6.SharedPipesModule, typeof i7.SharedDirectivesModule, typeof i8.RxStateModule, typeof i9.MatCommonModule, typeof i10.MatAutocompleteModule, typeof i11.MatFormFieldModule, typeof i12.MatInputModule, typeof i13.MatIconModule, typeof i14.MatButtonModule, typeof i15.MatSelectModule, typeof i9.MatRippleModule, typeof i16.TranslateModule], [typeof i10.MatAutocompleteModule, typeof i1.MatAutocompleteField]>;
21
21
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedMatAutocompleteModule>;
22
22
  }
@@ -2,14 +2,14 @@ import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
2
2
  import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
3
3
  import { FormErrorTranslator, FormErrorTranslatorOptions } from '../validator/form-error-adapter.class';
4
4
  import * as i0 from "@angular/core";
5
- export declare class FormErrorTranslatePipe implements PipeTransform, OnDestroy {
6
- private adapter;
5
+ export declare class FormErrorPipe implements PipeTransform, OnDestroy {
6
+ private service;
7
7
  private _ref;
8
- value: string;
8
+ private _value;
9
9
  private _lastForm;
10
10
  private _lastOptions;
11
11
  private _onFormStatusChanges;
12
- constructor(adapter: FormErrorTranslator, _ref: ChangeDetectorRef);
12
+ constructor(service: FormErrorTranslator, _ref: ChangeDetectorRef);
13
13
  transform(form: UntypedFormGroup, opts?: FormErrorTranslatorOptions): string;
14
14
  ngOnDestroy(): void;
15
15
  private _updateValue;
@@ -17,6 +17,16 @@ export declare class FormErrorTranslatePipe implements PipeTransform, OnDestroy
17
17
  * Clean any existing subscription to change events
18
18
  */
19
19
  private _dispose;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorPipe, never>;
21
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormErrorPipe, "formError", false>;
22
+ }
23
+ /**
24
+ * Same a FormErrorPipe
25
+ * @deprecated
26
+ */
27
+ export declare class FormErrorTranslatePipe extends FormErrorPipe {
28
+ constructor(service: FormErrorTranslator, _ref: ChangeDetectorRef);
29
+ transform(form: UntypedFormGroup, opts?: FormErrorTranslatorOptions): string;
20
30
  static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorTranslatePipe, never>;
21
31
  static ɵpipe: i0.ɵɵPipeDeclaration<FormErrorTranslatePipe, "translateFormError", false>;
22
32
  }
@@ -48,7 +58,7 @@ export declare class FormGetValuePipe implements PipeTransform, OnDestroy {
48
58
  private _onControlValueChanges;
49
59
  private _onControlStatusChanges;
50
60
  constructor(_ref: ChangeDetectorRef);
51
- transform(form: AbstractControl, path?: Array<string | number> | string, listenStatusChanges?: boolean): any;
61
+ transform<T = any>(form: AbstractControl, path?: Array<string | number> | string, listenStatusChanges?: boolean): T;
52
62
  ngOnDestroy(): void;
53
63
  /**
54
64
  * Clean any existing subscription to change events
@@ -25,6 +25,6 @@ import * as i23 from "@ionic/angular";
25
25
  import * as i24 from "@ngx-translate/core";
26
26
  export declare class SharedPipesModule {
27
27
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedPipesModule, never>;
28
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i1.BooleanFormatPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe], [typeof i22.CommonModule, typeof i23.IonicModule, typeof i24.TranslateModule], [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i1.BooleanFormatPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe]>;
28
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i1.BooleanFormatPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorPipe, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe], [typeof i22.CommonModule, typeof i23.IonicModule, typeof i24.TranslateModule], [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i1.BooleanFormatPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorPipe, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe]>;
29
29
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedPipesModule>;
30
30
  }
@@ -5,22 +5,22 @@ import { ObjectMap } from '../types';
5
5
  import { FormErrors } from '../forms';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare const APP_FORM_ERROR_I18N_KEYS: InjectionToken<ObjectMap<string>>;
8
- export interface IFormControlPathTranslator {
9
- translateControlPath: (controlPath: string) => string;
8
+ export interface IFormPathTranslator {
9
+ translateFormPath: (path: string) => string;
10
10
  }
11
11
  export interface FormErrorTranslatorOptions {
12
12
  i18nPrefix?: string;
13
- controlPathTranslator?: IFormControlPathTranslator;
13
+ pathTranslator?: IFormPathTranslator;
14
14
  separator?: string;
15
15
  recursive?: boolean;
16
16
  }
17
- export declare class FormErrorTranslator implements IFormControlPathTranslator {
17
+ export declare class FormErrorTranslator implements IFormPathTranslator {
18
18
  private translate;
19
19
  private readonly errorI18nKeys;
20
20
  constructor(translate: TranslateService, errorI18nKeys: ObjectMap<string>);
21
21
  translateFormErrors(control: AbstractControl, opts?: FormErrorTranslatorOptions): string;
22
22
  translateErrors(errors: FormErrors, opts?: FormErrorTranslatorOptions): string;
23
- translateControlPath(path: string, opts?: FormErrorTranslatorOptions): string;
23
+ translateFormPath(path: string, opts?: FormErrorTranslatorOptions): string;
24
24
  translateError(errorKey: string, errorContent?: any): any;
25
25
  static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorTranslator, [null, { optional: true; }]>;
26
26
  static ɵprov: i0.ɵɵInjectableDeclaration<FormErrorTranslator>;
@@ -18,7 +18,7 @@ export declare class SharedValidators {
18
18
  dateMinDuration: string;
19
19
  dateMaxDuration: string;
20
20
  maxDecimals: string;
21
- double: string;
21
+ decimal: string;
22
22
  integer: string;
23
23
  precision: string;
24
24
  email: string;
@@ -35,10 +35,6 @@ export declare class SharedValidators {
35
35
  static empty(control: UntypedFormControl): ValidationErrors | null;
36
36
  static pubkey(control: UntypedFormControl): ValidationErrors | null;
37
37
  static integer(control: UntypedFormControl): ValidationErrors | null;
38
- /**
39
- * @deprecated use decimal
40
- */
41
- static double: typeof SharedValidators.decimal;
42
38
  static decimal(opts?: {
43
39
  maxDecimals?: number;
44
40
  }): ValidatorFn;
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "2.9.0-alpha1",
5
+ "version": "2.9.0-alpha3",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -31,6 +31,7 @@ export declare class Environment {
31
31
  path?: string;
32
32
  }[];
33
33
  peerMinVersion?: string;
34
+ peerDefaultPrefix?: string;
34
35
  checkAppVersionIntervalInSeconds?: number;
35
36
  persistCache?: boolean;
36
37
  offline?: boolean;
@@ -5,3 +5,18 @@
5
5
  $remSize: $size / 16px;
6
6
  @return $remSize * 1rem;
7
7
  }
8
+
9
+ @function get-color-contrast($color, $bw: false) {
10
+ $lightness: lightness($color);
11
+
12
+ @if $bw == true {
13
+ @if $lightness > 50% {
14
+ @return #000000; // retourne noir si la couleur est claire
15
+ } @else {
16
+ @return #ffffff; // retourne blanc si la couleur est foncée
17
+ }
18
+ }
19
+ @else {
20
+ @return invert($color); // retourne la couleur inversée si bw n'est pas true
21
+ }
22
+ }
@@ -44,18 +44,12 @@
44
44
  $contrast: map-get($value, contrast);
45
45
  $shade: map-get($value, shade);
46
46
  $tint: map-get($value, tint);
47
- --ion-color-base: var(--ion-color-#{""+$color-name},
48
- #{$base}) !important;
49
- --ion-color-base-rgb: var(--ion-color-#{""+$color-name}-rgb,
50
- #{color-to-rgb-list($base)}) !important;
51
- --ion-color-contrast: var(--ion-color-#{""+$color-name}-contrast,
52
- #{$contrast}) !important;
53
- --ion-color-contrast-rgb: var(--ion-color-#{""+$color-name}-contrast-rgb,
54
- #{color-to-rgb-list($contrast)}) !important;
55
- --ion-color-shade: var(--ion-color-#{""+$color-name}-shade,
56
- #{$shade}) !important;
57
- --ion-color-tint: var(--ion-color-#{""+$color-name}-tint,
58
- #{$tint}) !important;
47
+ --ion-color-base: var(--ion-color-#{""+$color-name}, #{$base}) !important;
48
+ --ion-color-base-rgb: var(--ion-color-#{""+$color-name}-rgb, #{color-to-rgb-list($base)}) !important;
49
+ --ion-color-contrast: var(--ion-color-#{""+$color-name}-contrast, #{$contrast}) !important;
50
+ --ion-color-contrast-rgb: var(--ion-color-#{""+$color-name}-contrast-rgb, #{color-to-rgb-list($contrast)}) !important;
51
+ --ion-color-shade: var(--ion-color-#{""+$color-name}-shade, #{$shade}) !important;
52
+ --ion-color-tint: var(--ion-color-#{""+$color-name}-tint, #{$tint}) !important;
59
53
  }
60
54
 
61
55
  @mixin generate-color-list($color-name) {
@@ -72,6 +66,20 @@
72
66
  --ion-color-#{""+$color-name}-tint: #{$tint};
73
67
  }
74
68
 
69
+ @mixin generate-dark-color-list($color-name) {
70
+ $value: map-get($colors, $color-name);
71
+ $base: mix(map-get($value, base), #000, 50%);
72
+ $contrast: get-color-contrast($base, true);
73
+ $shade: lighten($base, 10%);
74
+ $tint: darken($base, 12%);
75
+ --ion-color-#{""+$color-name} : #{$base};
76
+ --ion-color-#{""+$color-name}-rgb: #{color-to-rgb-list($base)};
77
+ --ion-color-#{""+$color-name}-contrast: #{$contrast};
78
+ --ion-color-#{""+$color-name}-contrast-rgb: #{color-to-rgb-list($contrast)};
79
+ --ion-color-#{""+$color-name}-shade: #{$shade};
80
+ --ion-color-#{""+$color-name}-tint: #{$tint};
81
+ }
82
+
75
83
  @mixin set-color-each-ion-colors($element-name) {
76
84
 
77
85
  @each $color-name, $value in $colors {
@@ -125,6 +133,7 @@
125
133
  --app-form-color-computed: #{$app-form-color-computed};
126
134
  --app-form-field-background-color: #{$app-form-field-background-color};
127
135
  --app-form-field-disabled-background-color: #{$app-form-field-disabled-background-color};
136
+ --app-form-field-label-color: #{$app-form-field-label-color};
128
137
  --app-table-row-item-selected-background-color: #{$app-table-row-item-selected-background-color};
129
138
  --app-table-row-item-selected-text-color: #{$app-table-row-item-selected-text-color};
130
139
  }
@@ -136,3 +145,10 @@
136
145
  --app-form-buttons-bar-height: 0px;
137
146
  --app-footer-height: 0px;
138
147
  }
148
+
149
+ @mixin css-variables-to-root-dark() {
150
+ @each $color-name,
151
+ $value in $colors {
152
+ @include generate-dark-color-list($color-name);
153
+ }
154
+ }
@@ -10,6 +10,10 @@ form.form-container {
10
10
 
11
11
  --mdc-filled-text-field-container-color: var(--app-form-field-background-color);
12
12
  --mdc-filled-text-field-disabled-container-color: var(--app-form-field-disabled-background-color);
13
+ --mdc-filled-text-field-input-text-color: var(--app-form-color);
14
+ --mdc-filled-text-field-caret-color: var(--app-form-color);
15
+ --mdc-filled-text-field-label-text-color: var(--app-form-field-label-color);
16
+ --mdc-filled-text-field-hover-label-text-color: var(--app-form-field-label-color);
13
17
  --mat-form-field-state-layer-color: var(--app-form-field-focus-background-color);
14
18
  --mat-form-field-container-height: 45px;
15
19
  --mat-form-field-container-text-size: inherit;
@@ -19,6 +23,7 @@ form.form-container {
19
23
  --mat-form-field-filled-with-label-container-padding-bottom: 0px;
20
24
  --mdc-filled-text-field-label-text-tracking: normal;
21
25
  --mat-select-trigger-text-size: var(--mat-form-field-container-text-size);
26
+ --mat-select-enabled-trigger-text-color: var(--app-form-color);
22
27
 
23
28
  .mat-form-field-disabled,
24
29
  .mat-mdc-input-element:disabled {
@@ -203,3 +208,16 @@ ion-grid.form-container {
203
208
  }
204
209
  }
205
210
  }
211
+
212
+ // TODO: activer ce code et tester les mat-select en dark mode
213
+ //html {
214
+ // div.mat-mdc-select-panel {
215
+ // --mat-select-panel-background-color: var(--ion-color-light);
216
+ //
217
+ // .mat-mdc-option {
218
+ // --mat-option-label-text-color: var(--ion-color);
219
+ // --mat-option-selected-state-label-text-color: var(--ion-color-primary);
220
+ // color: var(--mat-option-label-text-color) !important;
221
+ // }
222
+ // }
223
+ //}
@@ -14,6 +14,7 @@ $app-form-color-disabled: rgba(0, 0, 0, 0.55) !default;
14
14
  $app-form-color-computed: var(--ion-color-primary-tint) !default;
15
15
  $app-form-field-background-color: #f5f5f5 !default; // Form's field background
16
16
  $app-form-field-disabled-background-color: #fafafa !default;
17
+ $app-form-field-label-color: rgba(0, 0, 0, 0.6) !default;
17
18
 
18
19
  $app-select-option-border-color: rgba(0, 0, 0, 0.12) !default;
19
20
  $app-table-border-color: rgba(0, 0, 0, 0.08) !default;
@@ -207,10 +207,6 @@ mat-option:not(:last-of-type) {
207
207
  --max-width: calc(min(100%, 100vw - 64px));
208
208
  min-width: var(--min-width) !important;
209
209
  max-width: var(--max-width) !important;
210
-
211
- &.left-workaround {
212
- left: calc((min(var(--panel-left, 0px) + var(--panel-width, var(--min-width)), 100vw - 32px) - var(--panel-width, var(--min-width))));
213
- }
214
210
  }
215
211
  .mat-mdc-autocomplete-panel {
216
212
  --min-width: 200px;
@@ -345,6 +341,10 @@ ion-list,
345
341
  position: sticky;
346
342
  top: 0;
347
343
  }
344
+
345
+ .searchbar-input {
346
+ --background: var(--app-form-field-background-color, var(--ion-background-color));
347
+ }
348
348
  }
349
349
 
350
350
  ion-row.ion-list-header,
@@ -21,6 +21,8 @@
21
21
  min-width: calc(100% - 1px);
22
22
  border-collapse: separate;
23
23
  --mat-table-background-color: var(--background, var(--ion-background-color));
24
+ --mat-table-header-color: var(--ion-color-primary);
25
+ --mat-table-header-background-color: var(--mat-table-background-color);
24
26
  --mat-table-row-item-label-text-color: var(--ion-text-color);
25
27
  --mat-table-row-item-outline-color: var(--ion-border-color);
26
28
  --mat-table-row-item-label-text-size: 14px;
@@ -46,8 +48,8 @@
46
48
  --mdc-form-field-label-text-color: var(--ion-text-color);
47
49
 
48
50
  .mat-mdc-header-cell {
49
- color: var(--ion-color-primary);
50
- background: var(--mat-table-background-color) !important;
51
+ color: var(--mat-table-header-color);
52
+ background: var(--mat-table-header-background-color) !important;
51
53
 
52
54
  &.disabled {
53
55
  color: var(--ion-color-medium, grey);
@@ -529,6 +531,7 @@
529
531
  }
530
532
  }
531
533
 
534
+
532
535
  // Paginator
533
536
  .mat-mdc-paginator {
534
537
  --mat-paginator-container-size: var(--app-paginator-height, #{$app-paginator-height});