ngx-material-entity 16.0.3 → 16.0.5
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/classes/base.builder.d.ts +6 -1
- package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +2 -1
- package/components/confirm-dialog/confirm-dialog.component.d.ts +3 -1
- package/components/edit-page/edit-page.component.d.ts +3 -1
- package/components/edit-page/page-edit-data.builder.d.ts +2 -1
- package/components/input/array/array-date-input/array-date-input.component.d.ts +7 -1
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +6 -1
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +6 -1
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +4 -0
- package/components/input/date/date-range-input/date-range-input.component.d.ts +3 -0
- package/components/input/date/date-time-input/date-time-input.component.d.ts +3 -0
- package/components/input/input.component.d.ts +9 -2
- package/components/input/input.module.d.ts +3 -1
- package/components/input/relations/references-many-input/references-many-input.component.d.ts +3 -1
- package/components/table/create-dialog/create-dialog-data.builder.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +3 -1
- package/components/table/edit-dialog/edit-data.builder.d.ts +5 -3
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +3 -1
- package/components/table/edit-dialog/edit-entity.builder.d.ts +2 -1
- package/components/table/table-data.builder.d.ts +9 -5
- package/components/table/table.component.d.ts +3 -1
- package/decorators/array/array-decorator-internal.data.d.ts +8 -7
- package/decorators/boolean/boolean-decorator-internal.data.d.ts +2 -1
- package/decorators/date/date-decorator-internal.data.d.ts +3 -2
- package/decorators/has-many/has-many-decorator-internal.data.d.ts +2 -1
- package/decorators/references-many/references-many-decorator-internal.data.d.ts +2 -1
- package/default-global-configuration-values.d.ts +6 -0
- package/directives/tooltip.directive.d.ts +0 -1
- package/esm2022/classes/base.builder.mjs +9 -3
- package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +7 -5
- package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +13 -7
- package/esm2022/components/edit-page/edit-page.component.mjs +22 -16
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +9 -9
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +33 -13
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +29 -12
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +32 -15
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +18 -4
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +16 -4
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +17 -5
- package/esm2022/components/input/input.component.mjs +89 -60
- package/esm2022/components/input/input.module.mjs +11 -4
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +15 -5
- package/esm2022/components/table/create-dialog/create-dialog-data.builder.mjs +10 -8
- package/esm2022/components/table/create-dialog/create-entity-dialog-data.builder.mjs +5 -4
- package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +15 -9
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +35 -21
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +21 -13
- package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +4 -4
- package/esm2022/components/table/table-data.builder.mjs +54 -30
- package/esm2022/components/table/table.component.mjs +18 -12
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +42 -43
- package/esm2022/decorators/array/array.decorator.mjs +8 -7
- package/esm2022/decorators/base/property-decorator-internal.data.mjs +4 -4
- package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +5 -4
- package/esm2022/decorators/boolean/boolean.decorator.mjs +3 -2
- package/esm2022/decorators/date/date-decorator-internal.data.mjs +7 -6
- package/esm2022/decorators/date/date.decorator.mjs +4 -3
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +4 -4
- package/esm2022/decorators/has-many/has-many.decorator.mjs +3 -2
- package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +7 -6
- package/esm2022/decorators/references-many/references-many.decorator.mjs +3 -2
- package/esm2022/default-global-configuration-values.mjs +89 -0
- package/esm2022/directives/tooltip.directive.mjs +5 -11
- package/esm2022/functions/get-config-value.function.mjs +15 -0
- package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +4 -8
- package/esm2022/global-configuration-values.mjs +10 -0
- package/esm2022/public-api.mjs +3 -1
- package/esm2022/utilities/entity.utilities.mjs +1 -23
- package/fesm2022/ngx-material-entity.mjs +1380 -1142
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/functions/get-config-value.function.d.ts +8 -0
- package/global-configuration-values.d.ts +216 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/utilities/entity.utilities.d.ts +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NgxGlobalDefaultValues } from '../global-configuration-values';
|
|
1
2
|
import { BaseEntityType } from './entity.model';
|
|
2
3
|
/**
|
|
3
4
|
* The abstract BaseBuilder class.
|
|
@@ -5,7 +6,11 @@ import { BaseEntityType } from './entity.model';
|
|
|
5
6
|
export declare abstract class BaseBuilder<InternalType extends InputType, InputType extends BaseEntityType<InputType>> {
|
|
6
7
|
private readonly data;
|
|
7
8
|
private readonly inputData?;
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The global configuration, is used for providing default values to fallback to.
|
|
11
|
+
*/
|
|
12
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
13
|
+
protected constructor(globalConfig: NgxGlobalDefaultValues, data?: InputType);
|
|
9
14
|
/**
|
|
10
15
|
* Generates the internal data from the given user inputs.
|
|
11
16
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
2
3
|
import { ConfirmDialogData, ConfirmDialogTypes } from './confirm-dialog-data';
|
|
3
4
|
/**
|
|
4
5
|
* The internal ConfirmDialogData. Requires all default values the user can leave out.
|
|
@@ -17,7 +18,7 @@ export declare class ConfirmDialogDataInternal implements ConfirmDialogData {
|
|
|
17
18
|
* The Builder for the ConfirmDialogData. Sets default values.
|
|
18
19
|
*/
|
|
19
20
|
export declare class ConfirmDialogDataBuilder extends BaseBuilder<ConfirmDialogDataInternal, ConfirmDialogData> {
|
|
20
|
-
constructor(data?: ConfirmDialogData);
|
|
21
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data?: ConfirmDialogData);
|
|
21
22
|
protected generateBaseData(data?: ConfirmDialogData): ConfirmDialogDataInternal;
|
|
22
23
|
protected validateInput(data?: ConfirmDialogData): void;
|
|
23
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
3
4
|
import { ConfirmDialogData } from './confirm-dialog-data';
|
|
4
5
|
import { ConfirmDialogDataInternal } from './confirm-dialog-data.builder';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -11,9 +12,10 @@ import * as i0 from "@angular/core";
|
|
|
11
12
|
export declare class NgxMatEntityConfirmDialogComponent implements OnInit {
|
|
12
13
|
private readonly dialogRef;
|
|
13
14
|
private readonly inputData;
|
|
15
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
14
16
|
confirm: boolean;
|
|
15
17
|
data: ConfirmDialogDataInternal;
|
|
16
|
-
constructor(dialogRef: MatDialogRef<NgxMatEntityConfirmDialogComponent>, inputData: ConfirmDialogData);
|
|
18
|
+
constructor(dialogRef: MatDialogRef<NgxMatEntityConfirmDialogComponent>, inputData: ConfirmDialogData, globalConfig: NgxGlobalDefaultValues);
|
|
17
19
|
ngOnInit(): void;
|
|
18
20
|
/**
|
|
19
21
|
* Closes the dialog with true to signal that the action should be run.
|
|
@@ -5,6 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
5
5
|
import { ActivatedRoute } from '@angular/router';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
7
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
8
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
8
9
|
import { EntityService } from '../../services/entity.service';
|
|
9
10
|
import { EntityTab, EntityUtilities } from '../../utilities/entity.utilities';
|
|
10
11
|
import { ValidationError } from '../../utilities/validation.utilities';
|
|
@@ -67,6 +68,7 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
67
68
|
private readonly http;
|
|
68
69
|
private readonly el;
|
|
69
70
|
private readonly renderer;
|
|
71
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
70
72
|
EntityUtilities: typeof EntityUtilities;
|
|
71
73
|
entityTabs: EntityTab<EntityType>[];
|
|
72
74
|
entity: EntityType;
|
|
@@ -80,7 +82,7 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
80
82
|
allowDelete: boolean;
|
|
81
83
|
private inConfirmNavigation;
|
|
82
84
|
get hasUnsavedChanges(): boolean;
|
|
83
|
-
constructor(dialog: MatDialog, location: Location, route: ActivatedRoute, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageEditData<EntityType>, http: HttpClient, el: ElementRef, renderer: Renderer2);
|
|
85
|
+
constructor(dialog: MatDialog, location: Location, route: ActivatedRoute, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageEditData<EntityType>, http: HttpClient, el: ElementRef, renderer: Renderer2, globalConfig: NgxGlobalDefaultValues);
|
|
84
86
|
/**
|
|
85
87
|
* Checks if the input with the given key is readonly.
|
|
86
88
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
2
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
3
4
|
import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
|
|
4
5
|
import { EditDataInternal } from '../table/edit-dialog/edit-data.builder';
|
|
5
6
|
import { EditEntityDataInternal } from '../table/edit-dialog/edit-entity.builder';
|
|
@@ -12,6 +13,6 @@ export type PageEditDataInternal<EntityType extends BaseEntityType<EntityType>>
|
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
export declare class PageEditDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<PageEditDataInternal<EntityType>, PageEditData<EntityType>> {
|
|
15
|
-
constructor(data: PageEditData<EntityType
|
|
16
|
+
constructor(data: PageEditData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
16
17
|
protected generateBaseData(data: PageEditData<EntityType>): PageEditDataInternal<EntityType>;
|
|
17
18
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
3
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
6
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
4
7
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
5
8
|
import { ArrayTableComponent } from '../array-table.class';
|
|
6
9
|
import * as i0 from "@angular/core";
|
|
7
10
|
export declare class ArrayDateInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<Date, EntityType, DecoratorTypes.ARRAY_DATE> implements OnInit {
|
|
11
|
+
private readonly globalConfig;
|
|
8
12
|
DateUtilities: typeof DateUtilities;
|
|
13
|
+
constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
14
|
+
ngOnInit(): void;
|
|
9
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateInputComponent<any>, never>;
|
|
10
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateInputComponent<any>, "array-date-input", never, {}, {}, never, never, false, never>;
|
|
11
17
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
3
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
6
|
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
7
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
5
8
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
6
9
|
import { ArrayTableComponent } from '../array-table.class';
|
|
7
10
|
import * as i0 from "@angular/core";
|
|
8
11
|
export declare class ArrayDateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<DateRange, EntityType, DecoratorTypes.ARRAY_DATE_RANGE> implements OnInit {
|
|
12
|
+
private readonly globalConfig;
|
|
9
13
|
DateUtilities: typeof DateUtilities;
|
|
10
14
|
dateRangeStart?: Date;
|
|
11
15
|
dateRangeEnd?: Date;
|
|
16
|
+
constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
12
17
|
ngOnInit(): void;
|
|
13
18
|
/**
|
|
14
19
|
* Adds a DateRange to the array.
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Time } from '@angular/common';
|
|
2
|
-
import {
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
4
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
3
5
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
6
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
5
7
|
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
8
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
6
9
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
7
10
|
import { ArrayTableComponent } from '../array-table.class';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
12
|
export declare class ArrayDateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<Date, EntityType, DecoratorTypes.ARRAY_DATE_TIME> implements OnInit {
|
|
13
|
+
private readonly globalConfig;
|
|
10
14
|
DateUtilities: typeof DateUtilities;
|
|
11
15
|
dateTime?: Date;
|
|
12
16
|
time?: Time;
|
|
13
17
|
timeDropdownValues: DropdownValue<Time>[];
|
|
18
|
+
constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
14
19
|
ngOnInit(): void;
|
|
15
20
|
protected resetInput(): void;
|
|
16
21
|
/**
|
package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
3
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
4
5
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class BooleanDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_DROPDOWN, boolean> implements OnInit {
|
|
8
|
+
private readonly globalConfig;
|
|
9
|
+
constructor(globalConfig: NgxGlobalDefaultValues);
|
|
10
|
+
ngOnInit(): void;
|
|
7
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanDropdownInputComponent<any>, never>;
|
|
8
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanDropdownInputComponent<any>, "boolean-dropdown-input", never, {}, {}, never, never, false, never>;
|
|
9
13
|
}
|
|
@@ -3,9 +3,11 @@ import { DateFilterFn } from '@angular/material/datepicker';
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
5
5
|
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
6
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
6
7
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class DateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_RANGE, DateRange> implements OnInit {
|
|
10
|
+
private readonly globalConfig;
|
|
9
11
|
get dateRange(): DateRange;
|
|
10
12
|
set dateRange(value: DateRange);
|
|
11
13
|
get dateRangeStart(): Date | undefined;
|
|
@@ -13,6 +15,7 @@ export declare class DateRangeInputComponent<EntityType extends BaseEntityType<E
|
|
|
13
15
|
get dateRangeEnd(): Date | undefined;
|
|
14
16
|
set dateRangeEnd(value: Date | undefined);
|
|
15
17
|
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
18
|
+
constructor(globalConfig: NgxGlobalDefaultValues);
|
|
16
19
|
ngOnInit(): void;
|
|
17
20
|
/**
|
|
18
21
|
* Updates the date range values based on the start and end date.
|
|
@@ -4,15 +4,18 @@ import { DateFilterFn } from '@angular/material/datepicker';
|
|
|
4
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
6
6
|
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
7
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
7
8
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
8
9
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class DateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_TIME, Date> implements OnInit {
|
|
12
|
+
private readonly globalConfig;
|
|
11
13
|
DateUtilities: typeof DateUtilities;
|
|
12
14
|
timeDropdownValues: DropdownValue<Time | undefined>[];
|
|
13
15
|
get time(): Time | undefined;
|
|
14
16
|
set time(value: Time | undefined);
|
|
15
17
|
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
18
|
+
constructor(globalConfig: NgxGlobalDefaultValues);
|
|
16
19
|
ngOnInit(): void;
|
|
17
20
|
/**
|
|
18
21
|
* Checks if two times are equal. Is needed for the dropdown.
|
|
@@ -15,9 +15,11 @@ import { PropertyDecoratorConfigInternal } from '../../decorators/base/property-
|
|
|
15
15
|
import { HasManyDecoratorConfigInternal } from '../../decorators/has-many/has-many-decorator-internal.data';
|
|
16
16
|
import { DefaultObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';
|
|
17
17
|
import { ReferencesOneDecoratorConfigInternal } from '../../decorators/references-one/references-one-decorator-internal.data';
|
|
18
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
18
19
|
import { DateUtilities } from '../../utilities/date.utilities';
|
|
19
20
|
import { EntityTab, EntityUtilities } from '../../utilities/entity.utilities';
|
|
20
21
|
import { SelectionUtilities } from '../../utilities/selection.utilities';
|
|
22
|
+
import { ValidationError } from '../../utilities/validation.utilities';
|
|
21
23
|
import { CreateDialogDataInternal } from '../table/create-dialog/create-dialog-data.builder';
|
|
22
24
|
import { EditActionInternal } from '../table/edit-dialog/edit-data.builder';
|
|
23
25
|
import { DisplayColumn } from '../table/table-data';
|
|
@@ -36,6 +38,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
36
38
|
private readonly injector;
|
|
37
39
|
private readonly router;
|
|
38
40
|
protected readonly defaultGetValidationErrorMessage: (model: NgModel) => string;
|
|
41
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
39
42
|
private readonly http;
|
|
40
43
|
/**
|
|
41
44
|
* The entity on which the property exists. Used in conjunction with the "propertyKey"
|
|
@@ -106,6 +109,8 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
106
109
|
addArrayItemDialogData: CreateDialogDataInternal;
|
|
107
110
|
arrayItemDialogTabs: EntityTab<EntityType>[];
|
|
108
111
|
editArrayItemDialogData: EditArrayItemDialogDataInternal<EntityType>;
|
|
112
|
+
arrayItemValidationErrors: ValidationError[];
|
|
113
|
+
arrayItemTooltipContent: string;
|
|
109
114
|
metadataHasMany: HasManyDecoratorConfigInternal<EntityType, EntityType>;
|
|
110
115
|
hasManyIsLoading: boolean;
|
|
111
116
|
/**
|
|
@@ -133,6 +138,8 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
133
138
|
hasManyEntity: EntityType;
|
|
134
139
|
hasManyEntityPriorChanges: EntityType;
|
|
135
140
|
isHasManyEntityValid: boolean;
|
|
141
|
+
hasManyValidationErrors: ValidationError[];
|
|
142
|
+
hasManyTooltipContent: string;
|
|
136
143
|
isHasManyEntityDirty: boolean;
|
|
137
144
|
hasManyAllowCreate: boolean;
|
|
138
145
|
hasManyCreateTabs: EntityTab<EntityType>[];
|
|
@@ -148,7 +155,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
148
155
|
DateUtilities: typeof DateUtilities;
|
|
149
156
|
SelectionUtilities: typeof SelectionUtilities;
|
|
150
157
|
referencesOneUUID: string;
|
|
151
|
-
constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, defaultGetValidationErrorMessage: (model: NgModel) => string, http: HttpClient);
|
|
158
|
+
constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, defaultGetValidationErrorMessage: (model: NgModel) => string, globalConfig: NgxGlobalDefaultValues, http: HttpClient);
|
|
152
159
|
/**
|
|
153
160
|
* Checks if the input with the given key on the given property is readonly.
|
|
154
161
|
*
|
|
@@ -263,7 +270,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
263
270
|
dialogCancelCreateHasMany(): void;
|
|
264
271
|
/**
|
|
265
272
|
* Runs the TableAction for all selected entries.
|
|
266
|
-
* Also handles confirmation with an additional
|
|
273
|
+
* Also handles confirmation with an additional dial#og if configured.
|
|
267
274
|
*
|
|
268
275
|
* @param action - The TableAction to run.
|
|
269
276
|
*/
|
|
@@ -48,8 +48,10 @@ import * as i46 from "../table/display-column-value/display-column-value.compone
|
|
|
48
48
|
import * as i47 from "@angular/material/sort";
|
|
49
49
|
import * as i48 from "../../directives/password-match.directive";
|
|
50
50
|
import * as i49 from "../../directives/number.directive";
|
|
51
|
+
import * as i50 from "../tooltip/tooltip.component";
|
|
52
|
+
import * as i51 from "@angular/material/badge";
|
|
51
53
|
export declare class NgxMatEntityInputModule {
|
|
52
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputModule, never>;
|
|
53
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.StringInputComponent, typeof i2.StringTextboxInputComponent, typeof i3.StringAutocompleteInputComponent, typeof i4.StringDropdownInputComponent, typeof i5.StringPasswordInputComponent, typeof i6.BooleanCheckboxInputComponent, typeof i7.BooleanToggleInputComponent, typeof i8.BooleanDropdownInputComponent, typeof i9.NumberInputComponent, typeof i10.NumberDropdownInputComponent, typeof i11.NumberSliderInputComponent, typeof i12.ArrayStringChipsInputComponent, typeof i13.ArrayStringAutocompleteChipsComponent, typeof i14.DateInputComponent, typeof i15.DateRangeInputComponent, typeof i16.DateTimeInputComponent, typeof i17.ArrayDateInputComponent, typeof i18.ArrayDateTimeInputComponent, typeof i19.ArrayDateRangeInputComponent, typeof i20.FileInputComponent, typeof i21.FileImageInputComponent, typeof i22.FileDefaultInputComponent, typeof i23.DragDropDirective, typeof i24.ReferencesManyInputComponent, typeof i25.CustomInputComponent, typeof i26.NgxMatEntityInputComponent], [typeof i27.CommonModule, typeof i28.MatInputModule, typeof i29.FormsModule, typeof i30.MatFormFieldModule, typeof i31.MatSelectModule, typeof i32.MatAutocompleteModule, typeof i33.MatCheckboxModule, typeof i34.MatSlideToggleModule, typeof i35.MatChipsModule, typeof i36.MatIconModule, typeof i37.MatTableModule, typeof i38.MatDialogModule, typeof i39.MatButtonModule, typeof i40.MatDatepickerModule, typeof i41.MatSliderModule, typeof i42.MatTabsModule, typeof i43.MatMenuModule, typeof i44.MatProgressSpinnerModule, typeof i45.MatPaginatorModule, typeof i46.DisplayColumnValueComponent, typeof i47.MatSortModule, typeof i48.PasswordMatchValidatorDirective, typeof i49.NumberDirective], [typeof i26.NgxMatEntityInputComponent]>;
|
|
55
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.StringInputComponent, typeof i2.StringTextboxInputComponent, typeof i3.StringAutocompleteInputComponent, typeof i4.StringDropdownInputComponent, typeof i5.StringPasswordInputComponent, typeof i6.BooleanCheckboxInputComponent, typeof i7.BooleanToggleInputComponent, typeof i8.BooleanDropdownInputComponent, typeof i9.NumberInputComponent, typeof i10.NumberDropdownInputComponent, typeof i11.NumberSliderInputComponent, typeof i12.ArrayStringChipsInputComponent, typeof i13.ArrayStringAutocompleteChipsComponent, typeof i14.DateInputComponent, typeof i15.DateRangeInputComponent, typeof i16.DateTimeInputComponent, typeof i17.ArrayDateInputComponent, typeof i18.ArrayDateTimeInputComponent, typeof i19.ArrayDateRangeInputComponent, typeof i20.FileInputComponent, typeof i21.FileImageInputComponent, typeof i22.FileDefaultInputComponent, typeof i23.DragDropDirective, typeof i24.ReferencesManyInputComponent, typeof i25.CustomInputComponent, typeof i26.NgxMatEntityInputComponent], [typeof i27.CommonModule, typeof i28.MatInputModule, typeof i29.FormsModule, typeof i30.MatFormFieldModule, typeof i31.MatSelectModule, typeof i32.MatAutocompleteModule, typeof i33.MatCheckboxModule, typeof i34.MatSlideToggleModule, typeof i35.MatChipsModule, typeof i36.MatIconModule, typeof i37.MatTableModule, typeof i38.MatDialogModule, typeof i39.MatButtonModule, typeof i40.MatDatepickerModule, typeof i41.MatSliderModule, typeof i42.MatTabsModule, typeof i43.MatMenuModule, typeof i44.MatProgressSpinnerModule, typeof i45.MatPaginatorModule, typeof i46.DisplayColumnValueComponent, typeof i47.MatSortModule, typeof i48.PasswordMatchValidatorDirective, typeof i49.NumberDirective, typeof i50.TooltipComponent, typeof i51.MatBadgeModule], [typeof i26.NgxMatEntityInputComponent]>;
|
|
54
56
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInputModule>;
|
|
55
57
|
}
|
package/components/input/relations/references-many-input/references-many-input.component.d.ts
CHANGED
|
@@ -4,12 +4,14 @@ import { MatTableDataSource } from '@angular/material/table';
|
|
|
4
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
6
6
|
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
7
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
7
8
|
import { SelectionUtilities } from '../../../../utilities/selection.utilities';
|
|
8
9
|
import { DisplayColumn } from '../../../table/table-data';
|
|
9
10
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class ReferencesManyInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.REFERENCES_MANY, string[]> implements OnInit {
|
|
12
13
|
private readonly injector;
|
|
14
|
+
private readonly globalConfig;
|
|
13
15
|
allReferencedEntities: EntityType[];
|
|
14
16
|
allDropdownValues: DropdownValue<string>[];
|
|
15
17
|
dropdownValues: DropdownValue<string>[];
|
|
@@ -18,7 +20,7 @@ export declare class ReferencesManyInputComponent<EntityType extends BaseEntityT
|
|
|
18
20
|
displayedColumns: string[];
|
|
19
21
|
selection: SelectionModel<string>;
|
|
20
22
|
SelectionUtilities: typeof SelectionUtilities;
|
|
21
|
-
constructor(injector: EnvironmentInjector);
|
|
23
|
+
constructor(injector: EnvironmentInjector, globalConfig: NgxGlobalDefaultValues);
|
|
22
24
|
ngOnInit(): Promise<void>;
|
|
23
25
|
/**
|
|
24
26
|
* Gets the value to display in the column.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
2
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
2
3
|
import { ConfirmDialogDataInternal } from '../../confirm-dialog/confirm-dialog-data.builder';
|
|
3
4
|
import { CreateDialogData } from '../table-data';
|
|
4
5
|
/**
|
|
@@ -16,6 +17,6 @@ export declare class CreateDialogDataInternal implements CreateDialogData {
|
|
|
16
17
|
* The Builder for the CreateDialogData. Sets default values.
|
|
17
18
|
*/
|
|
18
19
|
export declare class CreateDialogDataBuilder extends BaseBuilder<CreateDialogDataInternal, CreateDialogData> {
|
|
19
|
-
constructor(data?: CreateDialogData);
|
|
20
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data?: CreateDialogData);
|
|
20
21
|
protected generateBaseData(data?: CreateDialogData): CreateDialogDataInternal;
|
|
21
22
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
2
3
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
3
4
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
5
|
import { EntityService } from '../../../services/entity.service';
|
|
@@ -17,6 +18,6 @@ export declare class CreateEntityDialogDataInternal<EntityType extends BaseEntit
|
|
|
17
18
|
* The Builder for the CreateEntityDialogData. Sets default values.
|
|
18
19
|
*/
|
|
19
20
|
export declare class CreateEntityDialogDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<CreateEntityDialogDataInternal<EntityType>, CreateEntityDialogData<EntityType>> {
|
|
20
|
-
constructor(data: CreateEntityDialogData<EntityType
|
|
21
|
+
constructor(data: CreateEntityDialogData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
21
22
|
protected generateBaseData(data: CreateEntityDialogData<EntityType>): CreateEntityDialogDataInternal<EntityType>;
|
|
22
23
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
4
5
|
import { EntityService } from '../../../services/entity.service';
|
|
5
6
|
import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
|
|
6
7
|
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
@@ -18,6 +19,7 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
18
19
|
dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>;
|
|
19
20
|
private readonly injector;
|
|
20
21
|
private readonly dialog;
|
|
22
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
21
23
|
EntityUtilities: typeof EntityUtilities;
|
|
22
24
|
entityTabs: EntityTab<EntityType>[];
|
|
23
25
|
entityService: EntityService<EntityType>;
|
|
@@ -25,7 +27,7 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
25
27
|
isEntityValid: boolean;
|
|
26
28
|
validationErrors: ValidationError[];
|
|
27
29
|
tooltipContent: string;
|
|
28
|
-
constructor(inputData: CreateEntityDialogData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>, injector: Injector, dialog: MatDialog);
|
|
30
|
+
constructor(inputData: CreateEntityDialogData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>, injector: Injector, dialog: MatDialog, globalConfig: NgxGlobalDefaultValues);
|
|
29
31
|
ngOnInit(): void;
|
|
30
32
|
/**
|
|
31
33
|
* Checks if the entity is valid.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
2
2
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
3
4
|
import { ConfirmDialogData } from '../../confirm-dialog/confirm-dialog-data';
|
|
4
5
|
import { EditAction, EditData } from '../table-data';
|
|
5
6
|
/**
|
|
@@ -7,12 +8,13 @@ import { EditAction, EditData } from '../table-data';
|
|
|
7
8
|
* Sets default values.
|
|
8
9
|
*/
|
|
9
10
|
export declare class EditActionInternal<EntityType extends BaseEntityType<EntityType>> implements EditAction<EntityType> {
|
|
11
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
10
12
|
displayName: string;
|
|
11
13
|
action: (entity: EntityType, entityPriorChanges: EntityType) => Promise<unknown>;
|
|
12
14
|
enabled: ((e: EntityType) => boolean);
|
|
13
15
|
requireConfirmDialog: ((e: EntityType) => boolean);
|
|
14
16
|
confirmDialogData: ConfirmDialogData;
|
|
15
|
-
constructor(data: EditAction<EntityType
|
|
17
|
+
constructor(data: EditAction<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
16
18
|
private functionToAsync;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
@@ -29,12 +31,12 @@ export declare class EditDataInternal<EntityType extends BaseEntityType<EntityTy
|
|
|
29
31
|
confirmEditDialogData: ConfirmDialogData;
|
|
30
32
|
actionsLabel: string;
|
|
31
33
|
actions: EditActionInternal<EntityType>[];
|
|
32
|
-
constructor(title: (entity: EntityType) => string, confirmButtonLabel: string, deleteButtonLabel: string, cancelButtonLabel: string, deleteRequiresConfirmDialog: boolean, editRequiresConfirmDialog: boolean, confirmDeleteDialogData: ConfirmDialogData, confirmEditDialogData: ConfirmDialogData, actionsLabel: string, actions: EditAction<EntityType>[]);
|
|
34
|
+
constructor(title: (entity: EntityType) => string, confirmButtonLabel: string, deleteButtonLabel: string, cancelButtonLabel: string, deleteRequiresConfirmDialog: boolean, editRequiresConfirmDialog: boolean, confirmDeleteDialogData: ConfirmDialogData, confirmEditDialogData: ConfirmDialogData, actionsLabel: string, actions: EditAction<EntityType>[], globalConfig: NgxGlobalDefaultValues);
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* The Builder for the EditDialogData. Sets default values.
|
|
36
38
|
*/
|
|
37
39
|
export declare class EditDialogDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<EditDataInternal<EntityType>, EditData<EntityType>> {
|
|
38
|
-
constructor(data?: EditData<EntityType>);
|
|
40
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data?: EditData<EntityType>);
|
|
39
41
|
protected generateBaseData(data?: EditData<EntityType>): EditDataInternal<EntityType>;
|
|
40
42
|
}
|
|
@@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
3
3
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
4
4
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
5
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
5
6
|
import { EntityService } from '../../../services/entity.service';
|
|
6
7
|
import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
|
|
7
8
|
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
@@ -21,6 +22,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
21
22
|
private readonly injector;
|
|
22
23
|
private readonly dialog;
|
|
23
24
|
private readonly http;
|
|
25
|
+
private readonly globalConfig;
|
|
24
26
|
EntityUtilities: typeof EntityUtilities;
|
|
25
27
|
entityTabs: EntityTab<EntityType>[];
|
|
26
28
|
entityService: EntityService<EntityType>;
|
|
@@ -32,7 +34,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
32
34
|
tooltipContent: string;
|
|
33
35
|
isEntityReadOnly: boolean;
|
|
34
36
|
allowDelete: boolean;
|
|
35
|
-
constructor(inputData: EditEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>, injector: EnvironmentInjector, dialog: MatDialog, http: HttpClient);
|
|
37
|
+
constructor(inputData: EditEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>, injector: EnvironmentInjector, dialog: MatDialog, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
36
38
|
ngOnInit(): void;
|
|
37
39
|
/**
|
|
38
40
|
* Checks if the input with the given key is readonly.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
3
3
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
4
5
|
import { EntityService } from '../../../services/entity.service';
|
|
5
6
|
import { EditDataInternal } from './edit-data.builder';
|
|
6
7
|
import { EditEntityData } from './edit-entity-data';
|
|
@@ -19,6 +20,6 @@ export declare class EditEntityDataInternal<EntityType extends BaseEntityType<En
|
|
|
19
20
|
* The Builder for the EditEntityData. Sets default values.
|
|
20
21
|
*/
|
|
21
22
|
export declare class EditEntityDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<EditEntityDataInternal<EntityType>, EditEntityData<EntityType>> {
|
|
22
|
-
constructor(data: EditEntityData<EntityType
|
|
23
|
+
constructor(data: EditEntityData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
23
24
|
protected generateBaseData(data: EditEntityData<EntityType>): EditEntityDataInternal<EntityType>;
|
|
24
25
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
3
3
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
5
|
import { EntityService } from '../../services/entity.service';
|
|
5
6
|
import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
|
|
6
7
|
import { CreateDialogDataInternal } from './create-dialog/create-dialog-data.builder';
|
|
@@ -10,26 +11,28 @@ import { BaseData, BaseTableAction, DisplayColumn, MultiSelectAction, TableData
|
|
|
10
11
|
* The internal BaseTableAction. Sets default values.
|
|
11
12
|
*/
|
|
12
13
|
export declare class BaseTableActionInternal implements BaseTableAction {
|
|
14
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
13
15
|
type: 'default';
|
|
14
16
|
displayName: string;
|
|
15
17
|
action: () => Promise<unknown>;
|
|
16
18
|
enabled: (() => boolean);
|
|
17
19
|
requireConfirmDialog: (() => boolean);
|
|
18
20
|
confirmDialogData: ConfirmDialogDataInternal;
|
|
19
|
-
constructor(data: BaseTableAction);
|
|
21
|
+
constructor(data: BaseTableAction, globalConfig: NgxGlobalDefaultValues);
|
|
20
22
|
private functionToAsync;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* The internal BaseTableAction. Sets default values.
|
|
24
26
|
*/
|
|
25
27
|
export declare class MultiSelectActionInternal<EntityType extends BaseEntityType<EntityType>> implements MultiSelectAction<EntityType> {
|
|
28
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
26
29
|
type: 'multi-select';
|
|
27
30
|
displayName: string;
|
|
28
31
|
action: (selectedEntities: EntityType[]) => Promise<unknown>;
|
|
29
32
|
enabled: ((selectedEntities: EntityType[]) => boolean);
|
|
30
33
|
requireConfirmDialog: ((selectedEntities: EntityType[]) => boolean);
|
|
31
34
|
confirmDialogData: ConfirmDialogDataInternal;
|
|
32
|
-
constructor(data: MultiSelectAction<EntityType
|
|
35
|
+
constructor(data: MultiSelectAction<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
33
36
|
private functionToAsync;
|
|
34
37
|
}
|
|
35
38
|
/**
|
|
@@ -49,13 +52,14 @@ export declare class TableDataInternal<EntityType extends BaseEntityType<EntityT
|
|
|
49
52
|
* The Builder for the table BaseData. Sets default values.
|
|
50
53
|
*/
|
|
51
54
|
export declare class BaseDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<BaseDataInternal<EntityType>, BaseData<EntityType>> {
|
|
52
|
-
constructor(data: BaseData<EntityType
|
|
55
|
+
constructor(data: BaseData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
53
56
|
protected generateBaseData(data: BaseData<EntityType>): BaseDataInternal<EntityType>;
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
56
59
|
* The internal TableData. Requires all default values the user can leave out.
|
|
57
60
|
*/
|
|
58
61
|
export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityType>> implements BaseData<EntityType> {
|
|
62
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
59
63
|
title: string;
|
|
60
64
|
displayColumns: DisplayColumn<EntityType>[];
|
|
61
65
|
EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>;
|
|
@@ -75,7 +79,7 @@ export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityTy
|
|
|
75
79
|
EntityClass?: EntityClassNewable<EntityType>;
|
|
76
80
|
edit?: (entity: EntityType) => unknown;
|
|
77
81
|
create?: (entity: EntityType) => unknown;
|
|
78
|
-
constructor(data: BaseData<EntityType
|
|
82
|
+
constructor(data: BaseData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
79
83
|
private buildImportActionData;
|
|
80
84
|
private allowDataToFunction;
|
|
81
85
|
}
|
|
@@ -83,7 +87,7 @@ export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityTy
|
|
|
83
87
|
* The Builder for the complete TableData. Sets default values and validates user input.
|
|
84
88
|
*/
|
|
85
89
|
export declare class TableDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<TableDataInternal<EntityType>, TableData<EntityType>> {
|
|
86
|
-
constructor(data: TableData<EntityType>);
|
|
90
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data: TableData<EntityType>);
|
|
87
91
|
protected generateBaseData(data: TableData<EntityType>): TableDataInternal<EntityType>;
|
|
88
92
|
protected validateInput(data: TableData<EntityType>): void;
|
|
89
93
|
}
|
|
@@ -6,6 +6,7 @@ import { MatSort } from '@angular/material/sort';
|
|
|
6
6
|
import { MatTableDataSource } from '@angular/material/table';
|
|
7
7
|
import { Router } from '@angular/router';
|
|
8
8
|
import { BaseEntityType, Entity } from '../../classes/entity.model';
|
|
9
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
9
10
|
import { SelectionUtilities } from '../../utilities/selection.utilities';
|
|
10
11
|
import { DisplayColumn, TableData } from './table-data';
|
|
11
12
|
import { BaseTableActionInternal, TableActionInternal, TableDataInternal } from './table-data.builder';
|
|
@@ -20,6 +21,7 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
|
|
|
20
21
|
private readonly dialog;
|
|
21
22
|
private readonly injector;
|
|
22
23
|
private readonly router;
|
|
24
|
+
private readonly globalConfig;
|
|
23
25
|
/**
|
|
24
26
|
* The configuration for the component.
|
|
25
27
|
*/
|
|
@@ -37,7 +39,7 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
|
|
|
37
39
|
selection: SelectionModel<EntityType>;
|
|
38
40
|
SelectionUtilities: typeof SelectionUtilities;
|
|
39
41
|
importAction: BaseTableActionInternal;
|
|
40
|
-
constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router);
|
|
42
|
+
constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, globalConfig: NgxGlobalDefaultValues);
|
|
41
43
|
/**
|
|
42
44
|
* Sets up all the configuration for the table and the EntityService.
|
|
43
45
|
*/
|
|
@@ -3,6 +3,7 @@ import { DateFilterFn } from '@angular/material/datepicker';
|
|
|
3
3
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
4
4
|
import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
|
|
5
5
|
import { CreateDialogData, DisplayColumn } from '../../components/table/table-data';
|
|
6
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
6
7
|
import { DecoratorTypes } from '../base/decorator-types.enum';
|
|
7
8
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
8
9
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
@@ -16,7 +17,7 @@ export declare class EditArrayItemDialogDataInternal<EntityType extends BaseEnti
|
|
|
16
17
|
title: (entity: EntityType) => string;
|
|
17
18
|
confirmButtonLabel: string;
|
|
18
19
|
cancelButtonLabel: string;
|
|
19
|
-
constructor(data?: EditArrayItemDialogData<EntityType>);
|
|
20
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data?: EditArrayItemDialogData<EntityType>);
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* The internal EntityArrayDecoratorConfig. Sets default values.
|
|
@@ -33,7 +34,7 @@ export declare class EntityArrayDecoratorConfigInternal<EntityType extends BaseE
|
|
|
33
34
|
missingErrorMessage: string;
|
|
34
35
|
addButtonLabel: string;
|
|
35
36
|
removeButtonLabel: string;
|
|
36
|
-
constructor(data: EntityArrayDecoratorConfig<EntityType
|
|
37
|
+
constructor(data: EntityArrayDecoratorConfig<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* The internal DateArrayDecoratorConfig. Sets default values.
|
|
@@ -49,7 +50,7 @@ export declare class DateArrayDecoratorConfigInternal extends PropertyDecoratorC
|
|
|
49
50
|
min?: (date?: Date) => Date;
|
|
50
51
|
max?: (date?: Date) => Date;
|
|
51
52
|
filter?: DateFilterFn<Date | null | undefined>;
|
|
52
|
-
constructor(data: DateArrayDecoratorConfig);
|
|
53
|
+
constructor(data: DateArrayDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* The internal DateTimeArrayDecoratorConfig. Sets default values.
|
|
@@ -70,7 +71,7 @@ export declare class DateTimeArrayDecoratorConfigInternal extends PropertyDecora
|
|
|
70
71
|
minTime?: (date?: Date) => Time;
|
|
71
72
|
maxTime?: (date?: Date) => Time;
|
|
72
73
|
filterTime?: ((time: Time) => boolean) | (() => boolean);
|
|
73
|
-
constructor(data: DateTimeArrayDecoratorConfig);
|
|
74
|
+
constructor(data: DateTimeArrayDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* The internal DateRangeArrayDecoratorConfig. Sets default values.
|
|
@@ -90,7 +91,7 @@ export declare class DateRangeArrayDecoratorConfigInternal extends PropertyDecor
|
|
|
90
91
|
minEnd?: (date?: Date) => Date;
|
|
91
92
|
maxEnd?: (date?: Date) => Date;
|
|
92
93
|
filter?: DateFilterFn<Date>;
|
|
93
|
-
constructor(data: DateRangeArrayDecoratorConfig);
|
|
94
|
+
constructor(data: DateRangeArrayDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
94
95
|
}
|
|
95
96
|
/**
|
|
96
97
|
* The internal StringChipsArrayDecoratorConfig. Sets default values.
|
|
@@ -103,7 +104,7 @@ export declare class StringChipsArrayDecoratorConfigInternal extends PropertyDec
|
|
|
103
104
|
minLength?: number;
|
|
104
105
|
maxLength?: number;
|
|
105
106
|
regex?: RegExp;
|
|
106
|
-
constructor(data: StringChipsArrayDecoratorConfig);
|
|
107
|
+
constructor(data: StringChipsArrayDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
107
108
|
}
|
|
108
109
|
/**
|
|
109
110
|
* The internal AutocompleteStringChipsArrayDecoratorConfig. Sets default values.
|
|
@@ -117,5 +118,5 @@ export declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends
|
|
|
117
118
|
minLength?: number;
|
|
118
119
|
maxLength?: number;
|
|
119
120
|
regex?: RegExp;
|
|
120
|
-
constructor(data: AutocompleteStringChipsArrayDecoratorConfig);
|
|
121
|
+
constructor(data: AutocompleteStringChipsArrayDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
121
122
|
}
|