@sumaris-net/ngx-components 18.12.13 → 18.13.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 (34) hide show
  1. package/doc/changelog.md +7 -0
  2. package/esm2022/public_api.mjs +3 -1
  3. package/esm2022/src/app/core/home/home.mjs +39 -19
  4. package/esm2022/src/app/core/home/home.module.mjs +7 -3
  5. package/esm2022/src/app/shared/observables.mjs +2 -2
  6. package/esm2022/src/app/shared/pipes/badge.pipes.mjs +3 -2
  7. package/esm2022/src/app/social/config/social.config.mjs +9 -0
  8. package/esm2022/src/app/social/job/progression/job-progression.icon.mjs +21 -21
  9. package/esm2022/src/app/social/user-event/notification/user-event-notification.icon.mjs +111 -51
  10. package/esm2022/src/app/social/user-event/notification/user-event-notification.list.mjs +49 -32
  11. package/esm2022/src/app/social/user-event/notification/user-event-notification.modal.mjs +81 -0
  12. package/esm2022/src/app/social/user-event/testing/user-event.testing.mjs +27 -11
  13. package/esm2022/src/app/social/user-event/user-event.module.mjs +5 -4
  14. package/esm2022/src/app/social/user-event/user-event.service.mjs +3 -3
  15. package/fesm2022/sumaris-net.ngx-components.mjs +5473 -5282
  16. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/public_api.d.ts +2 -0
  19. package/src/app/core/home/home.d.ts +28 -20
  20. package/src/app/core/home/home.module.d.ts +2 -1
  21. package/src/app/shared/inputs.d.ts +1 -1
  22. package/src/app/shared/observables.d.ts +1 -1
  23. package/src/app/social/config/social.config.d.ts +4 -0
  24. package/src/app/social/job/progression/job-progression.icon.d.ts +14 -14
  25. package/src/app/social/user-event/notification/user-event-notification.icon.d.ts +23 -9
  26. package/src/app/social/user-event/notification/user-event-notification.list.d.ts +20 -16
  27. package/src/app/social/user-event/notification/user-event-notification.modal.d.ts +36 -0
  28. package/src/app/social/user-event/testing/user-event.testing.d.ts +11 -2
  29. package/src/app/social/user-event/user-event.module.d.ts +7 -6
  30. package/src/app/social/user-event/user-event.service.d.ts +2 -2
  31. package/src/assets/i18n/fr.json +2 -1
  32. package/src/assets/manifest.json +1 -1
  33. package/src/theme/_ngx-components.scss +4 -1
  34. package/src/theme/_theme.variables.scss +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.12.13",
4
+ "version": "18.13.0",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -263,12 +263,14 @@ export * from './src/app/core/offline/update-offline-mode-card.component';
263
263
  export * from './src/app/core/offline/update-offline-mode-card.module';
264
264
  export { EntityClass, EntityClasses } from './src/app/core/services/model/entity.decorators';
265
265
  export * from './src/app/social/social.module';
266
+ export * from './src/app/social/config/social.config';
266
267
  export * from './src/app/social/social.errors';
267
268
  export * from './src/app/social/user-event/user-event.module';
268
269
  export * from './src/app/social/user-event/user-event.model';
269
270
  export * from './src/app/social/user-event/user-event.service';
270
271
  export * from './src/app/social/user-event/notification/user-event-notification.icon';
271
272
  export * from './src/app/social/user-event/notification/user-event-notification.list';
273
+ export * from './src/app/social/user-event/notification/user-event-notification.modal';
272
274
  export * from './src/app/social/job/job.module';
273
275
  export * from './src/app/social/job/progression/job-progression.service';
274
276
  export * from './src/app/social/job/progression/job-progression.model';
@@ -25,6 +25,11 @@ import * as i0 from "@angular/core";
25
25
  export declare const getRandomImage: typeof ImagesUtils.getRandomImage;
26
26
  export declare const getRandomImageWithCredit: typeof ImagesUtils.getRandomImageWithCredit;
27
27
  export declare const APP_HOME_BUTTONS: InjectionToken<IMenuItem[]>;
28
+ export declare const APP_HOME_CONFIG: InjectionToken<IHomePageConfig>;
29
+ export interface IHomePageConfig {
30
+ showNotificationIcon?: boolean | 'mobile' | 'desktop';
31
+ autoHideNotificationIcon?: boolean | 'mobile' | 'desktop';
32
+ }
28
33
  export interface HomePageState {
29
34
  loading: boolean;
30
35
  showSpinner: boolean;
@@ -45,30 +50,33 @@ export declare class HomePage extends RxState<HomePageState> implements OnDestro
45
50
  network: NetworkService;
46
51
  settings: LocalSettingsService;
47
52
  protected environment: Environment;
48
- locales: LocaleConfig[];
49
- buttons: IMenuItem[];
53
+ protected locales: LocaleConfig[];
54
+ protected buttons: IMenuItem[];
55
+ protected config: IHomePageConfig;
50
56
  private readonly _debug;
51
57
  private _subscription;
52
58
  private _config;
59
+ protected readonly mobile: boolean;
60
+ protected readonly showAccountButton: boolean;
61
+ protected accountName: string;
62
+ protected isLogin: boolean;
63
+ protected logo: string;
64
+ protected description: string;
65
+ protected appName: string;
66
+ protected isWeb: boolean;
67
+ protected canRegister: boolean;
68
+ protected contentStyle: any;
69
+ protected contentCredits: string;
70
+ protected legalInformation: IMenuItem[];
71
+ protected waitingNetwork: boolean;
72
+ protected offline: boolean;
73
+ protected showNotificationIcon: boolean;
74
+ protected autoHideNotificationIcon: boolean;
75
+ protected $partners: BehaviorSubject<Department[]>;
76
+ protected $filteredButtons: BehaviorSubject<IMenuItem[]>;
53
77
  protected darkMode$: import("rxjs").Observable<boolean>;
54
78
  protected pageHistory$: import("rxjs").Observable<HistoryPageReference[]>;
55
79
  protected loading$: import("rxjs").Observable<boolean>;
56
- protected readonly mobile: boolean;
57
- waitingNetwork: boolean;
58
- accountName: string;
59
- isLogin: boolean;
60
- $partners: BehaviorSubject<Department[]>;
61
- logo: string;
62
- description: string;
63
- appName: string;
64
- isWeb: boolean;
65
- canRegister: boolean;
66
- contentStyle: any;
67
- contentCredits: string;
68
- legalInformation: IMenuItem[];
69
- offline: boolean;
70
- $filteredButtons: BehaviorSubject<IMenuItem[]>;
71
- readonly showAccountButton: boolean;
72
80
  set pageHistory(value: HistoryPageReference[]);
73
81
  get pageHistory(): HistoryPageReference[];
74
82
  set loading(value: boolean);
@@ -85,7 +93,7 @@ export declare class HomePage extends RxState<HomePageState> implements OnDestro
85
93
  get darkMode(): boolean;
86
94
  get currentLocaleCode(): string;
87
95
  get partnerBannerSize(): number;
88
- constructor(accountService: AccountService, modalCtrl: ModalController, translate: TranslateService, toastController: ToastController, configService: ConfigService, platform: PlatformService, cd: ChangeDetectorRef, network: NetworkService, settings: LocalSettingsService, environment: Environment, locales: LocaleConfig[], buttons: IMenuItem[]);
96
+ constructor(accountService: AccountService, modalCtrl: ModalController, translate: TranslateService, toastController: ToastController, configService: ConfigService, platform: PlatformService, cd: ChangeDetectorRef, network: NetworkService, settings: LocalSettingsService, environment: Environment, locales: LocaleConfig[], buttons: IMenuItem[], config: IHomePageConfig);
89
97
  ngOnDestroy(): void;
90
98
  login(): Promise<void>;
91
99
  register(): Promise<void>;
@@ -104,6 +112,6 @@ export declare class HomePage extends RxState<HomePageState> implements OnDestro
104
112
  protected toggleDarkMode(): Promise<void>;
105
113
  protected removePageHistory(path: string): Promise<void>;
106
114
  protected markForCheck(): void;
107
- static ɵfac: i0.ɵɵFactoryDeclaration<HomePage, [null, null, null, null, null, null, null, null, null, null, null, { optional: true; }]>;
115
+ static ɵfac: i0.ɵɵFactoryDeclaration<HomePage, [null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
108
116
  static ɵcmp: i0.ɵɵComponentDeclaration<HomePage, "app-page-home", never, {}, {}, never, never, false, never>;
109
117
  }
@@ -7,8 +7,9 @@ import * as i5 from "../../shared/rx-state/rx-state.module";
7
7
  import * as i6 from "../auth/auth.module";
8
8
  import * as i7 from "../install/install-upgrade-card.module";
9
9
  import * as i8 from "../../shared/markdown/markdown.module";
10
+ import * as i9 from "../../social/user-event/user-event.module";
10
11
  export declare class AppHomePageModule {
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<AppHomePageModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<AppHomePageModule, [typeof i1.HomePage], [typeof i2.SharedModule, typeof i3.RouterModule, typeof i4.TranslateModule, typeof i5.RxStateModule, typeof i6.AppAuthModule, typeof i7.AppInstallUpgradeCardModule, typeof i8.SharedMarkdownModule], [typeof i3.RouterModule, typeof i4.TranslateModule, typeof i1.HomePage]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AppHomePageModule, [typeof i1.HomePage], [typeof i2.SharedModule, typeof i3.RouterModule, typeof i4.TranslateModule, typeof i5.RxStateModule, typeof i6.AppAuthModule, typeof i7.AppInstallUpgradeCardModule, typeof i8.SharedMarkdownModule, typeof i9.UserEventModule], [typeof i3.RouterModule, typeof i4.TranslateModule, typeof i1.HomePage]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<AppHomePageModule>;
14
15
  }
@@ -17,7 +17,7 @@ export interface InputElement extends FocusableElement {
17
17
  }
18
18
  export declare function isInputElement(object: any): object is InputElement;
19
19
  export declare function asInputElement<T = any>(object: ElementRef<T>): InputElement | undefined;
20
- export declare function tabindexComparator(a: InputElement, b: InputElement): 1 | 0 | -1;
20
+ export declare function tabindexComparator(a: InputElement, b: InputElement): 0 | 1 | -1;
21
21
  export interface CanGainFocusOptions {
22
22
  minTabindex?: number;
23
23
  maxTabindex?: number;
@@ -11,7 +11,7 @@ export declare interface WaitForOptions extends FirstOptions {
11
11
  }
12
12
  export declare function filterNotNil<T = any>(obs: Observable<T>): Observable<T>;
13
13
  export declare function filterTrue(obs: Observable<boolean>): Observable<boolean>;
14
- export declare function filterFalse(obs: Observable<boolean>, opts?: FirstOptions): Observable<boolean>;
14
+ export declare function filterFalse(obs: Observable<boolean>): Observable<boolean>;
15
15
  export declare function firstNotNil<T = any>(obs: Observable<T>, opts?: FirstOptions): Observable<T>;
16
16
  export declare function firstTrue<T = void>(obs: Observable<boolean>, opts?: FirstOptions, result?: T): Observable<T>;
17
17
  export declare function firstFalse<T = void>(obs: Observable<boolean>, opts?: FirstOptions, result?: T): Observable<T>;
@@ -0,0 +1,4 @@
1
+ import { FormFieldDefinition } from '../../shared/form/field.model';
2
+ export declare const SOCIAL_CONFIG_OPTIONS: Readonly<{
3
+ ENABLE_NOTIFICATION_ICONS: FormFieldDefinition<string, import("../../shared/form/field.model").FormFieldType, any>;
4
+ }>;
@@ -25,26 +25,26 @@ export declare class JobProgressionIcon extends RxState<JobProgressionIconState>
25
25
  protected jobProgressionService: IJobProgressionService;
26
26
  protected popoverController: PopoverController;
27
27
  protected cd: ChangeDetectorRef;
28
+ private _listPopover;
29
+ private _subscriptions;
30
+ private _subscriptionsById;
31
+ private _logPrefix;
32
+ protected disabled: boolean;
33
+ protected color: ThemePalette;
34
+ protected jobProgressions$: import("rxjs").Observable<BehaviorSubject<JobProgression>[]>;
35
+ protected jobCount$: import("rxjs").Observable<number>;
36
+ protected visible$: import("rxjs").Observable<boolean>;
37
+ protected mode$: import("rxjs").Observable<ProgressSpinnerMode>;
38
+ protected value$: import("rxjs").Observable<number>;
39
+ protected autoHideDelay: number;
40
+ protected autoRemove: boolean;
41
+ protected autoRemoveDelay: number;
28
42
  debug: boolean;
29
43
  titleI18n: string;
30
44
  options: JobProgressionOptions;
31
45
  autoHide: boolean;
32
46
  headerActions: IUserEventAction[];
33
47
  jobFinished: EventEmitter<number>;
34
- disabled: boolean;
35
- color: ThemePalette;
36
- jobProgressions$: import("rxjs").Observable<BehaviorSubject<JobProgression>[]>;
37
- jobCount$: import("rxjs").Observable<number>;
38
- visible$: import("rxjs").Observable<boolean>;
39
- mode$: import("rxjs").Observable<ProgressSpinnerMode>;
40
- value$: import("rxjs").Observable<number>;
41
- protected autoHideDelay: number;
42
- protected autoRemove: boolean;
43
- protected autoRemoveDelay: number;
44
- private _listPopover;
45
- private _subscriptions;
46
- private _subscriptionsById;
47
- private _logPrefix;
48
48
  constructor(jobProgressionService: IJobProgressionService, popoverController: PopoverController, cd: ChangeDetectorRef);
49
49
  get jobProgressions(): BehaviorSubject<JobProgression>[];
50
50
  ngOnInit(): void;
@@ -1,32 +1,46 @@
1
- import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { PopoverController } from '@ionic/angular';
3
+ import { ModalController, PopoverController } from '@ionic/angular';
4
4
  import { IUserEventService } from '../user-event.service';
5
+ import { UserEventNotificationListOptions } from './user-event-notification.list';
5
6
  import { IUserEvent, IUserEventAction, IUserEventFilter } from '../user-event.model';
6
7
  import { AccountService } from '../../../core/services/account.service';
8
+ import { AppColors } from '../../../shared/types';
9
+ import { LocalSettingsService } from '../../../core/services/local-settings.service';
7
10
  import * as i0 from "@angular/core";
8
11
  export declare class UserEventNotificationIcon implements OnInit, OnDestroy {
9
12
  userEventService: IUserEventService<IUserEvent<any>, IUserEventFilter<any>>;
10
13
  protected accountService: AccountService;
11
14
  protected popoverController: PopoverController;
15
+ protected modalController: ModalController;
16
+ protected settings: LocalSettingsService;
12
17
  private cd;
13
18
  private _logPrefix;
14
19
  private _readEvent;
15
20
  private _readEvents;
16
- debug: boolean;
21
+ protected visible: boolean;
22
+ protected readonly count$: Observable<number>;
17
23
  titleI18n: string;
18
24
  disabled: boolean;
19
25
  filter: any;
20
26
  autoHide: boolean;
21
27
  headerActions: IUserEventAction[];
22
28
  footerActions: IUserEventAction[];
23
- protected visible: boolean;
24
- protected readonly countChanges$: Observable<number>;
25
- constructor(userEventService: IUserEventService<IUserEvent<any>, IUserEventFilter<any>>, accountService: AccountService, popoverController: PopoverController, cd: ChangeDetectorRef);
29
+ style: 'mat-button' | 'ion-button';
30
+ color: AppColors;
31
+ unreadColor: AppColors;
32
+ fill: 'clear' | 'outline' | 'solid';
33
+ mobile: boolean;
34
+ listStyle: 'popover' | 'modal';
35
+ debug: boolean;
36
+ onShowList: EventEmitter<Event>;
37
+ constructor(userEventService: IUserEventService<IUserEvent<any>, IUserEventFilter<any>>, accountService: AccountService, popoverController: PopoverController, modalController: ModalController, settings: LocalSettingsService, cd: ChangeDetectorRef);
26
38
  ngOnInit(): Promise<void>;
27
39
  ngOnDestroy(): void;
28
- showList(event: Event): Promise<void>;
40
+ showList(event?: Event, options?: UserEventNotificationListOptions & {
41
+ style: 'modal' | 'popover';
42
+ }): Promise<void>;
29
43
  protected setVisible(value: boolean): void;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<UserEventNotificationIcon, [{ optional: true; }, null, null, null]>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<UserEventNotificationIcon, "app-user-event-notification-icon", never, { "debug": { "alias": "debug"; "required": false; }; "titleI18n": { "alias": "titleI18n"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "autoHide": { "alias": "autoHide"; "required": false; }; "headerActions": { "alias": "headerActions"; "required": false; }; "footerActions": { "alias": "footerActions"; "required": false; }; }, {}, never, never, false, never>;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserEventNotificationIcon, [{ optional: true; }, null, null, null, null, null]>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserEventNotificationIcon, "app-user-event-notification-icon", never, { "titleI18n": { "alias": "titleI18n"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "autoHide": { "alias": "autoHide"; "required": false; }; "headerActions": { "alias": "headerActions"; "required": false; }; "footerActions": { "alias": "footerActions"; "required": false; }; "style": { "alias": "style"; "required": false; }; "color": { "alias": "color"; "required": false; }; "unreadColor": { "alias": "unreadColor"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "listStyle": { "alias": "listStyle"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; }, { "onShowList": "showList"; }, never, never, false, never>;
32
46
  }
@@ -1,6 +1,6 @@
1
1
  import { ChangeDetectorRef, EventEmitter, InjectionToken, OnDestroy, OnInit, QueryList } from '@angular/core';
2
- import { IUserEvent, IUserEventFilter, IUserEventAction } from '../user-event.model';
3
- import { BehaviorSubject, Subscription } from 'rxjs';
2
+ import { IUserEvent, IUserEventAction, IUserEventFilter } from '../user-event.model';
3
+ import { BehaviorSubject, Observable, Subscription } from 'rxjs';
4
4
  import { IonContent, IonItem, PopoverController } from '@ionic/angular';
5
5
  import { IUserEventService } from '../user-event.service';
6
6
  import { LocalSettingsService } from '../../../core/services/local-settings.service';
@@ -23,8 +23,13 @@ export declare class UserEventNotificationList<E extends IUserEvent<any> = IUser
23
23
  protected settings: LocalSettingsService;
24
24
  userEventService: IUserEventService<E, IUserEventFilter<any>>;
25
25
  infiniteScrollThresholdFromToken: string;
26
- debug: boolean;
27
- mobile: boolean;
26
+ protected fetchingMore: boolean;
27
+ protected $items: BehaviorSubject<E[]>;
28
+ protected _subscriptions: Subscription;
29
+ protected _fetchMoreFn: FetchMoreFn<LoadResult<E>>;
30
+ protected _fetchMoreSubscription: Subscription;
31
+ protected _$pageSize: BehaviorSubject<number>;
32
+ protected _panelElement: HTMLElement;
28
33
  titleI18n: string;
29
34
  sortBy: string;
30
35
  sortDirection: SortDirection;
@@ -33,39 +38,38 @@ export declare class UserEventNotificationList<E extends IUserEvent<any> = IUser
33
38
  infiniteScrollThreshold: string;
34
39
  headerActions: IUserEventAction[];
35
40
  footerActions: IUserEventAction[];
41
+ showHeader: boolean;
42
+ showFooter: boolean;
43
+ mobile: boolean;
44
+ debug: boolean;
36
45
  set pageSize(value: number);
46
+ $itemCount: BehaviorSubject<number>;
37
47
  get pageSize(): number;
48
+ get hasItem$(): Observable<boolean>;
49
+ get itemCount$(): Observable<number>;
38
50
  readEvent: EventEmitter<E>;
39
51
  readEvents: EventEmitter<E[]>;
52
+ dismiss: EventEmitter<Event>;
40
53
  ionContent: IonContent;
41
54
  ionItems: QueryList<IonItem>;
42
55
  get canFetchMore(): boolean;
43
- fetchingMore: boolean;
44
- $items: BehaviorSubject<E[]>;
45
- $itemCount: BehaviorSubject<number>;
46
- protected _subscriptions: Subscription;
47
- protected _fetchMoreFn: FetchMoreFn<LoadResult<E>>;
48
- protected _fetchMoreSubscription: Subscription;
49
- protected _$pageSize: BehaviorSubject<number>;
50
- protected _panelElement: HTMLElement;
51
56
  constructor(cd: ChangeDetectorRef, popoverController: PopoverController, settings: LocalSettingsService, userEventService: IUserEventService<E, IUserEventFilter<any>>, infiniteScrollThresholdFromToken: string);
52
57
  ngOnInit(): void;
53
58
  ngOnDestroy(): void;
54
- click(event: Event, userEvent: E): void;
59
+ click(event: Event, userEvent: E): Promise<void>;
55
60
  isDefaultAction(action: IUserEventAction): boolean;
56
61
  markAsRead(event: Event, userEvent: E): void;
57
62
  markAllAsRead(event: Event): void;
58
63
  executeAction(event: Event, action: IUserEventAction, userEvent: IUserEvent<any>): Promise<void>;
59
- dismiss(): void;
64
+ close(): void;
60
65
  fetchMore(event?: CustomEvent & {
61
66
  target?: EventTarget & {
62
67
  complete?: () => void;
63
68
  };
64
69
  }): Promise<void>;
65
- trackByFn(index: number, item: E): number;
66
70
  protected initInfiniteScroll(threshold?: string): Promise<void>;
67
71
  protected markForCheck(): void;
68
72
  protected getPanelElement(): Promise<HTMLElement>;
69
73
  static ɵfac: i0.ɵɵFactoryDeclaration<UserEventNotificationList<any, any>, [null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
70
- static ɵcmp: i0.ɵɵComponentDeclaration<UserEventNotificationList<any, any>, "app-user-event-notification-list", never, { "debug": { "alias": "debug"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "titleI18n": { "alias": "titleI18n"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "enableInfiniteScroll": { "alias": "enableInfiniteScroll"; "required": false; }; "infiniteScrollThreshold": { "alias": "infiniteScrollThreshold"; "required": false; }; "headerActions": { "alias": "headerActions"; "required": false; }; "footerActions": { "alias": "footerActions"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "readEvent": "readEvent"; "readEvents": "readEvents"; }, never, never, false, never>;
74
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserEventNotificationList<any, any>, "app-user-event-notification-list", never, { "titleI18n": { "alias": "titleI18n"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "enableInfiniteScroll": { "alias": "enableInfiniteScroll"; "required": false; }; "infiniteScrollThreshold": { "alias": "infiniteScrollThreshold"; "required": false; }; "headerActions": { "alias": "headerActions"; "required": false; }; "footerActions": { "alias": "footerActions"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "readEvent": "readEvent"; "readEvents": "readEvents"; "dismiss": "dismiss"; }, never, never, false, never>;
71
75
  }
@@ -0,0 +1,36 @@
1
+ import { ChangeDetectorRef, OnInit } from '@angular/core';
2
+ import { IUserEvent, IUserEventAction, IUserEventFilter } from '../user-event.model';
3
+ import { ModalController } from '@ionic/angular';
4
+ import { SortDirection } from '@angular/material/sort';
5
+ import { UserEventNotificationList, UserEventNotificationListOptions } from './user-event-notification.list';
6
+ import { IUserEventService } from '../user-event.service';
7
+ import { LocalSettingsService } from '../../../core/services/local-settings.service';
8
+ import { Observable } from 'rxjs';
9
+ import * as i0 from "@angular/core";
10
+ export interface UserEventNotificationModalOptions<E extends IUserEvent<any> = IUserEvent<any>, F extends IUserEventFilter<any> = IUserEventFilter<any>> extends UserEventNotificationListOptions<E, F> {
11
+ }
12
+ export declare class UserEventNotificationModal<E extends IUserEvent<any> = IUserEvent<any>, F extends IUserEventFilter<any> = IUserEventFilter<any>> implements UserEventNotificationModalOptions<E, F>, OnInit {
13
+ protected cd: ChangeDetectorRef;
14
+ protected settings: LocalSettingsService;
15
+ protected modalController: ModalController;
16
+ userEventService: IUserEventService<E, IUserEventFilter<any>>;
17
+ protected itemCount$: Observable<number>;
18
+ titleI18n: string;
19
+ sortBy: string;
20
+ sortDirection: SortDirection;
21
+ filter: Partial<F>;
22
+ enableInfiniteScroll: boolean;
23
+ infiniteScrollThreshold: string;
24
+ headerActions: IUserEventAction[];
25
+ footerActions: IUserEventAction[];
26
+ pageSize: number;
27
+ mobile: boolean;
28
+ debug: boolean;
29
+ list: UserEventNotificationList<E, F>;
30
+ constructor(cd: ChangeDetectorRef, settings: LocalSettingsService, modalController: ModalController, userEventService: IUserEventService<E, IUserEventFilter<any>>);
31
+ ngOnInit(): void;
32
+ protected close(): void;
33
+ protected markForCheck(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserEventNotificationModal<any, any>, [null, null, null, { optional: true; }]>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserEventNotificationModal<any, any>, "app-user-event-notification-modal", never, { "titleI18n": { "alias": "titleI18n"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "enableInfiniteScroll": { "alias": "enableInfiniteScroll"; "required": false; }; "infiniteScrollThreshold": { "alias": "infiniteScrollThreshold"; "required": false; }; "headerActions": { "alias": "headerActions"; "required": false; }; "footerActions": { "alias": "footerActions"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; }, {}, never, never, false, never>;
36
+ }
@@ -1,20 +1,27 @@
1
1
  import { OnDestroy } from '@angular/core';
2
+ import { IUserEventAction } from '../user-event.model';
2
3
  import { Router } from '@angular/router';
3
4
  import { AlertController } from '@ionic/angular';
4
5
  import { TranslateService } from '@ngx-translate/core';
5
6
  import { UserEventTestService } from './user-event.testing.service';
6
7
  import { UserEventNotificationIcon } from '../notification/user-event-notification.icon';
7
8
  import { UserEventTest } from './user-event.testing.model';
9
+ import { LocalSettingsService } from '../../../core/services/local-settings.service';
8
10
  import * as i0 from "@angular/core";
9
11
  export declare class UserEventTestingPage implements OnDestroy {
10
12
  protected userEventService: UserEventTestService;
11
13
  protected router: Router;
12
14
  protected alertController: AlertController;
15
+ protected settings: LocalSettingsService;
13
16
  protected translateService: TranslateService;
14
17
  private _timerSubscription;
18
+ protected mobile: boolean;
19
+ protected popoverHeaderActions: IUserEventAction[];
20
+ protected modalHeaderActions: IUserEventAction[];
21
+ protected footerActions: IUserEventAction[];
15
22
  notification: UserEventNotificationIcon;
16
23
  get timerStarted(): boolean;
17
- constructor(userEventService: UserEventTestService, router: Router, alertController: AlertController, translateService: TranslateService);
24
+ constructor(userEventService: UserEventTestService, router: Router, alertController: AlertController, settings: LocalSettingsService, translateService: TranslateService);
18
25
  ngOnDestroy(): void;
19
26
  protected customize(userEvent: UserEventTest): void;
20
27
  addNotification(): void;
@@ -29,7 +36,9 @@ export declare class UserEventTestingPage implements OnDestroy {
29
36
  addRandom(value: number): void;
30
37
  addNotificationWithDefaultAction(): void;
31
38
  protected showMessage(text: string): Promise<void>;
32
- replaceLastEvent(): void;
39
+ protected showNotificationModal(): void;
40
+ protected openSettings(): void;
41
+ protected replaceLastEvent(): void;
33
42
  static ɵfac: i0.ɵɵFactoryDeclaration<UserEventTestingPage, never>;
34
43
  static ɵcmp: i0.ɵɵComponentDeclaration<UserEventTestingPage, "job-progression-testing", never, {}, {}, never, never, false, never>;
35
44
  }
@@ -1,13 +1,14 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./notification/user-event-notification.icon";
3
3
  import * as i2 from "./notification/user-event-notification.list";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "../../shared/shared.module";
6
- import * as i5 from "../../core/icon/icon.module";
7
- import * as i6 from "../../shared/rx-state/rx-state.module";
8
- import * as i7 from "ngx-jdenticon";
4
+ import * as i3 from "./notification/user-event-notification.modal";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "../../shared/shared.module";
7
+ import * as i6 from "../../core/icon/icon.module";
8
+ import * as i7 from "../../shared/rx-state/rx-state.module";
9
+ import * as i8 from "ngx-jdenticon";
9
10
  export declare class UserEventModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<UserEventModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<UserEventModule, [typeof i1.UserEventNotificationIcon, typeof i2.UserEventNotificationList], [typeof i3.CommonModule, typeof i4.SharedModule, typeof i5.AppIconModule, typeof i6.RxStateModule, typeof i7.NgxJdenticonModule], [typeof i1.UserEventNotificationIcon]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UserEventModule, [typeof i1.UserEventNotificationIcon, typeof i2.UserEventNotificationList, typeof i3.UserEventNotificationModal], [typeof i4.CommonModule, typeof i5.SharedModule, typeof i6.AppIconModule, typeof i7.RxStateModule, typeof i8.NgxJdenticonModule], [typeof i1.UserEventNotificationIcon, typeof i3.UserEventNotificationModal]>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<UserEventModule>;
13
14
  }
@@ -2,7 +2,7 @@ import { InjectionToken, OnDestroy } from '@angular/core';
2
2
  import { FetchPolicy } from '@apollo/client/core';
3
3
  import { AccountService } from '../../core/services/account.service';
4
4
  import { GraphqlService } from '../../core/graphql/graphql.service';
5
- import { BehaviorSubject, Observable, Subject } from 'rxjs';
5
+ import { BehaviorSubject, Observable } from 'rxjs';
6
6
  import { IUserEvent, IUserEventFilter } from './user-event.model';
7
7
  import { SortDirection } from '@angular/material/sort';
8
8
  import { EntitiesServiceLoadOptions, EntitiesServiceWatchOptions, IEntitiesService, LoadResult, Page } from '../../shared/services/entity-service.class';
@@ -80,7 +80,7 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, I
80
80
  protected listeners: IUserEventListener<E, ID>[];
81
81
  private _subscriptions;
82
82
  private _listenSubscription;
83
- get countSubject(): Subject<number>;
83
+ get countSubject(): Observable<number>;
84
84
  protected constructor(graphql: GraphqlService, accountService: AccountService, network: NetworkService, translate: TranslateService, options: UserEventServiceOptions<Q, M, S>);
85
85
  protected ngOnStart(): Promise<void>;
86
86
  ngOnDestroy(): void;
@@ -525,7 +525,8 @@
525
525
  "NOTIFICATION": {
526
526
  "TITLE": "Notifications",
527
527
  "EMPTY": "Aucune notification",
528
- "READ_ALL": "Tout marquer comme lu"
528
+ "READ_ALL": "Tout marquer comme lu",
529
+ "SHOW_ALL": "Afficher tout"
529
530
  },
530
531
  "TYPE": "Type",
531
532
  "ICON": "Icône",
@@ -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.12.13",
5
+ "version": "18.13.0",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -802,7 +802,7 @@ ion-modal.stack-modal {
802
802
  --backdrop-opacity: var(--ion-backdrop-opacity, 0.32);
803
803
  }
804
804
 
805
- ion-modal.modal-large{
805
+ ion-modal.modal-large {
806
806
  --min-height: calc(100% - 50px) !important;
807
807
  --min-width: calc(100% - 100px) !important;
808
808
  }
@@ -810,6 +810,9 @@ ion-modal.modal-fullscreen {
810
810
  --min-height: calc(100%) !important;
811
811
  --min-width: calc(100%) !important;
812
812
  }
813
+ ion-modal.modal-notifications {
814
+ --min-height: calc(100% - 50px) !important;
815
+ }
813
816
 
814
817
 
815
818
  // --------------------------------------------------
@@ -80,7 +80,7 @@ html.dark {
80
80
  --ion-color-light-tint: #383a3e;
81
81
 
82
82
  --ion-toolbar-background: #1f1f1f;
83
- --ion-border-color: #222222;
83
+ --ion-border-color: #303030;
84
84
  --ion-backdrop-opacity: 0.15;
85
85
 
86
86
  --app-form-field-background-color: var(--ion-color-light-tint);