ngx-material-entity 16.0.2 → 16.0.4
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 +15 -2
- 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-checkbox-input/boolean-checkbox-input.component.d.ts +1 -0
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +4 -0
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +2 -1
- 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 +10 -3
- package/components/input/input.module.d.ts +6 -2
- package/components/input/number/number-slider-input/number-slider-input.component.d.ts +2 -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 +6 -1
- package/components/table/edit-dialog/edit-data.builder.d.ts +5 -3
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +7 -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/components/tooltip/tooltip.component.d.ts +9 -0
- package/decorators/array/array-decorator-internal.data.d.ts +14 -13
- package/decorators/array/array-decorator.data.d.ts +7 -7
- package/decorators/base/property-decorator-internal.data.d.ts +11 -2
- package/decorators/base/property-decorator.data.d.ts +9 -1
- package/decorators/boolean/boolean-decorator-internal.data.d.ts +5 -4
- package/decorators/boolean/boolean-decorator.data.d.ts +1 -1
- package/decorators/custom/custom-decorator-internal.data.d.ts +2 -2
- package/decorators/custom/custom-decorator.data.d.ts +4 -4
- package/decorators/date/date-decorator-internal.data.d.ts +7 -6
- package/decorators/date/date-decorator.data.d.ts +5 -5
- package/decorators/file/file-decorator-internal.data.d.ts +3 -3
- package/decorators/file/file-decorator.data.d.ts +1 -1
- package/decorators/has-many/has-many-decorator-internal.data.d.ts +3 -2
- package/decorators/has-many/has-many-decorator.data.d.ts +1 -1
- package/decorators/number/number-decorator-internal.data.d.ts +3 -3
- package/decorators/number/number-decorator.data.d.ts +1 -1
- package/decorators/object/object-decorator-internal.data.d.ts +1 -1
- package/decorators/object/object-decorator.data.d.ts +1 -1
- package/decorators/references-many/references-many-decorator-internal.data.d.ts +3 -2
- package/decorators/references-many/references-many-decorator.data.d.ts +1 -1
- package/decorators/references-one/references-one-decorator-internal.data.d.ts +1 -1
- package/decorators/references-one/references-one-decorator.data.d.ts +1 -1
- package/decorators/string/string-decorator-internal.data.d.ts +5 -6
- package/decorators/string/string-decorator.data.d.ts +1 -7
- package/default-global-configuration-values.d.ts +6 -0
- package/directives/number.directive.d.ts +17 -0
- package/directives/password-match.directive.d.ts +14 -0
- package/directives/tooltip.directive.d.ts +32 -0
- 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 +75 -25
- 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/base-input.component.mjs +2 -1
- package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +6 -3
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +18 -4
- package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +6 -3
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +18 -4
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +17 -5
- package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +3 -3
- package/esm2022/components/input/file/file-input/file-input.component.mjs +1 -1
- package/esm2022/components/input/input.component.mjs +91 -61
- package/esm2022/components/input/input.module.mjs +18 -5
- package/esm2022/components/input/number/number-input/number-input.component.mjs +4 -3
- package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +6 -3
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +15 -5
- package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +4 -3
- 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 +32 -14
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +35 -21
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +46 -25
- 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 +24 -15
- package/esm2022/components/tooltip/tooltip.component.mjs +20 -0
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +42 -43
- package/esm2022/decorators/array/array-decorator.data.mjs +1 -1
- package/esm2022/decorators/array/array.decorator.mjs +8 -7
- package/esm2022/decorators/base/property-decorator-internal.data.mjs +25 -4
- package/esm2022/decorators/base/property-decorator.data.mjs +10 -1
- package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +5 -4
- package/esm2022/decorators/boolean/boolean-decorator.data.mjs +1 -1
- package/esm2022/decorators/boolean/boolean.decorator.mjs +3 -2
- package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +2 -2
- package/esm2022/decorators/custom/custom-decorator.data.mjs +1 -1
- package/esm2022/decorators/date/date-decorator-internal.data.mjs +8 -6
- package/esm2022/decorators/date/date-decorator.data.mjs +1 -1
- package/esm2022/decorators/date/date.decorator.mjs +4 -3
- package/esm2022/decorators/file/file-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/file/file-decorator.data.mjs +1 -1
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +4 -4
- package/esm2022/decorators/has-many/has-many-decorator.data.mjs +1 -1
- package/esm2022/decorators/has-many/has-many.decorator.mjs +3 -2
- package/esm2022/decorators/number/number-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/number/number-decorator.data.mjs +1 -1
- package/esm2022/decorators/object/object-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/object/object-decorator.data.mjs +1 -1
- package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +7 -6
- package/esm2022/decorators/references-many/references-many-decorator.data.mjs +1 -1
- package/esm2022/decorators/references-many/references-many.decorator.mjs +3 -2
- package/esm2022/decorators/references-one/references-one-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/references-one/references-one-decorator.data.mjs +1 -1
- package/esm2022/decorators/string/string-decorator-internal.data.mjs +1 -4
- package/esm2022/decorators/string/string-decorator.data.mjs +1 -1
- package/esm2022/default-global-configuration-values.mjs +89 -0
- package/esm2022/directives/drag-drop.directive.mjs +62 -0
- package/esm2022/directives/number.directive.mjs +38 -0
- package/esm2022/directives/password-match.directive.mjs +30 -0
- package/esm2022/directives/tooltip.directive.mjs +106 -0
- package/esm2022/functions/get-config-value.function.mjs +15 -0
- package/esm2022/functions/get-validation-error-message.function.mjs +49 -0
- package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +21 -0
- package/esm2022/global-configuration-values.mjs +10 -0
- package/esm2022/public-api.mjs +8 -2
- package/esm2022/utilities/entity.utilities.mjs +80 -405
- package/esm2022/utilities/validation.utilities.mjs +455 -0
- package/fesm2022/ngx-material-entity.mjs +2119 -1412
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/functions/get-config-value.function.d.ts +8 -0
- package/functions/get-validation-errors-tooltip-content.function.ts.d.ts +10 -0
- package/global-configuration-values.d.ts +216 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -1
- package/utilities/entity.utilities.d.ts +30 -34
- package/utilities/validation.utilities.d.ts +56 -0
- package/esm2022/components/get-validation-error-message.function.mjs +0 -42
- package/esm2022/components/input/file/file-input/dragDrop.directive.mjs +0 -62
- /package/{components/input/file/file-input/dragDrop.directive.d.ts → directives/drag-drop.directive.d.ts} +0 -0
- /package/{components → functions}/get-validation-error-message.function.d.ts +0 -0
|
@@ -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
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* A component that displays an info-symbol and a tooltip when it is hovered/clicked.
|
|
4
|
+
*/
|
|
5
|
+
export declare class TooltipComponent {
|
|
6
|
+
tooltipContent: string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "ngx-mat-entity-tooltip", never, { "tooltipContent": { "alias": "tooltipContent"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -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,12 +17,12 @@ 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.
|
|
23
24
|
*/
|
|
24
|
-
export declare class EntityArrayDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal implements EntityArrayDecoratorConfig<EntityType> {
|
|
25
|
+
export declare class EntityArrayDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal<EntityType[]> implements EntityArrayDecoratorConfig<EntityType> {
|
|
25
26
|
itemType: DecoratorTypes.OBJECT;
|
|
26
27
|
allowDuplicates: boolean;
|
|
27
28
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -33,12 +34,12 @@ 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.
|
|
40
41
|
*/
|
|
41
|
-
export declare class DateArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateArrayDecoratorConfig {
|
|
42
|
+
export declare class DateArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date[]> implements DateArrayDecoratorConfig {
|
|
42
43
|
itemType: DecoratorTypes.DATE;
|
|
43
44
|
allowDuplicates: boolean;
|
|
44
45
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -49,12 +50,12 @@ 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.
|
|
56
57
|
*/
|
|
57
|
-
export declare class DateTimeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateTimeArrayDecoratorConfig {
|
|
58
|
+
export declare class DateTimeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date[]> implements DateTimeArrayDecoratorConfig {
|
|
58
59
|
itemType: DecoratorTypes.DATE_TIME;
|
|
59
60
|
allowDuplicates: boolean;
|
|
60
61
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -70,12 +71,12 @@ 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.
|
|
77
78
|
*/
|
|
78
|
-
export declare class DateRangeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateRangeArrayDecoratorConfig {
|
|
79
|
+
export declare class DateRangeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<DateRange[]> implements DateRangeArrayDecoratorConfig {
|
|
79
80
|
itemType: DecoratorTypes.DATE_RANGE;
|
|
80
81
|
allowDuplicates: boolean;
|
|
81
82
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -90,12 +91,12 @@ 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.
|
|
97
98
|
*/
|
|
98
|
-
export declare class StringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements StringChipsArrayDecoratorConfig {
|
|
99
|
+
export declare class StringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<string[]> implements StringChipsArrayDecoratorConfig {
|
|
99
100
|
itemType: DecoratorTypes.STRING;
|
|
100
101
|
allowDuplicates: boolean;
|
|
101
102
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -103,12 +104,12 @@ 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.
|
|
110
111
|
*/
|
|
111
|
-
export declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements AutocompleteStringChipsArrayDecoratorConfig {
|
|
112
|
+
export declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<string[]> implements AutocompleteStringChipsArrayDecoratorConfig {
|
|
112
113
|
autocompleteValues: string[];
|
|
113
114
|
itemType: DecoratorTypes.STRING_AUTOCOMPLETE;
|
|
114
115
|
allowDuplicates: boolean;
|
|
@@ -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
|
}
|
|
@@ -10,7 +10,7 @@ import { DateRange } from '../date/date-decorator.data';
|
|
|
10
10
|
/**
|
|
11
11
|
* Interface definition for the @array metadata.
|
|
12
12
|
*/
|
|
13
|
-
export declare abstract class ArrayDecoratorConfig extends PropertyDecoratorConfig {
|
|
13
|
+
export declare abstract class ArrayDecoratorConfig<ValueType> extends PropertyDecoratorConfig<ValueType> {
|
|
14
14
|
/**
|
|
15
15
|
* The type of the items inside the array.
|
|
16
16
|
*/
|
|
@@ -46,7 +46,7 @@ export interface EditArrayItemDialogData<EntityType extends BaseEntityType<Entit
|
|
|
46
46
|
/**
|
|
47
47
|
* Definition for an array of Entities.
|
|
48
48
|
*/
|
|
49
|
-
export interface EntityArrayDecoratorConfig<EntityType extends BaseEntityType<EntityType>> extends ArrayDecoratorConfig {
|
|
49
|
+
export interface EntityArrayDecoratorConfig<EntityType extends BaseEntityType<EntityType>> extends ArrayDecoratorConfig<EntityType[]> {
|
|
50
50
|
itemType: DecoratorTypes.OBJECT;
|
|
51
51
|
/**
|
|
52
52
|
* The EntityClass used for generating the create inputs.
|
|
@@ -94,7 +94,7 @@ export interface EntityArrayDecoratorConfig<EntityType extends BaseEntityType<En
|
|
|
94
94
|
/**
|
|
95
95
|
* Definition for an array of Dates.
|
|
96
96
|
*/
|
|
97
|
-
export interface DateArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
97
|
+
export interface DateArrayDecoratorConfig extends ArrayDecoratorConfig<Date[]> {
|
|
98
98
|
itemType: DecoratorTypes.DATE;
|
|
99
99
|
/**
|
|
100
100
|
* The definition of the columns to display. Consists of the displayName to show in the header of the row
|
|
@@ -133,7 +133,7 @@ export interface DateArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
|
133
133
|
/**
|
|
134
134
|
* Definition for an array of DateTimes.
|
|
135
135
|
*/
|
|
136
|
-
export interface DateTimeArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
136
|
+
export interface DateTimeArrayDecoratorConfig extends ArrayDecoratorConfig<Date[]> {
|
|
137
137
|
itemType: DecoratorTypes.DATE_TIME;
|
|
138
138
|
/**
|
|
139
139
|
* The definition of the columns to display. Consists of the displayName to show in the header of the row
|
|
@@ -194,7 +194,7 @@ export interface DateTimeArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
|
194
194
|
/**
|
|
195
195
|
* Definition for an array of DateRanges.
|
|
196
196
|
*/
|
|
197
|
-
export interface DateRangeArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
197
|
+
export interface DateRangeArrayDecoratorConfig extends ArrayDecoratorConfig<DateRange[]> {
|
|
198
198
|
itemType: DecoratorTypes.DATE_RANGE;
|
|
199
199
|
/**
|
|
200
200
|
* The definition of the columns to display. Consists of the displayName to show in the header of the row
|
|
@@ -253,7 +253,7 @@ export interface DateRangeArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
|
253
253
|
/**
|
|
254
254
|
* Definition for an array of strings displayed as a chips list.
|
|
255
255
|
*/
|
|
256
|
-
export interface StringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
256
|
+
export interface StringChipsArrayDecoratorConfig extends ArrayDecoratorConfig<string[]> {
|
|
257
257
|
itemType: DecoratorTypes.STRING;
|
|
258
258
|
/**
|
|
259
259
|
* The class for the <i> tag used to remove an entry from the array.
|
|
@@ -277,7 +277,7 @@ export interface StringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
|
277
277
|
/**
|
|
278
278
|
* Definition for an array of autocomplete strings displayed as a chips list.
|
|
279
279
|
*/
|
|
280
|
-
export interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {
|
|
280
|
+
export interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecoratorConfig<string[]> {
|
|
281
281
|
itemType: DecoratorTypes.STRING_AUTOCOMPLETE;
|
|
282
282
|
/**
|
|
283
283
|
* The class for the <i> tag used to remove an entry from the array.
|
|
@@ -13,7 +13,7 @@ declare class PositionInternal implements Position {
|
|
|
13
13
|
/**
|
|
14
14
|
* The internal PropertyDecoratorConfig. Sets default values.
|
|
15
15
|
*/
|
|
16
|
-
export declare abstract class PropertyDecoratorConfigInternal implements PropertyDecoratorConfig {
|
|
16
|
+
export declare abstract class PropertyDecoratorConfigInternal<ValueType> implements PropertyDecoratorConfig<ValueType> {
|
|
17
17
|
display: (entity: unknown) => boolean;
|
|
18
18
|
displayName: string;
|
|
19
19
|
required: ((entity: unknown) => boolean);
|
|
@@ -22,7 +22,16 @@ export declare abstract class PropertyDecoratorConfigInternal implements Propert
|
|
|
22
22
|
defaultWidths: [Col, Col, Col];
|
|
23
23
|
position: PositionInternal;
|
|
24
24
|
isReadOnly: (entity: unknown) => boolean;
|
|
25
|
-
|
|
25
|
+
default?: () => ValueType;
|
|
26
|
+
change?: (entity: unknown) => void;
|
|
27
|
+
constructor(data: PropertyDecoratorConfig<ValueType>);
|
|
28
|
+
/**
|
|
29
|
+
* Converts the default value to a function or undefined.
|
|
30
|
+
*
|
|
31
|
+
* @param value - The default value provided by the metadata.
|
|
32
|
+
* @returns A function that returns a default value or undefined.
|
|
33
|
+
*/
|
|
34
|
+
protected defaultToFunction(value?: ValueType | (() => ValueType)): (() => ValueType) | undefined;
|
|
26
35
|
/**
|
|
27
36
|
* Converts the given boolean or boolean function to a boolean function.
|
|
28
37
|
*
|
|
@@ -5,7 +5,7 @@ export type Col = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
|
5
5
|
/**
|
|
6
6
|
* The base options for all propertyDecorators.
|
|
7
7
|
*/
|
|
8
|
-
export declare abstract class PropertyDecoratorConfig {
|
|
8
|
+
export declare abstract class PropertyDecoratorConfig<ValueType> {
|
|
9
9
|
/**
|
|
10
10
|
* Whether or not the Property is displayed at all.
|
|
11
11
|
*
|
|
@@ -53,6 +53,14 @@ export declare abstract class PropertyDecoratorConfig {
|
|
|
53
53
|
* Can either be a boolean or a function returning a boolean.
|
|
54
54
|
*/
|
|
55
55
|
isReadOnly?: boolean | ((entity: any) => boolean);
|
|
56
|
+
/**
|
|
57
|
+
* The value that the property should be prefilled with. Only active in create mode.
|
|
58
|
+
*/
|
|
59
|
+
default?: ValueType | (() => ValueType);
|
|
60
|
+
/**
|
|
61
|
+
* A function that runs just before the inputChangeEvent every time the property is changed.
|
|
62
|
+
*/
|
|
63
|
+
change?: (entity: any) => void;
|
|
56
64
|
}
|
|
57
65
|
/**
|
|
58
66
|
* The options for positioning a property when using default create/edit dialogs.
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
1
2
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
2
3
|
import { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig, ToggleBooleanDecoratorConfig } from './boolean-decorator.data';
|
|
3
4
|
/**
|
|
4
5
|
* The internal DropdownBooleanDecoratorConfig. Sets default values.
|
|
5
6
|
*/
|
|
6
|
-
export declare class DropdownBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DropdownBooleanDecoratorConfig {
|
|
7
|
+
export declare class DropdownBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal<boolean> implements DropdownBooleanDecoratorConfig {
|
|
7
8
|
displayStyle: 'dropdown';
|
|
8
9
|
dropdownTrue: string;
|
|
9
10
|
dropdownFalse: string;
|
|
10
|
-
constructor(data: DropdownBooleanDecoratorConfig);
|
|
11
|
+
constructor(data: DropdownBooleanDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* The internal CheckboxBooleanDecoratorConfig. Sets default values.
|
|
14
15
|
*/
|
|
15
|
-
export declare class CheckboxBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements CheckboxBooleanDecoratorConfig {
|
|
16
|
+
export declare class CheckboxBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal<boolean> implements CheckboxBooleanDecoratorConfig {
|
|
16
17
|
displayStyle: 'checkbox';
|
|
17
18
|
constructor(data: CheckboxBooleanDecoratorConfig);
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* The internal ToggleBooleanDecoratorConfig. Sets default values.
|
|
21
22
|
*/
|
|
22
|
-
export declare class ToggleBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements ToggleBooleanDecoratorConfig {
|
|
23
|
+
export declare class ToggleBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal<boolean> implements ToggleBooleanDecoratorConfig {
|
|
23
24
|
displayStyle: 'toggle';
|
|
24
25
|
constructor(data: ToggleBooleanDecoratorConfig);
|
|
25
26
|
}
|
|
@@ -2,7 +2,7 @@ import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
|
2
2
|
/**
|
|
3
3
|
* The Definition for the @boolean metadata.
|
|
4
4
|
*/
|
|
5
|
-
declare abstract class BooleanDecoratorConfig extends PropertyDecoratorConfig {
|
|
5
|
+
declare abstract class BooleanDecoratorConfig extends PropertyDecoratorConfig<boolean> {
|
|
6
6
|
/**
|
|
7
7
|
* Whether to display the booleans as a checkbox, a toggle button or as a dropdown.
|
|
8
8
|
*/
|
|
@@ -8,9 +8,9 @@ import { CustomDecoratorConfig } from './custom-decorator.data';
|
|
|
8
8
|
* The internal config for the @custom decorator.
|
|
9
9
|
* Sets default values.
|
|
10
10
|
*/
|
|
11
|
-
export declare class CustomDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, ValueType, MetadataType extends BaseEntityType<MetadataType>, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType, MetadataType>> extends PropertyDecoratorConfigInternal implements CustomDecoratorConfig<EntityType, ValueType, MetadataType, ComponentType> {
|
|
11
|
+
export declare class CustomDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, ValueType, MetadataType extends BaseEntityType<MetadataType>, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType, MetadataType>> extends PropertyDecoratorConfigInternal<ValueType> implements CustomDecoratorConfig<EntityType, ValueType, MetadataType, ComponentType> {
|
|
12
12
|
component: Type<ComponentType>;
|
|
13
|
-
isValid: (value: ValueType, omit
|
|
13
|
+
isValid: (value: ValueType, omit?: 'create' | 'update') => boolean;
|
|
14
14
|
isEqual: (value: ValueType, valuePriorChanges: ValueType, metadata: CustomDecoratorConfig<EntityType, ValueType, MetadataType, ComponentType>) => boolean;
|
|
15
15
|
customMetadata: MetadataType;
|
|
16
16
|
constructor(data: CustomDecoratorConfig<EntityType, ValueType, MetadataType, ComponentType>);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
2
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
|
+
import { NgxMatEntityBaseInputComponent } from '../../components/input/base-input.component';
|
|
3
4
|
import { DecoratorTypes } from '../base/decorator-types.enum';
|
|
4
5
|
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
5
|
-
import { Type } from '@angular/core';
|
|
6
6
|
/**
|
|
7
7
|
* Definition for a custom property. Use this if the provided decorators don't fit your needs.
|
|
8
8
|
*/
|
|
9
|
-
export interface CustomDecoratorConfig<EntityType extends BaseEntityType<EntityType>, ValueType, CustomMetadataType extends BaseEntityType<CustomMetadataType>, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType, CustomMetadataType>> extends PropertyDecoratorConfig {
|
|
9
|
+
export interface CustomDecoratorConfig<EntityType extends BaseEntityType<EntityType>, ValueType, CustomMetadataType extends BaseEntityType<CustomMetadataType>, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType, CustomMetadataType>> extends PropertyDecoratorConfig<ValueType> {
|
|
10
10
|
/**
|
|
11
11
|
* The component to use for this input.
|
|
12
12
|
*/
|
|
@@ -20,7 +20,7 @@ export interface CustomDecoratorConfig<EntityType extends BaseEntityType<EntityT
|
|
|
20
20
|
*
|
|
21
21
|
* @default () => true
|
|
22
22
|
*/
|
|
23
|
-
isValid?: (value: ValueType, omit
|
|
23
|
+
isValid?: (value: ValueType, omit?: 'create' | 'update') => boolean;
|
|
24
24
|
/**
|
|
25
25
|
* The function that defines whether or not two of your custom values are equal.
|
|
26
26
|
* Needed for the edit and create dialogs.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Time } from '@angular/common';
|
|
2
2
|
import { DateFilterFn } from '@angular/material/datepicker';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
3
4
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
4
5
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
5
|
-
import { DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
6
|
+
import { DateRange, DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
6
7
|
/**
|
|
7
8
|
* The internal DefaultDateDecoratorConfig. Sets default values.
|
|
8
9
|
*/
|
|
9
|
-
export declare class DefaultDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DefaultDateDecoratorConfig {
|
|
10
|
+
export declare class DefaultDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date> implements DefaultDateDecoratorConfig {
|
|
10
11
|
displayStyle: 'date';
|
|
11
12
|
min?: (date?: Date) => Date;
|
|
12
13
|
max?: (date?: Date) => Date;
|
|
@@ -16,7 +17,7 @@ export declare class DefaultDateDecoratorConfigInternal extends PropertyDecorato
|
|
|
16
17
|
/**
|
|
17
18
|
* The internal DateRangeDateDecoratorConfig. Sets default values.
|
|
18
19
|
*/
|
|
19
|
-
export declare class DateRangeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateRangeDateDecoratorConfig {
|
|
20
|
+
export declare class DateRangeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<DateRange> implements DateRangeDateDecoratorConfig {
|
|
20
21
|
displayStyle: 'daterange';
|
|
21
22
|
minStart?: (date?: Date) => Date;
|
|
22
23
|
maxStart?: (date?: Date) => Date;
|
|
@@ -25,12 +26,12 @@ export declare class DateRangeDateDecoratorConfigInternal extends PropertyDecora
|
|
|
25
26
|
filter?: DateFilterFn<Date>;
|
|
26
27
|
placeholderStart: string;
|
|
27
28
|
placeholderEnd: string;
|
|
28
|
-
constructor(data: DateRangeDateDecoratorConfig);
|
|
29
|
+
constructor(data: DateRangeDateDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* The internal DateTimeDateDecoratorConfig. Sets default values.
|
|
32
33
|
*/
|
|
33
|
-
export declare class DateTimeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateTimeDateDecoratorConfig {
|
|
34
|
+
export declare class DateTimeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date> implements DateTimeDateDecoratorConfig {
|
|
34
35
|
displayStyle: 'datetime';
|
|
35
36
|
times: DropdownValue<Time | undefined>[];
|
|
36
37
|
timeDisplayName: string;
|
|
@@ -40,5 +41,5 @@ export declare class DateTimeDateDecoratorConfigInternal extends PropertyDecorat
|
|
|
40
41
|
minTime?: (date?: Date) => Time;
|
|
41
42
|
maxTime?: (date?: Date) => Time;
|
|
42
43
|
filterTime?: ((time: Time) => boolean) | (() => boolean);
|
|
43
|
-
constructor(data: DateTimeDateDecoratorConfig);
|
|
44
|
+
constructor(data: DateTimeDateDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
44
45
|
}
|
|
@@ -19,12 +19,12 @@ export interface DateRange {
|
|
|
19
19
|
* E.g. When you build a tool to request vacation you may want the user to select 3 weeks in the range picker
|
|
20
20
|
* but don't want the weekend dates in the final result.
|
|
21
21
|
*/
|
|
22
|
-
values
|
|
22
|
+
values: Date[];
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Definition for the @date metadata.
|
|
26
26
|
*/
|
|
27
|
-
declare abstract class DateDecoratorConfig extends PropertyDecoratorConfig {
|
|
27
|
+
declare abstract class DateDecoratorConfig<ValueType> extends PropertyDecoratorConfig<ValueType> {
|
|
28
28
|
/**
|
|
29
29
|
* How to display the date.
|
|
30
30
|
*/
|
|
@@ -33,7 +33,7 @@ declare abstract class DateDecoratorConfig extends PropertyDecoratorConfig {
|
|
|
33
33
|
/**
|
|
34
34
|
* The configuration options for a date property displayed as a default single date picker.
|
|
35
35
|
*/
|
|
36
|
-
export interface DefaultDateDecoratorConfig extends DateDecoratorConfig {
|
|
36
|
+
export interface DefaultDateDecoratorConfig extends DateDecoratorConfig<Date> {
|
|
37
37
|
displayStyle: 'date';
|
|
38
38
|
/**
|
|
39
39
|
* A function to get the minimum value of the date.
|
|
@@ -51,7 +51,7 @@ export interface DefaultDateDecoratorConfig extends DateDecoratorConfig {
|
|
|
51
51
|
/**
|
|
52
52
|
* The configuration options for a date property displayed as a date range.
|
|
53
53
|
*/
|
|
54
|
-
export interface DateRangeDateDecoratorConfig extends DateDecoratorConfig {
|
|
54
|
+
export interface DateRangeDateDecoratorConfig extends DateDecoratorConfig<DateRange> {
|
|
55
55
|
displayStyle: 'daterange';
|
|
56
56
|
/**
|
|
57
57
|
* A function to get the minimum value of the start date.
|
|
@@ -89,7 +89,7 @@ export interface DateRangeDateDecoratorConfig extends DateDecoratorConfig {
|
|
|
89
89
|
/**
|
|
90
90
|
* The configuration options for a date property displayed as date time.
|
|
91
91
|
*/
|
|
92
|
-
export interface DateTimeDateDecoratorConfig extends DateDecoratorConfig {
|
|
92
|
+
export interface DateTimeDateDecoratorConfig extends DateDecoratorConfig<Date> {
|
|
93
93
|
displayStyle: 'datetime';
|
|
94
94
|
/**
|
|
95
95
|
* The selectable times.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
|
|
2
2
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
3
|
-
import { DefaultFileDecoratorConfig, ImageFileDecoratorConfig } from './file-decorator.data';
|
|
3
|
+
import { DefaultFileDecoratorConfig, FileData, ImageFileDecoratorConfig } from './file-decorator.data';
|
|
4
4
|
/**
|
|
5
5
|
* Contains data about a file property where a blob exists.
|
|
6
6
|
*/
|
|
@@ -58,7 +58,7 @@ export interface FileDataWithUrl {
|
|
|
58
58
|
/**
|
|
59
59
|
* The internal DefaultFileDecoratorConfig. Sets default values.
|
|
60
60
|
*/
|
|
61
|
-
export declare class DefaultFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DefaultFileDecoratorConfig {
|
|
61
|
+
export declare class DefaultFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal<FileData> implements DefaultFileDecoratorConfig {
|
|
62
62
|
type: 'other';
|
|
63
63
|
preview: false;
|
|
64
64
|
multiple: boolean;
|
|
@@ -75,7 +75,7 @@ export declare class DefaultFileDecoratorConfigInternal extends PropertyDecorato
|
|
|
75
75
|
/**
|
|
76
76
|
* The internal ImageFileDecoratorConfig. Sets default values.
|
|
77
77
|
*/
|
|
78
|
-
export declare class ImageFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements ImageFileDecoratorConfig {
|
|
78
|
+
export declare class ImageFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal<FileData> implements ImageFileDecoratorConfig {
|
|
79
79
|
type: 'image';
|
|
80
80
|
allowedMimeTypes: string[];
|
|
81
81
|
multiple: boolean;
|
|
@@ -8,7 +8,7 @@ export type FileData = FileDataWithFile | FileDataWithUrl;
|
|
|
8
8
|
/**
|
|
9
9
|
* Definition for the @file metadata.
|
|
10
10
|
*/
|
|
11
|
-
declare abstract class FileDecoratorConfig extends PropertyDecoratorConfig {
|
|
11
|
+
declare abstract class FileDecoratorConfig extends PropertyDecoratorConfig<FileData> {
|
|
12
12
|
/**
|
|
13
13
|
* Specifies whether or not the decorated property can have multiple files.
|
|
14
14
|
*/
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
3
|
import { TableDataInternal } from '../../components/table/table-data.builder';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
5
|
import { EntityService } from '../../services/entity.service';
|
|
5
6
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
6
7
|
import { HasManyDecoratorConfig } from './has-many-decorator.data';
|
|
7
8
|
/**
|
|
8
9
|
* The internal HasManyDecoratorConfig. Sets default values.
|
|
9
10
|
*/
|
|
10
|
-
export declare class HasManyDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfigInternal implements HasManyDecoratorConfig<EntityType, RelatedBaseEntityType> {
|
|
11
|
+
export declare class HasManyDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements HasManyDecoratorConfig<EntityType, RelatedBaseEntityType> {
|
|
11
12
|
omitForCreate: true;
|
|
12
13
|
tableData: TableDataInternal<EntityType>;
|
|
13
14
|
RelatedEntityServiceClass: new (httpClient: HttpClient) => EntityService<RelatedBaseEntityType>;
|
|
14
15
|
createBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
|
|
15
16
|
readBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
|
|
16
|
-
constructor(data: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType
|
|
17
|
+
constructor(data: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
17
18
|
}
|
|
@@ -6,7 +6,7 @@ import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
|
6
6
|
/**
|
|
7
7
|
* Definition for the @hasMany metadata.
|
|
8
8
|
*/
|
|
9
|
-
export interface HasManyDecoratorConfig<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfig {
|
|
9
|
+
export interface HasManyDecoratorConfig<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfig<EntityType> {
|
|
10
10
|
/**
|
|
11
11
|
* Whether or not the property gets omitted when creating new Entities.
|
|
12
12
|
*
|
|
@@ -4,7 +4,7 @@ import { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig, SliderNumb
|
|
|
4
4
|
/**
|
|
5
5
|
* The internal DefaultNumberDecoratorConfig. Sets default values.
|
|
6
6
|
*/
|
|
7
|
-
export declare class DefaultNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DefaultNumberDecoratorConfig {
|
|
7
|
+
export declare class DefaultNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal<number> implements DefaultNumberDecoratorConfig {
|
|
8
8
|
displayStyle: 'line';
|
|
9
9
|
min?: number;
|
|
10
10
|
max?: number;
|
|
@@ -13,7 +13,7 @@ export declare class DefaultNumberDecoratorConfigInternal extends PropertyDecora
|
|
|
13
13
|
/**
|
|
14
14
|
* The internal DropdownNumberDecoratorConfig. Sets default values.
|
|
15
15
|
*/
|
|
16
|
-
export declare class DropdownNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DropdownNumberDecoratorConfig {
|
|
16
|
+
export declare class DropdownNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal<number> implements DropdownNumberDecoratorConfig {
|
|
17
17
|
displayStyle: 'dropdown';
|
|
18
18
|
dropdownValues: ((entity: any) => Promise<DropdownValue<number | undefined>[]>);
|
|
19
19
|
constructor(data: DropdownNumberDecoratorConfig);
|
|
@@ -22,7 +22,7 @@ export declare class DropdownNumberDecoratorConfigInternal extends PropertyDecor
|
|
|
22
22
|
/**
|
|
23
23
|
* The internal SliderNumberDecoratorConfig. Sets default values.
|
|
24
24
|
*/
|
|
25
|
-
export declare class SliderNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements SliderNumberDecoratorConfig {
|
|
25
|
+
export declare class SliderNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal<number> implements SliderNumberDecoratorConfig {
|
|
26
26
|
displayStyle: 'slider';
|
|
27
27
|
min?: number;
|
|
28
28
|
max?: number;
|
|
@@ -4,7 +4,7 @@ export type NumberDropdownValues = DropdownValue<number | undefined>[] | ((entit
|
|
|
4
4
|
/**
|
|
5
5
|
* Definition for the @number metadata.
|
|
6
6
|
*/
|
|
7
|
-
declare abstract class NumberDecoratorConfig extends PropertyDecoratorConfig {
|
|
7
|
+
declare abstract class NumberDecoratorConfig extends PropertyDecoratorConfig<number> {
|
|
8
8
|
/**
|
|
9
9
|
* Whether to display the number in a single line or as a dropdown.
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@ import { DefaultObjectDecoratorConfig } from './object-decorator.data';
|
|
|
4
4
|
/**
|
|
5
5
|
* The internal DefaultObjectDecoratorConfig. Sets default values.
|
|
6
6
|
*/
|
|
7
|
-
export declare class DefaultObjectDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal implements DefaultObjectDecoratorConfig<EntityType> {
|
|
7
|
+
export declare class DefaultObjectDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements DefaultObjectDecoratorConfig<EntityType> {
|
|
8
8
|
displayStyle: 'inline';
|
|
9
9
|
EntityClass: EntityClassNewable<EntityType>;
|
|
10
10
|
omit: (keyof EntityType)[];
|
|
@@ -3,7 +3,7 @@ import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
|
3
3
|
/**
|
|
4
4
|
* Definition for the @object metadata.
|
|
5
5
|
*/
|
|
6
|
-
declare abstract class ObjectDecoratorConfig<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfig {
|
|
6
|
+
declare abstract class ObjectDecoratorConfig<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfig<EntityType> {
|
|
7
7
|
/**
|
|
8
8
|
* The class of the object. Is used to call the constructor so that all metadata is initialized.
|
|
9
9
|
*/
|