@sumaris-net/ngx-components 0.11.6 → 0.11.10

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": "0.11.6",
4
+ "version": "0.11.10",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -32,9 +32,7 @@ export declare class UsersPage extends AppTable<Person, PersonFilter> implements
32
32
  profiles: import("../../../core/services/model/person.model").UserProfileLabel[];
33
33
  additionalFields: FormFieldDefinition[];
34
34
  statusList: readonly import("../../../core/services/model/referential.model").IStatus[];
35
- statusById: {
36
- [key: number]: import("../../../core/services/model/referential.model").IStatus;
37
- };
35
+ statusById: import("../../../shared/functions").KeyValueType<import("../../../core/services/model/referential.model").IStatus>;
38
36
  filterCriteriaCount: number;
39
37
  set showUsernameColumn(value: boolean);
40
38
  set showUsernameExtranetColumn(value: boolean);
@@ -230,6 +230,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
230
230
  confirmEditCreate(event?: Event, row?: TableElement<T>): boolean;
231
231
  cancelOrDelete(event: Event, row: TableElement<T>, opts?: {
232
232
  interactive?: boolean;
233
+ keepEditing?: boolean;
233
234
  }): void;
234
235
  addRow(event?: Event, insertAt?: number): boolean;
235
236
  save(): Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  import { ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, Injector, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, FormControl, FormGroupDirective } from '@angular/forms';
3
3
  import { FloatLabelType } from '@angular/material/form-field';
4
- import { DisplayFn, FormFieldDefinition } from './field.model';
4
+ import { DisplayFn, FormFieldDefinition, FormFieldType } from './field.model';
5
5
  import { TranslateService } from '@ngx-translate/core';
6
6
  import { filterNumberInput, selectInputContent } from '../inputs';
7
7
  export declare class AppFormField implements OnInit, ControlValueAccessor {
@@ -12,7 +12,7 @@ export declare class AppFormField implements OnInit, ControlValueAccessor {
12
12
  private _onChangeCallback;
13
13
  private _onTouchedCallback;
14
14
  private _definition;
15
- type: string;
15
+ type: FormFieldType;
16
16
  numberInputStep: string;
17
17
  set definition(value: FormFieldDefinition);
18
18
  get definition(): FormFieldDefinition;
@@ -25,6 +25,7 @@ export declare class AppFormField implements OnInit, ControlValueAccessor {
25
25
  compact: boolean;
26
26
  floatLabel: FloatLabelType;
27
27
  tabindex: number;
28
+ autofocus: boolean;
28
29
  classList: string;
29
30
  onKeyupEnter: EventEmitter<any>;
30
31
  get value(): any;
@@ -3,7 +3,7 @@ import { InjectionToken } from '@angular/core';
3
3
  import { MatAutocompleteFieldAddOptions } from '../material/autocomplete/material.autocomplete';
4
4
  export declare type DisplayFn = (obj: any) => string;
5
5
  export declare type CompareWithFn = (o1: any, o2: any) => boolean;
6
- export declare type FormFieldType = 'integer' | 'double' | 'boolean' | 'string' | 'enum' | 'color' | 'peer' | 'entity' | 'entities';
6
+ export declare type FormFieldType = 'integer' | 'double' | 'boolean' | 'string' | 'enum' | 'color' | 'peer' | 'entity' | 'entities' | 'date' | 'dateTime';
7
7
  export declare interface FormFieldDefinition<T = any> {
8
8
  key: string;
9
9
  label: string;
@@ -89,16 +89,12 @@ export declare type KeysEnum<T> = {
89
89
  };
90
90
  export declare function capitalizeFirstLetter(value: string): string;
91
91
  export declare function uncapitalizeFirstLetter(value: string): string;
92
- export declare function splitByProperty<T, K extends number | string, M extends {
93
- [key: K]: T;
94
- } = {
95
- [key: K]: T;
96
- }>(array: T[] | readonly T[], propertyName: string): M;
97
- export declare function splitById<T, ID extends number | string = number, M extends {
98
- [key: ID]: T;
99
- } = {
100
- [key: number]: T;
101
- }>(array: T[] | readonly T[]): M;
92
+ export declare type KeyType = string | number;
93
+ export declare type KeyValueType<T> = {
94
+ [key in KeyType]: T;
95
+ };
96
+ export declare function splitByProperty<T, M extends KeyValueType<T> = KeyValueType<T>>(array: T[] | readonly T[], propertyName: string): M;
97
+ export declare function splitById<T, M extends KeyValueType<T> = KeyValueType<T>>(array: T[] | readonly T[]): M;
102
98
  export declare class Beans {
103
99
  /**
104
100
  * Copy a source object, by including only properties of the given dataType.
@@ -80,7 +80,7 @@ export declare class MatAutocompleteField implements OnInit, InputElement, OnDes
80
80
  highlightAccent: boolean;
81
81
  showAllOnFocus: boolean;
82
82
  showPanelOnFocus: boolean;
83
- appAutofocus: boolean;
83
+ autofocus: boolean;
84
84
  config: MatAutocompleteFieldConfig;
85
85
  i18nPrefix: string;
86
86
  noResultMessage: string;
@@ -22,7 +22,7 @@ export declare class DateTimeTestPage implements OnInit {
22
22
  startMemoryTimer(): void;
23
23
  stopMemoryTimer(): void;
24
24
  stringify: {
25
- (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
26
- (value: any, replacer?: (string | number)[], space?: string | number): string;
25
+ (value: any, replacer?: (this: any, key: string, value: any) => any, space?: import("../../../functions").KeyType): string;
26
+ (value: any, replacer?: import("../../../functions").KeyType[], space?: import("../../../functions").KeyType): string;
27
27
  };
28
28
  }
@@ -9,7 +9,7 @@ export declare class LatLongTestPage implements OnInit {
9
9
  doSubmit(event: any): void;
10
10
  geoPosition(event: UIEvent): boolean;
11
11
  stringify: {
12
- (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
13
- (value: any, replacer?: (string | number)[], space?: string | number): string;
12
+ (value: any, replacer?: (this: any, key: string, value: any) => any, space?: import("../../../functions").KeyType): string;
13
+ (value: any, replacer?: import("../../../functions").KeyType[], space?: import("../../../functions").KeyType): string;
14
14
  };
15
15
  }