ngx-material-entity 0.1.5 → 1.0.6
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/README.md +416 -39
- package/capsulation/reflect.utilities.d.ts +1 -1
- package/classes/date.utilities.d.ts +3 -3
- package/classes/entity.model.d.ts +2 -1
- package/classes/entity.utilities.d.ts +35 -4
- package/components/input/array/array-date-input/array-date-input.component.d.ts +5 -16
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +5 -15
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +5 -15
- package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +5 -13
- package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +5 -14
- package/components/input/array/array-table.class.d.ts +13 -13
- package/components/input/base-input.component.d.ts +57 -0
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +5 -12
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +5 -13
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +5 -12
- package/components/input/custom/custom.component.d.ts +13 -0
- package/components/input/date/date-input/date-input.component.d.ts +5 -15
- package/components/input/date/date-range-input/date-range-input.component.d.ts +6 -14
- package/components/input/date/date-time-input/date-time-input.component.d.ts +6 -14
- package/components/input/file/file-default-input/file-default-input.component.d.ts +5 -13
- package/components/input/file/file-image-input/file-image-input.component.d.ts +5 -13
- package/components/input/file/file-input/file-input.component.d.ts +2 -1
- package/components/input/input.component.d.ts +18 -6
- package/components/input/input.module.d.ts +38 -33
- package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +5 -13
- package/components/input/number/number-input/number-input.component.d.ts +5 -13
- package/components/input/number/number-slider-input/number-slider-input.component.d.ts +9 -0
- package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +6 -13
- package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +5 -13
- package/components/input/string/string-input/string-input.component.d.ts +5 -13
- package/components/input/string/string-password-input/string-password-input.component.d.ts +15 -0
- package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +5 -13
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +2 -2
- package/components/table/create-dialog/create-entity-dialog.module.d.ts +2 -1
- package/components/table/edit-dialog/edit-entity-dialog-data.d.ts +4 -0
- package/components/table/edit-dialog/edit-entity-dialog.builder.d.ts +2 -1
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +3 -2
- package/components/table/edit-dialog/edit-entity-dialog.module.d.ts +3 -2
- package/components/table/table-data.builder.d.ts +4 -3
- package/components/table/table-data.d.ts +12 -4
- package/decorators/base/base-property.decorator.d.ts +1 -1
- package/decorators/base/decorator-types.enum.d.ts +8 -4
- package/decorators/base/property-decorator-internal.data.d.ts +2 -0
- package/decorators/base/property-decorator.data.d.ts +15 -0
- package/decorators/custom/custom-decorator-internal.data.d.ts +17 -0
- package/decorators/custom/custom-decorator.data.d.ts +37 -0
- package/decorators/custom/custom.decorator.d.ts +11 -0
- package/decorators/number/number-decorator-internal.data.d.ts +20 -1
- package/decorators/number/number-decorator.data.d.ts +27 -1
- package/decorators/number/number.decorator.d.ts +2 -2
- package/decorators/string/string-decorator-internal.data.d.ts +14 -1
- package/decorators/string/string-decorator.data.d.ts +37 -1
- package/decorators/string/string.decorator.d.ts +2 -2
- package/esm2020/capsulation/reflect.utilities.mjs +1 -1
- package/esm2020/classes/date.utilities.mjs +3 -3
- package/esm2020/classes/entity.model.mjs +5 -1
- package/esm2020/classes/entity.utilities.mjs +107 -20
- package/esm2020/classes/file.utilities.mjs +3 -2
- package/esm2020/components/confirm-dialog/confirm-dialog.component.mjs +2 -2
- package/esm2020/components/input/array/array-date-input/array-date-input.component.mjs +16 -34
- package/esm2020/components/input/array/array-date-range-input/array-date-range-input.component.mjs +17 -35
- package/esm2020/components/input/array/array-date-time-input/array-date-time-input.component.mjs +19 -34
- package/esm2020/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +16 -44
- package/esm2020/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +15 -46
- package/esm2020/components/input/array/array-table.class.mjs +27 -15
- package/esm2020/components/input/base-input.component.mjs +65 -0
- package/esm2020/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +10 -27
- package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +8 -26
- package/esm2020/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +10 -27
- package/esm2020/components/input/custom/custom.component.mjs +26 -0
- package/esm2020/components/input/date/date-input/date-input.component.mjs +9 -25
- package/esm2020/components/input/date/date-range-input/date-range-input.component.mjs +13 -25
- package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +20 -31
- package/esm2020/components/input/file/file-default-input/file-default-input.component.mjs +10 -26
- package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +27 -38
- package/esm2020/components/input/file/file-input/file-input.component.mjs +7 -5
- package/esm2020/components/input/input.component.mjs +50 -38
- package/esm2020/components/input/input.module.mjs +21 -4
- package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +8 -26
- package/esm2020/components/input/number/number-input/number-input.component.mjs +8 -26
- package/esm2020/components/input/number/number-slider-input/number-slider-input.component.mjs +17 -0
- package/esm2020/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +11 -28
- package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +8 -26
- package/esm2020/components/input/string/string-input/string-input.component.mjs +8 -26
- package/esm2020/components/input/string/string-password-input/string-password-input.component.mjs +36 -0
- package/esm2020/components/input/string/string-textbox-input/string-textbox-input.component.mjs +8 -26
- package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +9 -8
- package/esm2020/components/table/create-dialog/create-entity-dialog.module.mjs +8 -4
- package/esm2020/components/table/edit-dialog/edit-entity-dialog-data.mjs +1 -1
- package/esm2020/components/table/edit-dialog/edit-entity-dialog.builder.mjs +4 -3
- package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +10 -8
- package/esm2020/components/table/edit-dialog/edit-entity-dialog.module.mjs +5 -1
- package/esm2020/components/table/table-data.builder.mjs +13 -10
- package/esm2020/components/table/table-data.mjs +1 -1
- package/esm2020/components/table/table.component.mjs +16 -14
- package/esm2020/decorators/base/base-property.decorator.mjs +1 -1
- package/esm2020/decorators/base/decorator-types.enum.mjs +4 -1
- package/esm2020/decorators/base/property-decorator-internal.data.mjs +6 -1
- package/esm2020/decorators/base/property-decorator.data.mjs +1 -1
- package/esm2020/decorators/custom/custom-decorator-internal.data.mjs +26 -0
- package/esm2020/decorators/custom/custom-decorator.data.mjs +2 -0
- package/esm2020/decorators/custom/custom.decorator.mjs +13 -0
- package/esm2020/decorators/number/number-decorator-internal.data.mjs +24 -1
- package/esm2020/decorators/number/number-decorator.data.mjs +1 -1
- package/esm2020/decorators/number/number.decorator.mjs +9 -7
- package/esm2020/decorators/string/string-decorator-internal.data.mjs +16 -1
- package/esm2020/decorators/string/string-decorator.data.mjs +1 -1
- package/esm2020/decorators/string/string.decorator.mjs +13 -13
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/ngx-material-entity.mjs +663 -628
- package/fesm2015/ngx-material-entity.mjs.map +1 -1
- package/fesm2020/ngx-material-entity.mjs +768 -740
- package/fesm2020/ngx-material-entity.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NgModel } from '@angular/forms';
|
|
3
|
-
import { ImageFileDecoratorConfigInternal } from '../../../../decorators/file/file-decorator-internal.data';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
4
2
|
import { FileUtilities } from '../../../../classes/file.utilities';
|
|
3
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
5
4
|
import { FileData } from '../../../../decorators/file/file-decorator.data';
|
|
6
5
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class FileImageInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
8
|
+
export declare class FileImageInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_IMAGE, FileData | FileData[]> implements OnInit {
|
|
9
9
|
FileUtilities: typeof FileUtilities;
|
|
10
|
-
entity: EntityType;
|
|
11
|
-
key: keyof EntityType;
|
|
12
|
-
getValidationErrorMessage: (model: NgModel) => string;
|
|
13
|
-
inputChangeEvent: EventEmitter<void>;
|
|
14
|
-
metadata: ImageFileDecoratorConfigInternal;
|
|
15
10
|
singlePreviewImage?: string;
|
|
16
11
|
multiPreviewImages?: string[];
|
|
17
12
|
imageIndex: number;
|
|
18
13
|
placeHolder: string;
|
|
19
|
-
constructor();
|
|
20
|
-
ngOnInit(): Promise<void>;
|
|
21
14
|
private setSinglePreviewImage;
|
|
22
15
|
private setMultiPreviewImages;
|
|
23
16
|
refreshFileData(fileData?: FileData | FileData[]): Promise<void>;
|
|
24
17
|
prev(): Promise<void>;
|
|
25
18
|
next(): Promise<void>;
|
|
26
19
|
setIndex(index: number): Promise<void>;
|
|
27
|
-
emitChange(): void;
|
|
28
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileImageInputComponent<any>, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileImageInputComponent<any>, "file-image-input", never, {
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileImageInputComponent<any>, "file-image-input", never, {}, {}, never, never>;
|
|
30
22
|
}
|
|
@@ -15,6 +15,7 @@ export declare class FileInputComponent<EntityType extends BaseEntityType<Entity
|
|
|
15
15
|
entity: EntityType;
|
|
16
16
|
key: keyof EntityType;
|
|
17
17
|
getValidationErrorMessage: (model: NgModel) => string;
|
|
18
|
+
isReadOnly: boolean;
|
|
18
19
|
fileDataChangeEvent: EventEmitter<FileData | FileData[]>;
|
|
19
20
|
metadata: DefaultFileDecoratorConfigInternal;
|
|
20
21
|
constructor(dialog: MatDialog);
|
|
@@ -28,5 +29,5 @@ export declare class FileInputComponent<EntityType extends BaseEntityType<Entity
|
|
|
28
29
|
private setSingleFile;
|
|
29
30
|
removeFile(name: string): void;
|
|
30
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileInputComponent<any>, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent<any>, "file-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "fileDataChangeEvent": "fileDataChangeEvent"; }, never, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent<any>, "file-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; "isReadOnly": "isReadOnly"; }, { "fileDataChangeEvent": "fileDataChangeEvent"; }, never, never>;
|
|
32
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { NgModel } from '@angular/forms';
|
|
3
|
-
import {
|
|
3
|
+
import { EntityTab, EntityUtilities } from '../../classes/entity.utilities';
|
|
4
4
|
import { DecoratorTypes } from '../../decorators/base/decorator-types.enum';
|
|
5
5
|
import { EntityArrayDecoratorConfigInternal } from '../../decorators/array/array-decorator-internal.data';
|
|
6
6
|
import { DefaultObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';
|
|
@@ -42,13 +42,25 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
42
42
|
/**
|
|
43
43
|
* Whether to hide a value if it is omitted for creation.
|
|
44
44
|
* Is used internally for the object property.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
45
47
|
*/
|
|
46
48
|
hideOmitForCreate?: boolean;
|
|
47
49
|
/**
|
|
48
50
|
* Whether to hide a value if it is omitted for editing.
|
|
49
51
|
* Is used internally for the object property.
|
|
52
|
+
*
|
|
53
|
+
* @default false
|
|
50
54
|
*/
|
|
51
55
|
hideOmitForEdit?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether or not the input should be readonly.
|
|
58
|
+
* In that case it is disabled, but most of the default styling is overwritten.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
isReadOnly?: boolean;
|
|
63
|
+
internalIsReadOnly: boolean;
|
|
52
64
|
inputChangeEvent: EventEmitter<void>;
|
|
53
65
|
addArrayItemDialog: TemplateRef<unknown>;
|
|
54
66
|
addArrayItemDialogRef: MatDialogRef<unknown>;
|
|
@@ -56,19 +68,19 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
56
68
|
metadata: PropertyDecoratorConfigInternal;
|
|
57
69
|
metadataDefaultObject: DefaultObjectDecoratorConfigInternal<EntityType>;
|
|
58
70
|
objectProperty: EntityType;
|
|
59
|
-
|
|
71
|
+
objectPropertyTabs: EntityTab<EntityType>[];
|
|
60
72
|
metadataEntityArray: EntityArrayDecoratorConfigInternal<EntityType>;
|
|
61
73
|
entityArrayValues: EntityType[];
|
|
62
74
|
arrayItem: EntityType;
|
|
63
75
|
private arrayItemPriorChanges;
|
|
64
|
-
|
|
76
|
+
arrayItemInlineTabs: EntityTab<EntityType>[];
|
|
65
77
|
dataSource: MatTableDataSource<EntityType>;
|
|
66
78
|
selection: SelectionModel<EntityType>;
|
|
67
79
|
displayedColumns: string[];
|
|
68
80
|
isArrayItemValid: boolean;
|
|
69
81
|
dialogInputData: AddArrayItemDialogData<EntityType>;
|
|
70
82
|
dialogData: AddArrayItemDialogDataInternal<EntityType>;
|
|
71
|
-
|
|
83
|
+
arrayItemDialogTabs: EntityTab<EntityType>[];
|
|
72
84
|
isDialogArrayItemValid: boolean;
|
|
73
85
|
readonly DecoratorTypes: typeof DecoratorTypes;
|
|
74
86
|
EntityUtilities: typeof EntityUtilities;
|
|
@@ -101,7 +113,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
101
113
|
* Does this either inline if the "createInline"-metadata is set to true
|
|
102
114
|
* or in a separate dialog if it is set to false.
|
|
103
115
|
*/
|
|
104
|
-
addEntity(): void
|
|
116
|
+
addEntity(): Promise<void>;
|
|
105
117
|
/**
|
|
106
118
|
* Adds the array item defined in the dialog.
|
|
107
119
|
*/
|
|
@@ -135,5 +147,5 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
|
|
|
135
147
|
*/
|
|
136
148
|
isAllSelected(selection: SelectionModel<any>, dataSource: MatTableDataSource<any>): boolean;
|
|
137
149
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputComponent<any>, never>;
|
|
138
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInputComponent<any>, "ngx-mat-entity-input", never, { "entity": "entity"; "propertyKey": "propertyKey"; "getValidationErrorMessage": "getValidationErrorMessage"; "hideOmitForCreate": "hideOmitForCreate"; "hideOmitForEdit": "hideOmitForEdit"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
150
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInputComponent<any>, "ngx-mat-entity-input", never, { "entity": "entity"; "propertyKey": "propertyKey"; "getValidationErrorMessage": "getValidationErrorMessage"; "hideOmitForCreate": "hideOmitForCreate"; "hideOmitForEdit": "hideOmitForEdit"; "isReadOnly": "isReadOnly"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
139
151
|
}
|
|
@@ -3,40 +3,45 @@ import * as i1 from "./string/string-input/string-input.component";
|
|
|
3
3
|
import * as i2 from "./string/string-textbox-input/string-textbox-input.component";
|
|
4
4
|
import * as i3 from "./string/string-autocomplete-input/string-autocomplete-input.component";
|
|
5
5
|
import * as i4 from "./string/string-dropdown-input/string-dropdown-input.component";
|
|
6
|
-
import * as i5 from "./
|
|
7
|
-
import * as i6 from "./boolean/boolean-
|
|
8
|
-
import * as i7 from "./boolean/boolean-
|
|
9
|
-
import * as i8 from "./
|
|
10
|
-
import * as i9 from "./number/number-
|
|
11
|
-
import * as i10 from "./
|
|
12
|
-
import * as i11 from "./
|
|
13
|
-
import * as i12 from "./
|
|
14
|
-
import * as i13 from "./
|
|
15
|
-
import * as i14 from "./date/date-
|
|
16
|
-
import * as i15 from "./
|
|
17
|
-
import * as i16 from "./
|
|
18
|
-
import * as i17 from "./array/array-date-
|
|
19
|
-
import * as i18 from "./
|
|
20
|
-
import * as i19 from "./
|
|
21
|
-
import * as i20 from "./file/file-
|
|
22
|
-
import * as i21 from "./file/file-input/
|
|
23
|
-
import * as i22 from "./input.component";
|
|
24
|
-
import * as i23 from "
|
|
25
|
-
import * as i24 from "
|
|
26
|
-
import * as i25 from "
|
|
27
|
-
import * as i26 from "@angular/
|
|
28
|
-
import * as i27 from "@angular/material/
|
|
29
|
-
import * as i28 from "@angular/
|
|
30
|
-
import * as i29 from "@angular/material/
|
|
31
|
-
import * as i30 from "@angular/material/
|
|
32
|
-
import * as i31 from "@angular/material/
|
|
33
|
-
import * as i32 from "@angular/material/
|
|
34
|
-
import * as i33 from "@angular/material/
|
|
35
|
-
import * as i34 from "@angular/material/
|
|
36
|
-
import * as i35 from "@angular/material/
|
|
37
|
-
import * as i36 from "@angular/material/
|
|
6
|
+
import * as i5 from "./string/string-password-input/string-password-input.component";
|
|
7
|
+
import * as i6 from "./boolean/boolean-checkbox-input/boolean-checkbox-input.component";
|
|
8
|
+
import * as i7 from "./boolean/boolean-toggle-input/boolean-toggle-input.component";
|
|
9
|
+
import * as i8 from "./boolean/boolean-dropdown-input/boolean-dropdown-input.component";
|
|
10
|
+
import * as i9 from "./number/number-input/number-input.component";
|
|
11
|
+
import * as i10 from "./number/number-dropdown-input/number-dropdown-input.component";
|
|
12
|
+
import * as i11 from "./number/number-slider-input/number-slider-input.component";
|
|
13
|
+
import * as i12 from "./array/array-string-chips-input/array-string-chips-input.component";
|
|
14
|
+
import * as i13 from "./array/array-string-autocomplete-chips/array-string-autocomplete-chips.component";
|
|
15
|
+
import * as i14 from "./date/date-input/date-input.component";
|
|
16
|
+
import * as i15 from "./date/date-range-input/date-range-input.component";
|
|
17
|
+
import * as i16 from "./date/date-time-input/date-time-input.component";
|
|
18
|
+
import * as i17 from "./array/array-date-input/array-date-input.component";
|
|
19
|
+
import * as i18 from "./array/array-date-time-input/array-date-time-input.component";
|
|
20
|
+
import * as i19 from "./array/array-date-range-input/array-date-range-input.component";
|
|
21
|
+
import * as i20 from "./file/file-input/file-input.component";
|
|
22
|
+
import * as i21 from "./file/file-image-input/file-image-input.component";
|
|
23
|
+
import * as i22 from "./file/file-default-input/file-default-input.component";
|
|
24
|
+
import * as i23 from "./file/file-input/dragDrop.directive";
|
|
25
|
+
import * as i24 from "./custom/custom.component";
|
|
26
|
+
import * as i25 from "./input.component";
|
|
27
|
+
import * as i26 from "@angular/common";
|
|
28
|
+
import * as i27 from "@angular/material/input";
|
|
29
|
+
import * as i28 from "@angular/forms";
|
|
30
|
+
import * as i29 from "@angular/material/form-field";
|
|
31
|
+
import * as i30 from "@angular/material/select";
|
|
32
|
+
import * as i31 from "@angular/material/autocomplete";
|
|
33
|
+
import * as i32 from "@angular/material/checkbox";
|
|
34
|
+
import * as i33 from "@angular/material/slide-toggle";
|
|
35
|
+
import * as i34 from "@angular/material/chips";
|
|
36
|
+
import * as i35 from "@angular/material/icon";
|
|
37
|
+
import * as i36 from "@angular/material/table";
|
|
38
|
+
import * as i37 from "@angular/material/dialog";
|
|
39
|
+
import * as i38 from "@angular/material/button";
|
|
40
|
+
import * as i39 from "@angular/material/datepicker";
|
|
41
|
+
import * as i40 from "@angular/material/slider";
|
|
42
|
+
import * as i41 from "@angular/material/tabs";
|
|
38
43
|
export declare class NgxMatEntityInputModule {
|
|
39
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputModule, never>;
|
|
40
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.StringInputComponent, typeof i2.StringTextboxInputComponent, typeof i3.StringAutocompleteInputComponent, typeof i4.StringDropdownInputComponent, typeof i5.
|
|
45
|
+
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.CustomInputComponent, typeof i25.NgxMatEntityInputComponent], [typeof i26.CommonModule, typeof i27.MatInputModule, typeof i28.FormsModule, typeof i29.MatFormFieldModule, typeof i30.MatSelectModule, typeof i31.MatAutocompleteModule, typeof i32.MatCheckboxModule, typeof i33.MatSlideToggleModule, typeof i34.MatChipsModule, typeof i35.MatIconModule, typeof i36.MatTableModule, typeof i37.MatDialogModule, typeof i38.MatButtonModule, typeof i39.MatDatepickerModule, typeof i40.MatSliderModule, typeof i41.MatTabsModule], [typeof i25.NgxMatEntityInputComponent]>;
|
|
41
46
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInputModule>;
|
|
42
47
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { NgModel } from '@angular/forms';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class NumberDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
-
entity: EntityType;
|
|
8
|
-
key: keyof EntityType;
|
|
9
|
-
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
-
inputChangeEvent: EventEmitter<void>;
|
|
11
|
-
metadata: DropdownNumberDecoratorConfigInternal;
|
|
12
|
-
constructor();
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
emitChange(): void;
|
|
6
|
+
export declare class NumberDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER_DROPDOWN, number> implements OnInit {
|
|
15
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberDropdownInputComponent<any>, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NumberDropdownInputComponent<any>, "number-dropdown-input", never, {
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NumberDropdownInputComponent<any>, "number-dropdown-input", never, {}, {}, never, never>;
|
|
17
9
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { NgModel } from '@angular/forms';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class NumberInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
-
entity: EntityType;
|
|
8
|
-
key: keyof EntityType;
|
|
9
|
-
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
-
inputChangeEvent: EventEmitter<void>;
|
|
11
|
-
metadata: DefaultNumberDecoratorConfigInternal;
|
|
12
|
-
constructor();
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
emitChange(): void;
|
|
6
|
+
export declare class NumberInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER, number> implements OnInit {
|
|
15
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberInputComponent<any>, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NumberInputComponent<any>, "number-input", never, {
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NumberInputComponent<any>, "number-input", never, {}, {}, never, never>;
|
|
17
9
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NumberSliderInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER_SLIDER, number> implements OnInit {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NumberSliderInputComponent<any>, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NumberSliderInputComponent<any>, "number-slider-input", never, {}, {}, never, never>;
|
|
9
|
+
}
|
package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AutocompleteStringDecoratorConfigInternal } from '../../../../decorators/string/string-decorator-internal.data';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringAutocompleteInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
-
entity: EntityType;
|
|
8
|
-
key: keyof EntityType;
|
|
9
|
-
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
-
inputChangeEvent: EventEmitter<void>;
|
|
11
|
-
metadata: AutocompleteStringDecoratorConfigInternal;
|
|
6
|
+
export declare class StringAutocompleteInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_AUTOCOMPLETE, string> implements OnInit {
|
|
12
7
|
autocompleteStrings: string[];
|
|
13
8
|
filteredAutocompleteStrings: string[];
|
|
14
|
-
constructor();
|
|
15
9
|
ngOnInit(): void;
|
|
16
10
|
/**
|
|
17
11
|
* Dynamically filters the Autocomplete options when the user inputs something.
|
|
18
12
|
*
|
|
19
13
|
* @param input - The input of the user.
|
|
20
14
|
*/
|
|
21
|
-
filterAutocompleteStrings(input
|
|
22
|
-
emitChange(): void;
|
|
15
|
+
filterAutocompleteStrings(input?: string): void;
|
|
23
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringAutocompleteInputComponent<any>, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StringAutocompleteInputComponent<any>, "string-autocomplete-input", never, {
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StringAutocompleteInputComponent<any>, "string-autocomplete-input", never, {}, {}, never, never>;
|
|
25
18
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { NgModel } from '@angular/forms';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
-
entity: EntityType;
|
|
8
|
-
key: keyof EntityType;
|
|
9
|
-
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
-
inputChangeEvent: EventEmitter<void>;
|
|
11
|
-
metadata: DropdownStringDecoratorConfigInternal;
|
|
12
|
-
constructor();
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
emitChange(): void;
|
|
6
|
+
export declare class StringDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_DROPDOWN, string> implements OnInit {
|
|
15
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringDropdownInputComponent<any>, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StringDropdownInputComponent<any>, "string-dropdown-input", never, {
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StringDropdownInputComponent<any>, "string-dropdown-input", never, {}, {}, never, never>;
|
|
17
9
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { NgModel } from '@angular/forms';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
-
entity: EntityType;
|
|
8
|
-
key: keyof EntityType;
|
|
9
|
-
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
-
inputChangeEvent: EventEmitter<void>;
|
|
11
|
-
metadata: DefaultStringDecoratorConfigInternal;
|
|
12
|
-
constructor();
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
emitChange(): void;
|
|
6
|
+
export declare class StringInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING, string> implements OnInit {
|
|
15
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringInputComponent<any>, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StringInputComponent<any>, "string-input", never, {
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StringInputComponent<any>, "string-input", never, {}, {}, never, never>;
|
|
17
9
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class StringPasswordInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_PASSWORD, string> implements OnInit {
|
|
7
|
+
hide: boolean;
|
|
8
|
+
hideConfirm: boolean;
|
|
9
|
+
confirmRequired: boolean;
|
|
10
|
+
confirmPassword?: string;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
passwordInput(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StringPasswordInputComponent<any>, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StringPasswordInputComponent<any>, "string-password-input", never, {}, {}, never, never>;
|
|
15
|
+
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { TextboxStringDecoratorConfigInternal } from '../../../../decorators/string/string-decorator-internal.data';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringTextboxInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
-
entity: EntityType;
|
|
8
|
-
key: keyof EntityType;
|
|
9
|
-
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
-
inputChangeEvent: EventEmitter<void>;
|
|
11
|
-
metadata: TextboxStringDecoratorConfigInternal;
|
|
12
|
-
constructor();
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
emitChange(): void;
|
|
6
|
+
export declare class StringTextboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_TEXTBOX, string> implements OnInit {
|
|
15
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringTextboxInputComponent<any>, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StringTextboxInputComponent<any>, "string-textbox-input", never, {
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StringTextboxInputComponent<any>, "string-textbox-input", never, {}, {}, never, never>;
|
|
17
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { EntityService } from '../../../classes/entity.service';
|
|
4
|
-
import {
|
|
4
|
+
import { EntityTab, EntityUtilities } from '../../../classes/entity.utilities';
|
|
5
5
|
import { CreateEntityDialogDataInternal } from './create-entity-dialog-data.builder';
|
|
6
6
|
import { CreateEntityDialogData } from './create-entity-dialog-data';
|
|
7
7
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
@@ -18,7 +18,7 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
|
|
|
18
18
|
private readonly injector;
|
|
19
19
|
private readonly dialog;
|
|
20
20
|
EntityUtilities: typeof EntityUtilities;
|
|
21
|
-
|
|
21
|
+
entityTabs: EntityTab<EntityType>[];
|
|
22
22
|
entityService: EntityService<EntityType>;
|
|
23
23
|
data: CreateEntityDialogDataInternal<EntityType>;
|
|
24
24
|
isEntityValid: boolean;
|
|
@@ -5,8 +5,9 @@ import * as i3 from "../../input/input.module";
|
|
|
5
5
|
import * as i4 from "@angular/material/dialog";
|
|
6
6
|
import * as i5 from "@angular/forms";
|
|
7
7
|
import * as i6 from "@angular/material/button";
|
|
8
|
+
import * as i7 from "@angular/material/tabs";
|
|
8
9
|
export declare class NgxMatEntityCreateDialogModule {
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityCreateDialogModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityCreateDialogModule, [typeof i1.NgxMatEntityCreateDialogComponent], [typeof i2.CommonModule, typeof i3.NgxMatEntityInputModule, typeof i4.MatDialogModule, typeof i5.FormsModule, typeof i6.MatButtonModule], [typeof i1.NgxMatEntityCreateDialogComponent]>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityCreateDialogModule, [typeof i1.NgxMatEntityCreateDialogComponent], [typeof i2.CommonModule, typeof i3.NgxMatEntityInputModule, typeof i4.MatDialogModule, typeof i5.FormsModule, typeof i6.MatButtonModule, typeof i7.MatTabsModule], [typeof i1.NgxMatEntityCreateDialogComponent]>;
|
|
11
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityCreateDialogModule>;
|
|
12
13
|
}
|
|
@@ -22,4 +22,8 @@ export interface EditEntityDialogData<EntityType extends BaseEntityType<EntityTy
|
|
|
22
22
|
* Whether or not the user can delete this specific entity.
|
|
23
23
|
*/
|
|
24
24
|
allowDelete?: (entity: EntityType) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not the user can update this specific entity.
|
|
27
|
+
*/
|
|
28
|
+
allowUpdate?: (entity: EntityType) => boolean;
|
|
25
29
|
}
|
|
@@ -11,8 +11,9 @@ export declare class EditEntityDialogDataInternal<EntityType extends BaseEntityT
|
|
|
11
11
|
entity: EntityType;
|
|
12
12
|
EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>;
|
|
13
13
|
editDialogData: EditDialogDataInternal<EntityType>;
|
|
14
|
+
allowUpdate: (entity: EntityType) => boolean;
|
|
14
15
|
allowDelete: (entity: EntityType) => boolean;
|
|
15
|
-
constructor(entity: EntityType, EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>, editDialogData: EditDialogDataInternal<EntityType>, allowDelete: (entity: EntityType) => boolean);
|
|
16
|
+
constructor(entity: EntityType, EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>, editDialogData: EditDialogDataInternal<EntityType>, allowUpdate: (entity: EntityType) => boolean, allowDelete: (entity: EntityType) => boolean);
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* The Builder for the EditEntityDialogData. Sets default values.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { EntityService } from '../../../classes/entity.service';
|
|
4
|
-
import {
|
|
4
|
+
import { EntityTab, EntityUtilities } from '../../../classes/entity.utilities';
|
|
5
5
|
import { EditEntityDialogData } from './edit-entity-dialog-data';
|
|
6
6
|
import { EditEntityDialogDataInternal } from './edit-entity-dialog.builder';
|
|
7
7
|
import { BaseEntityType } from '../../../classes/entity.model';
|
|
@@ -18,12 +18,13 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
18
18
|
private readonly injector;
|
|
19
19
|
private readonly dialog;
|
|
20
20
|
EntityUtilities: typeof EntityUtilities;
|
|
21
|
-
|
|
21
|
+
entityTabs: EntityTab<EntityType>[];
|
|
22
22
|
entityService: EntityService<EntityType>;
|
|
23
23
|
entityPriorChanges: EntityType;
|
|
24
24
|
data: EditEntityDialogDataInternal<EntityType>;
|
|
25
25
|
isEntityValid: boolean;
|
|
26
26
|
isEntityDirty: Promise<boolean>;
|
|
27
|
+
isReadOnly: boolean;
|
|
27
28
|
constructor(inputData: EditEntityDialogData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>, injector: Injector, dialog: MatDialog);
|
|
28
29
|
ngOnInit(): void;
|
|
29
30
|
checkEntity(): void;
|
|
@@ -5,9 +5,10 @@ import * as i3 from "../../input/input.module";
|
|
|
5
5
|
import * as i4 from "@angular/material/dialog";
|
|
6
6
|
import * as i5 from "@angular/forms";
|
|
7
7
|
import * as i6 from "@angular/material/button";
|
|
8
|
-
import * as i7 from "
|
|
8
|
+
import * as i7 from "@angular/material/tabs";
|
|
9
|
+
import * as i8 from "../../confirm-dialog/confirm-dialog.module";
|
|
9
10
|
export declare class NgxMatEntityEditDialogModule {
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityEditDialogModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityEditDialogModule, [typeof i1.NgxMatEntityEditDialogComponent], [typeof i2.CommonModule, typeof i3.NgxMatEntityInputModule, typeof i4.MatDialogModule, typeof i5.FormsModule, typeof i6.MatButtonModule, typeof i7.NgxMatEntityConfirmDialogModule], [typeof i1.NgxMatEntityEditDialogComponent]>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityEditDialogModule, [typeof i1.NgxMatEntityEditDialogComponent], [typeof i2.CommonModule, typeof i3.NgxMatEntityInputModule, typeof i4.MatDialogModule, typeof i5.FormsModule, typeof i6.MatButtonModule, typeof i7.MatTabsModule, typeof i8.NgxMatEntityConfirmDialogModule], [typeof i1.NgxMatEntityEditDialogComponent]>;
|
|
12
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityEditDialogModule>;
|
|
13
14
|
}
|
|
@@ -31,15 +31,16 @@ export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityTy
|
|
|
31
31
|
searchLabel: string;
|
|
32
32
|
createButtonLabel: string;
|
|
33
33
|
searchString: (entity: EntityType) => string;
|
|
34
|
-
allowCreate: boolean;
|
|
35
|
-
|
|
34
|
+
allowCreate: () => boolean;
|
|
35
|
+
allowRead: (entity: EntityType) => boolean;
|
|
36
|
+
allowUpdate: (entity: EntityType) => boolean;
|
|
36
37
|
allowDelete: (entity: EntityType) => boolean;
|
|
37
38
|
multiSelectActions: MultiSelectAction<EntityType>[];
|
|
38
39
|
multiSelectLabel: string;
|
|
39
40
|
EntityClass?: EntityClassNewable<EntityType>;
|
|
40
41
|
edit?: (entity: EntityType) => unknown;
|
|
41
42
|
create?: (entity: EntityType) => unknown;
|
|
42
|
-
constructor(title: string, displayColumns: DisplayColumn<EntityType>[], EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>, searchLabel: string, createButtonLabel: string, searchString: (entity: EntityType) => string, allowCreate: boolean,
|
|
43
|
+
constructor(title: string, displayColumns: DisplayColumn<EntityType>[], EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>, searchLabel: string, createButtonLabel: string, searchString: (entity: EntityType) => string, allowCreate: () => boolean, allowRead: (entity: EntityType) => boolean, allowUpdate: (entity: EntityType) => boolean, allowDelete: (entity: EntityType) => boolean, multiSelectActions: MultiSelectAction<EntityType>[], multiSelectLabel: string, EntityClass?: EntityClassNewable<EntityType>, edit?: (entity: EntityType) => unknown, create?: (entity: EntityType) => unknown);
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
46
|
* The Builder for the complete TableData. Sets default values and validates user input.
|
|
@@ -93,17 +93,25 @@ export interface BaseData<EntityType extends BaseEntityType<EntityType>> {
|
|
|
93
93
|
/**
|
|
94
94
|
* Defines whether or not the user can add new entities.
|
|
95
95
|
*
|
|
96
|
-
* @default true
|
|
96
|
+
* @default () => true
|
|
97
|
+
*/
|
|
98
|
+
allowCreate?: () => boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Defines whether or not the user can view the specific entity.
|
|
101
|
+
*
|
|
102
|
+
* @default () => true
|
|
97
103
|
*/
|
|
98
|
-
|
|
104
|
+
allowRead?: (entity: EntityType) => boolean;
|
|
99
105
|
/**
|
|
100
|
-
* Defines whether or not the user can edit
|
|
106
|
+
* Defines whether or not the user can edit the specific entity.
|
|
101
107
|
*
|
|
102
108
|
* @default () => true
|
|
103
109
|
*/
|
|
104
|
-
|
|
110
|
+
allowUpdate?: (entity: EntityType) => boolean;
|
|
105
111
|
/**
|
|
106
112
|
* Whether or not the user can delete this specific entity.
|
|
113
|
+
*
|
|
114
|
+
* @default () => true
|
|
107
115
|
*/
|
|
108
116
|
allowDelete?: (entity: EntityType) => boolean;
|
|
109
117
|
/**
|
|
@@ -6,4 +6,4 @@ import { DecoratorType, DecoratorTypes } from './decorator-types.enum';
|
|
|
6
6
|
* @param type - The type of metadata.
|
|
7
7
|
* @returns The method that sets the metadata.
|
|
8
8
|
*/
|
|
9
|
-
export declare function baseProperty<T extends DecoratorTypes
|
|
9
|
+
export declare function baseProperty<T extends DecoratorTypes, CustomMetadataType extends Record<string, unknown>>(metadata: DecoratorType<T, CustomMetadataType>, type: T): (target: object, propertyKey: string) => void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AutocompleteStringChipsArrayDecoratorConfigInternal, EntityArrayDecoratorConfigInternal, DateArrayDecoratorConfigInternal, StringChipsArrayDecoratorConfigInternal, DateTimeArrayDecoratorConfigInternal, DateRangeArrayDecoratorConfigInternal } from '../array/array-decorator-internal.data';
|
|
2
2
|
import { CheckboxBooleanDecoratorConfigInternal, DropdownBooleanDecoratorConfigInternal, ToggleBooleanDecoratorConfigInternal } from '../boolean/boolean-decorator-internal.data';
|
|
3
|
+
import { CustomDecoratorConfigInternal } from '../custom/custom-decorator-internal.data';
|
|
3
4
|
import { DateRangeDateDecoratorConfigInternal, DateTimeDateDecoratorConfigInternal, DefaultDateDecoratorConfigInternal } from '../date/date-decorator-internal.data';
|
|
4
5
|
import { DefaultFileDecoratorConfigInternal, ImageFileDecoratorConfigInternal } from '../file/file-decorator-internal.data';
|
|
5
|
-
import { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal } from '../number/number-decorator-internal.data';
|
|
6
|
+
import { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal, SliderNumberDecoratorConfigInternal } from '../number/number-decorator-internal.data';
|
|
6
7
|
import { DefaultObjectDecoratorConfigInternal } from '../object/object-decorator-internal.data';
|
|
7
|
-
import { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../string/string-decorator-internal.data';
|
|
8
|
+
import { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, PasswordStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../string/string-decorator-internal.data';
|
|
8
9
|
/**
|
|
9
10
|
* The enum Values for all the different DecoratorTypes.
|
|
10
11
|
*/
|
|
@@ -13,8 +14,10 @@ export declare enum DecoratorTypes {
|
|
|
13
14
|
STRING_DROPDOWN = "stringDropdown",
|
|
14
15
|
STRING_AUTOCOMPLETE = "stringAutocomplete",
|
|
15
16
|
STRING_TEXTBOX = "stringTextbox",
|
|
17
|
+
STRING_PASSWORD = "stringPassword",
|
|
16
18
|
NUMBER = "number",
|
|
17
19
|
NUMBER_DROPDOWN = "numberDropdown",
|
|
20
|
+
NUMBER_SLIDER = "numberSlider",
|
|
18
21
|
BOOLEAN_CHECKBOX = "boolean",
|
|
19
22
|
BOOLEAN_TOGGLE = "booleanToggle",
|
|
20
23
|
BOOLEAN_DROPDOWN = "booleanDropdown",
|
|
@@ -29,9 +32,10 @@ export declare enum DecoratorTypes {
|
|
|
29
32
|
DATE_RANGE = "dateRange",
|
|
30
33
|
DATE_TIME = "dateTime",
|
|
31
34
|
FILE_DEFAULT = "fileDefault",
|
|
32
|
-
FILE_IMAGE = "fileImage"
|
|
35
|
+
FILE_IMAGE = "fileImage",
|
|
36
|
+
CUSTOM = "custom"
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
35
39
|
* Gives the metadata-config Type based on the DecoratorTypes enum.
|
|
36
40
|
*/
|
|
37
|
-
export declare type DecoratorType<T
|
|
41
|
+
export declare 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.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
|