ngx-material-entity 16.0.2 → 16.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/classes/base.builder.d.ts +6 -1
- package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +2 -1
- package/components/confirm-dialog/confirm-dialog.component.d.ts +3 -1
- package/components/edit-page/edit-page.component.d.ts +15 -2
- package/components/edit-page/page-edit-data.builder.d.ts +2 -1
- package/components/input/array/array-date-input/array-date-input.component.d.ts +7 -1
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +6 -1
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +6 -1
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +1 -0
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +4 -0
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +2 -1
- package/components/input/date/date-range-input/date-range-input.component.d.ts +3 -0
- package/components/input/date/date-time-input/date-time-input.component.d.ts +3 -0
- package/components/input/input.component.d.ts +10 -3
- package/components/input/input.module.d.ts +6 -2
- package/components/input/number/number-slider-input/number-slider-input.component.d.ts +2 -1
- package/components/input/relations/references-many-input/references-many-input.component.d.ts +3 -1
- package/components/table/create-dialog/create-dialog-data.builder.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +6 -1
- package/components/table/edit-dialog/edit-data.builder.d.ts +5 -3
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +7 -1
- package/components/table/edit-dialog/edit-entity.builder.d.ts +2 -1
- package/components/table/table-data.builder.d.ts +9 -5
- package/components/table/table.component.d.ts +3 -1
- package/components/tooltip/tooltip.component.d.ts +9 -0
- package/decorators/array/array-decorator-internal.data.d.ts +14 -13
- package/decorators/array/array-decorator.data.d.ts +7 -7
- package/decorators/base/property-decorator-internal.data.d.ts +11 -2
- package/decorators/base/property-decorator.data.d.ts +9 -1
- package/decorators/boolean/boolean-decorator-internal.data.d.ts +5 -4
- package/decorators/boolean/boolean-decorator.data.d.ts +1 -1
- package/decorators/custom/custom-decorator-internal.data.d.ts +2 -2
- package/decorators/custom/custom-decorator.data.d.ts +4 -4
- package/decorators/date/date-decorator-internal.data.d.ts +7 -6
- package/decorators/date/date-decorator.data.d.ts +5 -5
- package/decorators/file/file-decorator-internal.data.d.ts +3 -3
- package/decorators/file/file-decorator.data.d.ts +1 -1
- package/decorators/has-many/has-many-decorator-internal.data.d.ts +3 -2
- package/decorators/has-many/has-many-decorator.data.d.ts +1 -1
- package/decorators/number/number-decorator-internal.data.d.ts +3 -3
- package/decorators/number/number-decorator.data.d.ts +1 -1
- package/decorators/object/object-decorator-internal.data.d.ts +1 -1
- package/decorators/object/object-decorator.data.d.ts +1 -1
- package/decorators/references-many/references-many-decorator-internal.data.d.ts +3 -2
- package/decorators/references-many/references-many-decorator.data.d.ts +1 -1
- package/decorators/references-one/references-one-decorator-internal.data.d.ts +1 -1
- package/decorators/references-one/references-one-decorator.data.d.ts +1 -1
- package/decorators/string/string-decorator-internal.data.d.ts +5 -6
- package/decorators/string/string-decorator.data.d.ts +1 -7
- package/default-global-configuration-values.d.ts +6 -0
- package/directives/number.directive.d.ts +17 -0
- package/directives/password-match.directive.d.ts +14 -0
- package/directives/tooltip.directive.d.ts +32 -0
- package/esm2022/classes/base.builder.mjs +9 -3
- package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +7 -5
- package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +13 -7
- package/esm2022/components/edit-page/edit-page.component.mjs +75 -25
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +9 -9
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +33 -13
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +29 -12
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +32 -15
- package/esm2022/components/input/base-input.component.mjs +2 -1
- package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +6 -3
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +18 -4
- package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +6 -3
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +18 -4
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +17 -5
- package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +3 -3
- package/esm2022/components/input/file/file-input/file-input.component.mjs +1 -1
- package/esm2022/components/input/input.component.mjs +91 -61
- package/esm2022/components/input/input.module.mjs +18 -5
- package/esm2022/components/input/number/number-input/number-input.component.mjs +4 -3
- package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +6 -3
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +15 -5
- package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +4 -3
- package/esm2022/components/table/create-dialog/create-dialog-data.builder.mjs +10 -8
- package/esm2022/components/table/create-dialog/create-entity-dialog-data.builder.mjs +5 -4
- package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +32 -14
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +35 -21
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +46 -25
- package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +4 -4
- package/esm2022/components/table/table-data.builder.mjs +54 -30
- package/esm2022/components/table/table.component.mjs +24 -15
- package/esm2022/components/tooltip/tooltip.component.mjs +20 -0
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +42 -43
- package/esm2022/decorators/array/array-decorator.data.mjs +1 -1
- package/esm2022/decorators/array/array.decorator.mjs +8 -7
- package/esm2022/decorators/base/property-decorator-internal.data.mjs +25 -4
- package/esm2022/decorators/base/property-decorator.data.mjs +10 -1
- package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +5 -4
- package/esm2022/decorators/boolean/boolean-decorator.data.mjs +1 -1
- package/esm2022/decorators/boolean/boolean.decorator.mjs +3 -2
- package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +2 -2
- package/esm2022/decorators/custom/custom-decorator.data.mjs +1 -1
- package/esm2022/decorators/date/date-decorator-internal.data.mjs +8 -6
- package/esm2022/decorators/date/date-decorator.data.mjs +1 -1
- package/esm2022/decorators/date/date.decorator.mjs +4 -3
- package/esm2022/decorators/file/file-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/file/file-decorator.data.mjs +1 -1
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +4 -4
- package/esm2022/decorators/has-many/has-many-decorator.data.mjs +1 -1
- package/esm2022/decorators/has-many/has-many.decorator.mjs +3 -2
- package/esm2022/decorators/number/number-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/number/number-decorator.data.mjs +1 -1
- package/esm2022/decorators/object/object-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/object/object-decorator.data.mjs +1 -1
- package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +7 -6
- package/esm2022/decorators/references-many/references-many-decorator.data.mjs +1 -1
- package/esm2022/decorators/references-many/references-many.decorator.mjs +3 -2
- package/esm2022/decorators/references-one/references-one-decorator-internal.data.mjs +1 -1
- package/esm2022/decorators/references-one/references-one-decorator.data.mjs +1 -1
- package/esm2022/decorators/string/string-decorator-internal.data.mjs +1 -4
- package/esm2022/decorators/string/string-decorator.data.mjs +1 -1
- package/esm2022/default-global-configuration-values.mjs +89 -0
- package/esm2022/directives/drag-drop.directive.mjs +62 -0
- package/esm2022/directives/number.directive.mjs +38 -0
- package/esm2022/directives/password-match.directive.mjs +30 -0
- package/esm2022/directives/tooltip.directive.mjs +106 -0
- package/esm2022/functions/get-config-value.function.mjs +15 -0
- package/esm2022/functions/get-validation-error-message.function.mjs +49 -0
- package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +21 -0
- package/esm2022/global-configuration-values.mjs +10 -0
- package/esm2022/public-api.mjs +8 -2
- package/esm2022/utilities/entity.utilities.mjs +80 -405
- package/esm2022/utilities/validation.utilities.mjs +455 -0
- package/fesm2022/ngx-material-entity.mjs +2119 -1412
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/functions/get-config-value.function.d.ts +8 -0
- package/functions/get-validation-errors-tooltip-content.function.ts.d.ts +10 -0
- package/global-configuration-values.d.ts +216 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -1
- package/utilities/entity.utilities.d.ts +30 -34
- package/utilities/validation.utilities.d.ts +56 -0
- package/esm2022/components/get-validation-error-message.function.mjs +0 -42
- package/esm2022/components/input/file/file-input/dragDrop.directive.mjs +0 -62
- /package/{components/input/file/file-input/dragDrop.directive.d.ts → directives/drag-drop.directive.d.ts} +0 -0
- /package/{components → functions}/get-validation-error-message.function.d.ts +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NgxGlobalDefaultValues } from '../global-configuration-values';
|
|
1
2
|
import { BaseEntityType } from './entity.model';
|
|
2
3
|
/**
|
|
3
4
|
* The abstract BaseBuilder class.
|
|
@@ -5,7 +6,11 @@ import { BaseEntityType } from './entity.model';
|
|
|
5
6
|
export declare abstract class BaseBuilder<InternalType extends InputType, InputType extends BaseEntityType<InputType>> {
|
|
6
7
|
private readonly data;
|
|
7
8
|
private readonly inputData?;
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The global configuration, is used for providing default values to fallback to.
|
|
11
|
+
*/
|
|
12
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
13
|
+
protected constructor(globalConfig: NgxGlobalDefaultValues, data?: InputType);
|
|
9
14
|
/**
|
|
10
15
|
* Generates the internal data from the given user inputs.
|
|
11
16
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
2
3
|
import { ConfirmDialogData, ConfirmDialogTypes } from './confirm-dialog-data';
|
|
3
4
|
/**
|
|
4
5
|
* The internal ConfirmDialogData. Requires all default values the user can leave out.
|
|
@@ -17,7 +18,7 @@ export declare class ConfirmDialogDataInternal implements ConfirmDialogData {
|
|
|
17
18
|
* The Builder for the ConfirmDialogData. Sets default values.
|
|
18
19
|
*/
|
|
19
20
|
export declare class ConfirmDialogDataBuilder extends BaseBuilder<ConfirmDialogDataInternal, ConfirmDialogData> {
|
|
20
|
-
constructor(data?: ConfirmDialogData);
|
|
21
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data?: ConfirmDialogData);
|
|
21
22
|
protected generateBaseData(data?: ConfirmDialogData): ConfirmDialogDataInternal;
|
|
22
23
|
protected validateInput(data?: ConfirmDialogData): void;
|
|
23
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
3
4
|
import { ConfirmDialogData } from './confirm-dialog-data';
|
|
4
5
|
import { ConfirmDialogDataInternal } from './confirm-dialog-data.builder';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -11,9 +12,10 @@ import * as i0 from "@angular/core";
|
|
|
11
12
|
export declare class NgxMatEntityConfirmDialogComponent implements OnInit {
|
|
12
13
|
private readonly dialogRef;
|
|
13
14
|
private readonly inputData;
|
|
15
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
14
16
|
confirm: boolean;
|
|
15
17
|
data: ConfirmDialogDataInternal;
|
|
16
|
-
constructor(dialogRef: MatDialogRef<NgxMatEntityConfirmDialogComponent>, inputData: ConfirmDialogData);
|
|
18
|
+
constructor(dialogRef: MatDialogRef<NgxMatEntityConfirmDialogComponent>, inputData: ConfirmDialogData, globalConfig: NgxGlobalDefaultValues);
|
|
17
19
|
ngOnInit(): void;
|
|
18
20
|
/**
|
|
19
21
|
* Closes the dialog with true to signal that the action should be run.
|
|
@@ -1,12 +1,14 @@
|
|
|
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
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
8
9
|
import { EntityService } from '../../services/entity.service';
|
|
9
10
|
import { EntityTab, EntityUtilities } from '../../utilities/entity.utilities';
|
|
11
|
+
import { ValidationError } from '../../utilities/validation.utilities';
|
|
10
12
|
import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
|
|
11
13
|
import { EditActionInternal } from '../table/edit-dialog/edit-data.builder';
|
|
12
14
|
import { EditEntityData } from '../table/edit-dialog/edit-entity-data';
|
|
@@ -64,18 +66,23 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
64
66
|
private readonly EntityClass;
|
|
65
67
|
private readonly inputData;
|
|
66
68
|
private readonly http;
|
|
69
|
+
private readonly el;
|
|
70
|
+
private readonly renderer;
|
|
71
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
67
72
|
EntityUtilities: typeof EntityUtilities;
|
|
68
73
|
entityTabs: EntityTab<EntityType>[];
|
|
69
74
|
entity: EntityType;
|
|
70
75
|
entityPriorChanges: EntityType;
|
|
71
76
|
data: PageEditDataInternal<EntityType>;
|
|
77
|
+
validationErrors: ValidationError[];
|
|
72
78
|
isEntityValid: boolean;
|
|
73
79
|
isEntityDirty: boolean;
|
|
80
|
+
tooltipContent: string;
|
|
74
81
|
isEntityReadOnly: boolean;
|
|
75
82
|
allowDelete: boolean;
|
|
76
83
|
private inConfirmNavigation;
|
|
77
84
|
get hasUnsavedChanges(): boolean;
|
|
78
|
-
constructor(dialog: MatDialog, location: Location, route: ActivatedRoute, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageEditData<EntityType>, http: HttpClient);
|
|
85
|
+
constructor(dialog: MatDialog, location: Location, route: ActivatedRoute, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageEditData<EntityType>, http: HttpClient, el: ElementRef, renderer: Renderer2, globalConfig: NgxGlobalDefaultValues);
|
|
79
86
|
/**
|
|
80
87
|
* Checks if the input with the given key is readonly.
|
|
81
88
|
*
|
|
@@ -84,6 +91,11 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
84
91
|
*/
|
|
85
92
|
isReadOnly(key: keyof EntityType): boolean;
|
|
86
93
|
ngOnInit(): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Checks if the bottom row should be displayed as fixed.
|
|
96
|
+
*/
|
|
97
|
+
onScroll(): void;
|
|
98
|
+
private checkOffset;
|
|
87
99
|
/**
|
|
88
100
|
* Whether the page can be left without confirmation (of unsaved changes).
|
|
89
101
|
*
|
|
@@ -94,6 +106,7 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
94
106
|
* Checks if the entity has become invalid or dirty.
|
|
95
107
|
*/
|
|
96
108
|
checkEntity(): Promise<void>;
|
|
109
|
+
private checkIsEntityValid;
|
|
97
110
|
/**
|
|
98
111
|
* Tries to save the changes and close the dialog afterwards.
|
|
99
112
|
* Also handles the confirmation if required.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
2
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
3
4
|
import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
|
|
4
5
|
import { EditDataInternal } from '../table/edit-dialog/edit-data.builder';
|
|
5
6
|
import { EditEntityDataInternal } from '../table/edit-dialog/edit-entity.builder';
|
|
@@ -12,6 +13,6 @@ export type PageEditDataInternal<EntityType extends BaseEntityType<EntityType>>
|
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
export declare class PageEditDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<PageEditDataInternal<EntityType>, PageEditData<EntityType>> {
|
|
15
|
-
constructor(data: PageEditData<EntityType
|
|
16
|
+
constructor(data: PageEditData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
16
17
|
protected generateBaseData(data: PageEditData<EntityType>): PageEditDataInternal<EntityType>;
|
|
17
18
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
3
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
6
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
4
7
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
5
8
|
import { ArrayTableComponent } from '../array-table.class';
|
|
6
9
|
import * as i0 from "@angular/core";
|
|
7
10
|
export declare class ArrayDateInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<Date, EntityType, DecoratorTypes.ARRAY_DATE> implements OnInit {
|
|
11
|
+
private readonly globalConfig;
|
|
8
12
|
DateUtilities: typeof DateUtilities;
|
|
13
|
+
constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
14
|
+
ngOnInit(): void;
|
|
9
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateInputComponent<any>, never>;
|
|
10
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateInputComponent<any>, "array-date-input", never, {}, {}, never, never, false, never>;
|
|
11
17
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
3
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
6
|
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
7
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
5
8
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
6
9
|
import { ArrayTableComponent } from '../array-table.class';
|
|
7
10
|
import * as i0 from "@angular/core";
|
|
8
11
|
export declare class ArrayDateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<DateRange, EntityType, DecoratorTypes.ARRAY_DATE_RANGE> implements OnInit {
|
|
12
|
+
private readonly globalConfig;
|
|
9
13
|
DateUtilities: typeof DateUtilities;
|
|
10
14
|
dateRangeStart?: Date;
|
|
11
15
|
dateRangeEnd?: Date;
|
|
16
|
+
constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
12
17
|
ngOnInit(): void;
|
|
13
18
|
/**
|
|
14
19
|
* Adds a DateRange to the array.
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Time } from '@angular/common';
|
|
2
|
-
import {
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
4
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
3
5
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
6
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
5
7
|
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
8
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
6
9
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
7
10
|
import { ArrayTableComponent } from '../array-table.class';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
12
|
export declare class ArrayDateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<Date, EntityType, DecoratorTypes.ARRAY_DATE_TIME> implements OnInit {
|
|
13
|
+
private readonly globalConfig;
|
|
10
14
|
DateUtilities: typeof DateUtilities;
|
|
11
15
|
dateTime?: Date;
|
|
12
16
|
time?: Time;
|
|
13
17
|
timeDropdownValues: DropdownValue<Time>[];
|
|
18
|
+
constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
14
19
|
ngOnInit(): void;
|
|
15
20
|
protected resetInput(): void;
|
|
16
21
|
/**
|
package/components/input/boolean/boolean-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
|
}
|
package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
3
3
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
4
5
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class BooleanDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_DROPDOWN, boolean> implements OnInit {
|
|
8
|
+
private readonly globalConfig;
|
|
9
|
+
constructor(globalConfig: NgxGlobalDefaultValues);
|
|
10
|
+
ngOnInit(): void;
|
|
7
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanDropdownInputComponent<any>, never>;
|
|
8
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanDropdownInputComponent<any>, "boolean-dropdown-input", never, {}, {}, never, never, false, never>;
|
|
9
13
|
}
|
|
@@ -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
|
}
|
|
@@ -3,9 +3,11 @@ import { DateFilterFn } from '@angular/material/datepicker';
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
5
5
|
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
6
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
6
7
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class DateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_RANGE, DateRange> implements OnInit {
|
|
10
|
+
private readonly globalConfig;
|
|
9
11
|
get dateRange(): DateRange;
|
|
10
12
|
set dateRange(value: DateRange);
|
|
11
13
|
get dateRangeStart(): Date | undefined;
|
|
@@ -13,6 +15,7 @@ export declare class DateRangeInputComponent<EntityType extends BaseEntityType<E
|
|
|
13
15
|
get dateRangeEnd(): Date | undefined;
|
|
14
16
|
set dateRangeEnd(value: Date | undefined);
|
|
15
17
|
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
18
|
+
constructor(globalConfig: NgxGlobalDefaultValues);
|
|
16
19
|
ngOnInit(): void;
|
|
17
20
|
/**
|
|
18
21
|
* Updates the date range values based on the start and end date.
|
|
@@ -4,15 +4,18 @@ import { DateFilterFn } from '@angular/material/datepicker';
|
|
|
4
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
6
6
|
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
7
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
7
8
|
import { DateUtilities } from '../../../../utilities/date.utilities';
|
|
8
9
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class DateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_TIME, Date> implements OnInit {
|
|
12
|
+
private readonly globalConfig;
|
|
11
13
|
DateUtilities: typeof DateUtilities;
|
|
12
14
|
timeDropdownValues: DropdownValue<Time | undefined>[];
|
|
13
15
|
get time(): Time | undefined;
|
|
14
16
|
set time(value: Time | undefined);
|
|
15
17
|
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
18
|
+
constructor(globalConfig: NgxGlobalDefaultValues);
|
|
16
19
|
ngOnInit(): void;
|
|
17
20
|
/**
|
|
18
21
|
* Checks if two times are equal. Is needed for the dropdown.
|
|
@@ -15,9 +15,11 @@ import { PropertyDecoratorConfigInternal } from '../../decorators/base/property-
|
|
|
15
15
|
import { HasManyDecoratorConfigInternal } from '../../decorators/has-many/has-many-decorator-internal.data';
|
|
16
16
|
import { DefaultObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';
|
|
17
17
|
import { ReferencesOneDecoratorConfigInternal } from '../../decorators/references-one/references-one-decorator-internal.data';
|
|
18
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
18
19
|
import { DateUtilities } from '../../utilities/date.utilities';
|
|
19
20
|
import { EntityTab, EntityUtilities } from '../../utilities/entity.utilities';
|
|
20
21
|
import { SelectionUtilities } from '../../utilities/selection.utilities';
|
|
22
|
+
import { ValidationError } from '../../utilities/validation.utilities';
|
|
21
23
|
import { CreateDialogDataInternal } from '../table/create-dialog/create-dialog-data.builder';
|
|
22
24
|
import { EditActionInternal } from '../table/edit-dialog/edit-data.builder';
|
|
23
25
|
import { DisplayColumn } from '../table/table-data';
|
|
@@ -36,6 +38,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
36
38
|
private readonly injector;
|
|
37
39
|
private readonly router;
|
|
38
40
|
protected readonly defaultGetValidationErrorMessage: (model: NgModel) => string;
|
|
41
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
39
42
|
private readonly http;
|
|
40
43
|
/**
|
|
41
44
|
* The entity on which the property exists. Used in conjunction with the "propertyKey"
|
|
@@ -88,7 +91,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
88
91
|
editArrayItemDialog: TemplateRef<unknown>;
|
|
89
92
|
editArrayItemDialogRef: MatDialogRef<unknown>;
|
|
90
93
|
type: DecoratorTypes;
|
|
91
|
-
metadata: PropertyDecoratorConfigInternal
|
|
94
|
+
metadata: PropertyDecoratorConfigInternal<unknown>;
|
|
92
95
|
metadataDefaultObject: DefaultObjectDecoratorConfigInternal<EntityType>;
|
|
93
96
|
objectProperty: EntityType;
|
|
94
97
|
objectPropertyTabs: EntityTab<EntityType>[];
|
|
@@ -106,6 +109,8 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
106
109
|
addArrayItemDialogData: CreateDialogDataInternal;
|
|
107
110
|
arrayItemDialogTabs: EntityTab<EntityType>[];
|
|
108
111
|
editArrayItemDialogData: EditArrayItemDialogDataInternal<EntityType>;
|
|
112
|
+
arrayItemValidationErrors: ValidationError[];
|
|
113
|
+
arrayItemTooltipContent: string;
|
|
109
114
|
metadataHasMany: HasManyDecoratorConfigInternal<EntityType, EntityType>;
|
|
110
115
|
hasManyIsLoading: boolean;
|
|
111
116
|
/**
|
|
@@ -133,6 +138,8 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
133
138
|
hasManyEntity: EntityType;
|
|
134
139
|
hasManyEntityPriorChanges: EntityType;
|
|
135
140
|
isHasManyEntityValid: boolean;
|
|
141
|
+
hasManyValidationErrors: ValidationError[];
|
|
142
|
+
hasManyTooltipContent: string;
|
|
136
143
|
isHasManyEntityDirty: boolean;
|
|
137
144
|
hasManyAllowCreate: boolean;
|
|
138
145
|
hasManyCreateTabs: EntityTab<EntityType>[];
|
|
@@ -148,7 +155,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
148
155
|
DateUtilities: typeof DateUtilities;
|
|
149
156
|
SelectionUtilities: typeof SelectionUtilities;
|
|
150
157
|
referencesOneUUID: string;
|
|
151
|
-
constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, defaultGetValidationErrorMessage: (model: NgModel) => string, http: HttpClient);
|
|
158
|
+
constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, defaultGetValidationErrorMessage: (model: NgModel) => string, globalConfig: NgxGlobalDefaultValues, http: HttpClient);
|
|
152
159
|
/**
|
|
153
160
|
* Checks if the input with the given key on the given property is readonly.
|
|
154
161
|
*
|
|
@@ -263,7 +270,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
263
270
|
dialogCancelCreateHasMany(): void;
|
|
264
271
|
/**
|
|
265
272
|
* Runs the TableAction for all selected entries.
|
|
266
|
-
* Also handles confirmation with an additional
|
|
273
|
+
* Also handles confirmation with an additional dial#og if configured.
|
|
267
274
|
*
|
|
268
275
|
* @param action - The TableAction to run.
|
|
269
276
|
*/
|
|
@@ -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,12 @@ 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";
|
|
51
|
+
import * as i50 from "../tooltip/tooltip.component";
|
|
52
|
+
import * as i51 from "@angular/material/badge";
|
|
49
53
|
export declare class NgxMatEntityInputModule {
|
|
50
54
|
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]>;
|
|
55
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.StringInputComponent, typeof i2.StringTextboxInputComponent, typeof i3.StringAutocompleteInputComponent, typeof i4.StringDropdownInputComponent, typeof i5.StringPasswordInputComponent, typeof i6.BooleanCheckboxInputComponent, typeof i7.BooleanToggleInputComponent, typeof i8.BooleanDropdownInputComponent, typeof i9.NumberInputComponent, typeof i10.NumberDropdownInputComponent, typeof i11.NumberSliderInputComponent, typeof i12.ArrayStringChipsInputComponent, typeof i13.ArrayStringAutocompleteChipsComponent, typeof i14.DateInputComponent, typeof i15.DateRangeInputComponent, typeof i16.DateTimeInputComponent, typeof i17.ArrayDateInputComponent, typeof i18.ArrayDateTimeInputComponent, typeof i19.ArrayDateRangeInputComponent, typeof i20.FileInputComponent, typeof i21.FileImageInputComponent, typeof i22.FileDefaultInputComponent, typeof i23.DragDropDirective, typeof i24.ReferencesManyInputComponent, typeof i25.CustomInputComponent, typeof i26.NgxMatEntityInputComponent], [typeof i27.CommonModule, typeof i28.MatInputModule, typeof i29.FormsModule, typeof i30.MatFormFieldModule, typeof i31.MatSelectModule, typeof i32.MatAutocompleteModule, typeof i33.MatCheckboxModule, typeof i34.MatSlideToggleModule, typeof i35.MatChipsModule, typeof i36.MatIconModule, typeof i37.MatTableModule, typeof i38.MatDialogModule, typeof i39.MatButtonModule, typeof i40.MatDatepickerModule, typeof i41.MatSliderModule, typeof i42.MatTabsModule, typeof i43.MatMenuModule, typeof i44.MatProgressSpinnerModule, typeof i45.MatPaginatorModule, typeof i46.DisplayColumnValueComponent, typeof i47.MatSortModule, typeof i48.PasswordMatchValidatorDirective, typeof i49.NumberDirective, typeof i50.TooltipComponent, typeof i51.MatBadgeModule], [typeof i26.NgxMatEntityInputComponent]>;
|
|
52
56
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInputModule>;
|
|
53
57
|
}
|
|
@@ -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
|
}
|
package/components/input/relations/references-many-input/references-many-input.component.d.ts
CHANGED
|
@@ -4,12 +4,14 @@ import { MatTableDataSource } from '@angular/material/table';
|
|
|
4
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
6
6
|
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
7
|
+
import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
|
|
7
8
|
import { SelectionUtilities } from '../../../../utilities/selection.utilities';
|
|
8
9
|
import { DisplayColumn } from '../../../table/table-data';
|
|
9
10
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class ReferencesManyInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.REFERENCES_MANY, string[]> implements OnInit {
|
|
12
13
|
private readonly injector;
|
|
14
|
+
private readonly globalConfig;
|
|
13
15
|
allReferencedEntities: EntityType[];
|
|
14
16
|
allDropdownValues: DropdownValue<string>[];
|
|
15
17
|
dropdownValues: DropdownValue<string>[];
|
|
@@ -18,7 +20,7 @@ export declare class ReferencesManyInputComponent<EntityType extends BaseEntityT
|
|
|
18
20
|
displayedColumns: string[];
|
|
19
21
|
selection: SelectionModel<string>;
|
|
20
22
|
SelectionUtilities: typeof SelectionUtilities;
|
|
21
|
-
constructor(injector: EnvironmentInjector);
|
|
23
|
+
constructor(injector: EnvironmentInjector, globalConfig: NgxGlobalDefaultValues);
|
|
22
24
|
ngOnInit(): Promise<void>;
|
|
23
25
|
/**
|
|
24
26
|
* Gets the value to display in the column.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
2
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
2
3
|
import { ConfirmDialogDataInternal } from '../../confirm-dialog/confirm-dialog-data.builder';
|
|
3
4
|
import { CreateDialogData } from '../table-data';
|
|
4
5
|
/**
|
|
@@ -16,6 +17,6 @@ export declare class CreateDialogDataInternal implements CreateDialogData {
|
|
|
16
17
|
* The Builder for the CreateDialogData. Sets default values.
|
|
17
18
|
*/
|
|
18
19
|
export declare class CreateDialogDataBuilder extends BaseBuilder<CreateDialogDataInternal, CreateDialogData> {
|
|
19
|
-
constructor(data?: CreateDialogData);
|
|
20
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data?: CreateDialogData);
|
|
20
21
|
protected generateBaseData(data?: CreateDialogData): CreateDialogDataInternal;
|
|
21
22
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { NgxGlobalDefaultValues } from 'projects/ngx-material-entity/src/global-configuration-values';
|
|
2
3
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
3
4
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
5
|
import { EntityService } from '../../../services/entity.service';
|
|
@@ -17,6 +18,6 @@ export declare class CreateEntityDialogDataInternal<EntityType extends BaseEntit
|
|
|
17
18
|
* The Builder for the CreateEntityDialogData. Sets default values.
|
|
18
19
|
*/
|
|
19
20
|
export declare class CreateEntityDialogDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<CreateEntityDialogDataInternal<EntityType>, CreateEntityDialogData<EntityType>> {
|
|
20
|
-
constructor(data: CreateEntityDialogData<EntityType
|
|
21
|
+
constructor(data: CreateEntityDialogData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
21
22
|
protected generateBaseData(data: CreateEntityDialogData<EntityType>): CreateEntityDialogDataInternal<EntityType>;
|
|
22
23
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
4
5
|
import { EntityService } from '../../../services/entity.service';
|
|
5
6
|
import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
|
|
7
|
+
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
6
8
|
import { CreateEntityDialogData } from './create-entity-dialog-data';
|
|
7
9
|
import { CreateEntityDialogDataInternal } from './create-entity-dialog-data.builder';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
@@ -17,12 +19,15 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
17
19
|
dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>;
|
|
18
20
|
private readonly injector;
|
|
19
21
|
private readonly dialog;
|
|
22
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
20
23
|
EntityUtilities: typeof EntityUtilities;
|
|
21
24
|
entityTabs: EntityTab<EntityType>[];
|
|
22
25
|
entityService: EntityService<EntityType>;
|
|
23
26
|
data: CreateEntityDialogDataInternal<EntityType>;
|
|
24
27
|
isEntityValid: boolean;
|
|
25
|
-
|
|
28
|
+
validationErrors: ValidationError[];
|
|
29
|
+
tooltipContent: string;
|
|
30
|
+
constructor(inputData: CreateEntityDialogData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>, injector: Injector, dialog: MatDialog, globalConfig: NgxGlobalDefaultValues);
|
|
26
31
|
ngOnInit(): void;
|
|
27
32
|
/**
|
|
28
33
|
* Checks if the entity is valid.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
2
2
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
3
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
3
4
|
import { ConfirmDialogData } from '../../confirm-dialog/confirm-dialog-data';
|
|
4
5
|
import { EditAction, EditData } from '../table-data';
|
|
5
6
|
/**
|
|
@@ -7,12 +8,13 @@ import { EditAction, EditData } from '../table-data';
|
|
|
7
8
|
* Sets default values.
|
|
8
9
|
*/
|
|
9
10
|
export declare class EditActionInternal<EntityType extends BaseEntityType<EntityType>> implements EditAction<EntityType> {
|
|
11
|
+
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
10
12
|
displayName: string;
|
|
11
13
|
action: (entity: EntityType, entityPriorChanges: EntityType) => Promise<unknown>;
|
|
12
14
|
enabled: ((e: EntityType) => boolean);
|
|
13
15
|
requireConfirmDialog: ((e: EntityType) => boolean);
|
|
14
16
|
confirmDialogData: ConfirmDialogData;
|
|
15
|
-
constructor(data: EditAction<EntityType
|
|
17
|
+
constructor(data: EditAction<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
16
18
|
private functionToAsync;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
@@ -29,12 +31,12 @@ export declare class EditDataInternal<EntityType extends BaseEntityType<EntityTy
|
|
|
29
31
|
confirmEditDialogData: ConfirmDialogData;
|
|
30
32
|
actionsLabel: string;
|
|
31
33
|
actions: EditActionInternal<EntityType>[];
|
|
32
|
-
constructor(title: (entity: EntityType) => string, confirmButtonLabel: string, deleteButtonLabel: string, cancelButtonLabel: string, deleteRequiresConfirmDialog: boolean, editRequiresConfirmDialog: boolean, confirmDeleteDialogData: ConfirmDialogData, confirmEditDialogData: ConfirmDialogData, actionsLabel: string, actions: EditAction<EntityType>[]);
|
|
34
|
+
constructor(title: (entity: EntityType) => string, confirmButtonLabel: string, deleteButtonLabel: string, cancelButtonLabel: string, deleteRequiresConfirmDialog: boolean, editRequiresConfirmDialog: boolean, confirmDeleteDialogData: ConfirmDialogData, confirmEditDialogData: ConfirmDialogData, actionsLabel: string, actions: EditAction<EntityType>[], globalConfig: NgxGlobalDefaultValues);
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* The Builder for the EditDialogData. Sets default values.
|
|
36
38
|
*/
|
|
37
39
|
export declare class EditDialogDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<EditDataInternal<EntityType>, EditData<EntityType>> {
|
|
38
|
-
constructor(data?: EditData<EntityType>);
|
|
40
|
+
constructor(globalConfig: NgxGlobalDefaultValues, data?: EditData<EntityType>);
|
|
39
41
|
protected generateBaseData(data?: EditData<EntityType>): EditDataInternal<EntityType>;
|
|
40
42
|
}
|
|
@@ -2,8 +2,10 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { EnvironmentInjector, OnInit } from '@angular/core';
|
|
3
3
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
4
4
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
5
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
5
6
|
import { EntityService } from '../../../services/entity.service';
|
|
6
7
|
import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
|
|
8
|
+
import { ValidationError } from '../../../utilities/validation.utilities';
|
|
7
9
|
import { EditActionInternal } from './edit-data.builder';
|
|
8
10
|
import { EditEntityData } from './edit-entity-data';
|
|
9
11
|
import { EditEntityDataInternal } from './edit-entity.builder';
|
|
@@ -20,6 +22,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
20
22
|
private readonly injector;
|
|
21
23
|
private readonly dialog;
|
|
22
24
|
private readonly http;
|
|
25
|
+
private readonly globalConfig;
|
|
23
26
|
EntityUtilities: typeof EntityUtilities;
|
|
24
27
|
entityTabs: EntityTab<EntityType>[];
|
|
25
28
|
entityService: EntityService<EntityType>;
|
|
@@ -27,9 +30,11 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
27
30
|
data: EditEntityDataInternal<EntityType>;
|
|
28
31
|
isEntityValid: boolean;
|
|
29
32
|
isEntityDirty: boolean;
|
|
33
|
+
validationErrors: ValidationError[];
|
|
34
|
+
tooltipContent: string;
|
|
30
35
|
isEntityReadOnly: boolean;
|
|
31
36
|
allowDelete: boolean;
|
|
32
|
-
constructor(inputData: EditEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>, injector: EnvironmentInjector, dialog: MatDialog, http: HttpClient);
|
|
37
|
+
constructor(inputData: EditEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>, injector: EnvironmentInjector, dialog: MatDialog, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
|
|
33
38
|
ngOnInit(): void;
|
|
34
39
|
/**
|
|
35
40
|
* Checks if the input with the given key is readonly.
|
|
@@ -42,6 +47,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
42
47
|
* Checks if the entity has become invalid or dirty.
|
|
43
48
|
*/
|
|
44
49
|
checkEntity(): Promise<void>;
|
|
50
|
+
private checkIsEntityValid;
|
|
45
51
|
/**
|
|
46
52
|
* Tries to save the changes and close the dialog afterwards.
|
|
47
53
|
* Also handles the confirmation if required.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
3
3
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
4
|
+
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
4
5
|
import { EntityService } from '../../../services/entity.service';
|
|
5
6
|
import { EditDataInternal } from './edit-data.builder';
|
|
6
7
|
import { EditEntityData } from './edit-entity-data';
|
|
@@ -19,6 +20,6 @@ export declare class EditEntityDataInternal<EntityType extends BaseEntityType<En
|
|
|
19
20
|
* The Builder for the EditEntityData. Sets default values.
|
|
20
21
|
*/
|
|
21
22
|
export declare class EditEntityDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<EditEntityDataInternal<EntityType>, EditEntityData<EntityType>> {
|
|
22
|
-
constructor(data: EditEntityData<EntityType
|
|
23
|
+
constructor(data: EditEntityData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
23
24
|
protected generateBaseData(data: EditEntityData<EntityType>): EditEntityDataInternal<EntityType>;
|
|
24
25
|
}
|