ngx-material-entity 16.1.0 → 16.1.2
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 +1 -1
- package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +1 -1
- package/components/confirm-dialog/confirm-dialog.component.d.ts +1 -1
- package/components/create-page/create-page.component.d.ts +11 -20
- package/components/create-page/page-create-data.builder.d.ts +1 -1
- package/components/edit-page/edit-page.component.d.ts +10 -25
- package/components/edit-page/page-edit-data.builder.d.ts +1 -1
- package/components/form/form.component.d.ts +59 -0
- package/components/input/array/array-date-input/array-date-input.component.d.ts +1 -1
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +1 -1
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +1 -1
- package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +1 -1
- package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +1 -1
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +1 -1
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +1 -1
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +1 -1
- package/components/input/custom/custom.component.d.ts +1 -1
- package/components/input/date/date-input/date-input.component.d.ts +1 -1
- package/components/input/date/date-range-input/date-range-input.component.d.ts +1 -1
- package/components/input/date/date-time-input/date-time-input.component.d.ts +1 -1
- package/components/input/file/file-default-input/file-default-input.component.d.ts +1 -1
- package/components/input/file/file-image-input/file-image-input.component.d.ts +1 -1
- package/components/input/file/file-input/file-input.component.d.ts +1 -1
- package/components/input/input.component.d.ts +33 -3
- package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +1 -1
- package/components/input/number/number-input/number-input.component.d.ts +1 -1
- package/components/input/number/number-slider-input/number-slider-input.component.d.ts +1 -1
- package/components/input/relations/references-many-input/references-many-input.component.d.ts +1 -1
- package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +1 -1
- package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +1 -1
- package/components/input/string/string-input/string-input.component.d.ts +1 -1
- package/components/input/string/string-password-input/string-password-input.component.d.ts +1 -1
- package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +1 -1
- package/components/table/create-dialog/create-data.builder.d.ts +4 -1
- package/components/table/create-dialog/create-entity-data.builder.d.ts +2 -2
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +22 -14
- package/components/table/display-column-value/display-column-value.component.d.ts +1 -1
- package/components/table/edit-dialog/edit-data.builder.d.ts +4 -2
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +12 -7
- package/components/table/edit-dialog/edit-entity.builder.d.ts +2 -2
- package/components/table/table-data.builder.d.ts +3 -3
- package/components/table/table-data.d.ts +17 -1
- package/components/table/table.component.d.ts +9 -7
- package/decorators/array/array-decorator-internal.data.d.ts +1 -1
- package/decorators/array/array.decorator.d.ts +1 -1
- package/decorators/base/decorator-types.enum.d.ts +3 -2
- package/decorators/boolean/boolean-decorator-internal.data.d.ts +1 -1
- package/decorators/custom/custom-decorator-internal.data.d.ts +1 -1
- package/decorators/custom/custom.decorator.d.ts +1 -1
- package/decorators/date/date-decorator-internal.data.d.ts +1 -1
- package/decorators/file/file-decorator-internal.data.d.ts +1 -1
- 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.d.ts +1 -1
- package/decorators/number/number-decorator-internal.data.d.ts +1 -2
- package/decorators/object/object-decorator-internal.data.d.ts +12 -1
- package/decorators/object/object-decorator.data.d.ts +14 -1
- package/decorators/object/object.decorator.d.ts +2 -2
- package/decorators/references-many/references-many-decorator-internal.data.d.ts +1 -1
- package/decorators/references-many/references-many.decorator.d.ts +1 -1
- package/decorators/references-one/references-one-decorator-internal.data.d.ts +1 -1
- package/decorators/references-one/references-one.decorator.d.ts +1 -1
- package/decorators/string/string-decorator-internal.data.d.ts +1 -2
- package/default-global-configuration-values.d.ts +0 -5
- package/directives/drag-drop.directive.d.ts +1 -1
- package/esm2022/classes/base.builder.mjs +2 -2
- package/esm2022/classes/entity.model.mjs +1 -1
- package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +1 -1
- package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +4 -4
- package/esm2022/components/create-page/create-data.route.mjs +1 -1
- package/esm2022/components/create-page/create-page.component.mjs +31 -43
- package/esm2022/components/create-page/page-create-data.builder.mjs +1 -1
- package/esm2022/components/edit-page/edit-data.route.mjs +1 -1
- package/esm2022/components/edit-page/edit-page.component.mjs +30 -56
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +1 -1
- package/esm2022/components/form/form.component.mjs +99 -0
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +30 -14
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +28 -14
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +34 -15
- package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +22 -10
- package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +18 -9
- package/esm2022/components/input/array/array-table.class.mjs +1 -1
- package/esm2022/components/input/base-input.component.mjs +1 -1
- package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +14 -6
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +19 -11
- package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +16 -8
- package/esm2022/components/input/custom/custom.component.mjs +3 -4
- package/esm2022/components/input/date/date-input/date-input.component.mjs +15 -7
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +19 -11
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +26 -14
- package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +6 -5
- package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +8 -6
- package/esm2022/components/input/file/file-input/file-input.component.mjs +21 -10
- package/esm2022/components/input/input.component.mjs +156 -53
- package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +18 -8
- package/esm2022/components/input/number/number-input/number-input.component.mjs +12 -7
- package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +14 -8
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +32 -17
- package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +22 -11
- package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +21 -11
- package/esm2022/components/input/string/string-input/string-input.component.mjs +12 -6
- package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +19 -9
- package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +12 -6
- package/esm2022/components/table/create-dialog/create-data.builder.mjs +14 -3
- package/esm2022/components/table/create-dialog/create-entity-data.builder.mjs +2 -2
- package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +66 -38
- package/esm2022/components/table/default.actions.mjs +1 -1
- package/esm2022/components/table/display-column-value/base-display-column-value.component.mjs +1 -1
- package/esm2022/components/table/display-column-value/display-column-value.component.mjs +1 -1
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +18 -7
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +45 -24
- package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +2 -2
- package/esm2022/components/table/table-data.builder.mjs +7 -7
- package/esm2022/components/table/table-data.mjs +1 -1
- package/esm2022/components/table/table.component.mjs +30 -24
- package/esm2022/components/tooltip/tooltip.component.mjs +1 -1
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/array/array-decorator.data.mjs +1 -1
- package/esm2022/decorators/array/array.decorator.mjs +2 -2
- package/esm2022/decorators/base/base-property.decorator.mjs +1 -1
- package/esm2022/decorators/base/decorator-types.enum.mjs +2 -1
- package/esm2022/decorators/base/property-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/boolean/boolean.decorator.mjs +2 -2
- package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/custom/custom-decorator.data.mjs +1 -1
- package/esm2022/decorators/custom/custom.decorator.mjs +2 -2
- package/esm2022/decorators/date/date-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/date/date-decorator.data.mjs +1 -1
- package/esm2022/decorators/date/date.decorator.mjs +2 -2
- package/esm2022/decorators/file/file-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/file/file-decorator.data.mjs +1 -1
- package/esm2022/decorators/file/file.decorator.mjs +2 -2
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/has-many/has-many.decorator.mjs +2 -2
- package/esm2022/decorators/number/number-decorator-internal.data.mjs +3 -10
- package/esm2022/decorators/number/number.decorator.mjs +2 -2
- package/esm2022/decorators/object/object-decorator-internal.data.mjs +23 -1
- package/esm2022/decorators/object/object-decorator.data.mjs +1 -1
- package/esm2022/decorators/object/object.decorator.mjs +8 -3
- package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/references-many/references-many.decorator.mjs +2 -2
- package/esm2022/decorators/references-one/references-one-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/references-one/references-one.decorator.mjs +2 -2
- package/esm2022/decorators/string/string-decorator-internal.data.mjs +3 -10
- package/esm2022/decorators/string/string.decorator.mjs +2 -2
- package/esm2022/default-global-configuration-values.mjs +5 -17
- package/esm2022/directives/drag-drop.directive.mjs +4 -3
- package/esm2022/directives/dynamic-style-class.directive.mjs +1 -1
- package/esm2022/encapsulation/reflect.utilities.mjs +2 -1
- package/esm2022/functions/dropdown-values-to-function.function.mjs +14 -0
- package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +1 -1
- package/esm2022/global-configuration-values.mjs +16 -2
- package/esm2022/public-api.mjs +1 -2
- package/esm2022/services/entity.service.mjs +1 -1
- package/esm2022/services/unsaved-changes.guard.mjs +7 -13
- package/esm2022/utilities/date.utilities.mjs +1 -1
- package/esm2022/utilities/entity.utilities.mjs +9 -9
- package/esm2022/utilities/file.utilities.mjs +1 -1
- package/esm2022/utilities/validation.utilities.mjs +11 -6
- package/fesm2022/ngx-material-entity.mjs +4760 -4510
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/functions/dropdown-values-to-function.function.d.ts +11 -0
- package/global-configuration-values.d.ts +15 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/services/unsaved-changes.guard.d.ts +15 -8
- package/utilities/entity.utilities.d.ts +2 -2
- package/components/input/input.module.d.ts +0 -58
- package/esm2022/components/input/input.module.mjs +0 -192
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { EnvironmentInjector, EventEmitter, OnInit } from '@angular/core';
|
|
2
3
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
4
|
+
import { CreateEntityData } from './create-entity-data';
|
|
5
|
+
import { CreateEntityDataInternal } from './create-entity-data.builder';
|
|
3
6
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
7
|
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
5
8
|
import { EntityService } from '../../../services/entity.service';
|
|
6
|
-
import {
|
|
9
|
+
import { EntityUtilities } from '../../../utilities/entity.utilities';
|
|
7
10
|
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
8
|
-
import { CreateEntityData } from './create-entity-data';
|
|
9
|
-
import { CreateEntityDataInternal } from './create-entity-data.builder';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* The default dialog used to create new entities based on the configuration passed in the MAT_DIALOG_DATA "inputData".
|
|
@@ -16,18 +17,19 @@ import * as i0 from "@angular/core";
|
|
|
16
17
|
*/
|
|
17
18
|
export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
18
19
|
private readonly inputData;
|
|
19
|
-
dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>;
|
|
20
|
+
readonly dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>;
|
|
20
21
|
private readonly injector;
|
|
21
22
|
private readonly dialog;
|
|
22
|
-
|
|
23
|
+
private readonly http;
|
|
24
|
+
private readonly globalConfig;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Emits when the form is dirty.
|
|
25
27
|
*/
|
|
26
|
-
|
|
28
|
+
unsavedChanges: EventEmitter<boolean>;
|
|
27
29
|
/**
|
|
28
|
-
*
|
|
30
|
+
* Contains HelperMethods around handling Entities and their property-metadata.
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
EntityUtilities: typeof EntityUtilities;
|
|
31
33
|
/**
|
|
32
34
|
* The services that handles the entity.
|
|
33
35
|
*/
|
|
@@ -36,6 +38,11 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
36
38
|
* The internal configuration data.
|
|
37
39
|
*/
|
|
38
40
|
data: CreateEntityDataInternal<EntityType>;
|
|
41
|
+
private entityPriorChanges;
|
|
42
|
+
/**
|
|
43
|
+
* Whether or not the entity is dirty.
|
|
44
|
+
*/
|
|
45
|
+
isEntityDirty: boolean;
|
|
39
46
|
/**
|
|
40
47
|
* Whether or not the entity is valid.
|
|
41
48
|
*/
|
|
@@ -48,7 +55,7 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
48
55
|
* What to display inside the tooltip.
|
|
49
56
|
*/
|
|
50
57
|
tooltipContent: string;
|
|
51
|
-
constructor(inputData: CreateEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>, injector: EnvironmentInjector, dialog: MatDialog, globalConfig: NgxGlobalDefaultValues);
|
|
58
|
+
constructor(inputData: CreateEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>, injector: EnvironmentInjector, dialog: MatDialog, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
52
59
|
ngOnInit(): void;
|
|
53
60
|
/**
|
|
54
61
|
* Checks if the entity is valid.
|
|
@@ -58,12 +65,13 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
58
65
|
* Tries add the new entity and close the dialog afterwards.
|
|
59
66
|
* Also handles the confirmation if required.
|
|
60
67
|
*/
|
|
61
|
-
create(): void
|
|
68
|
+
create(): Promise<void>;
|
|
62
69
|
private confirmCreate;
|
|
63
70
|
/**
|
|
64
71
|
* Closes the dialog.
|
|
65
72
|
*/
|
|
66
|
-
cancel(): void
|
|
73
|
+
cancel(): Promise<void>;
|
|
74
|
+
private confirmCancel;
|
|
67
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityCreateDialogComponent<any>, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityCreateDialogComponent<any>, "ngx-mat-entity-create-dialog", never, {}, {}, never, never, true, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityCreateDialogComponent<any>, "ngx-mat-entity-create-dialog", never, {}, { "unsavedChanges": "unsavedChanges"; }, never, never, true, never>;
|
|
69
77
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentRef, OnInit, Type, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { BaseEntityType } from '../../../classes/entity.model';
|
|
3
2
|
import { NgxMatEntityBaseDisplayColumnValueComponent } from './base-display-column-value.component';
|
|
3
|
+
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* The component that displays the custom display column value.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
2
2
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
3
4
|
import { ConfirmDialogData } from '../../confirm-dialog/confirm-dialog-data';
|
|
4
5
|
import { EditAction, EditData } from '../table-data';
|
|
5
|
-
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
6
6
|
/**
|
|
7
7
|
* The internal edit action.
|
|
8
8
|
* Sets default values.
|
|
@@ -29,9 +29,11 @@ export declare class EditDataInternal<EntityType extends BaseEntityType<EntityTy
|
|
|
29
29
|
editRequiresConfirmDialog: boolean;
|
|
30
30
|
confirmDeleteDialogData: ConfirmDialogData;
|
|
31
31
|
confirmEditDialogData: ConfirmDialogData;
|
|
32
|
+
unsavedChangesRequireConfirmDialog: boolean;
|
|
33
|
+
confirmUnsavedChangesDialogData: ConfirmDialogData;
|
|
32
34
|
actionsLabel: string;
|
|
33
35
|
actions: EditActionInternal<EntityType>[];
|
|
34
|
-
constructor(title: (entity: EntityType) => string, confirmButtonLabel: string, deleteButtonLabel: string, cancelButtonLabel: string, deleteRequiresConfirmDialog: boolean, editRequiresConfirmDialog: boolean, confirmDeleteDialogData: ConfirmDialogData, confirmEditDialogData: ConfirmDialogData, actionsLabel: string, actions: EditAction<EntityType>[], globalConfig: NgxGlobalDefaultValues);
|
|
36
|
+
constructor(title: (entity: EntityType) => string, confirmButtonLabel: string, deleteButtonLabel: string, cancelButtonLabel: string, deleteRequiresConfirmDialog: boolean, editRequiresConfirmDialog: boolean, unsavedChangesRequireConfirmDialog: boolean, confirmDeleteDialogData: ConfirmDialogData, confirmEditDialogData: ConfirmDialogData, confirmUnsavedChangesDialogData: ConfirmDialogData, actionsLabel: string, actions: EditAction<EntityType>[], globalConfig: NgxGlobalDefaultValues);
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* The Builder for the EditData. Sets default values.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
2
|
+
import { EnvironmentInjector, EventEmitter, OnInit } from '@angular/core';
|
|
3
3
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
4
|
+
import { EditActionInternal } from './edit-data.builder';
|
|
5
|
+
import { EditEntityData } from './edit-entity-data';
|
|
6
|
+
import { EditEntityDataInternal } from './edit-entity.builder';
|
|
4
7
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
5
8
|
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
6
9
|
import { EntityService } from '../../../services/entity.service';
|
|
7
10
|
import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
|
|
8
11
|
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
9
|
-
import { EditActionInternal } from './edit-data.builder';
|
|
10
|
-
import { EditEntityData } from './edit-entity-data';
|
|
11
|
-
import { EditEntityDataInternal } from './edit-entity.builder';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
/**
|
|
14
14
|
* The default dialog used to edit an existing entity based on the configuration passed in the MAT_DIALOG_DATA "inputData".
|
|
@@ -23,6 +23,10 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
23
23
|
private readonly dialog;
|
|
24
24
|
private readonly http;
|
|
25
25
|
private readonly globalConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Emits when the form is dirty.
|
|
28
|
+
*/
|
|
29
|
+
unsavedChanges: EventEmitter<boolean>;
|
|
26
30
|
/**
|
|
27
31
|
* Contains HelperMethods around handling Entities and their property-metadata.
|
|
28
32
|
*/
|
|
@@ -93,9 +97,10 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
93
97
|
delete(): void;
|
|
94
98
|
private confirmDelete;
|
|
95
99
|
/**
|
|
96
|
-
*
|
|
100
|
+
* Closes the dialog.
|
|
97
101
|
*/
|
|
98
|
-
cancel(): void
|
|
102
|
+
cancel(): Promise<void>;
|
|
103
|
+
private confirmCancel;
|
|
99
104
|
/**
|
|
100
105
|
* Runs the edit action on the entity.
|
|
101
106
|
* @param action - The action to run.
|
|
@@ -109,5 +114,5 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
109
114
|
*/
|
|
110
115
|
editActionDisabled(action: EditActionInternal<EntityType>): boolean;
|
|
111
116
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityEditDialogComponent<any>, never>;
|
|
112
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityEditDialogComponent<any>, "ngx-mat-entity-edit-dialog", never, {}, {}, never, never, true, never>;
|
|
117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityEditDialogComponent<any>, "ngx-mat-entity-edit-dialog", never, {}, { "unsavedChanges": "unsavedChanges"; }, never, never, true, never>;
|
|
113
118
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { EditDataInternal } from './edit-data.builder';
|
|
2
|
+
import { EditEntityData } from './edit-entity-data';
|
|
1
3
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
2
4
|
import { BaseEntityType, EntityServiceClassNewable } from '../../../classes/entity.model';
|
|
3
5
|
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
4
|
-
import { EditDataInternal } from './edit-data.builder';
|
|
5
|
-
import { EditEntityData } from './edit-entity-data';
|
|
6
6
|
/**
|
|
7
7
|
* The internal EditEntityData. Requires all default values the user can leave out.
|
|
8
8
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { CreateDataInternal } from './create-dialog/create-data.builder';
|
|
2
|
+
import { EditDataInternal } from './edit-dialog/edit-data.builder';
|
|
3
|
+
import { BaseData, BaseTableAction, DisplayColumn, DynamicStyleClasses, MultiSelectAction, TableData } from './table-data';
|
|
1
4
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
5
|
import { BaseEntityType, EntityClassNewable, EntityServiceClassNewable } from '../../classes/entity.model';
|
|
3
6
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
7
|
import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
|
|
5
|
-
import { CreateDataInternal } from './create-dialog/create-data.builder';
|
|
6
|
-
import { EditDataInternal } from './edit-dialog/edit-data.builder';
|
|
7
|
-
import { BaseData, BaseTableAction, DisplayColumn, DynamicStyleClasses, MultiSelectAction, TableData } from './table-data';
|
|
8
8
|
/**
|
|
9
9
|
* The internal BaseTableAction. Sets default values.
|
|
10
10
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
+
import { NgxMatEntityBaseDisplayColumnValueComponent } from './display-column-value/base-display-column-value.component';
|
|
2
3
|
import { BaseEntityType, EntityClassNewable, EntityServiceClassNewable } from '../../classes/entity.model';
|
|
3
4
|
import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
|
|
4
|
-
import { NgxMatEntityBaseDisplayColumnValueComponent } from './display-column-value/base-display-column-value.component';
|
|
5
5
|
/**
|
|
6
6
|
* The Definition of a Column inside the table.
|
|
7
7
|
*/
|
|
@@ -224,6 +224,14 @@ export interface CreateData {
|
|
|
224
224
|
* The data used to generate a confirmation dialog for the create action.
|
|
225
225
|
*/
|
|
226
226
|
confirmCreateDialogData?: ConfirmDialogData;
|
|
227
|
+
/**
|
|
228
|
+
* Whether or not cancelling with unsaved changes should require a confirm dialog.
|
|
229
|
+
*/
|
|
230
|
+
unsavedChangesRequireConfirmDialog?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* The data used to generate a confirmation dialog for the cancel with unsaved changes action.
|
|
233
|
+
*/
|
|
234
|
+
confirmUnsavedChangesDialogData?: ConfirmDialogData;
|
|
227
235
|
}
|
|
228
236
|
/**
|
|
229
237
|
* An action that can be run from inside the edit dialog or page.
|
|
@@ -288,6 +296,14 @@ export interface EditData<EntityType extends BaseEntityType<EntityType>> {
|
|
|
288
296
|
* The data used to generate a confirmation dialog for the edit action.
|
|
289
297
|
*/
|
|
290
298
|
confirmEditDialogData?: ConfirmDialogData;
|
|
299
|
+
/**
|
|
300
|
+
* Whether or not cancelling with unsaved changes should require a confirm dialog.
|
|
301
|
+
*/
|
|
302
|
+
unsavedChangesRequireConfirmDialog?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* The data used to generate a confirmation dialog for the cancel with unsaved changes action.
|
|
305
|
+
*/
|
|
306
|
+
confirmUnsavedChangesDialogData?: ConfirmDialogData;
|
|
291
307
|
/**
|
|
292
308
|
* The label of the actions button.
|
|
293
309
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
2
|
-
import { EnvironmentInjector,
|
|
2
|
+
import { EnvironmentInjector, EventEmitter, OnInit } from '@angular/core';
|
|
3
3
|
import { MatDialog } from '@angular/material/dialog';
|
|
4
4
|
import { MatPaginator } from '@angular/material/paginator';
|
|
5
5
|
import { MatSort } from '@angular/material/sort';
|
|
6
6
|
import { MatTableDataSource } from '@angular/material/table';
|
|
7
7
|
import { Router } from '@angular/router';
|
|
8
|
+
import { DisplayColumn, TableData } from './table-data';
|
|
9
|
+
import { BaseTableActionInternal, TableActionInternal, TableDataInternal } from './table-data.builder';
|
|
8
10
|
import { BaseEntityType, Entity } from '../../classes/entity.model';
|
|
9
11
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
10
12
|
import { SelectionUtilities } from '../../utilities/selection.utilities';
|
|
11
|
-
import { DisplayColumn, TableData } from './table-data';
|
|
12
|
-
import { BaseTableActionInternal, TableActionInternal, TableDataInternal } from './table-data.builder';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
/**
|
|
15
15
|
* Generates a fully functional table for displaying, creating, updating and deleting entities
|
|
@@ -17,7 +17,7 @@ import * as i0 from "@angular/core";
|
|
|
17
17
|
*
|
|
18
18
|
* It offers a lot of customization options which can be found in "TableData".
|
|
19
19
|
*/
|
|
20
|
-
export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityType<Entity>> implements OnInit
|
|
20
|
+
export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityType<Entity>> implements OnInit {
|
|
21
21
|
private readonly dialog;
|
|
22
22
|
private readonly injector;
|
|
23
23
|
private readonly router;
|
|
@@ -26,6 +26,10 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
|
|
|
26
26
|
* The configuration for the component.
|
|
27
27
|
*/
|
|
28
28
|
tableData: TableData<EntityType>;
|
|
29
|
+
/**
|
|
30
|
+
* Emits when there are unsaved changes on either the create or update dialog.
|
|
31
|
+
*/
|
|
32
|
+
unsavedDialogChanges: EventEmitter<boolean>;
|
|
29
33
|
/**
|
|
30
34
|
* The internal TableData.
|
|
31
35
|
*/
|
|
@@ -39,7 +43,6 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
|
|
|
39
43
|
*/
|
|
40
44
|
allowCreate: boolean;
|
|
41
45
|
private entityService;
|
|
42
|
-
private readonly onDestroy;
|
|
43
46
|
/**
|
|
44
47
|
* The paginator from the html.
|
|
45
48
|
*/
|
|
@@ -128,12 +131,11 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
|
|
|
128
131
|
* @returns Whether or not the Action can be used.
|
|
129
132
|
*/
|
|
130
133
|
tableActionDisabled(action: TableActionInternal<EntityType>): boolean;
|
|
131
|
-
ngOnDestroy(): void;
|
|
132
134
|
/**
|
|
133
135
|
* Applies the search input to filter the table entries.
|
|
134
136
|
* @param event - The keyup-event which contains the search-string of the user.
|
|
135
137
|
*/
|
|
136
138
|
applyFilter(event: Event): void;
|
|
137
139
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityTableComponent<any>, never>;
|
|
138
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityTableComponent<any>, "ngx-mat-entity-table", never, { "tableData": { "alias": "tableData"; "required": false; }; }, {}, never, never, true, never>;
|
|
140
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityTableComponent<any>, "ngx-mat-entity-table", never, { "tableData": { "alias": "tableData"; "required": false; }; }, { "unsavedDialogChanges": "unsavedDialogChanges"; }, never, never, true, never>;
|
|
139
141
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Time } from '@angular/common';
|
|
2
2
|
import { DateFilterFn } from '@angular/material/datepicker';
|
|
3
|
+
import { AutocompleteStringChipsArrayDecoratorConfig, DateArrayDecoratorConfig, DateRangeArrayDecoratorConfig, DateTimeArrayDecoratorConfig, EditArrayItemDialogData, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from './array-decorator.data';
|
|
3
4
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
4
5
|
import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
|
|
5
6
|
import { CreateData, DisplayColumn } from '../../components/table/table-data';
|
|
@@ -8,7 +9,6 @@ import { DecoratorTypes } from '../base/decorator-types.enum';
|
|
|
8
9
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
9
10
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
10
11
|
import { DateRange } from '../date/date-decorator.data';
|
|
11
|
-
import { AutocompleteStringChipsArrayDecoratorConfig, DateArrayDecoratorConfig, DateRangeArrayDecoratorConfig, DateTimeArrayDecoratorConfig, EditArrayItemDialogData, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from './array-decorator.data';
|
|
12
12
|
/**
|
|
13
13
|
* The internal dialog data for the entities array edit dialog.
|
|
14
14
|
* Sets default values.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
2
1
|
import { AutocompleteStringChipsArrayDecoratorConfig, DateArrayDecoratorConfig, DateRangeArrayDecoratorConfig, DateTimeArrayDecoratorConfig, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from './array-decorator.data';
|
|
2
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
3
|
/**
|
|
4
4
|
* Decorator for setting and getting array property metadata.
|
|
5
5
|
* @param metadata - The metadata of the array property.
|
|
@@ -5,7 +5,7 @@ import { DateRangeDateDecoratorConfigInternal, DateTimeDateDecoratorConfigIntern
|
|
|
5
5
|
import { DefaultFileDecoratorConfigInternal, ImageFileDecoratorConfigInternal } from '../file/file-decorator-internal.data';
|
|
6
6
|
import { HasManyDecoratorConfigInternal } from '../has-many/has-many-decorator-internal.data';
|
|
7
7
|
import { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal, SliderNumberDecoratorConfigInternal } from '../number/number-decorator-internal.data';
|
|
8
|
-
import { DefaultObjectDecoratorConfigInternal } from '../object/object-decorator-internal.data';
|
|
8
|
+
import { DefaultObjectDecoratorConfigInternal, DropdownObjectDecoratorConfigInternal } from '../object/object-decorator-internal.data';
|
|
9
9
|
import { ReferencesManyDecoratorConfigInternal } from '../references-many/references-many-decorator-internal.data';
|
|
10
10
|
import { ReferencesOneDecoratorConfigInternal } from '../references-one/references-one-decorator-internal.data';
|
|
11
11
|
import { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, PasswordStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../string/string-decorator-internal.data';
|
|
@@ -25,6 +25,7 @@ export declare enum DecoratorTypes {
|
|
|
25
25
|
BOOLEAN_TOGGLE = "booleanToggle",
|
|
26
26
|
BOOLEAN_DROPDOWN = "booleanDropdown",
|
|
27
27
|
OBJECT = "object",
|
|
28
|
+
OBJECT_DROPDOWN = "objectDropdown",
|
|
28
29
|
ARRAY = "array",
|
|
29
30
|
ARRAY_DATE = "arrayDate",
|
|
30
31
|
ARRAY_DATE_TIME = "arrayDateTime",
|
|
@@ -44,4 +45,4 @@ export declare enum DecoratorTypes {
|
|
|
44
45
|
/**
|
|
45
46
|
* Gives the metadata-config Type based on the DecoratorTypes enum.
|
|
46
47
|
*/
|
|
47
|
-
export type DecoratorType<T, CustomMetadataType extends Record<string, unknown>> = T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_PASSWORD ? PasswordStringDecoratorConfigInternal : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_SLIDER ? SliderNumberDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_TOGGLE ? ToggleBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfigInternal : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY_DATE ? DateArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_TIME ? DateTimeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_RANGE ? DateRangeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.DATE ? DefaultDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_RANGE ? DateRangeDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_TIME ? DateTimeDateDecoratorConfigInternal : T extends DecoratorTypes.FILE_DEFAULT ? DefaultFileDecoratorConfigInternal : T extends DecoratorTypes.FILE_IMAGE ? ImageFileDecoratorConfigInternal : T extends DecoratorTypes.REFERENCES_MANY ? ReferencesManyDecoratorConfigInternal<any> : T extends DecoratorTypes.REFERENCES_ONE ? ReferencesOneDecoratorConfigInternal<any> : T extends DecoratorTypes.HAS_MANY ? HasManyDecoratorConfigInternal<any, any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
|
|
48
|
+
export type DecoratorType<T, CustomMetadataType extends Record<string, unknown>> = T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_PASSWORD ? PasswordStringDecoratorConfigInternal : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_SLIDER ? SliderNumberDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_TOGGLE ? ToggleBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfigInternal : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfigInternal<any> : T extends DecoratorTypes.OBJECT_DROPDOWN ? DropdownObjectDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY_DATE ? DateArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_TIME ? DateTimeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_RANGE ? DateRangeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.DATE ? DefaultDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_RANGE ? DateRangeDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_TIME ? DateTimeDateDecoratorConfigInternal : T extends DecoratorTypes.FILE_DEFAULT ? DefaultFileDecoratorConfigInternal : T extends DecoratorTypes.FILE_IMAGE ? ImageFileDecoratorConfigInternal : T extends DecoratorTypes.REFERENCES_MANY ? ReferencesManyDecoratorConfigInternal<any> : T extends DecoratorTypes.REFERENCES_ONE ? ReferencesOneDecoratorConfigInternal<any> : T extends DecoratorTypes.HAS_MANY ? HasManyDecoratorConfigInternal<any, any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig, ToggleBooleanDecoratorConfig } from './boolean-decorator.data';
|
|
1
2
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
2
3
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
3
|
-
import { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig, ToggleBooleanDecoratorConfig } from './boolean-decorator.data';
|
|
4
4
|
/**
|
|
5
5
|
* The internal DropdownBooleanDecoratorConfig. Sets default values.
|
|
6
6
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
+
import { CustomDecoratorConfig } from './custom-decorator.data';
|
|
2
3
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
4
|
import { NgxMatEntityBaseInputComponent } from '../../components/input/base-input.component';
|
|
4
5
|
import { DecoratorTypes } from '../base/decorator-types.enum';
|
|
5
6
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
6
|
-
import { CustomDecoratorConfig } from './custom-decorator.data';
|
|
7
7
|
/**
|
|
8
8
|
* The internal config for the @custom decorator.
|
|
9
9
|
* Sets default values.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
2
1
|
import { CustomDecoratorConfig } from './custom-decorator.data';
|
|
2
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
3
|
/**
|
|
4
4
|
* Decorator for setting and getting custom property metadata.
|
|
5
5
|
* @param metadata - The metadata of the custom property.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Time } from '@angular/common';
|
|
2
2
|
import { DateFilterFn } from '@angular/material/datepicker';
|
|
3
|
+
import { DateRange, DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
3
4
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
5
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
5
6
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
6
|
-
import { DateRange, DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
7
7
|
/**
|
|
8
8
|
* The internal DefaultDateDecoratorConfig. Sets default values.
|
|
9
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DefaultFileDecoratorConfig, FileData, ImageFileDecoratorConfig } from './file-decorator.data';
|
|
1
2
|
import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
|
|
2
3
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.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
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { FileDataWithFile, FileDataWithUrl } from './file-decorator-internal.data';
|
|
1
2
|
import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
|
|
2
3
|
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
3
|
-
import { FileDataWithFile, FileDataWithUrl } from './file-decorator-internal.data';
|
|
4
4
|
/**
|
|
5
5
|
* The type of a property annotated with @file.
|
|
6
6
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { HasManyDecoratorConfig } from './has-many-decorator.data';
|
|
1
2
|
import { BaseEntityType, EntityServiceClassNewable } from '../../classes/entity.model';
|
|
2
3
|
import { TableDataInternal } from '../../components/table/table-data.builder';
|
|
3
4
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
5
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
5
|
-
import { HasManyDecoratorConfig } from './has-many-decorator.data';
|
|
6
6
|
/**
|
|
7
7
|
* The internal HasManyDecoratorConfig. Sets default values.
|
|
8
8
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
2
1
|
import { HasManyDecoratorConfig } from './has-many-decorator.data';
|
|
2
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
3
|
/**
|
|
4
4
|
* Decorator for setting and getting has many property metadata.
|
|
5
5
|
* @param metadata - The metadata of the has many property.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig, SliderNumberDecoratorConfig } from './number-decorator.data';
|
|
1
2
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
2
3
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
3
|
-
import { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig, SliderNumberDecoratorConfig } from './number-decorator.data';
|
|
4
4
|
/**
|
|
5
5
|
* The internal DefaultNumberDecoratorConfig. Sets default values.
|
|
6
6
|
*/
|
|
@@ -17,7 +17,6 @@ export declare class DropdownNumberDecoratorConfigInternal extends PropertyDecor
|
|
|
17
17
|
displayStyle: 'dropdown';
|
|
18
18
|
dropdownValues: ((entity: any) => Promise<DropdownValue<number | undefined>[]>);
|
|
19
19
|
constructor(data: DropdownNumberDecoratorConfig);
|
|
20
|
-
private dropdownValuesToFunction;
|
|
21
20
|
}
|
|
22
21
|
/**
|
|
23
22
|
* The internal SliderNumberDecoratorConfig. Sets default values.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { DefaultObjectDecoratorConfig, DropdownObjectDecoratorConfig } from './object-decorator.data';
|
|
1
2
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
3
|
+
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
2
4
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
3
|
-
import { DefaultObjectDecoratorConfig } from './object-decorator.data';
|
|
4
5
|
/**
|
|
5
6
|
* The internal DefaultObjectDecoratorConfig. Sets default values.
|
|
6
7
|
*/
|
|
@@ -10,3 +11,13 @@ export declare class DefaultObjectDecoratorConfigInternal<EntityType extends Bas
|
|
|
10
11
|
omit: (keyof EntityType)[];
|
|
11
12
|
constructor(data: DefaultObjectDecoratorConfig<EntityType>);
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The internal DropdownObjectDecoratorConfig. Sets default values.
|
|
16
|
+
*/
|
|
17
|
+
export declare class DropdownObjectDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements DropdownObjectDecoratorConfig<EntityType> {
|
|
18
|
+
displayStyle: 'dropdown';
|
|
19
|
+
EntityClass: EntityClassNewable<EntityType>;
|
|
20
|
+
omit: (keyof EntityType)[];
|
|
21
|
+
dropdownValues: ((entity: any) => Promise<DropdownValue<EntityType | undefined>[]>);
|
|
22
|
+
constructor(data: DropdownObjectDecoratorConfig<EntityType>);
|
|
23
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
2
|
+
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
2
3
|
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
4
|
+
export type ObjectDropdownValues<EntityType extends BaseEntityType<EntityType>> = DropdownValue<EntityType | undefined>[] | ((entity: any) => DropdownValue<EntityType | undefined>[]) | ((entity: any) => Promise<DropdownValue<EntityType | undefined>[]>);
|
|
3
5
|
/**
|
|
4
6
|
* Definition for the @object metadata.
|
|
5
7
|
*/
|
|
@@ -14,7 +16,7 @@ declare abstract class ObjectDecoratorConfig<EntityType extends BaseEntityType<E
|
|
|
14
16
|
* The objects properties are added as input fields in an section of the entity.
|
|
15
17
|
* Useful if the object only contains a few properties (e.g. A address on a user).
|
|
16
18
|
*/
|
|
17
|
-
displayStyle: 'inline';
|
|
19
|
+
displayStyle: 'dropdown' | 'inline';
|
|
18
20
|
/**
|
|
19
21
|
* Some properties of the objects entity class that should be omitted.
|
|
20
22
|
*/
|
|
@@ -26,4 +28,15 @@ declare abstract class ObjectDecoratorConfig<EntityType extends BaseEntityType<E
|
|
|
26
28
|
export interface DefaultObjectDecoratorConfig<EntityType extends BaseEntityType<EntityType>> extends ObjectDecoratorConfig<EntityType> {
|
|
27
29
|
displayStyle: 'inline';
|
|
28
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* The configuration options for a dropdown object property.
|
|
33
|
+
*/
|
|
34
|
+
export interface DropdownObjectDecoratorConfig<EntityType extends BaseEntityType<EntityType>> extends ObjectDecoratorConfig<EntityType> {
|
|
35
|
+
displayStyle: 'dropdown';
|
|
36
|
+
/**
|
|
37
|
+
* The values of the dropdown, consisting of a name to display and the actual value.
|
|
38
|
+
* Can also receive a function to determine the values.
|
|
39
|
+
*/
|
|
40
|
+
dropdownValues: ObjectDropdownValues<EntityType>;
|
|
41
|
+
}
|
|
29
42
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DefaultObjectDecoratorConfig } from './object-decorator.data';
|
|
1
|
+
import { DefaultObjectDecoratorConfig, DropdownObjectDecoratorConfig } from './object-decorator.data';
|
|
2
2
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
3
|
/**
|
|
4
4
|
* Decorator for setting and getting object property metadata.
|
|
5
5
|
* @param metadata - The metadata of the object property.
|
|
6
6
|
* @returns The method that defines the metadata.
|
|
7
7
|
*/
|
|
8
|
-
export declare function object<EntityType extends BaseEntityType<EntityType>>(metadata: DefaultObjectDecoratorConfig<EntityType>): (target: object, propertyKey: string) => void;
|
|
8
|
+
export declare function object<EntityType extends BaseEntityType<EntityType>>(metadata: DefaultObjectDecoratorConfig<EntityType> | DropdownObjectDecoratorConfig<EntityType>): (target: object, propertyKey: string) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ReferencesManyDecoratorConfig } from './references-many-decorator.data';
|
|
1
2
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
2
3
|
import { DisplayColumn } from '../../components/table/table-data';
|
|
3
4
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
5
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
5
6
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
6
|
-
import { ReferencesManyDecoratorConfig } from './references-many-decorator.data';
|
|
7
7
|
/**
|
|
8
8
|
* The internal DefaultNumberDecoratorConfig. Sets default values.
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
2
1
|
import { ReferencesManyDecoratorConfig } from './references-many-decorator.data';
|
|
2
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
3
|
/**
|
|
4
4
|
* Decorator for setting and getting references many property metadata.
|
|
5
5
|
* @param metadata - The metadata of the references many property.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ReferencesOneDecoratorConfig } from './references-one-decorator.data';
|
|
1
2
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
2
3
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
3
4
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
4
|
-
import { ReferencesOneDecoratorConfig } from './references-one-decorator.data';
|
|
5
5
|
/**
|
|
6
6
|
* The internal DefaultNumberDecoratorConfig. Sets default values.
|
|
7
7
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
2
1
|
import { ReferencesOneDecoratorConfig } from './references-one-decorator.data';
|
|
2
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
3
|
/**
|
|
4
4
|
* Decorator for setting and getting references one property metadata.
|
|
5
5
|
* @param metadata - The metadata of the references one property.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, PasswordStringDecoratorConfig, TextboxStringDecoratorConfig } from './string-decorator.data';
|
|
1
2
|
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
2
3
|
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
3
|
-
import { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, PasswordStringDecoratorConfig, TextboxStringDecoratorConfig } from './string-decorator.data';
|
|
4
4
|
/**
|
|
5
5
|
* The internal DropdownStringDecoratorConfig. Sets default values.
|
|
6
6
|
*/
|
|
@@ -8,7 +8,6 @@ export declare class DropdownStringDecoratorConfigInternal extends PropertyDecor
|
|
|
8
8
|
displayStyle: 'dropdown';
|
|
9
9
|
dropdownValues: ((entity: any) => Promise<DropdownValue<string | undefined>[]>);
|
|
10
10
|
constructor(data: DropdownStringDecoratorConfig);
|
|
11
|
-
private dropdownValuesToFunction;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
* The internal DefaultStringDecoratorConfig. Sets default values.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
1
|
import { NgxGlobalDefaultValues } from './global-configuration-values';
|
|
3
2
|
/**
|
|
4
3
|
* The default configuration values of the library.
|
|
@@ -12,7 +11,3 @@ export declare const CONFIG_NEEDS_UPDATE_KEY: string;
|
|
|
12
11
|
* The global defaults for a configuration that needs update.
|
|
13
12
|
*/
|
|
14
13
|
export declare const needsUpdateGlobalDefaults: NgxGlobalDefaultValues;
|
|
15
|
-
/**
|
|
16
|
-
* The internal values consisting of default ones and values provided by the user in NGX_GLOBAL_DEFAULT_VALUES.
|
|
17
|
-
*/
|
|
18
|
-
export declare const NGX_INTERNAL_GLOBAL_DEFAULT_VALUES: InjectionToken<NgxGlobalDefaultValues>;
|
|
@@ -25,5 +25,5 @@ export declare class DragDropDirective {
|
|
|
25
25
|
*/
|
|
26
26
|
onDrop(evt: DragEvent): void;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragDropDirective, never>;
|
|
28
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DragDropDirective, "[dragDrop]", never, {}, { "files": "files"; }, never, never,
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragDropDirective, "[dragDrop]", never, {}, { "files": "files"; }, never, never, true, never>;
|
|
29
29
|
}
|