@sumaris-net/ngx-components 18.15.2 → 18.16.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.
Files changed (28) hide show
  1. package/doc/changelog.md +10 -0
  2. package/esm2022/src/app/core/about/about.modal.mjs +53 -20
  3. package/esm2022/src/app/core/services/local-settings.service.mjs +8 -4
  4. package/esm2022/src/app/core/services/model/entity.model.mjs +10 -8
  5. package/esm2022/src/app/core/services/network.utils.mjs +1 -1
  6. package/esm2022/src/app/core/table/testing/table.testing.mjs +1 -1
  7. package/esm2022/src/app/shared/file/url.utils.mjs +3 -1
  8. package/esm2022/src/app/shared/form/field.component.mjs +1 -1
  9. package/esm2022/src/app/shared/material/datetime/datetime.module.mjs +5 -2
  10. package/esm2022/src/app/shared/material/datetime/material.datetime.mjs +160 -15
  11. package/esm2022/src/app/shared/material/datetime/testing/mat-date-time.test.mjs +4 -3
  12. package/esm2022/src/app/shared/material/testing/common.test.mjs +1 -1
  13. package/esm2022/src/environments/environment.class.mjs +2 -1
  14. package/esm2022/src/environments/environment.mjs +2 -1
  15. package/fesm2022/sumaris-net.ngx-components.mjs +231 -43
  16. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/src/app/core/about/about.modal.d.ts +23 -11
  19. package/src/app/core/services/local-settings.service.d.ts +25 -0
  20. package/src/app/core/services/network.utils.d.ts +1 -0
  21. package/src/app/shared/material/datetime/datetime.module.d.ts +2 -1
  22. package/src/app/shared/material/datetime/material.datetime.d.ts +24 -7
  23. package/src/app/shared/material/datetime/testing/mat-date-time.test.d.ts +1 -0
  24. package/src/assets/i18n/en-US.json +4 -1
  25. package/src/assets/i18n/en.json +4 -1
  26. package/src/assets/i18n/fr.json +4 -1
  27. package/src/assets/manifest.json +1 -1
  28. package/src/environments/environment.class.d.ts +1 -0
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.15.2",
4
+ "version": "18.16.0",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -1,32 +1,44 @@
1
- import { InjectionToken, OnDestroy } from '@angular/core';
1
+ import { ChangeDetectorRef, InjectionToken, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ModalController } from '@ionic/angular';
3
3
  import { Department } from '../services/model/department.model';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import { ConfigService } from '../services/config.service';
6
6
  import { Configuration } from '../services/model/config.model';
7
7
  import { Observable } from 'rxjs';
8
+ import { NetworkService } from '../services/network.service';
9
+ import { NodeInfo } from '../services/network.utils';
8
10
  import * as i0 from "@angular/core";
9
11
  export declare const APP_ABOUT_DEVELOPERS: InjectionToken<Partial<Department>[]>;
10
12
  export declare const APP_ABOUT_PARTNERS: InjectionToken<Partial<Department>[]>;
11
- export declare class AboutModal implements OnDestroy {
13
+ export declare class AboutModal implements OnInit, OnDestroy {
12
14
  protected translate: TranslateService;
13
15
  protected modalController: ModalController;
14
16
  protected configService: ConfigService;
17
+ protected networkService: NetworkService;
18
+ protected cd: ChangeDetectorRef;
15
19
  protected environment: any;
16
20
  developers: Partial<Department>[];
17
21
  partners: Partial<Department>[];
18
- readonly name: string;
19
- readonly version: string;
20
- readonly sourceUrl: string;
21
- readonly config$: Observable<Configuration>;
22
- reportIssueUrl: string;
23
- forumUrl: string;
24
- helpUrl: string;
25
22
  private readonly _subscription;
26
- constructor(translate: TranslateService, modalController: ModalController, configService: ConfigService, environment: any, developers: Partial<Department>[], partners: Partial<Department>[]);
23
+ protected _logPrefix: string;
24
+ protected readonly name: string;
25
+ protected readonly version: string;
26
+ protected readonly sourceUrl: string;
27
+ protected readonly config$: Observable<Configuration>;
28
+ protected reportIssueUrl: string;
29
+ protected forumUrl: string;
30
+ protected helpUrl: string;
31
+ protected showVersionDetails: boolean;
32
+ protected nodeInfo: NodeInfo;
33
+ protected buildDate: string;
34
+ protected get allowVersionDetails(): boolean;
35
+ constructor(translate: TranslateService, modalController: ModalController, configService: ConfigService, networkService: NetworkService, cd: ChangeDetectorRef, environment: any, developers: Partial<Department>[], partners: Partial<Department>[]);
36
+ ngOnInit(): void;
27
37
  ngOnDestroy(): void;
28
38
  close(): Promise<void>;
29
39
  protected setConfig(config?: Configuration): void;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<AboutModal, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
40
+ protected loadNodeInfo(): Promise<void>;
41
+ protected getNodeInfo(): Promise<NodeInfo>;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<AboutModal, [null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
31
43
  static ɵcmp: i0.ɵɵComponentDeclaration<AboutModal, "app-about-modal", never, {}, {}, never, never, false, never>;
32
44
  }
@@ -18,8 +18,33 @@ export interface LocalSettingsOptions {
18
18
  options: FormFieldDefinitionMap;
19
19
  }
20
20
  export declare interface AddToPageHistoryOptions {
21
+ /**
22
+ * Represents a configuration option that determines whether query parameters
23
+ * should be removed from the path in a given URL or resource.
24
+ *
25
+ * When set to `true` (default), any query parameters appended to the path
26
+ * will be stripped or ignored during processing.
27
+ * When set to `false` or undefined, query parameters in the path
28
+ * will remain intact and be considered.
29
+ *
30
+ * Commonly used in scenarios where URL normalization or simplification is required.
31
+ */
21
32
  removePathQueryParams?: boolean;
33
+ /**
34
+ * A boolean flag indicating whether to remove the <small> HTML tag
35
+ * from the title. When set to true, any <small> tags within the title
36
+ * will be stripped or ignored. Defaults to undefined if not provided.
37
+ */
22
38
  removeTitleSmallTag?: boolean;
39
+ /**
40
+ * Specifies whether an event should be emitted or not.
41
+ *
42
+ * When set to `true`, the relevant event will be triggered.
43
+ * When set to `false` or omitted, no event will be emitted.
44
+ *
45
+ * Typically used to control the propagation of changes or actions
46
+ * to event listeners within a system or application.
47
+ */
23
48
  emitEvent?: boolean;
24
49
  }
25
50
  export declare const APP_LOCAL_SETTINGS: InjectionToken<Partial<LocalSettings>>;
@@ -8,6 +8,7 @@ export interface NodeInfo {
8
8
  softwareVersion: string;
9
9
  nodeLabel?: string;
10
10
  nodeName?: string;
11
+ buildDate?: string;
11
12
  features?: NodeFeature[];
12
13
  }
13
14
  export interface AppManifest {
@@ -17,8 +17,9 @@ import * as i15 from "@maskito/angular";
17
17
  import * as i16 from "@ngx-translate/core";
18
18
  import * as i17 from "../../directives/directives.module";
19
19
  import * as i18 from "ngx-mat-timepicker";
20
+ import * as i19 from "@angular/material/autocomplete";
20
21
  export declare class SharedMatDateTimeModule {
21
22
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedMatDateTimeModule, never>;
22
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatDateTimeModule, [typeof i1.MatDate, typeof i2.MatDateTime, typeof i3.MatDateShort], [typeof i4.CommonModule, typeof i5.IonicModule, typeof i6.ReactiveFormsModule, typeof i7.SharedPipesModule, typeof i8.MatCommonModule, typeof i9.MatFormFieldModule, typeof i10.MatInputModule, typeof i11.MatIconModule, typeof i12.MatButtonModule, typeof i13.MatDatepickerModule, typeof i14.MatMomentDateModule, typeof i15.MaskitoDirective, typeof i16.TranslateModule, typeof i17.SharedDirectivesModule, typeof i18.NgxMatTimepickerModule], [typeof i11.MatIconModule, typeof i1.MatDate, typeof i2.MatDateTime, typeof i3.MatDateShort]>;
23
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatDateTimeModule, [typeof i1.MatDate, typeof i2.MatDateTime, typeof i3.MatDateShort], [typeof i4.CommonModule, typeof i5.IonicModule, typeof i6.ReactiveFormsModule, typeof i7.SharedPipesModule, typeof i8.MatCommonModule, typeof i9.MatFormFieldModule, typeof i10.MatInputModule, typeof i11.MatIconModule, typeof i12.MatButtonModule, typeof i13.MatDatepickerModule, typeof i14.MatMomentDateModule, typeof i15.MaskitoDirective, typeof i16.TranslateModule, typeof i17.SharedDirectivesModule, typeof i18.NgxMatTimepickerModule, typeof i19.MatAutocompleteTrigger], [typeof i11.MatIconModule, typeof i1.MatDate, typeof i2.MatDateTime, typeof i3.MatDateShort]>;
23
24
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedMatDateTimeModule>;
24
25
  }
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core';
2
2
  import { MatFormFieldAppearance, MatFormFieldDefaultOptions, SubscriptSizing } from '@angular/material/form-field';
3
3
  import { ControlValueAccessor, FormGroupDirective, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
4
4
  import { TranslateService } from '@ngx-translate/core';
@@ -17,6 +17,7 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
17
17
  private dateAdapter;
18
18
  private translate;
19
19
  private formBuilder;
20
+ private renderer;
20
21
  private cd;
21
22
  private formGroupDir;
22
23
  private _onChangeCallback;
@@ -25,6 +26,7 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
25
26
  private _controlSubscription;
26
27
  private _writing;
27
28
  private _disabling;
29
+ private _focused;
28
30
  private _tabindex;
29
31
  private _readonly;
30
32
  private _controlName;
@@ -44,6 +46,8 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
44
46
  protected maskitoTimeOptions: MaskitoOptions;
45
47
  protected datePlaceholder: string;
46
48
  protected timePlaceholder: string;
49
+ protected timePickerReady: boolean;
50
+ logPrefix: string;
47
51
  placeholder: string;
48
52
  floatLabel: AppFloatLabelType;
49
53
  mobile: boolean;
@@ -53,6 +57,9 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
53
57
  startDate: Moment | null;
54
58
  datePickerFilter: DateFilterFn<Moment>;
55
59
  allowNoTime: boolean;
60
+ dottedMinutesInGap: boolean;
61
+ timeHoursOnly: boolean;
62
+ debug: boolean;
56
63
  set appearance(value: MatFormFieldAppearance);
57
64
  get appearance(): MatFormFieldAppearance;
58
65
  set subscriptSizing(value: SubscriptSizing);
@@ -73,7 +80,11 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
73
80
  datePicker: MatDatepicker<Moment>;
74
81
  timePicker: NgxTimePicker;
75
82
  _matInputs: QueryList<ElementRef>;
76
- constructor(dateAdapter: MomentDateAdapter, translate: TranslateService, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective, defaultOptions?: MatFormFieldDefaultOptions);
83
+ focused: EventEmitter<FocusEvent>;
84
+ blurred: EventEmitter<FocusEvent>;
85
+ keydownEscape: EventEmitter<Event>;
86
+ keyupEnter: EventEmitter<Event>;
87
+ constructor(dateAdapter: MomentDateAdapter, translate: TranslateService, formBuilder: UntypedFormBuilder, renderer: Renderer2, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective, defaultOptions?: MatFormFieldDefaultOptions);
77
88
  ngOnInit(): void;
78
89
  ngAfterViewInit(): void;
79
90
  ngOnDestroy(): void;
@@ -82,17 +93,20 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
82
93
  registerOnTouched(fn: any): void;
83
94
  setDisabledState(isDisabled: boolean): void;
84
95
  openDatePicker(event?: Event, datePicker?: MatDatepicker<any>): void;
85
- openTimePicker(event?: Event): void;
96
+ openTimePicker(event?: Event, timePicker?: NgxTimePicker): void;
97
+ private fixTimePickerPosition;
86
98
  focus(): void;
87
99
  clear(event?: Event): void;
88
100
  protected _setFormControlName(controlName: string): void;
89
101
  protected _setFormControl(control: UntypedFormControl): void;
90
102
  protected _updateControlValidators(control: UntypedFormControl, required: boolean): void;
91
103
  protected _onDatePickerChange(event: MatDatepickerInputEvent<Moment>): void;
92
- protected _onTimePickerChange(timeStr: string): void;
104
+ protected _onTimePickerChanged(timeStr: string): void;
93
105
  protected _openDatePickerIfMobile(event?: Event, datePicker?: MatDatepicker<any>): void;
94
106
  protected _openTimePickerIfMobile(event?: Event): void;
95
- protected _onBlur(): void;
107
+ filterInputTextFocusEvent(event: FocusEvent): boolean;
108
+ protected filterInputTextBlurEvent(event: FocusEvent): void;
109
+ protected _onBlur(event: FocusEvent): void;
96
110
  protected _checkIfTouched(): void;
97
111
  protected _preventEvent(event?: Event): void;
98
112
  private updateTranslations;
@@ -105,12 +119,15 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
105
119
  private markAsTouched;
106
120
  private markAsDirty;
107
121
  private markForCheck;
108
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDateTime, [null, null, null, null, { optional: true; }, null]>;
109
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDateTime, "mat-date-time-field", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "datePickerFilter": { "alias": "datePickerFilter"; "required": false; }; "allowNoTime": { "alias": "allowNoTime"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; }, {}, never, ["[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
122
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDateTime, [null, null, null, null, null, { optional: true; }, null]>;
123
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDateTime, "mat-date-time-field", never, { "logPrefix": { "alias": "logPrefix"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "datePickerFilter": { "alias": "datePickerFilter"; "required": false; }; "allowNoTime": { "alias": "allowNoTime"; "required": false; }; "dottedMinutesInGap": { "alias": "dottedMinutesInGap"; "required": false; }; "timeHoursOnly": { "alias": "timeHoursOnly"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; }, { "focused": "focus"; "blurred": "blur"; "keydownEscape": "keydown.escape"; "keyupEnter": "keyup.enter"; }, never, ["[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
110
124
  static ngAcceptInputType_mobile: unknown;
111
125
  static ngAcceptInputType_compact: unknown;
112
126
  static ngAcceptInputType_autofocus: unknown;
113
127
  static ngAcceptInputType_clearable: unknown;
114
128
  static ngAcceptInputType_allowNoTime: unknown;
129
+ static ngAcceptInputType_dottedMinutesInGap: unknown;
130
+ static ngAcceptInputType_timeHoursOnly: unknown;
131
+ static ngAcceptInputType_debug: unknown;
115
132
  }
116
133
  export {};
@@ -14,6 +14,7 @@ export declare class DateTimeTestPage implements OnInit {
14
14
  memoryHide: boolean;
15
15
  memoryMobile: boolean;
16
16
  memoryTimer: Subscription;
17
+ tempFocus: boolean;
17
18
  form: UntypedFormGroup;
18
19
  mode: 'mobile' | 'desktop' | 'memory' | 'temp';
19
20
  appearance: MatFormFieldAppearance;
@@ -68,6 +68,7 @@
68
68
  "DATE_TIME_PATTERN": "MM/DD/YYYY HH:mm",
69
69
  "DATE_TIME_SECONDS_PATTERN": "MM/DD/YYYY HH:mm:ss",
70
70
  "TIME_PATTERN": "HH:mm",
71
+ "HOUR_PATTERN": "HH:00",
71
72
  "DATE_FILE_PATTERN": "YYYY-MM-DD",
72
73
  "DATE_SHORT_PATTERN": "DD/MM/YY",
73
74
  "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
@@ -252,7 +253,9 @@
252
253
  "USER_MANUAL": "User manual",
253
254
  "SOURCE_CODE": "Source core:",
254
255
  "DEVELOPED_BY": "Developed by:",
255
- "PARTNERS": "Partners and sponsors:"
256
+ "PARTNERS": "Partners and sponsors:",
257
+ "POD_VERSION": "Pod v{{version}}",
258
+ "APP_VERSION": "App v{{version}}"
256
259
  },
257
260
  "HOME": {
258
261
  "WELCOME_WEB": "Welcome to the {{appName}} web site!",
@@ -68,6 +68,7 @@
68
68
  "DATE_TIME_PATTERN": "DD/MM/YYYY HH:mm",
69
69
  "DATE_TIME_SECONDS_PATTERN": "DD/MM/YYYY HH:mm:ss",
70
70
  "TIME_PATTERN": "HH:mm",
71
+ "HOUR_PATTERN": "HH:00",
71
72
  "DATE_FILE_PATTERN": "YYYY-MM-DD",
72
73
  "DATE_SHORT_PATTERN": "DD/MM/YY",
73
74
  "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
@@ -252,7 +253,9 @@
252
253
  "USER_MANUAL": "User manual",
253
254
  "SOURCE_CODE": "Source core:",
254
255
  "DEVELOPED_BY": "Developed by:",
255
- "PARTNERS": "Partners and sponsors:"
256
+ "PARTNERS": "Partners and sponsors:",
257
+ "POD_VERSION": "Pod v{{version}}",
258
+ "APP_VERSION": "App v{{version}}"
256
259
  },
257
260
  "HOME": {
258
261
  "WELCOME_WEB": "Welcome to the {{appName}} web site!",
@@ -68,6 +68,7 @@
68
68
  "DATE_TIME_PATTERN": "DD/MM/YYYY HH:mm",
69
69
  "DATE_TIME_SECONDS_PATTERN": "DD/MM/YYYY HH:mm:ss",
70
70
  "TIME_PATTERN": "HH:mm",
71
+ "HOUR_PATTERN": "HH:00",
71
72
  "DATE_FILE_PATTERN": "YYYY-MM-DD",
72
73
  "DATE_SHORT_PATTERN": "DD/MM/YY",
73
74
  "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
@@ -252,7 +253,9 @@
252
253
  "USER_MANUAL": "Manuel",
253
254
  "SOURCE_CODE": "Code source :",
254
255
  "DEVELOPED_BY": "Développé par :",
255
- "PARTNERS": "Partenaires et sponsors :"
256
+ "PARTNERS": "Partenaires et sponsors :",
257
+ "POD_VERSION": "Pod v{{version}}",
258
+ "APP_VERSION": "App v{{version}}"
256
259
  },
257
260
  "HOME": {
258
261
  "WELCOME_WEB": "Bienvenue sur le site web {{appName}} !",
@@ -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.15.2",
5
+ "version": "18.16.0",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -80,4 +80,5 @@ export declare class Environment {
80
80
  maxAgeInMonths: number;
81
81
  maxCount: number;
82
82
  };
83
+ buildDate?: string;
83
84
  }