@sumaris-net/ngx-components 18.14.9 → 18.14.11

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/esm2022/src/app/core/home/home.mjs +13 -11
  2. package/esm2022/src/app/core/peer/select-peer.modal.mjs +2 -1
  3. package/esm2022/src/app/social/feed/discourse/discourse-feed.service.mjs +4 -1
  4. package/esm2022/src/app/social/feed/feed.component.mjs +65 -18
  5. package/esm2022/src/app/social/feed/feed.module.mjs +5 -5
  6. package/esm2022/src/app/social/feed/feed.service.mjs +1 -1
  7. package/esm2022/src/app/social/feed/testing/feed.testing.mjs +66 -0
  8. package/esm2022/src/app/social/feed/testing/feed.testing.module.mjs +23 -0
  9. package/esm2022/src/app/social/job/progression/job-progression.component.mjs +4 -1
  10. package/esm2022/src/app/social/job/progression/job-progression.icon.mjs +11 -8
  11. package/esm2022/src/app/social/social.testing.module.mjs +31 -5
  12. package/esm2022/src/environments/environment.mjs +2 -2
  13. package/fesm2022/sumaris-net.ngx-components.mjs +209 -59
  14. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/src/app/core/home/home.d.ts +3 -3
  17. package/src/app/core/install/install-upgrade-card.component.d.ts +1 -1
  18. package/src/app/shared/inputs.d.ts +1 -1
  19. package/src/app/social/feed/discourse/discourse-feed.service.d.ts +1 -0
  20. package/src/app/social/feed/feed.component.d.ts +16 -4
  21. package/src/app/social/feed/feed.module.d.ts +2 -2
  22. package/src/app/social/feed/feed.service.d.ts +1 -0
  23. package/src/app/social/feed/testing/feed.testing.d.ts +23 -0
  24. package/src/app/social/feed/testing/feed.testing.module.d.ts +12 -0
  25. package/src/app/social/job/progression/job-progression.component.d.ts +3 -2
  26. package/src/app/social/job/progression/job-progression.icon.d.ts +1 -1
  27. package/src/app/social/social.testing.module.d.ts +2 -1
  28. package/src/theme/_mixins.scss +23 -3
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.14.9",
4
+ "version": "18.14.11",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, InjectionToken, OnDestroy } from '@angular/core';
1
+ import { ChangeDetectorRef, InjectionToken, OnDestroy, OnInit } from '@angular/core';
2
2
  import { IonContent, ModalController, ToastController } from '@ionic/angular';
3
3
  import { BehaviorSubject } from 'rxjs';
4
4
  import { AccountService } from '../services/account.service';
@@ -39,7 +39,7 @@ export interface HomePageState {
39
39
  pageHistory: HistoryPageReference[];
40
40
  darkMode: boolean;
41
41
  }
42
- export declare class HomePage extends RxState<HomePageState> implements OnDestroy {
42
+ export declare class HomePage extends RxState<HomePageState> implements OnInit, OnDestroy {
43
43
  private accountService;
44
44
  private modalCtrl;
45
45
  private translate;
@@ -53,9 +53,9 @@ export declare class HomePage extends RxState<HomePageState> implements OnDestro
53
53
  protected locales: LocaleConfig[];
54
54
  protected buttons: IMenuItem[];
55
55
  protected config: IHomePageConfig;
56
- private readonly _debug;
57
56
  private _subscription;
58
57
  private _config;
58
+ protected readonly debug: boolean;
59
59
  protected readonly mobile: boolean;
60
60
  protected readonly showAccountButton: boolean;
61
61
  protected accountName: string;
@@ -46,7 +46,7 @@ export declare class AppInstallUpgradeCard implements OnInit, OnDestroy {
46
46
  download(event: Event, link: InstallAppLink): Promise<void>;
47
47
  openFile(event: Event, link: InstallAppLink): Promise<void>;
48
48
  tryOnline(): Promise<void>;
49
- getPlatformName(platform: 'android' | 'ios' | 'electron'): "" | "desktop" | "Android" | "iOS";
49
+ getPlatformName(platform: 'android' | 'ios' | 'electron'): "desktop" | "" | "Android" | "iOS";
50
50
  asLink(value: any): InstallAppLink;
51
51
  private checkNeedInstallOrUpdate;
52
52
  private getCompatibleInstallLinks;
@@ -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): 0 | 1 | -1;
20
+ export declare function tabindexComparator(a: InputElement, b: InputElement): 1 | -1 | 0;
21
21
  export interface CanGainFocusOptions {
22
22
  minTabindex?: number;
23
23
  maxTabindex?: number;
@@ -25,6 +25,7 @@ export declare class DiscourseFeedService extends StartableService<DiscourseFeed
25
25
  constructor(settings: LocalSettingsService, environment: Environment);
26
26
  protected ngOnStart(): Promise<DiscourseFeedServiceState>;
27
27
  watchAll(opts?: {
28
+ urls?: string[];
28
29
  maxAgeInMonths?: number;
29
30
  maxContentLength?: number;
30
31
  }): Observable<LoadResult<JsonFeed>>;
@@ -1,3 +1,4 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
1
2
  import { RxState } from '@rx-angular/state';
2
3
  import { TranslateService } from '@ngx-translate/core';
3
4
  import { Router } from '@angular/router';
@@ -10,30 +11,41 @@ import * as i0 from "@angular/core";
10
11
  export interface FeedState<T> {
11
12
  maxAgeInMonths: number;
12
13
  maxContentLength: number;
14
+ feedUrls: string[];
13
15
  feeds: T[];
14
16
  hasFeeds: boolean;
15
17
  }
16
- export declare class FeedsComponent<T extends JsonFeed = JsonFeed> {
18
+ export declare class FeedsComponent<T extends JsonFeed = JsonFeed> implements OnInit, OnDestroy {
17
19
  protected environment: Environment;
18
20
  feedService: IFeedService<T>;
19
- protected _debug: boolean;
20
21
  protected _state: RxState<FeedState<T>>;
21
22
  protected translate: TranslateService;
22
23
  protected platform: PlatformService;
23
24
  protected router: Router;
24
25
  protected version: string;
25
26
  feeds$: import("rxjs").Observable<T[]>;
27
+ feedUrls$: import("rxjs").Observable<string[]>;
26
28
  hasFeeds$: import("rxjs").Observable<boolean>;
29
+ debug: boolean;
27
30
  set feeds(value: T[]);
28
31
  get feeds(): T[];
32
+ set feedUrls(value: string[]);
33
+ get feedUrls(): string[];
29
34
  get hasFeeds(): boolean;
30
35
  showHeader: boolean;
31
- headerTextColor: AppColors;
36
+ headerColor: AppColors;
37
+ cardColor: AppColors | 'light-transparent';
38
+ shape: 'round' | 'legacy';
39
+ class: string;
40
+ get hostClass(): string;
41
+ get borderRadius(): string;
32
42
  constructor(environment: Environment, feedService: IFeedService<T>);
43
+ ngOnInit(): void;
44
+ ngOnDestroy(): void;
33
45
  openFeedHome(feed?: T): Promise<void>;
34
46
  openUrl(url: string): Promise<void>;
35
47
  openTag(feed: T, tag: string): Promise<void>;
36
48
  getTags(feedOrItem?: T | T['items'][0]): string[];
37
49
  static ɵfac: i0.ɵɵFactoryDeclaration<FeedsComponent<any>, [null, { optional: true; }]>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<FeedsComponent<any>, "app-feeds", never, { "feeds": { "alias": "feeds"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "headerTextColor": { "alias": "headerTextColor"; "required": false; }; }, {}, never, never, false, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<FeedsComponent<any>, "app-feed", never, { "debug": { "alias": "debug"; "required": false; }; "feeds": { "alias": "feeds"; "required": false; }; "feedUrls": { "alias": "feedUrls"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "headerColor": { "alias": "headerColor"; "required": false; }; "cardColor": { "alias": "cardColor"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, never, false, never>;
39
51
  }
@@ -3,9 +3,9 @@ import * as i1 from "./feed.component";
3
3
  import * as i2 from "./feed.directive";
4
4
  import * as i3 from "../../shared/shared.module";
5
5
  import * as i4 from "@ngx-translate/core";
6
- import * as i5 from "@angular/common";
6
+ import * as i5 from "../../shared/debug/debug.module";
7
7
  export declare class FeedModule {
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<FeedModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<FeedModule, [typeof i1.FeedsComponent, typeof i2.FeedDirective], [typeof i3.SharedModule, typeof i4.TranslateModule, typeof i5.NgOptimizedImage], [typeof i4.TranslateModule, typeof i1.FeedsComponent, typeof i2.FeedDirective]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FeedModule, [typeof i1.FeedsComponent, typeof i2.FeedDirective], [typeof i3.SharedModule, typeof i4.TranslateModule, typeof i5.SharedDebugModule], [typeof i4.TranslateModule, typeof i1.FeedsComponent, typeof i2.FeedDirective]>;
10
10
  static ɵinj: i0.ɵɵInjectorDeclaration<FeedModule>;
11
11
  }
@@ -5,6 +5,7 @@ import { InjectionToken } from '@angular/core';
5
5
  export declare const APP_FEED_SERVICE: InjectionToken<IFeedService<any>>;
6
6
  export interface IFeedService<T extends JsonFeed = JsonFeed> {
7
7
  watchAll(opts?: {
8
+ urls?: string[];
8
9
  maxAgeInMonths?: number;
9
10
  maxContentLength?: number;
10
11
  }): Observable<LoadResult<T>>;
@@ -0,0 +1,23 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { Environment } from '../../../../environments/environment.class';
3
+ import { LocalSettingsService } from '../../../core/services/local-settings.service';
4
+ import { LocalSettings } from '../../../core/services/model/settings.model';
5
+ import { AppColors } from '../../../shared/types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class FeedTestingPage {
8
+ protected settings: LocalSettingsService;
9
+ protected cd: ChangeDetectorRef;
10
+ private environment;
11
+ protected availableFeedUrls: string[];
12
+ protected availableColors: (AppColors | 'light-transparent')[];
13
+ protected availableShapes: string[];
14
+ protected debug: boolean;
15
+ protected feedUrls: string[];
16
+ protected shape: 'round' | 'legacy';
17
+ protected headerColor: AppColors | 'light-transparent';
18
+ protected cardColor: AppColors | 'light-transparent';
19
+ constructor(settings: LocalSettingsService, cd: ChangeDetectorRef, environment: Environment);
20
+ protected start(settings: LocalSettings): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<FeedTestingPage, [null, null, { optional: true; }]>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<FeedTestingPage, "app-feed-test", never, {}, {}, never, never, false, never>;
23
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./feed.testing";
3
+ import * as i2 from "../../../shared/shared.module";
4
+ import * as i3 from "@ngx-translate/core";
5
+ import * as i4 from "../feed.module";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "@angular/material/select";
8
+ export declare class FeedTestingModule {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<FeedTestingModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FeedTestingModule, [typeof i1.FeedTestingPage], [typeof i2.SharedModule, typeof i3.TranslateModule, typeof i4.FeedModule, typeof i5.ReactiveFormsModule, typeof i6.MatSelectModule], [typeof i1.FeedTestingPage, typeof i4.FeedModule]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<FeedTestingModule>;
12
+ }
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { JobProgression } from './job-progression.model';
3
3
  import { RxState } from '@rx-angular/state';
4
4
  import { Observable } from 'rxjs';
@@ -9,7 +9,7 @@ export interface JobProgressionState {
9
9
  value: number;
10
10
  type: 'determinate' | 'indeterminate';
11
11
  }
12
- export declare class JobProgressionComponent extends RxState<JobProgressionState> implements OnInit {
12
+ export declare class JobProgressionComponent extends RxState<JobProgressionState> implements OnInit, OnDestroy {
13
13
  showName: boolean;
14
14
  jobProgression$: Observable<JobProgression>;
15
15
  name$: Observable<string>;
@@ -18,6 +18,7 @@ export declare class JobProgressionComponent extends RxState<JobProgressionState
18
18
  type$: Observable<"determinate" | "indeterminate">;
19
19
  constructor();
20
20
  ngOnInit(): void;
21
+ ngOnDestroy(): void;
21
22
  static ɵfac: i0.ɵɵFactoryDeclaration<JobProgressionComponent, never>;
22
23
  static ɵcmp: i0.ɵɵComponentDeclaration<JobProgressionComponent, "app-job-progression-component", never, { "showName": { "alias": "showName"; "required": false; }; "jobProgression$": { "alias": "jobProgression$"; "required": false; }; }, {}, never, never, false, never>;
23
24
  }
@@ -48,6 +48,7 @@ export declare class JobProgressionIcon extends RxState<JobProgressionIconState>
48
48
  constructor(jobProgressionService: IJobProgressionService, popoverController: PopoverController, cd: ChangeDetectorRef);
49
49
  get jobProgressions(): BehaviorSubject<JobProgression>[];
50
50
  ngOnInit(): void;
51
+ ngOnDestroy(): void;
51
52
  protected startListenJob(id: number, job?: JobProgression): BehaviorSubject<JobProgression>;
52
53
  protected stopListenJob(id: number, opts?: {
53
54
  emitEvent?: boolean;
@@ -56,7 +57,6 @@ export declare class JobProgressionIcon extends RxState<JobProgressionIconState>
56
57
  protected updateValue(): void;
57
58
  showList(event: Event): Promise<void>;
58
59
  protected markForCheck(): void;
59
- ngOnDestroy(): void;
60
60
  static ɵfac: i0.ɵɵFactoryDeclaration<JobProgressionIcon, [{ optional: true; }, null, null]>;
61
61
  static ɵcmp: i0.ɵɵComponentDeclaration<JobProgressionIcon, "app-job-progression-icon", never, { "debug": { "alias": "debug"; "required": false; }; "titleI18n": { "alias": "titleI18n"; "required": false; }; "options": { "alias": "options"; "required": false; }; "autoHide": { "alias": "autoHide"; "required": false; }; "headerActions": { "alias": "headerActions"; "required": false; }; }, { "jobFinished": "jobFinished"; }, never, never, false, never>;
62
62
  }
@@ -5,9 +5,10 @@ import * as i2 from "@ngx-translate/core";
5
5
  import * as i3 from "@angular/router";
6
6
  import * as i4 from "./job/testing/job.testing.module";
7
7
  import * as i5 from "./user-event/testing/user-event.testing.module";
8
+ import * as i6 from "./feed/testing/feed.testing.module";
8
9
  export declare const SOCIAL_TESTING_PAGES: TestingPage[];
9
10
  export declare class SocialTestingModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<SocialTestingModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<SocialTestingModule, never, [typeof i1.CommonModule, typeof i2.TranslateModule, typeof i3.RouterModule, typeof i4.JobTestingModule, typeof i5.UserEventTestingModule], never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SocialTestingModule, never, [typeof i1.CommonModule, typeof i2.TranslateModule, typeof i3.RouterModule, typeof i4.JobTestingModule, typeof i5.UserEventTestingModule, typeof i6.FeedTestingModule], never>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<SocialTestingModule>;
13
14
  }
@@ -45,9 +45,9 @@
45
45
  $shade: map-get($value, shade);
46
46
  $tint: map-get($value, tint);
47
47
  --ion-color-base: var(--ion-color-#{""+$color-name}, #{$base}) !important;
48
- --ion-color-base-rgb: var(--ion-color-#{""+$color-name}-rgb, #{color-to-rgb-list($base)}) !important;
48
+ --ion-color-base-rgb: var(--ion-color-#{""+$color-name}-rgb, #{color-to-rgb-list($base)});
49
49
  --ion-color-contrast: var(--ion-color-#{""+$color-name}-contrast, #{$contrast}) !important;
50
- --ion-color-contrast-rgb: var(--ion-color-#{""+$color-name}-contrast-rgb, #{color-to-rgb-list($contrast)}) !important;
50
+ --ion-color-contrast-rgb: var(--ion-color-#{""+$color-name}-contrast-rgb, #{color-to-rgb-list($contrast)});
51
51
  --ion-color-shade: var(--ion-color-#{""+$color-name}-shade, #{$shade}) !important;
52
52
  --ion-color-tint: var(--ion-color-#{""+$color-name}-tint, #{$tint}) !important;
53
53
  }
@@ -147,7 +147,7 @@
147
147
  --app-form-color-disabled: #{$app-form-color-disabled};
148
148
  --app-form-color-computed: #{$app-form-color-computed};
149
149
  --app-form-field-background-color: #{$app-form-field-background-color};
150
- --app-form-field-background-color-rgb: #{$app-form-field-background-color-rgb};
150
+ --app-form-field-background-color-rgb: #{$app-form-field-background-color-rgb};
151
151
  --app-form-field-background-color-shade: #{$app-form-field-background-color-shade};
152
152
  --app-form-field-focus-background-color: #{$app-form-field-focus-background-color};
153
153
  --app-form-field-disabled-background-color: #{$app-form-field-disabled-background-color};
@@ -155,6 +155,26 @@
155
155
  --app-form-field-disabled-label-color: #{$app-form-field-disabled-label-color};
156
156
  --app-table-row-item-selected-background-color: #{$app-table-row-item-selected-background-color};
157
157
  --app-table-row-item-selected-text-color: #{$app-table-row-item-selected-text-color};
158
+
159
+ --ion-color-step-50: #f3f3f3;
160
+ --ion-color-step-100: #e7e7e7;
161
+ --ion-color-step-150: #dbdbdb;
162
+ --ion-color-step-200: #d0d0d0;
163
+ --ion-color-step-250: #c4c4c4;
164
+ --ion-color-step-300: #b8b8b8;
165
+ --ion-color-step-350: #acacac;
166
+ --ion-color-step-400: #a0a0a0;
167
+ --ion-color-step-450: #949494;
168
+ --ion-color-step-500: #898989;
169
+ --ion-color-step-550: #7d7d7d;
170
+ --ion-color-step-600: #666666;
171
+ --ion-color-step-650: #646464;
172
+ --ion-color-step-700: #595959;
173
+ --ion-color-step-750: #4d4d4d;
174
+ --ion-color-step-800: #414141;
175
+ --ion-color-step-850: #363636;
176
+ --ion-color-step-900: #2a2a2a;
177
+ --ion-color-step-950: #1e1e1e;
158
178
  }
159
179
 
160
180
  @mixin css-variables-to-root-mobile() {