@sumaris-net/ngx-components 1.20.26 → 1.20.29

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 (39) hide show
  1. package/bundles/sumaris-net.ngx-components.umd.js +120 -113
  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 +7 -0
  6. package/esm2015/public_api.js +3 -1
  7. package/esm2015/src/app/core/form/form-buttons-bar.component.js +2 -2
  8. package/esm2015/src/app/shared/functions.js +1 -60
  9. package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +4 -3
  10. package/esm2015/src/app/shared/material/autocomplete/testing/autocomplete.test.js +3 -2
  11. package/esm2015/src/app/shared/material/boolean/material.boolean.js +3 -2
  12. package/esm2015/src/app/shared/material/chips/material.chips.js +4 -3
  13. package/esm2015/src/app/shared/material/chips/testing/chips.test.js +3 -2
  14. package/esm2015/src/app/shared/material/datetime/material.date.js +3 -2
  15. package/esm2015/src/app/shared/material/datetime/material.dateshort.js +3 -2
  16. package/esm2015/src/app/shared/material/datetime/material.datetime.js +4 -3
  17. package/esm2015/src/app/shared/material/duration/material.duration.js +3 -2
  18. package/esm2015/src/app/shared/material/latlong/material.latlong.js +3 -2
  19. package/esm2015/src/app/shared/pipes/arrays.pipe.js +1 -1
  20. package/esm2015/src/app/shared/pipes/form.pipes.js +2 -4
  21. package/esm2015/src/app/shared/pipes/highlight.pipe.js +4 -4
  22. package/esm2015/src/app/shared/pipes/string.pipes.js +7 -18
  23. package/esm2015/src/app/shared/services/memory-entity-service.class.js +12 -1
  24. package/esm2015/src/app/shared/services.js +61 -0
  25. package/fesm2015/sumaris-net.ngx-components.js +95 -89
  26. package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
  27. package/package.json +1 -1
  28. package/public_api.d.ts +2 -0
  29. package/src/app/shared/functions.d.ts +0 -9
  30. package/src/app/shared/material/boolean/material.boolean.d.ts +2 -1
  31. package/src/app/shared/material/datetime/material.date.d.ts +2 -1
  32. package/src/app/shared/material/datetime/material.dateshort.d.ts +2 -1
  33. package/src/app/shared/material/datetime/material.datetime.d.ts +2 -1
  34. package/src/app/shared/material/duration/material.duration.d.ts +6 -5
  35. package/src/app/shared/material/latlong/material.latlong.d.ts +2 -1
  36. package/src/app/shared/pipes/form.pipes.d.ts +1 -2
  37. package/src/app/shared/services/memory-entity-service.class.d.ts +7 -0
  38. package/src/app/shared/services.d.ts +9 -0
  39. package/sumaris-net.ngx-components.metadata.json +1 -1
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.26",
4
+ "version": "1.20.29",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -82,6 +82,7 @@ export * from './src/app/shared/validator/form-error-adapter.class';
82
82
  export * from './src/app/shared/types';
83
83
  export * from './src/app/shared/dates';
84
84
  export * from './src/app/shared/functions';
85
+ export * from './src/app/shared/services';
85
86
  export * from './src/app/shared/forms';
86
87
  export * from './src/app/shared/observables';
87
88
  export * from './src/app/shared/events';
@@ -196,3 +197,4 @@ export * from './src/app/core/table/testing/table.testing.module';
196
197
  export * from './src/app/core/table/testing/table.testing';
197
198
  export * from './src/app/core/text-popover/testing/text-popover.testing.module';
198
199
  export * from './src/app/core/text-popover/testing/text-popover.testing';
200
+ export { suggestFromArray } from "./src/app/shared/services";
@@ -1,4 +1,3 @@
1
- import { LoadResult } from './services/entity-service.class';
2
1
  import { KeysEnum, KeyValueType } from './types';
3
2
  export declare function isNil<T>(obj: T | null | undefined): boolean;
4
3
  export declare function isNilOrBlank<T>(obj: T | null | undefined): boolean;
@@ -46,14 +45,6 @@ export declare function removeEnd(value: string, end: string): string;
46
45
  */
47
46
  export declare function changeCaseToUnderscore(value: string): string;
48
47
  export declare function removeDiacritics(text: string): string;
49
- export declare function suggestFromArray<T = any>(items: T[], value: any, opts?: {
50
- offset?: number;
51
- size?: number;
52
- searchAttribute?: string;
53
- searchAttributes?: string[];
54
- excludedIds?: number[];
55
- skipSort?: boolean;
56
- }): LoadResult<T>;
57
48
  export declare function suggestFromStringArray(values: string[], value: any, options?: {
58
49
  searchAttribute?: string;
59
50
  searchAttributes?: string[];
@@ -1,5 +1,5 @@
1
1
  import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
2
- import { FloatLabelType } from '@angular/material/form-field';
2
+ import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
3
3
  import { ControlValueAccessor, FormBuilder, FormControl, FormGroupDirective } from '@angular/forms';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import { InputElement } from '../../inputs';
@@ -21,6 +21,7 @@ export declare class MatBooleanField implements OnInit, ControlValueAccessor, In
21
21
  formControlName: string;
22
22
  placeholder: string;
23
23
  floatLabel: FloatLabelType;
24
+ appearance: MatFormFieldAppearance;
24
25
  readonly: boolean;
25
26
  required: boolean;
26
27
  compact: boolean;
@@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
4
4
  import { Moment } from 'moment';
5
5
  import { Keyboard } from '@ionic-native/keyboard/ngx';
6
6
  import { InputElement } from '../../inputs';
7
- import { FloatLabelType } from '@angular/material/form-field';
7
+ import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
8
8
  import { DateFilterFn, MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
9
9
  import { MomentDateAdapter } from '@angular/material-moment-adapter';
10
10
  export declare class MatDate implements OnInit, OnDestroy, ControlValueAccessor, InputElement {
@@ -31,6 +31,7 @@ export declare class MatDate implements OnInit, OnDestroy, ControlValueAccessor,
31
31
  formControlName: string;
32
32
  placeholder: string;
33
33
  floatLabel: FloatLabelType;
34
+ appearance: MatFormFieldAppearance;
34
35
  required: boolean;
35
36
  compact: boolean;
36
37
  placeholderChar: string;
@@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
4
4
  import { Moment } from 'moment/moment';
5
5
  import { Keyboard } from '@ionic-native/keyboard/ngx';
6
6
  import { InputElement } from '../../inputs';
7
- import { FloatLabelType } from '@angular/material/form-field';
7
+ import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
8
8
  import { MatDatepicker } from '@angular/material/datepicker';
9
9
  import { DateAdapter } from '@angular/material/core';
10
10
  export declare class MatDateShort implements OnInit, ControlValueAccessor, InputElement {
@@ -32,6 +32,7 @@ export declare class MatDateShort implements OnInit, ControlValueAccessor, Input
32
32
  formControlName: string;
33
33
  placeholder: string;
34
34
  floatLabel: FloatLabelType;
35
+ appearance: MatFormFieldAppearance;
35
36
  readonly: boolean;
36
37
  required: boolean;
37
38
  compact: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
2
- import { FloatLabelType } from '@angular/material/form-field';
2
+ import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
3
3
  import { ControlValueAccessor, FormBuilder, FormControl, FormGroupDirective } from '@angular/forms';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import { Moment } from 'moment';
@@ -43,6 +43,7 @@ export declare class MatDateTime implements OnInit, OnDestroy, ControlValueAcces
43
43
  formControlName: string;
44
44
  placeholder: string;
45
45
  floatLabel: FloatLabelType;
46
+ appearance: MatFormFieldAppearance;
46
47
  required: boolean;
47
48
  mobile: boolean;
48
49
  compact: boolean;
@@ -1,7 +1,7 @@
1
1
  import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
2
2
  import { Platform } from '@ionic/angular';
3
3
  import { DateAdapter } from '@angular/material/core';
4
- import { FloatLabelType } from '@angular/material/form-field';
4
+ import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
5
5
  import { ControlValueAccessor, FormBuilder, FormControl, FormGroupDirective } from '@angular/forms';
6
6
  import { TranslateService } from '@ngx-translate/core';
7
7
  import { Moment } from 'moment';
@@ -15,17 +15,18 @@ export declare class MatDuration implements OnInit, OnDestroy, ControlValueAcces
15
15
  private _subscription;
16
16
  private _onChangeCallback;
17
17
  private _onTouchedCallback;
18
- protected writing: boolean;
19
- protected disabling: boolean;
20
- protected _tabindex: number;
18
+ private writing;
19
+ private disabling;
20
+ private _tabindex;
21
+ private _value;
21
22
  textControl: FormControl;
22
- _value: number;
23
23
  hourMask: (string | RegExp)[];
24
24
  disabled: boolean;
25
25
  formControl: FormControl;
26
26
  formControlName: string;
27
27
  placeholder: string;
28
28
  floatLabel: FloatLabelType;
29
+ appearance: MatFormFieldAppearance;
29
30
  readonly: boolean;
30
31
  required: boolean;
31
32
  compact: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import { FloatLabelType } from '@angular/material/form-field';
2
+ import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
3
3
  import { ControlValueAccessor, FormBuilder, FormControl, FormGroupDirective } from '@angular/forms';
4
4
  import { LatLongFormatFn, LatLongFormatOptions, LatLongPattern } from './latlong.utils';
5
5
  import { TextMaskConfig } from 'angular2-text-mask';
@@ -28,6 +28,7 @@ export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueA
28
28
  pattern: LatLongPattern;
29
29
  required: boolean;
30
30
  floatLabel: FloatLabelType;
31
+ appearance: MatFormFieldAppearance;
31
32
  placeholder: string;
32
33
  tabindex: number;
33
34
  defaultSign: '-' | '+';
@@ -30,14 +30,13 @@ export declare class FormGetGroupPipe implements PipeTransform {
30
30
  transform(form: AbstractControl, path?: Array<string | number> | string): FormGroup;
31
31
  }
32
32
  export declare class FormGetValuePipe implements PipeTransform, OnDestroy {
33
- private adapter;
34
33
  private _ref;
35
34
  value: any;
36
35
  private _lastControl;
37
36
  private _lastPath;
38
37
  private _onControlValueChanges;
39
38
  private _onControlStatusChanges;
40
- constructor(adapter: FormErrorTranslator, _ref: ChangeDetectorRef);
39
+ constructor(_ref: ChangeDetectorRef);
41
40
  transform(form: AbstractControl, path?: Array<string | number> | string, listenStatusChanges?: boolean): any;
42
41
  ngOnDestroy(): void;
43
42
  /**
@@ -43,6 +43,13 @@ export declare class InMemoryEntitiesService<T extends IEntity<T, ID>, F = any,
43
43
  asFilter(source: Partial<F>): F;
44
44
  addSortByReplacement(source: string, target: string): void;
45
45
  equals(d1: T, d2: T): boolean;
46
+ /**
47
+ * Count data inside the service.
48
+ * @param opts
49
+ */
50
+ count(opts?: {
51
+ withHidden: boolean;
52
+ }): number;
46
53
  protected filter(data: T[], _filter: F, hiddenData: T[]): T[];
47
54
  protected connect(): Observable<LoadResult<T>>;
48
55
  protected markAsSaving(): void;
@@ -0,0 +1,9 @@
1
+ import { LoadResult } from './services/entity-service.class';
2
+ export declare function suggestFromArray<T = any>(items: T[], value: any, opts?: {
3
+ offset?: number;
4
+ size?: number;
5
+ searchAttribute?: string;
6
+ searchAttributes?: string[];
7
+ excludedIds?: number[];
8
+ skipSort?: boolean;
9
+ }): LoadResult<T>;