@sumaris-net/ngx-components 18.7.13 → 18.7.14

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/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.7.13",
4
+ "version": "18.7.14",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -83,6 +83,7 @@ export * from './src/app/shared/pipes/math.pipes';
83
83
  export * from './src/app/shared/pipes/arrays.pipe';
84
84
  export * from './src/app/shared/pipes/maps.pipe';
85
85
  export * from './src/app/shared/pipes/string.pipes';
86
+ export * from './src/app/shared/pipes/url.pipes';
86
87
  export * from './src/app/shared/pipes/observable.pipes';
87
88
  export * from './src/app/shared/pipes/translate-context.pipe';
88
89
  export * from './src/app/shared/pipes/ng-init.pipe';
@@ -3,7 +3,7 @@ import { BehaviorSubject, Subject, Subscription } from 'rxjs';
3
3
  import { TableDataSource, TableElement } from '@e-is/ngx-material-table';
4
4
  import { Environment } from '../../../../environments/environment.class';
5
5
  import { ImageService } from '../image.service';
6
- import { Image } from '../image.model';
6
+ import { Image, ImageSize } from '../image.model';
7
7
  import { AlertController, IonModal, IonPopover, Platform } from '@ionic/angular';
8
8
  import { CollectionViewer, ListRange } from '@angular/cdk/collections';
9
9
  import { TranslateService } from '@ngx-translate/core';
@@ -17,6 +17,11 @@ export interface ISwiper extends Swiper {
17
17
  activeIndex: number;
18
18
  imagesLoaded: number;
19
19
  }
20
+ export interface ImageGallerySizes {
21
+ mosaic: ImageSize | string;
22
+ list: ImageSize | string;
23
+ modal: ImageSize | string;
24
+ }
20
25
  export declare class AppImageGalleryComponent<T extends Image> implements OnInit, OnDestroy, CollectionViewer, AfterContentChecked {
21
26
  protected image: ImageService;
22
27
  protected platform: Platform;
@@ -57,6 +62,8 @@ export declare class AppImageGalleryComponent<T extends Image> implements OnInit
57
62
  $implicit: T;
58
63
  mode: GalleryMode;
59
64
  }>;
65
+ imageSizes: ImageGallerySizes;
66
+ imageSizeQueryParam: string;
60
67
  set dataSource(dataSource: TableDataSource<T, any, any, any>);
61
68
  get dataSource(): TableDataSource<T, any, any, any>;
62
69
  get enabled(): boolean;
@@ -100,9 +107,12 @@ export declare class AppImageGalleryComponent<T extends Image> implements OnInit
100
107
  protected canDeleteRows(rows: TableElement<T>[], opts?: {
101
108
  interactive?: boolean;
102
109
  }): Promise<boolean>;
110
+ protected getImageSizeQueryParams(mode?: GalleryMode | 'modal'): {
111
+ [key: string]: any;
112
+ };
103
113
  protected markForCheck(): void;
104
114
  static ɵfac: i0.ɵɵFactoryDeclaration<AppImageGalleryComponent<any>, [null, null, null, null, null, { optional: true; }]>;
105
- static ɵcmp: i0.ɵɵComponentDeclaration<AppImageGalleryComponent<any>, "app-image-gallery", never, { "cardColor": { "alias": "cardColor"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "confirmBeforeDelete": { "alias": "confirmBeforeDelete"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "showFabButton": { "alias": "showFabButton"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showAddTextButton": { "alias": "showAddTextButton"; "required": false; }; "showAddCardButton": { "alias": "showAddCardButton"; "required": false; }; "addButtonColor": { "alias": "addButtonColor"; "required": false; }; "addButtonText": { "alias": "addButtonText"; "required": false; }; "cardTemplate": { "alias": "cardTemplate"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; }, { "onBeforeDeleteRows": "onBeforeDeleteRows"; "onAfterAddRows": "onAfterAddRows"; "onAfterEditRow": "onAfterEditRow"; "click": "click"; }, never, never, false, never>;
115
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppImageGalleryComponent<any>, "app-image-gallery", never, { "cardColor": { "alias": "cardColor"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "confirmBeforeDelete": { "alias": "confirmBeforeDelete"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "showFabButton": { "alias": "showFabButton"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showAddTextButton": { "alias": "showAddTextButton"; "required": false; }; "showAddCardButton": { "alias": "showAddCardButton"; "required": false; }; "addButtonColor": { "alias": "addButtonColor"; "required": false; }; "addButtonText": { "alias": "addButtonText"; "required": false; }; "cardTemplate": { "alias": "cardTemplate"; "required": false; }; "imageSizes": { "alias": "imageSizes"; "required": false; }; "imageSizeQueryParam": { "alias": "imageSizeQueryParam"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; }, { "onBeforeDeleteRows": "onBeforeDeleteRows"; "onAfterAddRows": "onAfterAddRows"; "onAfterEditRow": "onAfterEditRow"; "click": "click"; }, never, never, false, never>;
106
116
  static ngAcceptInputType_debug: unknown;
107
117
  static ngAcceptInputType_disabled: unknown;
108
118
  static ngAcceptInputType_readOnly: unknown;
@@ -3,3 +3,4 @@ export interface Image {
3
3
  url: string;
4
4
  title?: string;
5
5
  }
6
+ export type ImageSize = 'small' | 'medium' | 'large';
@@ -13,22 +13,23 @@ import * as i11 from "./arrays.pipe";
13
13
  import * as i12 from "./maps.pipe";
14
14
  import * as i13 from "./string.pipes";
15
15
  import * as i14 from "./dates.pipe";
16
- import * as i15 from "./translate-context.pipe";
17
- import * as i16 from "./ng-init.pipe";
18
- import * as i17 from "./form.pipes";
19
- import * as i18 from "./colors.pipe";
20
- import * as i19 from "./types.pipes";
21
- import * as i20 from "./maskito.pipe";
22
- import * as i21 from "./selection.pipes";
23
- import * as i22 from "./badge.pipes";
24
- import * as i23 from "./html.pipes";
25
- import * as i24 from "./display-with.pipe";
26
- import * as i25 from "./observable.pipes";
27
- import * as i26 from "@angular/common";
28
- import * as i27 from "@ionic/angular";
29
- import * as i28 from "@ngx-translate/core";
16
+ import * as i15 from "./url.pipes";
17
+ import * as i16 from "./translate-context.pipe";
18
+ import * as i17 from "./ng-init.pipe";
19
+ import * as i18 from "./form.pipes";
20
+ import * as i19 from "./colors.pipe";
21
+ import * as i20 from "./types.pipes";
22
+ import * as i21 from "./maskito.pipe";
23
+ import * as i22 from "./selection.pipes";
24
+ import * as i23 from "./badge.pipes";
25
+ import * as i24 from "./html.pipes";
26
+ import * as i25 from "./display-with.pipe";
27
+ import * as i26 from "./observable.pipes";
28
+ import * as i27 from "@angular/common";
29
+ import * as i28 from "@ionic/angular";
30
+ import * as i29 from "@ngx-translate/core";
30
31
  export declare class SharedPipesModule {
31
32
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedPipesModule, never>;
32
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i10.RoundPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i11.ArrayDistinctPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i14.IsValidDatePipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i13.StrReplacePipe, typeof i13.TruncTextPipe, typeof i13.TruncHtmlPipe, typeof i1.BooleanFormatPipe, typeof i15.TranslateContextPipe, typeof i15.TranslatablePipe, typeof i16.NgInitDirective, typeof i17.FormErrorPipe, typeof i17.FormErrorTranslatePipe, typeof i17.FormGetPipe, typeof i17.FormGetControlPipe, typeof i17.FormGetArrayPipe, typeof i17.FormGetGroupPipe, typeof i17.FormGetValuePipe, typeof i18.MatColorPipe, typeof i19.AsAnyPipe, typeof i19.AsArrayPipe, typeof i19.AsObservablePipe, typeof i19.AsFloatLabelTypePipe, typeof i20.MaskitoPlaceholderPipe, typeof i21.IsSelectedPipe, typeof i21.IsNotEmptySelectionPipe, typeof i21.IsEmptySelectionPipe, typeof i21.SelectionLengthPipe, typeof i21.IsMultipleSelectionPipe, typeof i21.IsSingleSelectionPipe, typeof i22.BadgeNumberPipe, typeof i19.AsBooleanPipe, typeof i23.SafeHtmlPipe, typeof i23.SafeStylePipe, typeof i23.NoHtmlPipe, typeof i24.DisplayWithPipe, typeof i25.FirstTruePipe, typeof i25.FirstFalsePipe, typeof i25.FirstPipe], [typeof i26.CommonModule, typeof i27.IonicModule, typeof i28.TranslateModule], [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i10.RoundPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i11.ArrayDistinctPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i14.IsValidDatePipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i13.StrReplacePipe, typeof i13.TruncTextPipe, typeof i13.TruncHtmlPipe, typeof i1.BooleanFormatPipe, typeof i15.TranslateContextPipe, typeof i15.TranslatablePipe, typeof i16.NgInitDirective, typeof i17.FormErrorPipe, typeof i17.FormErrorTranslatePipe, typeof i17.FormGetPipe, typeof i17.FormGetControlPipe, typeof i17.FormGetArrayPipe, typeof i17.FormGetGroupPipe, typeof i17.FormGetValuePipe, typeof i18.MatColorPipe, typeof i19.AsAnyPipe, typeof i19.AsArrayPipe, typeof i19.AsObservablePipe, typeof i19.AsFloatLabelTypePipe, typeof i20.MaskitoPlaceholderPipe, typeof i21.IsSelectedPipe, typeof i21.IsNotEmptySelectionPipe, typeof i21.IsEmptySelectionPipe, typeof i21.SelectionLengthPipe, typeof i21.IsMultipleSelectionPipe, typeof i21.IsSingleSelectionPipe, typeof i22.BadgeNumberPipe, typeof i19.AsBooleanPipe, typeof i23.SafeHtmlPipe, typeof i23.SafeStylePipe, typeof i23.NoHtmlPipe, typeof i24.DisplayWithPipe, typeof i25.FirstTruePipe, typeof i25.FirstFalsePipe, typeof i25.FirstPipe]>;
33
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i10.RoundPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i11.ArrayDistinctPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i14.IsValidDatePipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i13.StrReplacePipe, typeof i13.TruncHtmlPipe, typeof i13.TruncTextPipe, typeof i15.AppendQueryParamsPipePipe, typeof i1.BooleanFormatPipe, typeof i16.TranslateContextPipe, typeof i16.TranslatablePipe, typeof i17.NgInitDirective, typeof i18.FormErrorPipe, typeof i18.FormErrorTranslatePipe, typeof i18.FormGetPipe, typeof i18.FormGetControlPipe, typeof i18.FormGetArrayPipe, typeof i18.FormGetGroupPipe, typeof i18.FormGetValuePipe, typeof i19.MatColorPipe, typeof i20.AsAnyPipe, typeof i20.AsArrayPipe, typeof i20.AsObservablePipe, typeof i20.AsFloatLabelTypePipe, typeof i21.MaskitoPlaceholderPipe, typeof i22.IsSelectedPipe, typeof i22.IsNotEmptySelectionPipe, typeof i22.IsEmptySelectionPipe, typeof i22.SelectionLengthPipe, typeof i22.IsMultipleSelectionPipe, typeof i22.IsSingleSelectionPipe, typeof i23.BadgeNumberPipe, typeof i20.AsBooleanPipe, typeof i24.SafeHtmlPipe, typeof i24.SafeStylePipe, typeof i24.NoHtmlPipe, typeof i25.DisplayWithPipe, typeof i26.FirstTruePipe, typeof i26.FirstFalsePipe, typeof i26.FirstPipe], [typeof i27.CommonModule, typeof i28.IonicModule, typeof i29.TranslateModule], [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i10.RoundPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayLastPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i11.ArrayDistinctPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i14.IsValidDatePipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i13.StrReplacePipe, typeof i13.TruncHtmlPipe, typeof i13.TruncTextPipe, typeof i15.AppendQueryParamsPipePipe, typeof i1.BooleanFormatPipe, typeof i16.TranslateContextPipe, typeof i16.TranslatablePipe, typeof i17.NgInitDirective, typeof i18.FormErrorPipe, typeof i18.FormErrorTranslatePipe, typeof i18.FormGetPipe, typeof i18.FormGetControlPipe, typeof i18.FormGetArrayPipe, typeof i18.FormGetGroupPipe, typeof i18.FormGetValuePipe, typeof i19.MatColorPipe, typeof i20.AsAnyPipe, typeof i20.AsArrayPipe, typeof i20.AsObservablePipe, typeof i20.AsFloatLabelTypePipe, typeof i21.MaskitoPlaceholderPipe, typeof i22.IsSelectedPipe, typeof i22.IsNotEmptySelectionPipe, typeof i22.IsEmptySelectionPipe, typeof i22.SelectionLengthPipe, typeof i22.IsMultipleSelectionPipe, typeof i22.IsSingleSelectionPipe, typeof i23.BadgeNumberPipe, typeof i20.AsBooleanPipe, typeof i24.SafeHtmlPipe, typeof i24.SafeStylePipe, typeof i24.NoHtmlPipe, typeof i25.DisplayWithPipe, typeof i26.FirstTruePipe, typeof i26.FirstFalsePipe, typeof i26.FirstPipe]>;
33
34
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedPipesModule>;
34
35
  }
@@ -0,0 +1,27 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Pipe permettant d'ajouter des paramètres de requête à une URL.
5
+ *
6
+ * Cette pipe prend une URL de base et un objet contenant des paires clé-valeur
7
+ * représentant les paramètres de requête à ajouter. Elle encode correctement les
8
+ * paramètres et s'assure de les ajouter avec le séparateur approprié ('?' ou '&').
9
+ * Les paramètres avec des valeurs nulles ou undefined sont automatiquement filtrés.
10
+ *
11
+ * @example
12
+ * // Dans un template
13
+ * <a [href]="'https://example.com' | appendQueryParams:{id: 123, name: 'test'}">Lien</a>
14
+ * // Résultat: https://example.com?id=123&name=test
15
+ *
16
+ * @example
17
+ * // Si l'URL contient déjà des paramètres
18
+ * <a [href]="'https://example.com?page=1' | appendQueryParams:{sort: 'asc'}">Lien</a>
19
+ * // Résultat: https://example.com?page=1&sort=asc
20
+ */
21
+ export declare class AppendQueryParamsPipePipe implements PipeTransform {
22
+ transform(url: string, queryParams: {
23
+ [key: string]: any;
24
+ }): any;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppendQueryParamsPipePipe, never>;
26
+ static ɵpipe: i0.ɵɵPipeDeclaration<AppendQueryParamsPipePipe, "appendQueryParams", false>;
27
+ }
@@ -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.7.13",
5
+ "version": "18.7.14",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{