@sumaris-net/ngx-components 1.23.44 → 1.23.46
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 +41 -17
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +7 -0
- package/esm2015/src/app/core/form/entity-editor-modal.class.js +18 -5
- package/esm2015/src/app/core/icon/icon.component.js +2 -2
- package/esm2015/src/app/core/services/model/referential.model.js +8 -3
- package/esm2015/src/app/shared/graph/graph-colors.js +4 -1
- package/esm2015/src/app/shared/material/material.animations.js +1 -1
- package/esm2015/src/app/shared/services/memory-entity-service.class.js +9 -1
- package/fesm2015/sumaris-net.ngx-components.js +36 -7
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor-modal.class.d.ts +12 -3
- package/src/app/core/services/model/referential.model.d.ts +3 -0
- package/src/app/shared/graph/graph-colors.d.ts +1 -0
- package/src/app/shared/services/memory-entity-service.class.d.ts +5 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -12,11 +12,12 @@ import { WaitForOptions } from '../../shared/observables';
|
|
|
12
12
|
import { FormErrorTranslator } from '../../shared/validator/form-error-adapter.class';
|
|
13
13
|
import { AppErrorWithDetails } from './entity-editor.class';
|
|
14
14
|
export interface IEntityEditorModalOptions<T extends Entity<T, ID> = Entity<any, any>, ID = number> {
|
|
15
|
-
|
|
15
|
+
isNew: boolean;
|
|
16
16
|
data: T;
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
onAfterModalInit?: <M extends AppEntityEditorModal<T, ID>>(modal: M) => void | Promise<void>;
|
|
19
19
|
onDelete?: (event: UIEvent, data: T) => Promise<boolean>;
|
|
20
|
+
usageMode: UsageMode;
|
|
20
21
|
mobile: boolean;
|
|
21
22
|
i18nSuffix?: string;
|
|
22
23
|
}
|
|
@@ -27,7 +28,7 @@ export declare abstract class AppEntityEditorModal<T extends Entity<T, ID>, ID =
|
|
|
27
28
|
protected dataType: new () => T;
|
|
28
29
|
private _usageMode;
|
|
29
30
|
protected _logPrefix: any;
|
|
30
|
-
protected
|
|
31
|
+
protected _isNew: boolean;
|
|
31
32
|
protected readonly dateFormat: DateFormatPipe;
|
|
32
33
|
protected readonly cd: ChangeDetectorRef;
|
|
33
34
|
protected readonly settings: LocalSettingsService;
|
|
@@ -42,8 +43,16 @@ export declare abstract class AppEntityEditorModal<T extends Entity<T, ID>, ID =
|
|
|
42
43
|
onAfterModalInit: <M extends AppEntityEditorModal<T, ID>>(modal: M) => void | Promise<void>;
|
|
43
44
|
onDelete: (event: UIEvent, data: T) => Promise<boolean>;
|
|
44
45
|
i18nSuffix: string;
|
|
45
|
-
set
|
|
46
|
+
set isNew(value: boolean);
|
|
47
|
+
get isNew(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated use isNew instead
|
|
50
|
+
*/
|
|
46
51
|
get isNewData(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated use isNew instead
|
|
54
|
+
*/
|
|
55
|
+
set isNewData(value: boolean);
|
|
47
56
|
set disabled(value: boolean);
|
|
48
57
|
get disabled(): boolean;
|
|
49
58
|
get isOnFieldMode(): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Moment } from 'moment';
|
|
2
2
|
import { Entity, EntityAsObjectOptions, IEntity } from './entity.model';
|
|
3
|
+
import { IconRef } from '../../../shared/types';
|
|
3
4
|
export declare function referentialToString(obj: Referential | any, properties?: string[]): string | undefined;
|
|
4
5
|
export declare function referentialsToString(values: Referential[], properties?: string[], separator?: string): string;
|
|
5
6
|
export declare interface IStatus {
|
|
@@ -44,6 +45,7 @@ export declare class ReferentialUtils {
|
|
|
44
45
|
}
|
|
45
46
|
export interface ReferentialAsObjectOptions extends EntityAsObjectOptions {
|
|
46
47
|
keepEntityName?: boolean;
|
|
48
|
+
keepIcon?: boolean;
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* Used to store an entity locally
|
|
@@ -61,6 +63,7 @@ export declare class ReferentialRef<T extends ReferentialRef<any, ID> = Referent
|
|
|
61
63
|
statusId: number;
|
|
62
64
|
levelId: number;
|
|
63
65
|
entityName: string;
|
|
66
|
+
icon: IconRef;
|
|
64
67
|
constructor();
|
|
65
68
|
asObject(opts?: O): any;
|
|
66
69
|
fromObject(source: any, opts?: FO): void;
|
|
@@ -56,6 +56,7 @@ export declare class ColorScale {
|
|
|
56
56
|
get max(): number;
|
|
57
57
|
constructor(colorArray: number[][], options?: ColorScaleOptions);
|
|
58
58
|
get legend(): ColorScaleLegend;
|
|
59
|
+
getValueColor(value: number): Color;
|
|
59
60
|
getLegendForValue(value: number): ColorScaleLegendItem;
|
|
60
61
|
getLegendAtIndex(index: number): ColorScaleLegendItem;
|
|
61
62
|
protected computeLegendItems(colorArray: number[][]): ColorScaleLegendItem[];
|
|
@@ -50,6 +50,11 @@ export declare class InMemoryEntitiesService<T extends IEntity<T, ID>, F = any,
|
|
|
50
50
|
* Count data stored by the service (without hidden data).
|
|
51
51
|
* @param opts
|
|
52
52
|
*/
|
|
53
|
+
/**
|
|
54
|
+
* Count data stored by the service (without hidden data).
|
|
55
|
+
* @param opts
|
|
56
|
+
* @deprecated TODO Please rename this getter into visibleCount (and create count = hiddenCount + visibleCount)
|
|
57
|
+
*/
|
|
53
58
|
get count(): number;
|
|
54
59
|
get hiddenCount(): number;
|
|
55
60
|
waitIdle(opts?: WaitForOptions): Promise<void>;
|