@sumaris-net/ngx-components 1.20.34 → 1.20.37
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 +39 -20
- 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/account/account.js +2 -2
- package/esm2015/src/app/core/auth/form/form-auth.js +4 -2
- package/esm2015/src/app/core/form/editor.class.js +7 -1
- package/esm2015/src/app/core/form/entity-editor-modal.class.js +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +1 -1
- package/esm2015/src/app/core/form/form.class.js +4 -2
- package/esm2015/src/app/core/services/local-settings.service.js +2 -2
- package/esm2015/src/app/core/table/table.class.js +7 -7
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +5 -5
- package/esm2015/src/app/shared/observables.js +4 -5
- package/fesm2015/sumaris-net.ngx-components.js +27 -18
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/auth/form/form-auth.d.ts +1 -1
- package/src/app/core/form/editor.class.d.ts +14 -1
- package/src/app/core/form/entity-editor.class.d.ts +6 -2
- package/src/app/core/form/form.class.d.ts +1 -1
- package/src/app/core/table/table.class.d.ts +6 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ export declare class AuthForm extends AppForm<AuthData> implements OnInit {
|
|
|
26
26
|
}): void;
|
|
27
27
|
constructor(injector: Injector, platform: PlatformService, formBuilder: FormBuilder, settings: LocalSettingsService, configService: ConfigService, modalCtrl: ModalController, network: NetworkService, cd: ChangeDetectorRef, environment: any);
|
|
28
28
|
ngOnInit(): void;
|
|
29
|
-
cancel(): void
|
|
29
|
+
cancel(): Promise<void>;
|
|
30
30
|
doSubmit(event?: UIEvent): Promise<void>;
|
|
31
31
|
register(): void;
|
|
32
32
|
protected markForCheck(): void;
|
|
@@ -18,6 +18,17 @@ export interface IAppEditor extends CanLeave, IAppForm {
|
|
|
18
18
|
save(event?: Event, options?: any): Promise<boolean>;
|
|
19
19
|
cancel(event?: Event): Promise<void>;
|
|
20
20
|
}
|
|
21
|
+
export interface IAppTabEditor extends IAppEditor {
|
|
22
|
+
selectedTabIndex: number;
|
|
23
|
+
setSelectedTabIndex(value: number, opts?: {
|
|
24
|
+
emitEvent?: boolean;
|
|
25
|
+
realignInkBar?: boolean;
|
|
26
|
+
}): void;
|
|
27
|
+
unload(opts?: {
|
|
28
|
+
emitEvent?: boolean;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
realignInkBar(): any;
|
|
31
|
+
}
|
|
21
32
|
export declare class AppTabEditorOptions {
|
|
22
33
|
/**
|
|
23
34
|
* Number of tab. 1 by default
|
|
@@ -154,7 +165,7 @@ export declare abstract class AppEditor<T = any, ID = number, O = any> implement
|
|
|
154
165
|
protected logChildrenFormErrors(c: IAppForm | AbstractControl, prefix?: string, path?: string): void;
|
|
155
166
|
protected markForCheck(): void;
|
|
156
167
|
}
|
|
157
|
-
export declare abstract class AppTabEditor<T = any, ID = number, O = any> extends AppEditor<T, ID, O> {
|
|
168
|
+
export declare abstract class AppTabEditor<T = any, ID = number, O = any> extends AppEditor<T, ID, O> implements IAppTabEditor {
|
|
158
169
|
protected route: ActivatedRoute;
|
|
159
170
|
protected router: Router;
|
|
160
171
|
protected alertCtrl: AlertController;
|
|
@@ -176,6 +187,8 @@ export declare abstract class AppTabEditor<T = any, ID = number, O = any> extend
|
|
|
176
187
|
emitEvent?: boolean;
|
|
177
188
|
realignInkBar?: boolean;
|
|
178
189
|
}): void;
|
|
190
|
+
realignInkBar(): void;
|
|
191
|
+
protected abstract getFirstInvalidTabIndex(): number;
|
|
179
192
|
onTabChange(event: MatTabChangeEvent, queryTabIndexParamName?: string): boolean;
|
|
180
193
|
/**
|
|
181
194
|
* Action triggered when user swipes
|
|
@@ -4,7 +4,7 @@ import { AddToPageHistoryOptions, LocalSettingsService } from '../services/local
|
|
|
4
4
|
import { Entity } from '../services/model/entity.model';
|
|
5
5
|
import { UsageMode } from '../services/model/settings.model';
|
|
6
6
|
import { FormGroup } from '@angular/forms';
|
|
7
|
-
import { AppTabEditor, AppTabEditorOptions } from './editor.class';
|
|
7
|
+
import { AppTabEditor, AppTabEditorOptions, IAppTabEditor } from './editor.class';
|
|
8
8
|
import { EntityServiceLoadOptions, IEntityService } from '../../shared/services/entity-service.class';
|
|
9
9
|
import { DateFormatPipe } from '../../shared/pipes/date-format.pipe';
|
|
10
10
|
import { Environment } from '../../../environments/environment.class';
|
|
@@ -12,6 +12,10 @@ import { HistoryPageReference } from '../services/model/history.model';
|
|
|
12
12
|
import { WaitForOptions } from '../../shared/observables';
|
|
13
13
|
import { FormErrorTranslator } from '../../shared/validator/form-error-adapter.class';
|
|
14
14
|
import { FormErrors } from '../../shared/forms';
|
|
15
|
+
export interface IAppEntityEditor extends IAppTabEditor {
|
|
16
|
+
usageMode: UsageMode;
|
|
17
|
+
isNewData: boolean;
|
|
18
|
+
}
|
|
15
19
|
export declare class AppEditorOptions extends AppTabEditorOptions {
|
|
16
20
|
autoLoad?: boolean;
|
|
17
21
|
autoLoadDelay?: number;
|
|
@@ -37,7 +41,7 @@ export interface AppErrorWithDetails extends AppError {
|
|
|
37
41
|
errors?: FormErrors;
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
|
-
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 {
|
|
44
|
+
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, IAppEntityEditor {
|
|
41
45
|
protected dataType: new () => T;
|
|
42
46
|
protected dataService?: S;
|
|
43
47
|
private _usageMode;
|
|
@@ -59,7 +59,7 @@ export declare abstract class AppForm<T> implements IAppForm, OnInit, OnDestroy,
|
|
|
59
59
|
protected constructor(injector: Injector, form?: FormGroup);
|
|
60
60
|
ngOnInit(): void;
|
|
61
61
|
ngOnDestroy(): void;
|
|
62
|
-
cancel(): void
|
|
62
|
+
cancel(): Promise<void>;
|
|
63
63
|
/**
|
|
64
64
|
*
|
|
65
65
|
* @param event
|
|
@@ -244,7 +244,9 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
244
244
|
interactive?: boolean;
|
|
245
245
|
keepEditing?: boolean;
|
|
246
246
|
}): void;
|
|
247
|
-
addRow(event?: Event, insertAt?: number
|
|
247
|
+
addRow(event?: Event, insertAt?: number, opts?: {
|
|
248
|
+
focusColumn?: string;
|
|
249
|
+
}): boolean;
|
|
248
250
|
save(opts?: {
|
|
249
251
|
keepEditing?: boolean;
|
|
250
252
|
}): Promise<boolean>;
|
|
@@ -341,7 +343,9 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
341
343
|
protected registerAutocompleteField<E = any, EF = any>(fieldName: string, options?: MatAutocompleteFieldAddOptions<E, EF>): MatAutocompleteFieldConfig<E, EF>;
|
|
342
344
|
protected getI18nColumnName(columnName: string): string;
|
|
343
345
|
protected generateTableId(): string;
|
|
344
|
-
protected addRowToTable(insertAt?: number
|
|
346
|
+
protected addRowToTable(insertAt?: number, opts?: {
|
|
347
|
+
focusColumn?: string;
|
|
348
|
+
}): Promise<TableElement<T>>;
|
|
345
349
|
protected registerCellValueChanges(name: string, formPath?: string, emitInitialValue?: boolean): Observable<any>;
|
|
346
350
|
protected setShowColumn(columnName: string, show: boolean, opts?: {
|
|
347
351
|
emitEvent?: boolean;
|