@sumaris-net/ngx-components 18.16.5 → 18.16.6

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.16.5",
4
+ "version": "18.16.6",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -121,6 +121,8 @@ export * from './src/app/shared/observables';
121
121
  export * from './src/app/shared/events';
122
122
  export * from './src/app/shared/alerts';
123
123
  export * from './src/app/shared/platforms';
124
+ export * from './src/app/shared/html.utils';
125
+ export * from './src/app/shared/base64.utils';
124
126
  export * from './src/app/shared/geolocation/geolocation.utils';
125
127
  export * from './src/app/shared/version/versions';
126
128
  export * from './src/app/shared/file/file.utils';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Converts an ArrayBuffer into a Base64 encoded string.
3
+ *
4
+ * @param {ArrayBuffer} arrayBuffer - The buffer to be converted into a Base64 string.
5
+ * @return {string} The Base64 encoded string representation of the provided ArrayBuffer.
6
+ */
7
+ export declare function base64ArrayBuffer(arrayBuffer: any): string;
@@ -169,7 +169,6 @@ export declare class Beans {
169
169
  }
170
170
  export declare function findParentWithClass(elem: HTMLElement, className: string): HTMLElement;
171
171
  export declare function intersectArrays<T = any>(values: T[][]): T[];
172
- export declare function noHtml(value: string): string;
173
172
  /**
174
173
  * Interpolates a string by replacing placeholders with corresponding values from the provided object.
175
174
  *
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Removes all HTML tags from a given string.
3
+ *
4
+ * @param {string} value - The input string potentially containing HTML tags.
5
+ * @return {string} A string with all HTML tags removed.
6
+ */
7
+ export declare function noHtml(value: string): string;
8
+ /**
9
+ * Truncates the given HTML string to the specified maximum length, ensuring that the truncation
10
+ * does not break HTML structure and attempts to truncate at word or tag boundaries when possible.
11
+ * Appends an ellipsis (" (...)") to indicate truncation if the content exceeds the maximum length.
12
+ *
13
+ * @param {string} html - The HTML string to be truncated.
14
+ * @param {number} maxLength - The maximum length for the truncated string, including the ellipsis.
15
+ * @return {string} The truncated HTML string, or the original HTML string if its length is within the maximum length.
16
+ */
17
+ export declare function truncateHtml(html: string, maxLength: number): string;
@@ -1,6 +1,13 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
3
  import * as i0 from "@angular/core";
4
+ /**
5
+ * A custom Angular pipe that removes all HTML tags from a provided string.
6
+ * This is useful for cases where HTML content needs to be sanitized or plain text is required.
7
+ * Applies a function to strip HTML tags from the input value.
8
+ *
9
+ * It implements the `PipeTransform` interface provided by Angular to define its transformation logic.
10
+ */
4
11
  export declare class NoHtmlPipe implements PipeTransform {
5
12
  transform(value: string): string;
6
13
  static ɵfac: i0.ɵɵFactoryDeclaration<NoHtmlPipe, never>;
@@ -20,3 +27,24 @@ export declare class SafeStylePipe implements PipeTransform {
20
27
  static ɵfac: i0.ɵɵFactoryDeclaration<SafeStylePipe, never>;
21
28
  static ɵpipe: i0.ɵɵPipeDeclaration<SafeStylePipe, "safeStyle", false>;
22
29
  }
30
+ /**
31
+ * A custom Angular pipe that truncates an HTML string to a specified maximum length.
32
+ * This pipe ensures that the HTML structure remains valid and properly closed,
33
+ * even after truncation.
34
+ *
35
+ * It uses the `truncateHtml` function internally to handle the truncation logic.
36
+ * This can be useful when there is a need to display a shortened version of an HTML
37
+ * formatted string while preserving its structure.
38
+ *
39
+ * @pipe TruncateHtmlPipe
40
+ * @member {string} name - The name to use for this pipe in Angular templates.
41
+ * @method transform - Takes an HTML string input and truncates it to the specified length.
42
+ * @param value - The HTML string to be truncated.
43
+ * @param maxLength - The maximum length for the truncated string.
44
+ * @returns The truncated HTML string with valid structure.
45
+ */
46
+ export declare class TruncateHtmlPipe implements PipeTransform {
47
+ transform(value: string, maxLength: number): string;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruncateHtmlPipe, never>;
49
+ static ɵpipe: i0.ɵɵPipeDeclaration<TruncateHtmlPipe, "truncateHtml", false>;
50
+ }
@@ -30,6 +30,6 @@ import * as i28 from "@ionic/angular";
30
30
  import * as i29 from "@ngx-translate/core";
31
31
  export declare class SharedPipesModule {
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedPipesModule, never>;
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 i11.ArrayFindByPropertyPipe, typeof i11.SplitArrayInChunksPipe, typeof i11.ArrayMapPipe, 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 i1.MapToPipe, 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 i26.MapPipe], [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 i11.ArrayFindByPropertyPipe, typeof i11.SplitArrayInChunksPipe, typeof i11.ArrayMapPipe, 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 i1.MapToPipe, 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 i26.MapPipe]>;
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 i11.ArrayFindByPropertyPipe, typeof i11.SplitArrayInChunksPipe, typeof i11.ArrayMapPipe, 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 i1.MapToPipe, 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 i24.TruncateHtmlPipe, typeof i25.DisplayWithPipe, typeof i26.FirstTruePipe, typeof i26.FirstFalsePipe, typeof i26.FirstPipe, typeof i26.MapPipe], [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 i11.ArrayFindByPropertyPipe, typeof i11.SplitArrayInChunksPipe, typeof i11.ArrayMapPipe, 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 i1.MapToPipe, 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 i24.TruncateHtmlPipe, typeof i25.DisplayWithPipe, typeof i26.FirstTruePipe, typeof i26.FirstFalsePipe, typeof i26.FirstPipe, typeof i26.MapPipe]>;
34
34
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedPipesModule>;
35
35
  }
@@ -1,3 +1,4 @@
1
+ import { truncateHtml } from '../../shared/html.utils';
1
2
  export interface JsonFeed {
2
3
  version: string;
3
4
  title: string;
@@ -58,9 +59,7 @@ export declare class JsonFeedUtils {
58
59
  static truncateFeedItemsHtml(feed: JsonFeed, opts?: {
59
60
  maxContentLength?: number;
60
61
  }): JsonFeed;
61
- static truncateHtml(html: string, opts?: {
62
- maxContentLength?: number;
63
- }): string;
62
+ static truncateHtml: typeof truncateHtml;
64
63
  /**
65
64
  * Migrate from old version 1.0 to 1.1
66
65
  * @param feed
@@ -4,8 +4,9 @@ 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
6
  import * as i5 from "../../shared/debug/debug.module";
7
+ import * as i6 from "../../shared/markdown/markdown.module";
7
8
  export declare class FeedModule {
8
9
  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.SharedDebugModule], [typeof i4.TranslateModule, typeof i1.FeedsComponent, typeof i2.FeedDirective]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FeedModule, [typeof i1.FeedsComponent, typeof i2.FeedDirective], [typeof i3.SharedModule, typeof i4.TranslateModule, typeof i5.SharedDebugModule, typeof i6.SharedMarkdownModule], [typeof i4.TranslateModule, typeof i1.FeedsComponent, typeof i2.FeedDirective]>;
10
11
  static ɵinj: i0.ɵɵInjectorDeclaration<FeedModule>;
11
12
  }
@@ -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.16.5",
5
+ "version": "18.16.6",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{