@sumaris-net/ngx-components 18.16.8 → 18.17.1
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.
- package/doc/changelog.md +4 -0
- package/esm2022/public_api.mjs +4 -4
- package/esm2022/src/app/admin/users/person.filter.mjs +76 -0
- package/esm2022/src/app/admin/users/person.service.mjs +212 -0
- package/esm2022/src/app/admin/users/person.validator.mjs +72 -0
- package/esm2022/src/app/admin/users/users.mjs +4 -4
- package/esm2022/src/app/core/about/about.modal.mjs +5 -5
- package/esm2022/src/app/core/home/home.mjs +3 -3
- package/esm2022/src/app/core/services/account.service.mjs +8 -2
- package/esm2022/src/app/core/services/network.service.mjs +5 -2
- package/esm2022/src/app/core/services/validator/account.validator.mjs +2 -2
- package/esm2022/src/app/shared/validator/validators.mjs +3 -3
- package/esm2022/src/app/social/feed/feed.component.mjs +117 -30
- package/esm2022/src/app/social/feed/feed.model.mjs +1 -1
- package/esm2022/src/app/social/feed/feed.page.mjs +3 -3
- package/esm2022/src/app/social/feed/feed.service.mjs +63 -12
- package/esm2022/src/app/social/feed/testing/feed.testing.mjs +3 -3
- package/esm2022/src/app/social/message/message.form.mjs +8 -5
- package/esm2022/src/app/social/message/message.modal.mjs +10 -4
- package/esm2022/src/app/social/message/message.model.mjs +2 -2
- package/esm2022/src/app/social/message/message.module.mjs +5 -4
- package/esm2022/src/app/social/message/message.service.mjs +87 -1
- package/esm2022/src/app/social/social.errors.mjs +2 -1
- package/esm2022/src/environments/environment.mjs +7 -4
- package/fesm2022/sumaris-net.ngx-components.mjs +1310 -1048
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +3 -3
- package/src/app/admin/{services/filter → users}/person.filter.d.ts +4 -4
- package/src/app/admin/{services → users}/person.service.d.ts +3 -1
- package/src/app/admin/{services/validator → users}/person.validator.d.ts +4 -4
- package/src/app/admin/users/users.d.ts +2 -2
- package/src/app/core/services/account.service.d.ts +2 -0
- package/src/app/core/services/network.service.d.ts +3 -2
- package/src/app/core/services/validator/account.validator.d.ts +1 -1
- package/src/app/social/feed/feed.component.d.ts +36 -14
- package/src/app/social/feed/feed.model.d.ts +3 -2
- package/src/app/social/feed/feed.service.d.ts +35 -24
- package/src/app/social/message/message.form.d.ts +3 -3
- package/src/app/social/message/message.modal.d.ts +6 -2
- package/src/app/social/message/message.model.d.ts +1 -1
- package/src/app/social/message/message.module.d.ts +2 -1
- package/src/app/social/message/message.service.d.ts +12 -0
- package/src/app/social/social.errors.d.ts +1 -0
- package/src/assets/i18n/en-US.json +7 -3
- package/src/assets/i18n/en.json +5 -2
- package/src/assets/i18n/fr.json +5 -2
- package/src/assets/manifest.json +1 -1
- package/src/theme/_ngx-components.forms.scss +1 -0
- package/src/theme/_ngx-components.table.scss +1 -0
- package/esm2022/src/app/admin/services/filter/person.filter.mjs +0 -76
- package/esm2022/src/app/admin/services/person.service.mjs +0 -184
- package/esm2022/src/app/admin/services/validator/person.validator.mjs +0 -72
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -292,9 +292,9 @@ export * from './src/app/social/feed/feed.directive';
|
|
|
292
292
|
export * from './src/app/social/feed/feed.module';
|
|
293
293
|
export * from './src/app/admin/admin.module';
|
|
294
294
|
export { AdminRoutingModule } from './src/app/admin/admin-routing.module';
|
|
295
|
-
export * from './src/app/admin/
|
|
296
|
-
export * from './src/app/admin/
|
|
297
|
-
export * from './src/app/admin/
|
|
295
|
+
export * from './src/app/admin/users/person.filter';
|
|
296
|
+
export * from './src/app/admin/users/person.validator';
|
|
297
|
+
export * from './src/app/admin/users/person.service';
|
|
298
298
|
export * from './src/app/admin/users/users.module';
|
|
299
299
|
export * from './src/app/admin/users/users';
|
|
300
300
|
export * from './src/app/shared/testing/tests.page';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EntityFilter } from '
|
|
2
|
-
import { Person } from '
|
|
3
|
-
import { EntityAsObjectOptions } from '
|
|
1
|
+
import { EntityFilter } from '../../core/services/model/filter.model';
|
|
2
|
+
import { Person } from '../../core/services/model/person.model';
|
|
3
|
+
import { EntityAsObjectOptions } from '../../core/services/model/entity.model';
|
|
4
4
|
import { StoreObject } from '@apollo/client/core';
|
|
5
|
-
import { FilterFn } from '
|
|
5
|
+
import { FilterFn } from '../../shared/types';
|
|
6
6
|
export declare class PersonFilter extends EntityFilter<PersonFilter, Person> {
|
|
7
7
|
static fromObject: (source: any, opts?: any) => PersonFilter;
|
|
8
8
|
static searchFilter(source: any): FilterFn<Person>;
|
|
@@ -6,11 +6,13 @@ import { Person } from '../../core/services/model/person.model';
|
|
|
6
6
|
import { SortDirection } from '@angular/material/sort';
|
|
7
7
|
import { EntitiesServiceLoadOptions, EntityServiceLoadOptions, LoadResult, SuggestService } from '../../shared/services/entity-service.class';
|
|
8
8
|
import { PlatformService } from '../../core/services/platform.service';
|
|
9
|
-
import { PersonFilter } from './
|
|
9
|
+
import { PersonFilter } from './person.filter';
|
|
10
10
|
import { BaseEntityService } from '../../core/services/base-entity-service.class';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
export declare const PersonFragments: {
|
|
13
|
+
lightPerson: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
13
14
|
person: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
15
|
+
personFilter: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
14
16
|
};
|
|
15
17
|
export declare class PersonService extends BaseEntityService<Person, PersonFilter> implements SuggestService<Person, PersonFilter> {
|
|
16
18
|
protected graphql: GraphqlService;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UntypedFormBuilder, ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { Person } from '
|
|
3
|
-
import { AccountService } from '
|
|
4
|
-
import { FormFieldDefinition } from '
|
|
5
|
-
import { AppValidatorService } from '
|
|
2
|
+
import { Person } from '../../core/services/model/person.model';
|
|
3
|
+
import { AccountService } from '../../core/services/account.service';
|
|
4
|
+
import { FormFieldDefinition } from '../../shared/form/field.model';
|
|
5
|
+
import { AppValidatorService } from '../../core/services/validator/base.validator.class';
|
|
6
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export interface PersonValidatorOptions {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { Person } from '../../core/services/model/person.model';
|
|
3
|
-
import { PersonService } from '
|
|
3
|
+
import { PersonService } from './person.service';
|
|
4
4
|
import { AccountService } from '../../core/services/account.service';
|
|
5
5
|
import { AbstractControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
6
6
|
import { AppTable } from '../../core/table/table.class';
|
|
7
7
|
import { ValidatorService } from '@e-is/ngx-material-table';
|
|
8
8
|
import { FormFieldDefinition } from '../../shared/form/field.model';
|
|
9
|
-
import { PersonFilter } from '
|
|
9
|
+
import { PersonFilter } from './person.filter';
|
|
10
10
|
import { ConfigService } from '../../core/services/config.service';
|
|
11
11
|
import { MatExpansionPanel } from '@angular/material/expansion';
|
|
12
12
|
import { MessageService } from '../../social/message/message.service';
|
|
@@ -88,7 +88,9 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
88
88
|
private _tokenType$;
|
|
89
89
|
private _apiTokenEnabled;
|
|
90
90
|
get account(): Account;
|
|
91
|
+
get account$(): Observable<Account>;
|
|
91
92
|
get person(): Person;
|
|
93
|
+
get person$(): Observable<Person>;
|
|
92
94
|
get department(): Department;
|
|
93
95
|
get tokenType(): AuthTokenType;
|
|
94
96
|
set tokenType(value: AuthTokenType);
|
|
@@ -4,7 +4,7 @@ import { Storage } from '@ionic/storage-angular';
|
|
|
4
4
|
import { Peer } from './model/peer.model';
|
|
5
5
|
import { ModalController, Platform, ToastController } from '@ionic/angular';
|
|
6
6
|
import { ISelectPeerModalOptions } from '../peer/select-peer.modal';
|
|
7
|
-
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
7
|
+
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
|
8
8
|
import { ConnectionType } from '@capacitor/network';
|
|
9
9
|
import { LocalSettingsService } from './local-settings.service';
|
|
10
10
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
@@ -34,7 +34,7 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
|
|
|
34
34
|
private loggingService;
|
|
35
35
|
private translate;
|
|
36
36
|
private toastController;
|
|
37
|
-
onPeerChanges:
|
|
37
|
+
onPeerChanges: Observable<string>;
|
|
38
38
|
onNetworkStatusChanges: BehaviorSubject<ConnectionType>;
|
|
39
39
|
onResetNetworkCache: EventEmitter<any>;
|
|
40
40
|
private readonly _mobile;
|
|
@@ -55,6 +55,7 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
|
|
|
55
55
|
set peer(peer: Peer);
|
|
56
56
|
get connectionTimeout(): number;
|
|
57
57
|
get connectionParams(): ConnectionParams;
|
|
58
|
+
get peer$(): Observable<Peer>;
|
|
58
59
|
constructor(_document: any, platform: Platform, modalCtrl: ModalController, storage: Storage, settings: LocalSettingsService, cache: CacheService, http: HttpClient, environment: Environment, loggingService: ILoggingService, translate: TranslateService, toastController: ToastController);
|
|
59
60
|
/**
|
|
60
61
|
* Register to network event
|
|
@@ -2,7 +2,7 @@ import { UntypedFormBuilder } from '@angular/forms';
|
|
|
2
2
|
import { Account } from '../model/account.model';
|
|
3
3
|
import { AccountService } from '../account.service';
|
|
4
4
|
import { UserSettingsValidatorService } from './user-settings.validator';
|
|
5
|
-
import { PersonValidatorOptions, PersonValidatorService } from '../../../admin/
|
|
5
|
+
import { PersonValidatorOptions, PersonValidatorService } from '../../../admin/users/person.validator';
|
|
6
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export interface AccountValidatorOptions extends PersonValidatorOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { RxState } from '@rx-angular/state';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import { Router } from '@angular/router';
|
|
@@ -8,31 +8,38 @@ import { Environment } from '../../../environments/environment.class';
|
|
|
8
8
|
import { AppColors } from '../../shared/types';
|
|
9
9
|
import { IFeedService } from './feed.service';
|
|
10
10
|
import { NetworkService } from '../../core/services/network.service';
|
|
11
|
-
import { IonModal } from '@ionic/angular';
|
|
11
|
+
import { AlertController, IonModal } from '@ionic/angular';
|
|
12
12
|
import { LocalSettingsService } from '../../core/services/local-settings.service';
|
|
13
|
+
import { AccountService } from '../../core/services/account.service';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
export interface FeedState<T> {
|
|
16
|
+
peerUrl: string;
|
|
17
|
+
userId: number;
|
|
15
18
|
maxAgeInMonths: number;
|
|
16
19
|
maxContentLength: number;
|
|
17
|
-
|
|
20
|
+
urls: string[];
|
|
18
21
|
feeds: T[];
|
|
19
22
|
hasFeeds: boolean;
|
|
23
|
+
locale: string;
|
|
20
24
|
}
|
|
21
25
|
export type FilterItemFunction = (item: JsonFeedItem) => boolean;
|
|
22
|
-
export declare
|
|
23
|
-
export declare class FeedsComponent<T extends JsonFeed = JsonFeed> implements OnInit, OnDestroy {
|
|
26
|
+
export declare class FeedsComponent<T extends JsonFeed = JsonFeed, S extends FeedState<T> = FeedState<T>> implements OnInit, OnDestroy {
|
|
24
27
|
protected environment: Environment;
|
|
25
28
|
feedService: IFeedService<T>;
|
|
26
|
-
protected
|
|
29
|
+
protected accountService: AccountService;
|
|
30
|
+
protected alertCtrl: AlertController;
|
|
31
|
+
protected _state: RxState<S>;
|
|
27
32
|
protected translate: TranslateService;
|
|
28
33
|
protected platform: PlatformService;
|
|
29
34
|
protected networkService: NetworkService;
|
|
30
35
|
protected router: Router;
|
|
31
36
|
protected version: string;
|
|
32
37
|
protected modalItemId: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
protected onRefresh: EventEmitter<any>;
|
|
39
|
+
feeds$: import("rxjs").Observable<S["feeds"]>;
|
|
40
|
+
urls$: import("rxjs").Observable<S["urls"]>;
|
|
41
|
+
hasFeeds$: import("rxjs").Observable<S["hasFeeds"]>;
|
|
42
|
+
userId$: import("rxjs").Observable<S["userId"]>;
|
|
36
43
|
debug: boolean;
|
|
37
44
|
mobile: boolean;
|
|
38
45
|
showHeader: boolean;
|
|
@@ -43,18 +50,21 @@ export declare class FeedsComponent<T extends JsonFeed = JsonFeed> implements On
|
|
|
43
50
|
class: string;
|
|
44
51
|
itemId: string;
|
|
45
52
|
filterItem: FilterItemFunction;
|
|
53
|
+
editItem: EventEmitter<JsonFeedItem>;
|
|
54
|
+
deleteItem: EventEmitter<JsonFeedItem>;
|
|
46
55
|
set feeds(value: T[]);
|
|
47
56
|
get feeds(): T[];
|
|
48
|
-
set
|
|
49
|
-
get
|
|
57
|
+
set urls(value: string[]);
|
|
58
|
+
get urls(): string[];
|
|
50
59
|
get hasFeeds(): boolean;
|
|
51
60
|
set maxAgeInMonths(value: number);
|
|
52
61
|
get maxAgeInMonths(): number;
|
|
53
62
|
set maxContentLength(value: number);
|
|
54
63
|
get maxContentLength(): number;
|
|
64
|
+
get peerUrl(): S["peerUrl"];
|
|
55
65
|
get hostClass(): string;
|
|
56
66
|
modal: IonModal;
|
|
57
|
-
constructor(settings: LocalSettingsService, environment: Environment, feedService: IFeedService<T
|
|
67
|
+
constructor(settings: LocalSettingsService, environment: Environment, feedService: IFeedService<T>, accountService: AccountService, alertCtrl: AlertController);
|
|
58
68
|
ngOnInit(): void;
|
|
59
69
|
ngOnDestroy(): void;
|
|
60
70
|
openFeedHome(feed?: T): Promise<void>;
|
|
@@ -63,6 +73,18 @@ export declare class FeedsComponent<T extends JsonFeed = JsonFeed> implements On
|
|
|
63
73
|
openTag(feed: T, tag: string): Promise<void>;
|
|
64
74
|
getTags(feedOrItem?: T | T['items'][0]): string[];
|
|
65
75
|
protected getFeedHomeUrl(feed: T): string;
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Check if the current user is the author of the feed item
|
|
78
|
+
*/
|
|
79
|
+
canEditItem: (item: JsonFeedItem, userId: number, feed?: T) => boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Handle edit item action
|
|
82
|
+
*/
|
|
83
|
+
onEditItem(event: Event, item: JsonFeedItem): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Handle delete item action
|
|
86
|
+
*/
|
|
87
|
+
onDeleteItem(event: Event, item: JsonFeedItem): Promise<void>;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FeedsComponent<any, any>, [null, null, { optional: true; }, null, null]>;
|
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FeedsComponent<any, any>, "app-feed", never, { "debug": { "alias": "debug"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "showReadMoreButton": { "alias": "showReadMoreButton"; "required": false; }; "headerColor": { "alias": "headerColor"; "required": false; }; "cardColor": { "alias": "cardColor"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "class": { "alias": "class"; "required": false; }; "itemId": { "alias": "itemId"; "required": false; }; "filterItem": { "alias": "filterItem"; "required": false; }; "feeds": { "alias": "feeds"; "required": false; }; "urls": { "alias": "urls"; "required": false; }; "maxAgeInMonths": { "alias": "maxAgeInMonths"; "required": false; }; "maxContentLength": { "alias": "maxContentLength"; "required": false; }; }, { "editItem": "editItem"; "deleteItem": "deleteItem"; }, never, never, false, never>;
|
|
68
90
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { truncateHtml } from '../../shared/html.utils';
|
|
2
|
-
export interface JsonFeed {
|
|
2
|
+
export interface JsonFeed<I extends JsonFeedItem = JsonFeedItem> {
|
|
3
3
|
version: string;
|
|
4
4
|
title: string;
|
|
5
5
|
home_page_url?: string;
|
|
@@ -12,7 +12,7 @@ export interface JsonFeed {
|
|
|
12
12
|
authors: JsonFeedAuthor[];
|
|
13
13
|
language?: string;
|
|
14
14
|
expired?: boolean;
|
|
15
|
-
items:
|
|
15
|
+
items: I[];
|
|
16
16
|
hubs?: {
|
|
17
17
|
type?: string;
|
|
18
18
|
url: string;
|
|
@@ -44,6 +44,7 @@ export interface JsonFeedItem {
|
|
|
44
44
|
truncated: boolean;
|
|
45
45
|
}
|
|
46
46
|
export interface JsonFeedAuthor {
|
|
47
|
+
id?: string;
|
|
47
48
|
name?: string;
|
|
48
49
|
url?: string;
|
|
49
50
|
avatar?: string;
|
|
@@ -1,61 +1,72 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { LoadResult } from '../../shared/services/entity-service.class';
|
|
3
|
-
import { JsonFeed } from './feed.model';
|
|
3
|
+
import { JsonFeed, JsonFeedItem } from './feed.model';
|
|
4
4
|
import { InjectionToken } from '@angular/core';
|
|
5
5
|
import { StartableService } from '../../shared/services/startable-service.class';
|
|
6
6
|
import { NetworkService } from '../../core/services/network.service';
|
|
7
7
|
import { LocalSettingsService } from '../../core/services/local-settings.service';
|
|
8
8
|
import { RxState } from '@rx-angular/state';
|
|
9
9
|
import { Environment } from '../../../environments/environment.class';
|
|
10
|
+
import { PersonService } from '../../admin/users/person.service';
|
|
11
|
+
import { ModalController } from '@ionic/angular';
|
|
12
|
+
import { MessageService } from '../message/message.service';
|
|
10
13
|
import * as i0 from "@angular/core";
|
|
11
14
|
export declare const APP_FEED_SERVICE: InjectionToken<IFeedService<any>>;
|
|
15
|
+
export interface FeedLoadOptions {
|
|
16
|
+
locale?: string;
|
|
17
|
+
maxAgeInMonths?: number;
|
|
18
|
+
maxContentLength?: number;
|
|
19
|
+
cache?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface FeedsLoadOptions extends FeedLoadOptions {
|
|
22
|
+
urls?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface FeedsWatchOptions extends FeedsLoadOptions {
|
|
25
|
+
}
|
|
12
26
|
export interface IFeedService<T extends JsonFeed = JsonFeed> {
|
|
13
27
|
ready(): Promise<FeedServiceState>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
maxContentLength?: number;
|
|
18
|
-
}): Observable<LoadResult<T>>;
|
|
28
|
+
load(url: string, opts?: FeedLoadOptions): Promise<T>;
|
|
29
|
+
loadAll(opts?: FeedsLoadOptions): Promise<LoadResult<T>>;
|
|
30
|
+
watchAll(opts?: FeedsWatchOptions): Observable<LoadResult<T>>;
|
|
19
31
|
getHomeUrl(feed?: T): string;
|
|
20
32
|
getTagUrl(feed: T, tag: string): string;
|
|
33
|
+
openEditModal(event: Event, feedItem: T['items'][0]): Promise<any>;
|
|
34
|
+
deleteItem(feedItem: T['items'][0]): Promise<boolean>;
|
|
21
35
|
feedUrls$: Observable<string[]>;
|
|
22
36
|
}
|
|
23
37
|
export interface FeedServiceState {
|
|
24
38
|
locale: string;
|
|
25
39
|
feedUrls?: string[];
|
|
26
40
|
}
|
|
27
|
-
export declare class FeedService<S extends FeedServiceState> extends StartableService<S> implements IFeedService {
|
|
41
|
+
export declare class FeedService<S extends FeedServiceState, T extends JsonFeed = JsonFeed> extends StartableService<S> implements IFeedService<T> {
|
|
28
42
|
private settings;
|
|
29
43
|
protected environment: Environment;
|
|
30
44
|
protected _logPrefix: string;
|
|
31
45
|
protected _state: RxState<S>;
|
|
32
46
|
protected network: NetworkService;
|
|
47
|
+
protected modalCtrl: ModalController;
|
|
48
|
+
protected messageService: MessageService;
|
|
49
|
+
protected personService: PersonService;
|
|
33
50
|
locale$: Observable<S["locale"]>;
|
|
34
51
|
feedUrls$: Observable<S["feedUrls"]>;
|
|
35
52
|
get feedUrls(): string[];
|
|
36
53
|
set feedUrls(urls: string[]);
|
|
37
54
|
constructor(settings: LocalSettingsService, environment: Environment);
|
|
38
55
|
protected ngOnStart(): Promise<S>;
|
|
39
|
-
watchAll(opts?:
|
|
40
|
-
urls?: string[];
|
|
41
|
-
maxAgeInMonths?: number;
|
|
42
|
-
maxContentLength?: number;
|
|
43
|
-
}): Observable<LoadResult<JsonFeed>>;
|
|
56
|
+
watchAll(opts?: FeedsWatchOptions): Observable<LoadResult<T>>;
|
|
44
57
|
getHomeUrl(feed?: JsonFeed): string;
|
|
45
58
|
getTagUrl(feed: JsonFeed, tag: string): string;
|
|
46
|
-
load(url: string, opts?: {
|
|
47
|
-
locale?: string;
|
|
48
|
-
maxAgeInMonths?: number;
|
|
49
|
-
maxContentLength?: number;
|
|
59
|
+
load(url: string, opts?: FeedLoadOptions & {
|
|
50
60
|
depth?: number;
|
|
51
|
-
}): Promise<
|
|
52
|
-
loadAll(
|
|
53
|
-
locale?: string;
|
|
54
|
-
maxAgeInMonths?: number;
|
|
55
|
-
maxContentLength?: number;
|
|
61
|
+
}): Promise<T>;
|
|
62
|
+
loadAll(opts?: FeedsLoadOptions & {
|
|
56
63
|
depth?: number;
|
|
57
64
|
[key: string]: any;
|
|
58
|
-
}): Promise<LoadResult<
|
|
65
|
+
}): Promise<LoadResult<T>>;
|
|
66
|
+
openEditModal(event: Event, feedItem: JsonFeedItem, opts?: {
|
|
67
|
+
showToast?: boolean;
|
|
68
|
+
}): Promise<boolean>;
|
|
69
|
+
deleteItem(feedItem: JsonFeedItem): Promise<boolean>;
|
|
59
70
|
protected resolveFeed(json: any, url: string, opts?: {
|
|
60
71
|
locale?: string;
|
|
61
72
|
maxAgeInMonths?: number;
|
|
@@ -68,6 +79,6 @@ export declare class FeedService<S extends FeedServiceState> extends StartableSe
|
|
|
68
79
|
depth?: number;
|
|
69
80
|
}): Promise<JsonFeed>;
|
|
70
81
|
protected onAfterLoadAll(): void;
|
|
71
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FeedService<any>, [null, { optional: true; }]>;
|
|
72
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FeedService<any>>;
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FeedService<any, any>, [null, { optional: true; }]>;
|
|
83
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FeedService<any, any>>;
|
|
73
84
|
}
|
|
@@ -4,12 +4,12 @@ import { Message } from './message.model';
|
|
|
4
4
|
import { AppForm } from '../../core/form/form.class';
|
|
5
5
|
import { Person } from '../../core/services/model/person.model';
|
|
6
6
|
import { SuggestFn } from '../../shared/services/entity-service.class';
|
|
7
|
-
import { PersonFilter } from '../../admin/
|
|
7
|
+
import { PersonFilter } from '../../admin/users/person.filter';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class MessageForm extends AppForm<Message> implements OnInit {
|
|
10
10
|
private formBuilder;
|
|
11
11
|
private readonly cd;
|
|
12
|
-
|
|
12
|
+
mobile: boolean;
|
|
13
13
|
suggestFn: SuggestFn<Person, PersonFilter>;
|
|
14
14
|
subjectMinLength: number;
|
|
15
15
|
subjectMaxLength: number;
|
|
@@ -32,5 +32,5 @@ export declare class MessageForm extends AppForm<Message> implements OnInit {
|
|
|
32
32
|
}): void;
|
|
33
33
|
protected markForCheck(): void;
|
|
34
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageForm, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageForm, "app-message-form", never, { "suggestFn": { "alias": "suggestFn"; "required": false; }; "subjectMinLength": { "alias": "subjectMinLength"; "required": false; }; "subjectMaxLength": { "alias": "subjectMaxLength"; "required": false; }; "bodyMaxLength": { "alias": "bodyMaxLength"; "required": false; }; "bodyAutoHeight": { "alias": "bodyAutoHeight"; "required": false; }; "canSelectType": { "alias": "canSelectType"; "required": false; }; "canRecipientFilter": { "alias": "canRecipientFilter"; "required": false; }; "recipientFilterCount": { "alias": "recipientFilterCount"; "required": false; }; }, {}, never, never, false, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageForm, "app-message-form", never, { "mobile": { "alias": "mobile"; "required": false; }; "suggestFn": { "alias": "suggestFn"; "required": false; }; "subjectMinLength": { "alias": "subjectMinLength"; "required": false; }; "subjectMaxLength": { "alias": "subjectMaxLength"; "required": false; }; "bodyMaxLength": { "alias": "bodyMaxLength"; "required": false; }; "bodyAutoHeight": { "alias": "bodyAutoHeight"; "required": false; }; "canSelectType": { "alias": "canSelectType"; "required": false; }; "canRecipientFilter": { "alias": "canRecipientFilter"; "required": false; }; "recipientFilterCount": { "alias": "recipientFilterCount"; "required": false; }; }, {}, never, never, false, never>;
|
|
36
36
|
}
|
|
@@ -3,12 +3,14 @@ import { ModalController } from '@ionic/angular';
|
|
|
3
3
|
import { Message } from './message.model';
|
|
4
4
|
import { Person } from '../../core/services/model/person.model';
|
|
5
5
|
import { SuggestFn } from '../../shared/services/entity-service.class';
|
|
6
|
-
import { PersonFilter } from '../../admin/
|
|
6
|
+
import { PersonFilter } from '../../admin/users/person.filter';
|
|
7
7
|
import { LocalSettingsService } from '../../core/services/local-settings.service';
|
|
8
8
|
import { AccountService } from '../../core/services/account.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export interface MessageModalOptions {
|
|
11
|
+
debug?: boolean;
|
|
11
12
|
suggestFn: SuggestFn<Person, PersonFilter>;
|
|
13
|
+
title?: string;
|
|
12
14
|
data?: Message;
|
|
13
15
|
canSelectType?: boolean;
|
|
14
16
|
canRecipientFilter?: boolean;
|
|
@@ -20,6 +22,8 @@ export declare class MessageModal implements OnInit, AfterViewInit, MessageModal
|
|
|
20
22
|
protected accountService: AccountService;
|
|
21
23
|
protected cd: ChangeDetectorRef;
|
|
22
24
|
readonly mobile: boolean;
|
|
25
|
+
debug: boolean;
|
|
26
|
+
title: string;
|
|
23
27
|
suggestFn: SuggestFn<Person, PersonFilter>;
|
|
24
28
|
data: Message;
|
|
25
29
|
canSelectType: boolean;
|
|
@@ -39,5 +43,5 @@ export declare class MessageModal implements OnInit, AfterViewInit, MessageModal
|
|
|
39
43
|
emitEvent?: boolean;
|
|
40
44
|
}): void;
|
|
41
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageModal, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageModal, "app-message-modal", never, { "suggestFn": { "alias": "suggestFn"; "required": false; }; "data": { "alias": "data"; "required": false; }; "canSelectType": { "alias": "canSelectType"; "required": false; }; "canRecipientFilter": { "alias": "canRecipientFilter"; "required": false; }; "recipientFilterCount": { "alias": "recipientFilterCount"; "required": false; }; }, {}, never, never, false, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageModal, "app-message-modal", never, { "debug": { "alias": "debug"; "required": false; }; "title": { "alias": "title"; "required": false; }; "suggestFn": { "alias": "suggestFn"; "required": false; }; "data": { "alias": "data"; "required": false; }; "canSelectType": { "alias": "canSelectType"; "required": false; }; "canRecipientFilter": { "alias": "canRecipientFilter"; "required": false; }; "recipientFilterCount": { "alias": "recipientFilterCount"; "required": false; }; }, {}, never, never, false, never>;
|
|
43
47
|
}
|
|
@@ -2,7 +2,7 @@ import { Entity, EntityAsObjectOptions } from '../../core/services/model/entity.
|
|
|
2
2
|
import { StoreObject } from '@apollo/client/core';
|
|
3
3
|
import { EntityFilter } from '../../core/services/model/filter.model';
|
|
4
4
|
import { Person } from '../../core/services/model/person.model';
|
|
5
|
-
import { PersonFilter } from '../../admin/
|
|
5
|
+
import { PersonFilter } from '../../admin/users/person.filter';
|
|
6
6
|
import { FilterFn } from '../../shared/types';
|
|
7
7
|
export declare const MessageTypes: {
|
|
8
8
|
INBOX_MESSAGE: string;
|
|
@@ -5,8 +5,9 @@ import * as i3 from "@angular/common";
|
|
|
5
5
|
import * as i4 from "../../core/core.module";
|
|
6
6
|
import * as i5 from "../../shared/shared.module";
|
|
7
7
|
import * as i6 from "@angular/material/chips";
|
|
8
|
+
import * as i7 from "../../shared/debug/debug.module";
|
|
8
9
|
export declare class MessageModule {
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MessageModule, [typeof i1.MessageModal, typeof i2.MessageForm], [typeof i3.CommonModule, typeof i4.CoreModule, typeof i5.SharedModule, typeof i6.MatChipsModule], [typeof i1.MessageModal]>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MessageModule, [typeof i1.MessageModal, typeof i2.MessageForm], [typeof i3.CommonModule, typeof i4.CoreModule, typeof i5.SharedModule, typeof i6.MatChipsModule, typeof i7.SharedDebugModule], [typeof i1.MessageModal]>;
|
|
11
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<MessageModule>;
|
|
12
13
|
}
|
|
@@ -23,9 +23,21 @@ export declare class MessageService extends BaseGraphqlService<Message, MessageF
|
|
|
23
23
|
send(entity: Message, opts?: {
|
|
24
24
|
showToast?: boolean;
|
|
25
25
|
}): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Delete a message by ID
|
|
28
|
+
*
|
|
29
|
+
* @param id
|
|
30
|
+
* @param opts
|
|
31
|
+
*/
|
|
32
|
+
delete(id: number, opts?: {
|
|
33
|
+
showToast?: boolean;
|
|
34
|
+
}): Promise<boolean>;
|
|
26
35
|
openComposeModal(options: MessageModalOptions & {
|
|
27
36
|
showToast?: boolean;
|
|
28
37
|
}): Promise<any>;
|
|
38
|
+
load(id: number, opts?: {
|
|
39
|
+
toEntity?: boolean;
|
|
40
|
+
}): Promise<Message>;
|
|
29
41
|
protected showToast(opts: ShowToastOptions): Promise<import("@ionic/core").OverlayEventDetail<any>>;
|
|
30
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, [null, null, null, null, { optional: true; }]>;
|
|
31
43
|
static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
|
|
@@ -3,6 +3,7 @@ export declare const SocialErrorCodes: {
|
|
|
3
3
|
SAVE_USER_EVENT_ERROR: number;
|
|
4
4
|
COUNT_USER_EVENT_ERROR: number;
|
|
5
5
|
SEND_MESSAGE_ERROR: number;
|
|
6
|
+
DELETE_MESSAGE_ERROR: number;
|
|
6
7
|
SUBSCRIBE_USER_EVENTS_ERROR: number;
|
|
7
8
|
SUBSCRIBE_JOB_PROGRESSION_ERROR: number;
|
|
8
9
|
LOAD_JOB_PROGRESSIONS_ERROR: number;
|
|
@@ -556,7 +556,7 @@
|
|
|
556
556
|
"MESSAGE": {
|
|
557
557
|
"TYPE": "Message type",
|
|
558
558
|
"RECIPIENTS": "Recipients",
|
|
559
|
-
"RECIPIENT_FILTER_COUNT": "{{count}} filtered
|
|
559
|
+
"RECIPIENT_FILTER_COUNT": "{{count}} filtered user(s)",
|
|
560
560
|
"SUBJECT": "Object",
|
|
561
561
|
"BODY_HELP": "Your message...",
|
|
562
562
|
"NEW": {
|
|
@@ -570,7 +570,9 @@
|
|
|
570
570
|
},
|
|
571
571
|
"FEED": {
|
|
572
572
|
"NEWS": "News",
|
|
573
|
-
"
|
|
573
|
+
"READ_MORE": "Read more",
|
|
574
|
+
"SHOW_ALL_FEED": "Show all",
|
|
575
|
+
"EDIT_TITLE": "Edit post"
|
|
574
576
|
},
|
|
575
577
|
"ERROR": {
|
|
576
578
|
"LOAD_USER_EVENTS_ERROR": "Error while loading notifications",
|
|
@@ -578,11 +580,13 @@
|
|
|
578
580
|
"SAVE_USER_EVENT_ERROR": "Error while saving user notification",
|
|
579
581
|
"SUBSCRIBE_USER_EVENTS_ERROR": "Error while listening user events changes",
|
|
580
582
|
"SEND_MESSAGE_ERROR": "Error while sending message",
|
|
583
|
+
"DELETE_MESSAGE_ERROR": "Error while deleting message",
|
|
581
584
|
"LOAD_JOB_PROGRESSIONS_ERROR": "Error while loading job progressions",
|
|
582
585
|
"SUBSCRIBE_JOB_PROGRESSION_ERROR": "Error while listening job progression changes"
|
|
583
586
|
},
|
|
584
587
|
"INFO": {
|
|
585
|
-
"MESSAGE_SENT": "Message <b>sent</b>"
|
|
588
|
+
"MESSAGE_SENT": "Message <b>sent</b>",
|
|
589
|
+
"MESSAGE_DELETED": "Message <b>deleted</b>"
|
|
586
590
|
}
|
|
587
591
|
},
|
|
588
592
|
"FILE": {
|
package/src/assets/i18n/en.json
CHANGED
|
@@ -571,7 +571,8 @@
|
|
|
571
571
|
"FEED": {
|
|
572
572
|
"NEWS": "News",
|
|
573
573
|
"READ_MORE": "Read more",
|
|
574
|
-
"SHOW_ALL_FEED": "Show all"
|
|
574
|
+
"SHOW_ALL_FEED": "Show all",
|
|
575
|
+
"EDIT_TITLE": "Edit post"
|
|
575
576
|
},
|
|
576
577
|
"ERROR": {
|
|
577
578
|
"LOAD_USER_EVENTS_ERROR": "Error while loading notifications",
|
|
@@ -579,11 +580,13 @@
|
|
|
579
580
|
"SAVE_USER_EVENT_ERROR": "Error while saving user notification",
|
|
580
581
|
"SUBSCRIBE_USER_EVENTS_ERROR": "Error while listening user events changes",
|
|
581
582
|
"SEND_MESSAGE_ERROR": "Error while sending message",
|
|
583
|
+
"DELETE_MESSAGE_ERROR": "Error while deleting message",
|
|
582
584
|
"LOAD_JOB_PROGRESSIONS_ERROR": "Error while loading job progressions",
|
|
583
585
|
"SUBSCRIBE_JOB_PROGRESSION_ERROR": "Error while listening job progression changes"
|
|
584
586
|
},
|
|
585
587
|
"INFO": {
|
|
586
|
-
"MESSAGE_SENT": "Message <b>sent</b>"
|
|
588
|
+
"MESSAGE_SENT": "Message <b>sent</b>",
|
|
589
|
+
"MESSAGE_DELETED": "Message <b>deleted</b>"
|
|
587
590
|
}
|
|
588
591
|
},
|
|
589
592
|
"FILE": {
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -574,7 +574,8 @@
|
|
|
574
574
|
"FEED": {
|
|
575
575
|
"NEWS": "Actualités",
|
|
576
576
|
"READ_MORE": "Lire la suite",
|
|
577
|
-
"SHOW_ALL_FEED": "Voir tout"
|
|
577
|
+
"SHOW_ALL_FEED": "Voir tout",
|
|
578
|
+
"EDIT_TITLE": "Modifier l'article"
|
|
578
579
|
},
|
|
579
580
|
"ERROR": {
|
|
580
581
|
"LOAD_USER_EVENTS_ERROR": "Erreur de chargement des notifications",
|
|
@@ -582,11 +583,13 @@
|
|
|
582
583
|
"SAVE_USER_EVENT_ERROR": "Erreur de sauvegarde de la notification",
|
|
583
584
|
"SUBSCRIBE_USER_EVENTS_ERROR": "Erreur lors de l'abonnement aux notifications",
|
|
584
585
|
"SEND_MESSAGE_ERROR": "Erreur lors de l'envoi du message",
|
|
586
|
+
"DELETE_MESSAGE_ERROR": "Erreur lors de la suppression du message",
|
|
585
587
|
"LOAD_JOB_PROGRESSIONS_ERROR": "Erreur lors du chargement des tâches",
|
|
586
588
|
"SUBSCRIBE_JOB_PROGRESSION_ERROR": "Erreur lors de l'abonnement à une tâche"
|
|
587
589
|
},
|
|
588
590
|
"INFO": {
|
|
589
|
-
"MESSAGE_SENT": "Message <b>envoyé</b>"
|
|
591
|
+
"MESSAGE_SENT": "Message <b>envoyé</b>",
|
|
592
|
+
"MESSAGE_DELETED": "Message <b>supprimé</b>"
|
|
590
593
|
}
|
|
591
594
|
},
|
|
592
595
|
"FILE": {
|
package/src/assets/manifest.json
CHANGED
|
@@ -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.
|
|
5
|
+
"version": "18.17.1",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|
|
@@ -254,6 +254,7 @@ form.form-container {
|
|
|
254
254
|
// Radio
|
|
255
255
|
.mat-mdc-radio-button {
|
|
256
256
|
--mat-checkbox-label-text-color: var(--app-form-color);
|
|
257
|
+
--mat-radio-label-text-color: var(--app-form-color);
|
|
257
258
|
|
|
258
259
|
--mdc-radio-disabled-unselected-icon-color: rgba(var(--ion-text-color-rgb, 0, 0, 0), 1);
|
|
259
260
|
--mdc-radio-disabled-selected-icon-color: rgba(var(--ion-text-color-rgb, 0, 0, 0), 1);
|
|
@@ -276,6 +276,7 @@
|
|
|
276
276
|
--mat-select-enabled-trigger-text-color: var(--ion-text-color);
|
|
277
277
|
--mat-select-disabled-trigger-text-color: var(--ion-text-color);
|
|
278
278
|
--mat-checkbox-label-text-color: var(--ion-text-color);
|
|
279
|
+
--mat-radio-label-text-color: var(--ion-text-color);
|
|
279
280
|
|
|
280
281
|
background-color: var(--ion-background-color);
|
|
281
282
|
|