@sumaris-net/ngx-components 1.23.65 → 1.23.67

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 (26) hide show
  1. package/bundles/sumaris-net.ngx-components.umd.js +65 -31
  2. package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
  3. package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
  4. package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
  5. package/esm2015/src/app/core/form/entity-editor-modal.class.js +3 -3
  6. package/esm2015/src/app/core/form/entity-editor.class.js +3 -3
  7. package/esm2015/src/app/core/home/home.js +2 -3
  8. package/esm2015/src/app/core/services/account.service.js +3 -3
  9. package/esm2015/src/app/shared/material/boolean/material.boolean.js +1 -1
  10. package/esm2015/src/app/shared/material/swipe/testing/swipe.test.js +6 -6
  11. package/esm2015/src/app/shared/pipes/date-format.pipe.js +39 -11
  12. package/esm2015/src/app/shared/pipes/property.pipes.js +4 -4
  13. package/esm2015/src/app/shared/shared.module.js +3 -3
  14. package/esm2015/src/app/shared/upload-file/upload-file-popover.component.js +1 -1
  15. package/esm2015/src/app/social/job/progression/job-progression.list.js +1 -1
  16. package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +1 -1
  17. package/fesm2015/sumaris-net.ngx-components.js +56 -29
  18. package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
  19. package/package.json +1 -1
  20. package/src/app/core/form/entity-editor-modal.class.d.ts +2 -2
  21. package/src/app/core/form/entity-editor.class.d.ts +3 -3
  22. package/src/app/core/services/account.service.d.ts +3 -3
  23. package/src/app/shared/material/swipe/testing/swipe.test.d.ts +3 -3
  24. package/src/app/shared/pipes/date-format.pipe.d.ts +19 -9
  25. package/src/app/shared/pipes/property.pipes.d.ts +2 -2
  26. package/sumaris-net.ngx-components.metadata.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": "1.23.65",
4
+ "version": "1.23.67",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -6,7 +6,7 @@ import { Entity } from '../services/model/entity.model';
6
6
  import { UsageMode } from '../services/model/settings.model';
7
7
  import { FormGroup } from '@angular/forms';
8
8
  import { AppTabEditor, AppTabEditorOptions } from './editor.class';
9
- import { DateFormatPipe } from '../../shared/pipes/date-format.pipe';
9
+ import { DateFormatService } from '../../shared/pipes/date-format.pipe';
10
10
  import { Environment } from '../../../environments/environment.class';
11
11
  import { WaitForOptions } from '../../shared/observables';
12
12
  import { FormErrorTranslator } from '../../shared/validator/form-error-adapter.class';
@@ -29,7 +29,7 @@ export declare abstract class AppEntityEditorModal<T extends Entity<T, ID>, ID =
29
29
  private _usageMode;
30
30
  protected _logPrefix: any;
31
31
  protected _isNew: boolean;
32
- protected readonly dateFormat: DateFormatPipe;
32
+ protected readonly dateFormat: DateFormatService;
33
33
  protected readonly cd: ChangeDetectorRef;
34
34
  protected readonly settings: LocalSettingsService;
35
35
  protected readonly modalCtrl: ModalController;
@@ -6,7 +6,7 @@ import { UsageMode } from '../services/model/settings.model';
6
6
  import { FormGroup } from '@angular/forms';
7
7
  import { AppTabEditor, AppTabEditorOptions, IAppTabEditor } from './editor.class';
8
8
  import { EntityServiceLoadOptions, IEntityService } from '../../shared/services/entity-service.class';
9
- import { DateFormatPipe } from '../../shared/pipes/date-format.pipe';
9
+ import { DateFormatService } from '../../shared/pipes/date-format.pipe';
10
10
  import { Environment } from '../../../environments/environment.class';
11
11
  import { HistoryPageReference } from '../services/model/history.model';
12
12
  import { WaitForOptions } from '../../shared/observables';
@@ -37,7 +37,7 @@ export interface AppError {
37
37
  message?: string;
38
38
  }
39
39
  export interface AppErrorWithDetails extends AppError {
40
- details?: AppError & {
40
+ details: AppError & {
41
41
  errors?: FormErrors;
42
42
  };
43
43
  }
@@ -53,7 +53,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
53
53
  private readonly _autoUpdateRoute;
54
54
  private _autoOpenNextTab;
55
55
  private _listenChangesSubscription;
56
- protected readonly dateFormat: DateFormatPipe;
56
+ protected readonly dateFormat: DateFormatService;
57
57
  protected readonly cd: ChangeDetectorRef;
58
58
  protected readonly settings: LocalSettingsService;
59
59
  protected readonly environment: Environment;
@@ -3,7 +3,7 @@ import { Department } from './model/department.model';
3
3
  import { Account } from './model/account.model';
4
4
  import { Person, UserProfileLabel } from './model/person.model';
5
5
  import { LocalSettings, UsageMode, UserSettings } from './model/settings.model';
6
- import { Observable, Subject, Subscription } from 'rxjs';
6
+ import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs';
7
7
  import { FetchPolicy } from '@apollo/client/core';
8
8
  import { Storage } from '@ionic/storage';
9
9
  import { BaseGraphqlService } from './base-graphql-service.class';
@@ -55,8 +55,8 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
55
55
  onLogin: Subject<Account>;
56
56
  onLogout: Subject<any>;
57
57
  onChange: Subject<Account>;
58
- onAuthTokenChange: Subject<string>;
59
- onAuthBasicChange: Subject<string>;
58
+ onAuthTokenChange: BehaviorSubject<string>;
59
+ onAuthBasicChange: BehaviorSubject<string>;
60
60
  private _listenChangesSubscription;
61
61
  private readonly _enableListenChanges;
62
62
  private readonly _listenIntervalInSeconds;
@@ -3,15 +3,15 @@ import { FormBuilder, FormGroup } from '@angular/forms';
3
3
  import * as momentImported from 'moment';
4
4
  import { BehaviorSubject } from 'rxjs';
5
5
  import { Moment } from 'moment';
6
- import { DateFormatPipe } from '../../../pipes/date-format.pipe';
6
+ import { DateFormatService } from '../../../pipes/date-format.pipe';
7
7
  import { DisplayFn } from '../../../form/field.model';
8
8
  export declare class SwipeTestPage implements OnInit {
9
9
  protected formBuilder: FormBuilder;
10
- protected dateFormatPipe: DateFormatPipe;
10
+ protected dateFormat: DateFormatService;
11
11
  form: FormGroup;
12
12
  $dates: BehaviorSubject<momentImported.Moment[]>;
13
13
  private _today;
14
- constructor(formBuilder: FormBuilder, dateFormatPipe: DateFormatPipe);
14
+ constructor(formBuilder: FormBuilder, dateFormat: DateFormatService);
15
15
  ngOnInit(): void;
16
16
  loadData(): Promise<void>;
17
17
  doSubmit(event: any): void;
@@ -1,19 +1,29 @@
1
- import { PipeTransform } from '@angular/core';
1
+ import { OnDestroy, PipeTransform } from '@angular/core';
2
2
  import { Moment } from 'moment';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { MomentDateAdapter } from '@angular/material-moment-adapter';
5
- export declare class DateFormatPipe implements PipeTransform {
6
- private dateAdapter;
7
- private translate;
8
- private readonly datePattern;
9
- private readonly dateTimePattern;
10
- private readonly dateTimeSecondsPattern;
11
- constructor(dateAdapter: MomentDateAdapter, translate: TranslateService);
5
+ export declare abstract class AbstractDateFormat {
6
+ protected dateAdapter: MomentDateAdapter;
7
+ protected translate: TranslateService;
8
+ private datePattern;
9
+ private dateTimePattern;
10
+ private dateTimeSecondsPattern;
11
+ protected constructor(dateAdapter: MomentDateAdapter, translate: TranslateService);
12
12
  transform(value: string | Moment | Date, args?: {
13
13
  pattern?: string;
14
14
  time?: boolean;
15
15
  seconds?: boolean;
16
- }): string;
16
+ }): string | Promise<string>;
17
+ protected _updateTranslations(translations: any): void;
18
+ protected _getTranslationValue(translations: any, key: string, defaultValue: string): string;
19
+ }
20
+ export declare class DateFormatPipe extends AbstractDateFormat implements PipeTransform {
21
+ constructor(dateAdapter: MomentDateAdapter, translate: TranslateService);
22
+ }
23
+ export declare class DateFormatService extends AbstractDateFormat implements OnDestroy {
24
+ private _subscription;
25
+ constructor(dateAdapter: MomentDateAdapter, translate: TranslateService);
26
+ ngOnDestroy(): void;
17
27
  format(date: Moment, pattern: any): string;
18
28
  parse(value: string, parseFormat: any): Moment;
19
29
  }
@@ -1,5 +1,5 @@
1
1
  import { OnDestroy, PipeTransform } from '@angular/core';
2
- import { DateFormatPipe } from './date-format.pipe';
2
+ import { DateFormatService } from './date-format.pipe';
3
3
  import { FormFieldDefinition } from '../form/field.model';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  export declare class PropertyGetPipe implements PipeTransform {
@@ -14,7 +14,7 @@ export declare class PropertyFormatPipe implements PipeTransform, OnDestroy {
14
14
  private _subscription;
15
15
  private _i18nYes;
16
16
  private _i18nNo;
17
- constructor(dateFormat: DateFormatPipe, translate: TranslateService);
17
+ constructor(dateFormat: DateFormatService, translate: TranslateService);
18
18
  ngOnDestroy(): void;
19
19
  transform(obj: any, keyOrDefinition: string | FormFieldDefinition): string | Promise<string>;
20
20
  get i18nYes(): string;