ngx-material-entity 16.1.1 → 16.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +5 -14
- package/components/create-page/page-create-data.builder.d.ts +1 -1
- package/components/edit-page/edit-page.component.d.ts +5 -14
- package/components/edit-page/page-edit-data.builder.d.ts +1 -1
- package/components/input/input.component.d.ts +39 -2
- 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 +21 -9
- 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 +8 -4
- 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/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 +2 -2
- package/esm2022/components/create-page/create-data.route.mjs +1 -1
- package/esm2022/components/create-page/create-page.component.mjs +12 -20
- 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 +12 -20
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +1 -1
- package/esm2022/components/form/form.component.mjs +1 -1
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +1 -1
- package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +1 -1
- 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 +1 -1
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +1 -1
- package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +1 -1
- package/esm2022/components/input/custom/custom.component.mjs +1 -1
- package/esm2022/components/input/date/date-input/date-input.component.mjs +1 -1
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +2 -2
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-input/file-input.component.mjs +1 -1
- package/esm2022/components/input/input.component.mjs +87 -27
- package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +1 -1
- package/esm2022/components/input/number/number-input/number-input.component.mjs +1 -1
- package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +1 -1
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-input/string-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +1 -1
- 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 +60 -20
- 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 +17 -6
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +35 -7
- package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +2 -2
- package/esm2022/components/table/table-data.builder.mjs +3 -3
- package/esm2022/components/table/table-data.mjs +1 -1
- package/esm2022/components/table/table.component.mjs +26 -15
- 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 -1
- 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 +1 -1
- 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 +4 -4
- package/esm2022/utilities/file.utilities.mjs +1 -1
- package/esm2022/utilities/validation.utilities.mjs +11 -6
- package/fesm2022/ngx-material-entity.mjs +4834 -4664
- 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 +11 -1
- package/package.json +1 -1
- package/services/unsaved-changes.guard.d.ts +15 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ConfirmDialogData, ConfirmDialogTypes } from './confirm-dialog-data';
|
|
1
2
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
3
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
3
|
-
import { ConfirmDialogData, ConfirmDialogTypes } from './confirm-dialog-data';
|
|
4
4
|
/**
|
|
5
5
|
* The internal ConfirmDialogData. Requires all default values the user can leave out.
|
|
6
6
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
-
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
3
|
import { ConfirmDialogData } from './confirm-dialog-data';
|
|
5
4
|
import { ConfirmDialogDataInternal } from './confirm-dialog-data.builder';
|
|
5
|
+
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* The Dialog used whenever confirmation by the user is required (e.g. When the user tries to delete an entity).
|
|
@@ -2,16 +2,16 @@ import { Location } from '@angular/common';
|
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { ElementRef, EnvironmentInjector, InjectionToken, OnInit, Renderer2 } from '@angular/core';
|
|
4
4
|
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
-
import {
|
|
5
|
+
import { PageCreateDataInternal } from './page-create-data.builder';
|
|
6
6
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
7
7
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
8
8
|
import { EntityService } from '../../services/entity.service';
|
|
9
|
+
import { UnsavedChangesPage } from '../../services/unsaved-changes.guard';
|
|
9
10
|
import { EntityUtilities } from '../../utilities/entity.utilities';
|
|
10
11
|
import { ValidationError } from '../../utilities/validation.utilities';
|
|
11
12
|
import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
|
|
12
13
|
import { CreateEntityData } from '../table/create-dialog/create-entity-data';
|
|
13
14
|
import { CreateData } from '../table/table-data';
|
|
14
|
-
import { PageCreateDataInternal } from './page-create-data.builder';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
/**
|
|
17
17
|
* The data that needs to be provided for a route to be able to create a entity.
|
|
@@ -53,7 +53,7 @@ export declare const NGX_CREATE_DATA: InjectionToken<PageCreateData<any>>;
|
|
|
53
53
|
* A generic page that allows you to create a specific entity.
|
|
54
54
|
* For this to work you need to provide some data for the route.
|
|
55
55
|
*/
|
|
56
|
-
export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
56
|
+
export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit, UnsavedChangesPage {
|
|
57
57
|
private readonly dialog;
|
|
58
58
|
private readonly location;
|
|
59
59
|
private readonly injector;
|
|
@@ -105,10 +105,6 @@ export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEnti
|
|
|
105
105
|
get hasUnsavedChanges(): boolean;
|
|
106
106
|
constructor(dialog: MatDialog, location: Location, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageCreateData<EntityType>, http: HttpClient, el: ElementRef, renderer: Renderer2, globalConfig: NgxGlobalDefaultValues);
|
|
107
107
|
ngOnInit(): Promise<void>;
|
|
108
|
-
/**
|
|
109
|
-
* Whether the page can be left without confirmation (of unsaved changes).
|
|
110
|
-
* @returns Whether or not the page can be left without confirmation.
|
|
111
|
-
*/
|
|
112
108
|
canDeactivate(): boolean;
|
|
113
109
|
/**
|
|
114
110
|
* Checks if the bottom row should be displayed as fixed.
|
|
@@ -128,13 +124,8 @@ export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEnti
|
|
|
128
124
|
/**
|
|
129
125
|
* Tries to navigate back.
|
|
130
126
|
*/
|
|
131
|
-
navigateBack(): void
|
|
132
|
-
|
|
133
|
-
* Opens the confirm dialog for navigating with unsaved changes.
|
|
134
|
-
* This is exposed because the UnsavedChangesGuard needs to access this.
|
|
135
|
-
* @returns The first observable result of the confirm dialog.
|
|
136
|
-
*/
|
|
137
|
-
openConfirmNavigationDialog(): Observable<boolean>;
|
|
127
|
+
navigateBack(): Promise<void>;
|
|
128
|
+
openConfirmNavigationDialog(): Promise<boolean>;
|
|
138
129
|
private confirmNavigateBack;
|
|
139
130
|
/**
|
|
140
131
|
* Checks if the input with the given key is readonly.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { PageCreateData } from './create-page.component';
|
|
1
2
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
3
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
4
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
5
|
import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
|
|
5
6
|
import { CreateDataInternal } from '../table/create-dialog/create-data.builder';
|
|
6
7
|
import { CreateEntityDataInternal } from '../table/create-dialog/create-entity-data.builder';
|
|
7
|
-
import { PageCreateData } from './create-page.component';
|
|
8
8
|
export type PageCreateDataInternal<EntityType extends BaseEntityType<EntityType>> = Omit<CreateEntityDataInternal<EntityType>, 'entity' | 'EntityServiceClass'> & {
|
|
9
9
|
displayLoadingSpinner: boolean;
|
|
10
10
|
createData: CreateDataInternal & {
|
|
@@ -3,17 +3,17 @@ import { HttpClient } from '@angular/common/http';
|
|
|
3
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
|
-
import {
|
|
6
|
+
import { PageEditDataInternal } from './page-edit-data.builder';
|
|
7
7
|
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
8
8
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
9
9
|
import { EntityService } from '../../services/entity.service';
|
|
10
|
+
import { UnsavedChangesPage } from '../../services/unsaved-changes.guard';
|
|
10
11
|
import { EntityUtilities } from '../../utilities/entity.utilities';
|
|
11
12
|
import { ValidationError } from '../../utilities/validation.utilities';
|
|
12
13
|
import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
|
|
13
14
|
import { EditActionInternal } from '../table/edit-dialog/edit-data.builder';
|
|
14
15
|
import { EditEntityData } from '../table/edit-dialog/edit-entity-data';
|
|
15
16
|
import { EditData } from '../table/table-data';
|
|
16
|
-
import { PageEditDataInternal } from './page-edit-data.builder';
|
|
17
17
|
import * as i0 from "@angular/core";
|
|
18
18
|
/**
|
|
19
19
|
* The data that needs to be provided for a route to be able to edit a entity.
|
|
@@ -55,7 +55,7 @@ export declare const NGX_EDIT_DATA: InjectionToken<PageEditData<any>>;
|
|
|
55
55
|
* A generic page that allows you to edit a specific entity.
|
|
56
56
|
* For this to work you need to provide some data for the route.
|
|
57
57
|
*/
|
|
58
|
-
export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
58
|
+
export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit, UnsavedChangesPage {
|
|
59
59
|
private readonly dialog;
|
|
60
60
|
private readonly location;
|
|
61
61
|
private readonly route;
|
|
@@ -119,10 +119,6 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
119
119
|
* Checks if the bottom row should be displayed as fixed.
|
|
120
120
|
*/
|
|
121
121
|
checkOffset(): void;
|
|
122
|
-
/**
|
|
123
|
-
* Whether the page can be left without confirmation (of unsaved changes).
|
|
124
|
-
* @returns Whether or not the page can be left without confirmation.
|
|
125
|
-
*/
|
|
126
122
|
canDeactivate(): boolean;
|
|
127
123
|
/**
|
|
128
124
|
* Checks if the entity has become invalid or dirty.
|
|
@@ -144,13 +140,8 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
|
|
|
144
140
|
/**
|
|
145
141
|
* Tries to navigate back.
|
|
146
142
|
*/
|
|
147
|
-
navigateBack(): void
|
|
148
|
-
|
|
149
|
-
* Opens the confirm dialog for navigating with unsaved changes.
|
|
150
|
-
* This is exposed because the UnsavedChangesGuard needs to access this.
|
|
151
|
-
* @returns The first observable result of the confirm dialog.
|
|
152
|
-
*/
|
|
153
|
-
openConfirmNavigationDialog(): Observable<boolean>;
|
|
143
|
+
navigateBack(): Promise<void>;
|
|
144
|
+
openConfirmNavigationDialog(): Promise<boolean>;
|
|
154
145
|
private confirmNavigateBack;
|
|
155
146
|
/**
|
|
156
147
|
* Runs the edit action on the entity.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { PageEditData } from './edit-page.component';
|
|
1
2
|
import { BaseBuilder } from '../../classes/base.builder';
|
|
2
3
|
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
4
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
5
|
import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
|
|
5
6
|
import { EditDataInternal } from '../table/edit-dialog/edit-data.builder';
|
|
6
7
|
import { EditEntityDataInternal } from '../table/edit-dialog/edit-entity.builder';
|
|
7
|
-
import { PageEditData } from './edit-page.component';
|
|
8
8
|
export type PageEditDataInternal<EntityType extends BaseEntityType<EntityType>> = Omit<EditEntityDataInternal<EntityType>, 'entity' | 'EntityServiceClass'> & {
|
|
9
9
|
displayLoadingSpinner: boolean;
|
|
10
10
|
editData: EditDataInternal<EntityType> & {
|
|
@@ -12,7 +12,7 @@ import { DecoratorTypes } from '../../decorators/base/decorator-types.enum';
|
|
|
12
12
|
import { DropdownValue } from '../../decorators/base/dropdown-value.interface';
|
|
13
13
|
import { PropertyDecoratorConfigInternal } from '../../decorators/base/property-decorator-internal.data';
|
|
14
14
|
import { HasManyDecoratorConfigInternal } from '../../decorators/has-many/has-many-decorator-internal.data';
|
|
15
|
-
import { DefaultObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';
|
|
15
|
+
import { DefaultObjectDecoratorConfigInternal, DropdownObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';
|
|
16
16
|
import { ReferencesOneDecoratorConfigInternal } from '../../decorators/references-one/references-one-decorator-internal.data';
|
|
17
17
|
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
18
18
|
import { DateUtilities } from '../../utilities/date.utilities';
|
|
@@ -102,6 +102,30 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
102
102
|
* The tabs for the object property.
|
|
103
103
|
*/
|
|
104
104
|
objectPropertyTabs: EntityTab<EntityType>[];
|
|
105
|
+
/**
|
|
106
|
+
* The metadata of an dropdown object property.
|
|
107
|
+
*/
|
|
108
|
+
metadataDropdownObject: DropdownObjectDecoratorConfigInternal<EntityType>;
|
|
109
|
+
/**
|
|
110
|
+
* All possible dropdown values for the object property.
|
|
111
|
+
*/
|
|
112
|
+
private objectDropdownValues;
|
|
113
|
+
/**
|
|
114
|
+
* A unique input name for the references one property.
|
|
115
|
+
*/
|
|
116
|
+
objectDropdownName: string;
|
|
117
|
+
/**
|
|
118
|
+
* All currently shown dropdown values for the object property.
|
|
119
|
+
*/
|
|
120
|
+
filteredObjectDropdownValues: DropdownValue<EntityType | undefined>[];
|
|
121
|
+
/**
|
|
122
|
+
* The currently selected object as a drop down value.
|
|
123
|
+
*/
|
|
124
|
+
get currentObjectDropdownValue(): DropdownValue<EntityType | undefined> | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Whether or not the current object dropdown value should be shown in the dropdown.
|
|
127
|
+
*/
|
|
128
|
+
get shouldDisplayCurrentObjectDropdownValue(): boolean;
|
|
105
129
|
private readonly addArrayItemDialog;
|
|
106
130
|
private addArrayItemDialogRef;
|
|
107
131
|
private readonly editArrayItemDialog;
|
|
@@ -326,7 +350,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
326
350
|
* @returns The value of the display column.
|
|
327
351
|
*/
|
|
328
352
|
getDisplayColumnValue(entity: EntityType, displayColumn: DisplayColumn<EntityType>): unknown;
|
|
329
|
-
ngOnInit(): void
|
|
353
|
+
ngOnInit(): Promise<void>;
|
|
330
354
|
private initReferencesOne;
|
|
331
355
|
/**
|
|
332
356
|
* Filters the references one dropdown values.
|
|
@@ -335,9 +359,22 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
335
359
|
filterReferencesOneValues(searchInput: string): void;
|
|
336
360
|
private initHasMany;
|
|
337
361
|
private initEntityArray;
|
|
362
|
+
private initDropdownObjectInput;
|
|
338
363
|
private initObjectInput;
|
|
339
364
|
private startImportJson;
|
|
340
365
|
private importJson;
|
|
366
|
+
/**
|
|
367
|
+
* Checks if two objects are equal. Is needed for the dropdown.
|
|
368
|
+
* @param value1 - The first object to compare.
|
|
369
|
+
* @param value2 - The second object to compare.
|
|
370
|
+
* @returns Whether or not the objects are the same.
|
|
371
|
+
*/
|
|
372
|
+
compareObjects(value1?: EntityType, value2?: EntityType): boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Filters the dropdown values.
|
|
375
|
+
* @param searchInput - The search input to filter for.
|
|
376
|
+
*/
|
|
377
|
+
filterObjectDropdownValues(searchInput: string): void;
|
|
341
378
|
/**
|
|
342
379
|
* Sets the references one object using the input id.
|
|
343
380
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseBuilder } from '../../../classes/base.builder';
|
|
2
2
|
import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
|
|
3
|
+
import { ConfirmDialogData } from '../../confirm-dialog/confirm-dialog-data';
|
|
3
4
|
import { ConfirmDialogDataInternal } from '../../confirm-dialog/confirm-dialog-data.builder';
|
|
4
5
|
import { CreateData } from '../table-data';
|
|
5
6
|
/**
|
|
@@ -11,7 +12,9 @@ export declare class CreateDataInternal implements CreateData {
|
|
|
11
12
|
cancelButtonLabel: string;
|
|
12
13
|
createRequiresConfirmDialog: boolean;
|
|
13
14
|
confirmCreateDialogData: ConfirmDialogDataInternal;
|
|
14
|
-
|
|
15
|
+
unsavedChangesRequireConfirmDialog: boolean;
|
|
16
|
+
confirmUnsavedChangesDialogData: ConfirmDialogData;
|
|
17
|
+
constructor(title: string, createButtonLabel: string, cancelButtonLabel: string, createRequiresConfirmDialog: boolean, confirmCreateDialogData: ConfirmDialogDataInternal, unsavedChangesRequireConfirmDialog: boolean, confirmUnsavedChangesDialogData: ConfirmDialogDataInternal);
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
20
|
* The Builder for the CreateData. Sets default values.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { CreateDataInternal } from './create-data.builder';
|
|
2
|
+
import { CreateEntityData } from './create-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 { CreateDataInternal } from './create-data.builder';
|
|
5
|
-
import { CreateEntityData } from './create-entity-data';
|
|
6
6
|
/**
|
|
7
7
|
* The internal CreateEntityDialogData. Requires all default values the user can leave out.
|
|
8
8
|
*/
|
|
@@ -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
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,10 +17,15 @@ 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;
|
|
25
|
+
/**
|
|
26
|
+
* Emits when the form is dirty.
|
|
27
|
+
*/
|
|
28
|
+
unsavedChanges: EventEmitter<boolean>;
|
|
23
29
|
/**
|
|
24
30
|
* Contains HelperMethods around handling Entities and their property-metadata.
|
|
25
31
|
*/
|
|
@@ -32,6 +38,11 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
32
38
|
* The internal configuration data.
|
|
33
39
|
*/
|
|
34
40
|
data: CreateEntityDataInternal<EntityType>;
|
|
41
|
+
private entityPriorChanges;
|
|
42
|
+
/**
|
|
43
|
+
* Whether or not the entity is dirty.
|
|
44
|
+
*/
|
|
45
|
+
isEntityDirty: boolean;
|
|
35
46
|
/**
|
|
36
47
|
* Whether or not the entity is valid.
|
|
37
48
|
*/
|
|
@@ -44,7 +55,7 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
44
55
|
* What to display inside the tooltip.
|
|
45
56
|
*/
|
|
46
57
|
tooltipContent: string;
|
|
47
|
-
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);
|
|
48
59
|
ngOnInit(): void;
|
|
49
60
|
/**
|
|
50
61
|
* Checks if the entity is valid.
|
|
@@ -54,12 +65,13 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
54
65
|
* Tries add the new entity and close the dialog afterwards.
|
|
55
66
|
* Also handles the confirmation if required.
|
|
56
67
|
*/
|
|
57
|
-
create(): void
|
|
68
|
+
create(): Promise<void>;
|
|
58
69
|
private confirmCreate;
|
|
59
70
|
/**
|
|
60
71
|
* Closes the dialog.
|
|
61
72
|
*/
|
|
62
|
-
cancel(): void
|
|
73
|
+
cancel(): Promise<void>;
|
|
74
|
+
private confirmCancel;
|
|
63
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityCreateDialogComponent<any>, never>;
|
|
64
|
-
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>;
|
|
65
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, OnInit } from '@angular/core';
|
|
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
|
|
@@ -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
|
*/
|
|
@@ -133,5 +137,5 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
|
|
|
133
137
|
*/
|
|
134
138
|
applyFilter(event: Event): void;
|
|
135
139
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityTableComponent<any>, never>;
|
|
136
|
-
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>;
|
|
137
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
|
*/
|