ngx-material-entity 16.0.2 → 16.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/edit-page/edit-page.component.d.ts +13 -2
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +1 -0
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +2 -1
- package/components/input/input.component.d.ts +1 -1
- package/components/input/input.module.d.ts +4 -2
- package/components/input/number/number-slider-input/number-slider-input.component.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +3 -0
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +4 -0
- package/components/tooltip/tooltip.component.d.ts +9 -0
- package/decorators/array/array-decorator-internal.data.d.ts +6 -6
- 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 +3 -3
- 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 +4 -4
- 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 +1 -1
- 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 +1 -1
- 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/directives/number.directive.d.ts +17 -0
- package/directives/password-match.directive.d.ts +14 -0
- package/directives/tooltip.directive.d.ts +33 -0
- package/esm2022/components/edit-page/edit-page.component.mjs +57 -13
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +1 -1
- 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-toggle-input/boolean-toggle-input.component.mjs +6 -3
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +3 -1
- 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 +7 -6
- package/esm2022/components/input/input.module.mjs +10 -4
- 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/string/string-password-input/string-password-input.component.mjs +4 -3
- package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +18 -6
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +26 -13
- package/esm2022/components/table/table.component.mjs +7 -4
- package/esm2022/components/tooltip/tooltip.component.mjs +20 -0
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/array/array-decorator.data.mjs +1 -1
- package/esm2022/decorators/base/property-decorator-internal.data.mjs +22 -1
- package/esm2022/decorators/base/property-decorator.data.mjs +10 -1
- package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/boolean/boolean-decorator.data.mjs +1 -1
- 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 +2 -1
- package/esm2022/decorators/date/date-decorator.data.mjs +1 -1
- 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 +1 -1
- package/esm2022/decorators/has-many/has-many-decorator.data.mjs +1 -1
- 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 +1 -1
- package/esm2022/decorators/references-many/references-many-decorator.data.mjs +1 -1
- 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/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 +112 -0
- package/esm2022/functions/get-validation-error-message.function.mjs +49 -0
- package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +25 -0
- package/esm2022/public-api.mjs +6 -2
- package/esm2022/utilities/entity.utilities.mjs +83 -386
- package/esm2022/utilities/validation.utilities.mjs +455 -0
- package/fesm2022/ngx-material-entity.mjs +1374 -905
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/functions/get-validation-errors-tooltip-content.function.ts.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -1
- package/utilities/entity.utilities.d.ts +33 -30
- 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,12 +1,13 @@
|
|
|
1
1
|
import { Location } from '@angular/common';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { EnvironmentInjector, InjectionToken, OnInit } from '@angular/core';
|
|
3
|
+
import { ElementRef, EnvironmentInjector, InjectionToken, OnInit, Renderer2 } from '@angular/core';
|
|
4
4
|
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
8
|
import { EntityService } from '../../services/entity.service';
|
|
9
9
|
import { EntityTab, EntityUtilities } from '../../utilities/entity.utilities';
|
|
10
|
+
import { ValidationError } from '../../utilities/validation.utilities';
|
|
10
11
|
import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
|
|
11
12
|
import { EditActionInternal } from '../table/edit-dialog/edit-data.builder';
|
|
12
13
|
import { EditEntityData } from '../table/edit-dialog/edit-entity-data';
|
|
@@ -64,18 +65,22 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
64
65
|
private readonly EntityClass;
|
|
65
66
|
private readonly inputData;
|
|
66
67
|
private readonly http;
|
|
68
|
+
private readonly el;
|
|
69
|
+
private readonly renderer;
|
|
67
70
|
EntityUtilities: typeof EntityUtilities;
|
|
68
71
|
entityTabs: EntityTab<EntityType>[];
|
|
69
72
|
entity: EntityType;
|
|
70
73
|
entityPriorChanges: EntityType;
|
|
71
74
|
data: PageEditDataInternal<EntityType>;
|
|
75
|
+
validationErrors: ValidationError[];
|
|
72
76
|
isEntityValid: boolean;
|
|
73
77
|
isEntityDirty: boolean;
|
|
78
|
+
tooltipContent: string;
|
|
74
79
|
isEntityReadOnly: boolean;
|
|
75
80
|
allowDelete: boolean;
|
|
76
81
|
private inConfirmNavigation;
|
|
77
82
|
get hasUnsavedChanges(): boolean;
|
|
78
|
-
constructor(dialog: MatDialog, location: Location, route: ActivatedRoute, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageEditData<EntityType>, http: HttpClient);
|
|
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);
|
|
79
84
|
/**
|
|
80
85
|
* Checks if the input with the given key is readonly.
|
|
81
86
|
*
|
|
@@ -84,6 +89,11 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
84
89
|
*/
|
|
85
90
|
isReadOnly(key: keyof EntityType): boolean;
|
|
86
91
|
ngOnInit(): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Checks if the bottom row should be displayed as fixed.
|
|
94
|
+
*/
|
|
95
|
+
onScroll(): void;
|
|
96
|
+
private checkOffset;
|
|
87
97
|
/**
|
|
88
98
|
* Whether the page can be left without confirmation (of unsaved changes).
|
|
89
99
|
*
|
|
@@ -94,6 +104,7 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
94
104
|
* Checks if the entity has become invalid or dirty.
|
|
95
105
|
*/
|
|
96
106
|
checkEntity(): Promise<void>;
|
|
107
|
+
private checkIsEntityValid;
|
|
97
108
|
/**
|
|
98
109
|
* Tries to save the changes and close the dialog afterwards.
|
|
99
110
|
* Also handles the confirmation if required.
|
package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class BooleanCheckboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_CHECKBOX, boolean> implements OnInit {
|
|
7
7
|
ngOnInit(): void;
|
|
8
|
+
updatePropertyValue(): void;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanCheckboxInputComponent<any>, never>;
|
|
9
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanCheckboxInputComponent<any>, "boolean-checkbox-input", never, {}, {}, never, never, false, never>;
|
|
10
11
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
2
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class BooleanToggleInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_TOGGLE, boolean> implements OnInit {
|
|
7
7
|
ngOnInit(): void;
|
|
8
|
+
updatePropertyValue(): void;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanToggleInputComponent<any>, never>;
|
|
9
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanToggleInputComponent<any>, "boolean-toggle-input", never, {}, {}, never, never, false, never>;
|
|
10
11
|
}
|
|
@@ -88,7 +88,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
88
88
|
editArrayItemDialog: TemplateRef<unknown>;
|
|
89
89
|
editArrayItemDialogRef: MatDialogRef<unknown>;
|
|
90
90
|
type: DecoratorTypes;
|
|
91
|
-
metadata: PropertyDecoratorConfigInternal
|
|
91
|
+
metadata: PropertyDecoratorConfigInternal<unknown>;
|
|
92
92
|
metadataDefaultObject: DefaultObjectDecoratorConfigInternal<EntityType>;
|
|
93
93
|
objectProperty: EntityType;
|
|
94
94
|
objectPropertyTabs: EntityTab<EntityType>[];
|
|
@@ -21,7 +21,7 @@ import * as i19 from "./array/array-date-range-input/array-date-range-input.comp
|
|
|
21
21
|
import * as i20 from "./file/file-input/file-input.component";
|
|
22
22
|
import * as i21 from "./file/file-image-input/file-image-input.component";
|
|
23
23
|
import * as i22 from "./file/file-default-input/file-default-input.component";
|
|
24
|
-
import * as i23 from "
|
|
24
|
+
import * as i23 from "../../directives/drag-drop.directive";
|
|
25
25
|
import * as i24 from "./relations/references-many-input/references-many-input.component";
|
|
26
26
|
import * as i25 from "./custom/custom.component";
|
|
27
27
|
import * as i26 from "./input.component";
|
|
@@ -46,8 +46,10 @@ import * as i44 from "@angular/material/progress-spinner";
|
|
|
46
46
|
import * as i45 from "@angular/material/paginator";
|
|
47
47
|
import * as i46 from "../table/display-column-value/display-column-value.component";
|
|
48
48
|
import * as i47 from "@angular/material/sort";
|
|
49
|
+
import * as i48 from "../../directives/password-match.directive";
|
|
50
|
+
import * as i49 from "../../directives/number.directive";
|
|
49
51
|
export declare class NgxMatEntityInputModule {
|
|
50
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputModule, never>;
|
|
51
|
-
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 i26.NgxMatEntityInputComponent]>;
|
|
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]>;
|
|
52
54
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInputModule>;
|
|
53
55
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
2
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class NumberSliderInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER_SLIDER, number> implements OnInit {
|
|
7
|
+
updatePropertyValue(value: number): void;
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberSliderInputComponent<any>, never>;
|
|
8
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<NumberSliderInputComponent<any>, "number-slider-input", never, {}, {}, never, never, false, never>;
|
|
9
10
|
}
|
|
@@ -3,6 +3,7 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
|
3
3
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
4
|
import { EntityService } from '../../../services/entity.service';
|
|
5
5
|
import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
|
|
6
|
+
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
6
7
|
import { CreateEntityDialogData } from './create-entity-dialog-data';
|
|
7
8
|
import { CreateEntityDialogDataInternal } from './create-entity-dialog-data.builder';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
@@ -22,6 +23,8 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
22
23
|
entityService: EntityService<EntityType>;
|
|
23
24
|
data: CreateEntityDialogDataInternal<EntityType>;
|
|
24
25
|
isEntityValid: boolean;
|
|
26
|
+
validationErrors: ValidationError[];
|
|
27
|
+
tooltipContent: string;
|
|
25
28
|
constructor(inputData: CreateEntityDialogData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>, injector: Injector, dialog: MatDialog);
|
|
26
29
|
ngOnInit(): void;
|
|
27
30
|
/**
|
|
@@ -4,6 +4,7 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
|
4
4
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
5
5
|
import { EntityService } from '../../../services/entity.service';
|
|
6
6
|
import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
|
|
7
|
+
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
7
8
|
import { EditActionInternal } from './edit-data.builder';
|
|
8
9
|
import { EditEntityData } from './edit-entity-data';
|
|
9
10
|
import { EditEntityDataInternal } from './edit-entity.builder';
|
|
@@ -27,6 +28,8 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
27
28
|
data: EditEntityDataInternal<EntityType>;
|
|
28
29
|
isEntityValid: boolean;
|
|
29
30
|
isEntityDirty: boolean;
|
|
31
|
+
validationErrors: ValidationError[];
|
|
32
|
+
tooltipContent: string;
|
|
30
33
|
isEntityReadOnly: boolean;
|
|
31
34
|
allowDelete: boolean;
|
|
32
35
|
constructor(inputData: EditEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>, injector: EnvironmentInjector, dialog: MatDialog, http: HttpClient);
|
|
@@ -42,6 +45,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
42
45
|
* Checks if the entity has become invalid or dirty.
|
|
43
46
|
*/
|
|
44
47
|
checkEntity(): Promise<void>;
|
|
48
|
+
private checkIsEntityValid;
|
|
45
49
|
/**
|
|
46
50
|
* Tries to save the changes and close the dialog afterwards.
|
|
47
51
|
* Also handles the confirmation if required.
|
|
@@ -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
|
+
}
|
|
@@ -21,7 +21,7 @@ export declare class EditArrayItemDialogDataInternal<EntityType extends BaseEnti
|
|
|
21
21
|
/**
|
|
22
22
|
* The internal EntityArrayDecoratorConfig. Sets default values.
|
|
23
23
|
*/
|
|
24
|
-
export declare class EntityArrayDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal implements EntityArrayDecoratorConfig<EntityType> {
|
|
24
|
+
export declare class EntityArrayDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal<EntityType[]> implements EntityArrayDecoratorConfig<EntityType> {
|
|
25
25
|
itemType: DecoratorTypes.OBJECT;
|
|
26
26
|
allowDuplicates: boolean;
|
|
27
27
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -38,7 +38,7 @@ export declare class EntityArrayDecoratorConfigInternal<EntityType extends BaseE
|
|
|
38
38
|
/**
|
|
39
39
|
* The internal DateArrayDecoratorConfig. Sets default values.
|
|
40
40
|
*/
|
|
41
|
-
export declare class DateArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateArrayDecoratorConfig {
|
|
41
|
+
export declare class DateArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date[]> implements DateArrayDecoratorConfig {
|
|
42
42
|
itemType: DecoratorTypes.DATE;
|
|
43
43
|
allowDuplicates: boolean;
|
|
44
44
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -54,7 +54,7 @@ export declare class DateArrayDecoratorConfigInternal extends PropertyDecoratorC
|
|
|
54
54
|
/**
|
|
55
55
|
* The internal DateTimeArrayDecoratorConfig. Sets default values.
|
|
56
56
|
*/
|
|
57
|
-
export declare class DateTimeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateTimeArrayDecoratorConfig {
|
|
57
|
+
export declare class DateTimeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date[]> implements DateTimeArrayDecoratorConfig {
|
|
58
58
|
itemType: DecoratorTypes.DATE_TIME;
|
|
59
59
|
allowDuplicates: boolean;
|
|
60
60
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -75,7 +75,7 @@ export declare class DateTimeArrayDecoratorConfigInternal extends PropertyDecora
|
|
|
75
75
|
/**
|
|
76
76
|
* The internal DateRangeArrayDecoratorConfig. Sets default values.
|
|
77
77
|
*/
|
|
78
|
-
export declare class DateRangeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateRangeArrayDecoratorConfig {
|
|
78
|
+
export declare class DateRangeArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<DateRange[]> implements DateRangeArrayDecoratorConfig {
|
|
79
79
|
itemType: DecoratorTypes.DATE_RANGE;
|
|
80
80
|
allowDuplicates: boolean;
|
|
81
81
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -95,7 +95,7 @@ export declare class DateRangeArrayDecoratorConfigInternal extends PropertyDecor
|
|
|
95
95
|
/**
|
|
96
96
|
* The internal StringChipsArrayDecoratorConfig. Sets default values.
|
|
97
97
|
*/
|
|
98
|
-
export declare class StringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements StringChipsArrayDecoratorConfig {
|
|
98
|
+
export declare class StringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<string[]> implements StringChipsArrayDecoratorConfig {
|
|
99
99
|
itemType: DecoratorTypes.STRING;
|
|
100
100
|
allowDuplicates: boolean;
|
|
101
101
|
duplicatesErrorDialog: ConfirmDialogData;
|
|
@@ -108,7 +108,7 @@ export declare class StringChipsArrayDecoratorConfigInternal extends PropertyDec
|
|
|
108
108
|
/**
|
|
109
109
|
* The internal AutocompleteStringChipsArrayDecoratorConfig. Sets default values.
|
|
110
110
|
*/
|
|
111
|
-
export declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements AutocompleteStringChipsArrayDecoratorConfig {
|
|
111
|
+
export declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<string[]> implements AutocompleteStringChipsArrayDecoratorConfig {
|
|
112
112
|
autocompleteValues: string[];
|
|
113
113
|
itemType: DecoratorTypes.STRING_AUTOCOMPLETE;
|
|
114
114
|
allowDuplicates: boolean;
|
|
@@ -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.
|
|
@@ -3,7 +3,7 @@ import { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig, ToggleB
|
|
|
3
3
|
/**
|
|
4
4
|
* The internal DropdownBooleanDecoratorConfig. Sets default values.
|
|
5
5
|
*/
|
|
6
|
-
export declare class DropdownBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DropdownBooleanDecoratorConfig {
|
|
6
|
+
export declare class DropdownBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal<boolean> implements DropdownBooleanDecoratorConfig {
|
|
7
7
|
displayStyle: 'dropdown';
|
|
8
8
|
dropdownTrue: string;
|
|
9
9
|
dropdownFalse: string;
|
|
@@ -12,14 +12,14 @@ export declare class DropdownBooleanDecoratorConfigInternal extends PropertyDeco
|
|
|
12
12
|
/**
|
|
13
13
|
* The internal CheckboxBooleanDecoratorConfig. Sets default values.
|
|
14
14
|
*/
|
|
15
|
-
export declare class CheckboxBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements CheckboxBooleanDecoratorConfig {
|
|
15
|
+
export declare class CheckboxBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal<boolean> implements CheckboxBooleanDecoratorConfig {
|
|
16
16
|
displayStyle: 'checkbox';
|
|
17
17
|
constructor(data: CheckboxBooleanDecoratorConfig);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* The internal ToggleBooleanDecoratorConfig. Sets default values.
|
|
21
21
|
*/
|
|
22
|
-
export declare class ToggleBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements ToggleBooleanDecoratorConfig {
|
|
22
|
+
export declare class ToggleBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal<boolean> implements ToggleBooleanDecoratorConfig {
|
|
23
23
|
displayStyle: 'toggle';
|
|
24
24
|
constructor(data: ToggleBooleanDecoratorConfig);
|
|
25
25
|
}
|
|
@@ -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.
|
|
@@ -2,11 +2,11 @@ import { Time } from '@angular/common';
|
|
|
2
2
|
import { DateFilterFn } from '@angular/material/datepicker';
|
|
3
3
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
4
4
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
5
|
-
import { DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
5
|
+
import { DateRange, DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
6
6
|
/**
|
|
7
7
|
* The internal DefaultDateDecoratorConfig. Sets default values.
|
|
8
8
|
*/
|
|
9
|
-
export declare class DefaultDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DefaultDateDecoratorConfig {
|
|
9
|
+
export declare class DefaultDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date> implements DefaultDateDecoratorConfig {
|
|
10
10
|
displayStyle: 'date';
|
|
11
11
|
min?: (date?: Date) => Date;
|
|
12
12
|
max?: (date?: Date) => Date;
|
|
@@ -16,7 +16,7 @@ export declare class DefaultDateDecoratorConfigInternal extends PropertyDecorato
|
|
|
16
16
|
/**
|
|
17
17
|
* The internal DateRangeDateDecoratorConfig. Sets default values.
|
|
18
18
|
*/
|
|
19
|
-
export declare class DateRangeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateRangeDateDecoratorConfig {
|
|
19
|
+
export declare class DateRangeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<DateRange> implements DateRangeDateDecoratorConfig {
|
|
20
20
|
displayStyle: 'daterange';
|
|
21
21
|
minStart?: (date?: Date) => Date;
|
|
22
22
|
maxStart?: (date?: Date) => Date;
|
|
@@ -30,7 +30,7 @@ export declare class DateRangeDateDecoratorConfigInternal extends PropertyDecora
|
|
|
30
30
|
/**
|
|
31
31
|
* The internal DateTimeDateDecoratorConfig. Sets default values.
|
|
32
32
|
*/
|
|
33
|
-
export declare class DateTimeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DateTimeDateDecoratorConfig {
|
|
33
|
+
export declare class DateTimeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date> implements DateTimeDateDecoratorConfig {
|
|
34
34
|
displayStyle: 'datetime';
|
|
35
35
|
times: DropdownValue<Time | undefined>[];
|
|
36
36
|
timeDisplayName: string;
|
|
@@ -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
|
*/
|
|
@@ -7,7 +7,7 @@ import { HasManyDecoratorConfig } from './has-many-decorator.data';
|
|
|
7
7
|
/**
|
|
8
8
|
* The internal HasManyDecoratorConfig. Sets default values.
|
|
9
9
|
*/
|
|
10
|
-
export declare class HasManyDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfigInternal implements HasManyDecoratorConfig<EntityType, RelatedBaseEntityType> {
|
|
10
|
+
export declare class HasManyDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements HasManyDecoratorConfig<EntityType, RelatedBaseEntityType> {
|
|
11
11
|
omitForCreate: true;
|
|
12
12
|
tableData: TableDataInternal<EntityType>;
|
|
13
13
|
RelatedEntityServiceClass: new (httpClient: HttpClient) => EntityService<RelatedBaseEntityType>;
|
|
@@ -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
|
*/
|