@sumaris-net/ngx-components 1.20.1 → 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.
- package/bundles/sumaris-net.ngx-components.umd.js +209 -26
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +12 -0
- package/esm2015/public_api.js +7 -3
- package/esm2015/src/app/core/install/install-upgrade-card.component.js +3 -2
- package/esm2015/src/app/core/services/platform.service.js +3 -2
- package/esm2015/src/app/shared/directives/autotitle.directive.js +27 -0
- package/esm2015/src/app/shared/directives/directives.module.js +6 -3
- package/esm2015/src/app/shared/file/csv.utils.js +90 -0
- package/esm2015/src/app/shared/file/file.utils.js +63 -0
- package/esm2015/src/app/shared/file/uri.utils.js +23 -0
- package/esm2015/src/app/shared/functions.js +3 -1
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +3 -2
- package/esm2015/src/app/shared/material/chips/material.chips.js +3 -2
- package/esm2015/src/app/shared/material/swipe/material.swipe.js +3 -2
- package/esm2015/src/app/shared/pipes/pipes.module.js +7 -4
- package/esm2015/src/app/shared/pipes/property.pipes.js +74 -0
- package/esm2015/src/app/shared/upload-file/testing/upload-file.testing.js +2 -2
- package/fesm2015/sumaris-net.ngx-components.js +199 -24
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +6 -2
- package/src/app/shared/directives/autotitle.directive.d.ts +7 -0
- package/src/app/shared/file/csv.utils.d.ts +18 -0
- package/src/app/shared/{files.d.ts → file/file.utils.d.ts} +3 -9
- package/src/app/shared/file/uri.utils.d.ts +7 -0
- package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +2 -1
- package/src/app/shared/material/chips/material.chips.d.ts +2 -1
- package/src/app/shared/material/swipe/material.swipe.d.ts +2 -1
- package/src/app/shared/pipes/property.pipes.d.ts +14 -0
- package/src/theme/_mixins.scss +2 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
- package/esm2015/src/app/shared/files.js +0 -84
- package/esm2015/src/app/shared/pipes/properties.pipe.js +0 -20
- package/src/app/shared/pipes/properties.pipe.d.ts +0 -7
package/package.json
CHANGED
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/
|
|
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 '
|
|
2
|
-
import { UploadFilePopoverOptions } from '
|
|
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
|
-
}
|
|
@@ -4,7 +4,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|
|
4
4
|
import { LoadResult, SuggestFn, SuggestService } from '../../services/entity-service.class';
|
|
5
5
|
import { InputElement } from '../../inputs';
|
|
6
6
|
import { DisplayFn, EqualsFn } from '../../form/field.model';
|
|
7
|
-
import { FloatLabelType } from '@angular/material/form-field';
|
|
7
|
+
import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
|
|
8
8
|
import { MatSelect } from '@angular/material/select';
|
|
9
9
|
import { MatAutocomplete, MatAutocompleteTrigger } from '@angular/material/autocomplete';
|
|
10
10
|
import { IonSearchbar } from '@ionic/angular';
|
|
@@ -51,6 +51,7 @@ export declare class MatAutocompleteField implements OnInit, OnDestroy, InputEle
|
|
|
51
51
|
formControl: FormControl;
|
|
52
52
|
formControlName: string;
|
|
53
53
|
floatLabel: FloatLabelType;
|
|
54
|
+
appearance: MatFormFieldAppearance;
|
|
54
55
|
placeholder: string;
|
|
55
56
|
suggestFn: SuggestFn<any, any>;
|
|
56
57
|
required: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, FormControl, FormGroupDirective } from '@angular/forms';
|
|
3
3
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
|
-
import { FloatLabelType } from '@angular/material/form-field';
|
|
4
|
+
import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
|
|
5
5
|
import { MatAutocomplete, MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
|
|
6
6
|
import { InputElement } from '../../inputs';
|
|
7
7
|
import { SuggestFn } from '../../services/entity-service.class';
|
|
@@ -19,6 +19,7 @@ export declare class MatChipsField implements OnInit, OnDestroy, InputElement, C
|
|
|
19
19
|
formControl: FormControl;
|
|
20
20
|
formControlName: string;
|
|
21
21
|
floatLabel: FloatLabelType;
|
|
22
|
+
appearance: MatFormFieldAppearance;
|
|
22
23
|
placeholder: string;
|
|
23
24
|
suggestFn: SuggestFn<any, any>;
|
|
24
25
|
required: boolean;
|
|
@@ -3,7 +3,7 @@ import { ControlValueAccessor, FormControl, FormGroupDirective } from '@angular/
|
|
|
3
3
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
4
|
import { InputElement, selectInputContent } from '../../inputs';
|
|
5
5
|
import { EqualsFn, DisplayFn } from '../../form/field.model';
|
|
6
|
-
import { FloatLabelType } from '@angular/material/form-field';
|
|
6
|
+
import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
|
|
7
7
|
import { IonSlides } from '@ionic/angular';
|
|
8
8
|
import { MatButton } from '@angular/material/button';
|
|
9
9
|
export declare class MatSwipeField implements OnInit, InputElement, OnDestroy, ControlValueAccessor {
|
|
@@ -28,6 +28,7 @@ export declare class MatSwipeField implements OnInit, InputElement, OnDestroy, C
|
|
|
28
28
|
formControl: FormControl;
|
|
29
29
|
formControlName: string;
|
|
30
30
|
floatLabel: FloatLabelType;
|
|
31
|
+
appearance: MatFormFieldAppearance;
|
|
31
32
|
placeholder: string;
|
|
32
33
|
debug: boolean;
|
|
33
34
|
required: boolean;
|
|
@@ -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
|
+
}
|
package/src/theme/_mixins.scss
CHANGED
|
@@ -111,6 +111,8 @@
|
|
|
111
111
|
--app-paginator-height: #{$app-paginator-height};
|
|
112
112
|
--app-form-buttons-bar-height: #{$app-form-buttons-bar-height};
|
|
113
113
|
--app-footer-height: var(--app-form-buttons-bar-height);
|
|
114
|
+
--mat-tab-link-height: #{$mat-tab-link-height};
|
|
115
|
+
--mat-tab-bar-height: #{$mat-tab-bar-height};
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
@mixin css-variables-to-root-mobile() {
|