@sumaris-net/ngx-components 1.20.3 → 1.20.4

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 (30) hide show
  1. package/bundles/sumaris-net.ngx-components.umd.js +203 -23
  2. package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
  3. package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
  4. package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
  5. package/doc/changelog.md +5 -0
  6. package/esm2015/public_api.js +7 -3
  7. package/esm2015/src/app/core/install/install-upgrade-card.component.js +3 -2
  8. package/esm2015/src/app/core/services/platform.service.js +3 -2
  9. package/esm2015/src/app/shared/directives/autotitle.directive.js +27 -0
  10. package/esm2015/src/app/shared/directives/directives.module.js +6 -3
  11. package/esm2015/src/app/shared/file/csv.utils.js +90 -0
  12. package/esm2015/src/app/shared/file/file.utils.js +63 -0
  13. package/esm2015/src/app/shared/file/uri.utils.js +23 -0
  14. package/esm2015/src/app/shared/functions.js +3 -1
  15. package/esm2015/src/app/shared/pipes/pipes.module.js +7 -4
  16. package/esm2015/src/app/shared/pipes/property.pipes.js +74 -0
  17. package/esm2015/src/app/shared/upload-file/testing/upload-file.testing.js +2 -2
  18. package/fesm2015/sumaris-net.ngx-components.js +193 -21
  19. package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
  20. package/package.json +1 -1
  21. package/public_api.d.ts +6 -2
  22. package/src/app/shared/directives/autotitle.directive.d.ts +7 -0
  23. package/src/app/shared/file/csv.utils.d.ts +18 -0
  24. package/src/app/shared/{files.d.ts → file/file.utils.d.ts} +3 -9
  25. package/src/app/shared/file/uri.utils.d.ts +7 -0
  26. package/src/app/shared/pipes/property.pipes.d.ts +14 -0
  27. package/sumaris-net.ngx-components.metadata.json +1 -1
  28. package/esm2015/src/app/shared/files.js +0 -84
  29. package/esm2015/src/app/shared/pipes/properties.pipe.js +0 -20
  30. package/src/app/shared/pipes/properties.pipe.d.ts +0 -7
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": "1.20.3",
4
+ "version": "1.20.4",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -49,6 +49,7 @@ export * from './src/app/shared/directives/directives.module';
49
49
  export * from './src/app/shared/directives/autofocus.directive';
50
50
  export * from './src/app/shared/directives/ng-var.directive';
51
51
  export * from './src/app/shared/directives/drag-and-drop.directive';
52
+ export * from './src/app/shared/directives/autotitle.directive';
52
53
  export * from './src/app/shared/pipes/pipes.module';
53
54
  export * from './src/app/shared/pipes/date-format.pipe';
54
55
  export * from './src/app/shared/pipes/date-from-now.pipe';
@@ -56,9 +57,9 @@ export * from './src/app/shared/pipes/date-diff-duration.pipe';
56
57
  export * from './src/app/shared/pipes/latlong-format.pipe';
57
58
  export * from './src/app/shared/pipes/highlight.pipe';
58
59
  export * from './src/app/shared/pipes/number-format.pipe';
59
- export * from './src/app/shared/pipes/properties.pipe';
60
60
  export * from './src/app/shared/pipes/duration.pipe';
61
61
  export * from './src/app/shared/pipes/file-size.pipe';
62
+ export * from './src/app/shared/pipes/property.pipes';
62
63
  export * from './src/app/shared/pipes/math.pipes';
63
64
  export * from './src/app/shared/pipes/arrays.pipe';
64
65
  export * from './src/app/shared/pipes/maps.pipe';
@@ -83,7 +84,9 @@ export * from './src/app/shared/observables';
83
84
  export * from './src/app/shared/events';
84
85
  export * from './src/app/shared/alerts';
85
86
  export * from './src/app/shared/platforms';
86
- export * from './src/app/shared/files';
87
+ export * from './src/app/shared/file/file.utils';
88
+ export * from './src/app/shared/file/csv.utils';
89
+ export * from './src/app/shared/file/uri.utils';
87
90
  export * from './src/app/shared/hotkeys/shared-hotkeys.module';
88
91
  export * from './src/app/shared/hotkeys/hotkeys.service';
89
92
  export * from './src/app/shared/hotkeys/dialog/hotkeys-dialog.component';
@@ -188,3 +191,4 @@ export * from './src/app/core/table/testing/table.testing.module';
188
191
  export * from './src/app/core/table/testing/table.testing';
189
192
  export * from './src/app/core/text-popover/testing/text-popover.testing.module';
190
193
  export * from './src/app/core/text-popover/testing/text-popover.testing';
194
+ export { UriUtils } from './src/app/shared/file/uri.utils';
@@ -0,0 +1,7 @@
1
+ import { AfterContentChecked, ElementRef } from '@angular/core';
2
+ export declare class AutoTitleDirective implements AfterContentChecked {
3
+ private readonly elementRef;
4
+ private readonly element;
5
+ constructor(elementRef: ElementRef<HTMLElement>);
6
+ ngAfterContentChecked(): void;
7
+ }
@@ -0,0 +1,18 @@
1
+ import { Observable } from 'rxjs';
2
+ import { FileEvent } from '../upload-file/upload-file.model';
3
+ export declare class CsvUtils {
4
+ static exportToFile(rows: object[], opts?: {
5
+ filename?: string;
6
+ headers?: string[];
7
+ separator?: string;
8
+ encoding?: string;
9
+ }): void;
10
+ static parseFile(file: File, opts?: {
11
+ separator?: string;
12
+ encoding?: string;
13
+ }): Observable<FileEvent<string[][]>>;
14
+ static parseCSV(body: string, opts?: {
15
+ separator?: string;
16
+ skipEmptyLine?: boolean;
17
+ }): string[][];
18
+ }
@@ -1,5 +1,5 @@
1
- import { FileEvent, UploadFile } from './upload-file/upload-file.model';
2
- import { UploadFilePopoverOptions } from './upload-file/upload-file-popover.component';
1
+ import { FileEvent, UploadFile } from '../upload-file/upload-file.model';
2
+ import { UploadFilePopoverOptions } from '../upload-file/upload-file-popover.component';
3
3
  import { PopoverController } from '@ionic/angular';
4
4
  import { Observable } from 'rxjs';
5
5
  import { OverlayEventDetail } from '@ionic/core';
@@ -7,13 +7,7 @@ export declare const MimeTypes: Readonly<{
7
7
  ANDROID_APK: string;
8
8
  }>;
9
9
  export declare class FilesUtils {
10
+ static UTF8_BOM_CHAR: Uint8Array;
10
11
  static showUploadPopover<T>(popoverController: PopoverController, event: UIEvent, opts: UploadFilePopoverOptions<T>): Promise<OverlayEventDetail<UploadFile<T>[]>>;
11
12
  static readAsText(file: File, encoding?: string): Observable<FileEvent<string>>;
12
13
  }
13
- export declare class UriUtils {
14
- /**
15
- * Extract the filename, from an uri (using the last slash)
16
- * @param uri
17
- */
18
- static getFilename(uri: string): string;
19
- }
@@ -0,0 +1,7 @@
1
+ export declare class UriUtils {
2
+ /**
3
+ * Extract the filename, from an uri (using the last slash)
4
+ * @param uri
5
+ */
6
+ static getFilename(uri: string): string;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { DateFormatPipe } from './date-format.pipe';
3
+ import { FormFieldDefinition } from '../form/field.model';
4
+ export declare class PropertyGetPipe implements PipeTransform {
5
+ transform(obj: any, args: string | {
6
+ key: string;
7
+ defaultValue?: any;
8
+ }): any;
9
+ }
10
+ export declare class PropertyFormatPipe implements PipeTransform {
11
+ private dateFormat;
12
+ constructor(dateFormat: DateFormatPipe);
13
+ transform(obj: any, keyOrDefinition: string | FormFieldDefinition): string | Promise<string>;
14
+ }