@sumaris-net/ngx-components 1.7.0 → 1.7.3
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 -21
- 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/esm2015/src/app/core/form/entity-editor.class.js +34 -16
- package/esm2015/src/app/core/table/table.class.js +5 -3
- package/esm2015/src/app/shared/material/latlong/material.latlong.js +6 -6
- package/fesm2015/sumaris-net.ngx-components.js +41 -21
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +17 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import { Entity } from '../services/model/entity.model';
|
|
|
5
5
|
import { UsageMode } from '../services/model/settings.model';
|
|
6
6
|
import { FormGroup } from '@angular/forms';
|
|
7
7
|
import { AppTabEditor, AppTabEditorOptions } from './editor.class';
|
|
8
|
+
import { FormErrors } from './form.utils';
|
|
8
9
|
import { EntityServiceLoadOptions, IEntityService } from '../../shared/services/entity-service.class';
|
|
9
10
|
import { DateFormatPipe } from '../../shared/pipes/date-format.pipe';
|
|
10
11
|
import { HistoryPageReference } from '../services/model/history.model';
|
|
@@ -25,6 +26,15 @@ export declare class AppEditorOptions extends AppTabEditorOptions {
|
|
|
25
26
|
autoOpenNextTab?: boolean;
|
|
26
27
|
i18nPrefix?: string;
|
|
27
28
|
}
|
|
29
|
+
export interface AppError {
|
|
30
|
+
code?: number;
|
|
31
|
+
message?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface AppErrorWithDetails extends AppError {
|
|
34
|
+
details?: AppError & {
|
|
35
|
+
errors?: FormErrors;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
28
38
|
export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends IEntityService<T, ID> = IEntityService<T, any>, ID = number> extends AppTabEditor<T, ID, EntityServiceLoadOptions> implements OnInit, OnDestroy, AfterViewInit {
|
|
29
39
|
protected dataType: new () => T;
|
|
30
40
|
protected dataService?: S;
|
|
@@ -122,7 +132,13 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
|
|
|
122
132
|
delete(event?: UIEvent): Promise<boolean>;
|
|
123
133
|
reload(): Promise<void>;
|
|
124
134
|
goBack(event?: Event): Promise<void | boolean>;
|
|
125
|
-
|
|
135
|
+
resetError(opts?: {
|
|
136
|
+
emitEvent?: boolean;
|
|
137
|
+
}): void;
|
|
138
|
+
setError(err: string | AppErrorWithDetails, opts?: {
|
|
139
|
+
emitEvent?: boolean;
|
|
140
|
+
detailsCssClass?: string;
|
|
141
|
+
}): void;
|
|
126
142
|
protected abstract registerForms(): any;
|
|
127
143
|
protected abstract computeTitle(data: T): Promise<string>;
|
|
128
144
|
protected abstract setValue(data: T): Promise<void> | void;
|