ngx-material-entity 1.0.0 → 1.0.5
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 +11 -5
- package/capsulation/reflect.utilities.d.ts +1 -1
- package/classes/date.utilities.d.ts +3 -3
- package/classes/entity.model.d.ts +1 -1
- package/classes/entity.utilities.d.ts +2 -1
- package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +1 -2
- package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +1 -3
- package/components/input/array/array-table.class.d.ts +4 -5
- package/components/input/base-input.component.d.ts +29 -3
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +1 -1
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +1 -1
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +1 -1
- package/components/input/custom/custom.component.d.ts +3 -3
- package/components/input/date/date-input/date-input.component.d.ts +1 -3
- package/components/input/date/date-range-input/date-range-input.component.d.ts +2 -3
- package/components/input/date/date-time-input/date-time-input.component.d.ts +2 -3
- package/components/input/file/file-default-input/file-default-input.component.d.ts +1 -1
- package/components/input/file/file-image-input/file-image-input.component.d.ts +1 -1
- package/components/input/file/file-input/file-input.component.d.ts +2 -1
- package/components/input/input.component.d.ts +13 -1
- package/components/input/input.module.d.ts +37 -34
- package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +1 -1
- package/components/input/number/number-input/number-input.component.d.ts +1 -1
- package/components/input/number/number-slider-input/number-slider-input.component.d.ts +9 -0
- package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +2 -2
- package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +1 -1
- package/components/input/string/string-input/string-input.component.d.ts +1 -1
- package/components/input/string/string-password-input/string-password-input.component.d.ts +15 -0
- package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +1 -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 +1 -0
- package/components/table/table-data.builder.d.ts +4 -3
- package/components/table/table-data.d.ts +12 -4
- package/decorators/base/decorator-types.enum.d.ts +5 -3
- package/decorators/custom/custom-decorator.data.d.ts +4 -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 +1 -1
- package/esm2020/classes/entity.utilities.mjs +28 -6
- package/esm2020/classes/file.utilities.mjs +3 -2
- package/esm2020/components/input/array/array-date-input/array-date-input.component.mjs +6 -6
- package/esm2020/components/input/array/array-date-range-input/array-date-range-input.component.mjs +5 -5
- package/esm2020/components/input/array/array-date-time-input/array-date-time-input.component.mjs +6 -6
- package/esm2020/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +9 -25
- package/esm2020/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +9 -28
- package/esm2020/components/input/array/array-table.class.mjs +9 -12
- package/esm2020/components/input/base-input.component.mjs +28 -2
- package/esm2020/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +4 -6
- package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +3 -3
- package/esm2020/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +4 -6
- package/esm2020/components/input/custom/custom.component.mjs +2 -1
- package/esm2020/components/input/date/date-input/date-input.component.mjs +3 -4
- package/esm2020/components/input/date/date-range-input/date-range-input.component.mjs +6 -6
- package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +13 -13
- package/esm2020/components/input/file/file-default-input/file-default-input.component.mjs +4 -5
- package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +21 -16
- package/esm2020/components/input/file/file-input/file-input.component.mjs +7 -5
- package/esm2020/components/input/input.component.mjs +32 -27
- package/esm2020/components/input/input.module.mjs +14 -4
- package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +3 -3
- package/esm2020/components/input/number/number-input/number-input.component.mjs +3 -3
- 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 +5 -7
- package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +3 -3
- package/esm2020/components/input/string/string-input/string-input.component.mjs +3 -3
- 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 +3 -3
- package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +1 -1
- 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 +5 -4
- 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 +3 -1
- package/esm2020/decorators/custom/custom-decorator.data.mjs +1 -1
- 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/fesm2015/ngx-material-entity.mjs +330 -214
- package/fesm2015/ngx-material-entity.mjs.map +1 -1
- package/fesm2020/ngx-material-entity.mjs +314 -206
- package/fesm2020/ngx-material-entity.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1006,7 +1006,7 @@ The component needs to extend the NgxMatEntityBaseInputComponent:
|
|
|
1006
1006
|
styleUrls: ['./custom-input.component.scss']
|
|
1007
1007
|
})
|
|
1008
1008
|
export class CustomInputComponent
|
|
1009
|
-
extends NgxMatEntityBaseInputComponent<MyEntity, DecoratorTypes.CUSTOM, MyCustomMetadata>
|
|
1009
|
+
extends NgxMatEntityBaseInputComponent<MyEntity, DecoratorTypes.CUSTOM, string, MyCustomMetadata>
|
|
1010
1010
|
implements OnInit {
|
|
1011
1011
|
// Define your logic here.
|
|
1012
1012
|
// The base class already provides the entity and key values and handles getting the metadata.
|
|
@@ -1110,15 +1110,21 @@ export interface BaseData<EntityType extends object> {
|
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Defines whether or not the user can add new entities.
|
|
1112
1112
|
*
|
|
1113
|
-
* @default true
|
|
1113
|
+
* @default () => true
|
|
1114
|
+
*/
|
|
1115
|
+
allowCreate?: () => boolean,
|
|
1116
|
+
/**
|
|
1117
|
+
* Defines whether or not the user can view this specific entity.
|
|
1118
|
+
*
|
|
1119
|
+
* @default () => true
|
|
1114
1120
|
*/
|
|
1115
|
-
|
|
1121
|
+
allowRead?: (entity: EntityType) => boolean,
|
|
1116
1122
|
/**
|
|
1117
|
-
* Defines whether or not the user can edit
|
|
1123
|
+
* Defines whether or not the user can edit this specific entity.
|
|
1118
1124
|
*
|
|
1119
1125
|
* @default () => true
|
|
1120
1126
|
*/
|
|
1121
|
-
|
|
1127
|
+
allowUpdate?: (entity: EntityType) => boolean,
|
|
1122
1128
|
/**
|
|
1123
1129
|
* Whether or not the user can delete this specific entity.
|
|
1124
1130
|
*/
|
|
@@ -52,5 +52,5 @@ export declare abstract class ReflectUtilities {
|
|
|
52
52
|
* @param target - The target object on which to define metadata.
|
|
53
53
|
* @param propertyKey - The property key for the target.
|
|
54
54
|
*/
|
|
55
|
-
static defineMetadata<T extends object>(metadataKey: unknown, metadataValue: unknown, target: T, propertyKey:
|
|
55
|
+
static defineMetadata<T extends object>(metadataKey: unknown, metadataValue: unknown, target: T, propertyKey: keyof T): void;
|
|
56
56
|
}
|
|
@@ -37,7 +37,7 @@ export declare abstract class DateUtilities {
|
|
|
37
37
|
* @param value - The date to get the time object from.
|
|
38
38
|
* @returns The Time object build from the date value.
|
|
39
39
|
*/
|
|
40
|
-
static getTimeFromDate(value
|
|
40
|
+
static getTimeFromDate(value?: Date): Time | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* Gets the dates between the two given gates. Does additional filtering based on the provided DateRange metadata.
|
|
43
43
|
*
|
|
@@ -50,14 +50,14 @@ export declare abstract class DateUtilities {
|
|
|
50
50
|
/**
|
|
51
51
|
* Get all valid times for the dropdown of a datetime property.
|
|
52
52
|
*
|
|
53
|
-
* @param date - The date of the datetime.
|
|
54
53
|
* @param times - All given times to filter.
|
|
54
|
+
* @param date - The date of the datetime.
|
|
55
55
|
* @param min - The function that defines the minimum time.
|
|
56
56
|
* @param max - The function that defines the maximum time.
|
|
57
57
|
* @param filter - A filter function to do more specific time filtering. This could be e.g. The removal of lunch breaks.
|
|
58
58
|
* @returns All valid dropdown values for the datetime property.
|
|
59
59
|
*/
|
|
60
|
-
static getValidTimesForDropdown(
|
|
60
|
+
static getValidTimesForDropdown(times: DropdownValue<Time>[], date?: Date, min?: (date?: Date) => Time, max?: (date?: Date) => Time, filter?: ((time: Time) => boolean) | (() => boolean)): DropdownValue<Time>[];
|
|
61
61
|
/**
|
|
62
62
|
* Checks if the time object has processable hours and minutes properties.
|
|
63
63
|
* Doesn't check custom validators like min/max from the metadata configuration.
|
|
@@ -80,6 +80,7 @@ export declare abstract class EntityUtilities {
|
|
|
80
80
|
private static isBooleanValid;
|
|
81
81
|
private static isStringValid;
|
|
82
82
|
private static isTextboxValid;
|
|
83
|
+
private static isPasswordValid;
|
|
83
84
|
private static isNumberValid;
|
|
84
85
|
private static isDateValid;
|
|
85
86
|
private static isDateRangeValid;
|
|
@@ -92,7 +93,7 @@ export declare abstract class EntityUtilities {
|
|
|
92
93
|
* @param entityPriorChanges - The entity before the changes.
|
|
93
94
|
* @returns Whether or not the entity is dirty.
|
|
94
95
|
*/
|
|
95
|
-
static
|
|
96
|
+
static isDirty<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType): Promise<boolean>;
|
|
96
97
|
private static differencesForDirty;
|
|
97
98
|
/**
|
|
98
99
|
* Compares two Entities and returns their difference in an object.
|
|
@@ -5,8 +5,7 @@ import { BaseEntityType } from '../../../../classes/entity.model';
|
|
|
5
5
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
6
6
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class ArrayStringAutocompleteChipsComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS> implements OnInit {
|
|
9
|
-
stringChipsArrayValues?: string[];
|
|
8
|
+
export declare class ArrayStringAutocompleteChipsComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS, string[]> implements OnInit {
|
|
10
9
|
filteredAutocompleteStrings: string[];
|
|
11
10
|
chipsInput: string;
|
|
12
11
|
ngOnInit(): void;
|
package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts
CHANGED
|
@@ -5,10 +5,8 @@ import { MatChipInputEvent } from '@angular/material/chips';
|
|
|
5
5
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
6
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class ArrayStringChipsInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.ARRAY_STRING_CHIPS> implements OnInit {
|
|
9
|
-
stringChipsArrayValues?: string[];
|
|
8
|
+
export declare class ArrayStringChipsInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.ARRAY_STRING_CHIPS, string[]> implements OnInit {
|
|
10
9
|
chipsInput: string;
|
|
11
|
-
ngOnInit(): void;
|
|
12
10
|
/**
|
|
13
11
|
* Handles adding strings to the chipsArray.
|
|
14
12
|
* Checks validation and also creates a new array if it is undefined.
|
|
@@ -10,12 +10,11 @@ declare type ArrayTableType = DecoratorTypes.ARRAY | DecoratorTypes.ARRAY_DATE |
|
|
|
10
10
|
/**
|
|
11
11
|
* The base data needed for all arrays that are displayed as a table.
|
|
12
12
|
*/
|
|
13
|
-
export declare abstract class ArrayTableComponent<
|
|
13
|
+
export declare abstract class ArrayTableComponent<ValueType, EntityType extends BaseEntityType<EntityType>, ArrayType extends ArrayTableType> extends NgxMatEntityBaseInputComponent<EntityType, ArrayType, ValueType[]> implements OnInit {
|
|
14
14
|
private readonly matDialog;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
selection: SelectionModel<T>;
|
|
15
|
+
input?: ValueType;
|
|
16
|
+
dataSource: MatTableDataSource<ValueType>;
|
|
17
|
+
selection: SelectionModel<ValueType>;
|
|
19
18
|
displayedColumns: string[];
|
|
20
19
|
constructor(matDialog: MatDialog);
|
|
21
20
|
ngOnInit(): void;
|
|
@@ -5,8 +5,20 @@ import { DecoratorType, DecoratorTypes } from '../../decorators/base/decorator-t
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* The abstract base class of any ngx-mat-entity input.
|
|
8
|
+
* Extend from this when implementing your own custom decorator.
|
|
9
|
+
*
|
|
10
|
+
* It already provides:
|
|
11
|
+
*
|
|
12
|
+
* - entity: The entity which the property is on. (type-safe due to the Generic "EntityType")
|
|
13
|
+
* - key: The key of the property. (type-safe due to the Generic "EntityType")
|
|
14
|
+
* - getValidationErrorMessage: The function that generates the error message when the input is invalid.
|
|
15
|
+
* - isReadOnly: Whether or not the input is read only. Can be used to disable elements.
|
|
16
|
+
* - propertyValue: Just the typed version of the property, its the same as entity[key].
|
|
17
|
+
* - metadata: The metadata of the property. (type-safe due to the Generic "CustomMetadataType")
|
|
18
|
+
* - ngOnInit: Gets the metadata for the property, be aware of this when overriding this method.
|
|
19
|
+
* - emitChange: Should be called when the input has changed. This is needed to trigger validation and dirty checks.
|
|
8
20
|
*/
|
|
9
|
-
export declare abstract class NgxMatEntityBaseInputComponent<EntityType extends BaseEntityType<EntityType>, Type extends DecoratorTypes, CustomMetadataType extends BaseEntityType<CustomMetadataType> = {}> implements OnInit {
|
|
21
|
+
export declare abstract class NgxMatEntityBaseInputComponent<EntityType extends BaseEntityType<EntityType>, Type extends DecoratorTypes, ValueType, CustomMetadataType extends BaseEntityType<CustomMetadataType> = {}> implements OnInit {
|
|
10
22
|
/**
|
|
11
23
|
* The entity that the property to display as an input comes from.
|
|
12
24
|
*/
|
|
@@ -19,13 +31,27 @@ export declare abstract class NgxMatEntityBaseInputComponent<EntityType extends
|
|
|
19
31
|
* The function that generates the error message when the input is invalid.
|
|
20
32
|
*/
|
|
21
33
|
getValidationErrorMessage: (model: NgModel) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether or not the input should be readonly.
|
|
36
|
+
* In that case it is disabled, but most of the disabled-styling is overridden.
|
|
37
|
+
*/
|
|
38
|
+
isReadOnly: boolean;
|
|
22
39
|
inputChangeEvent: EventEmitter<void>;
|
|
40
|
+
/**
|
|
41
|
+
* The property value of entity[key] correctly typed.
|
|
42
|
+
* Uses getters and setters so that inputs are always linked to the original value.
|
|
43
|
+
*/
|
|
44
|
+
get propertyValue(): ValueType | undefined;
|
|
45
|
+
set propertyValue(value: ValueType | undefined);
|
|
46
|
+
/**
|
|
47
|
+
* The metadata of the property.
|
|
48
|
+
*/
|
|
23
49
|
metadata: DecoratorType<Type, CustomMetadataType>;
|
|
24
50
|
ngOnInit(): void;
|
|
25
51
|
/**
|
|
26
52
|
* Should emit when the input has changed. This is needed to trigger validation and dirty checks.
|
|
27
53
|
*/
|
|
28
54
|
emitChange(): void;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityBaseInputComponent<any, any, any>, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseInputComponent<any, any, any>, "ngx-mat-entity-base-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, "ngx-mat-entity-base-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; "isReadOnly": "isReadOnly"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
31
57
|
}
|
package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class BooleanCheckboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_CHECKBOX> implements OnInit {
|
|
6
|
+
export declare class BooleanCheckboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_CHECKBOX, boolean> implements OnInit {
|
|
7
7
|
ngOnInit(): void;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanCheckboxInputComponent<any>, never>;
|
|
9
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanCheckboxInputComponent<any>, "boolean-checkbox-input", never, {}, {}, never, never>;
|
package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class BooleanDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_DROPDOWN> implements OnInit {
|
|
6
|
+
export declare class BooleanDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_DROPDOWN, boolean> implements OnInit {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanDropdownInputComponent<any>, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanDropdownInputComponent<any>, "boolean-dropdown-input", never, {}, {}, never, never>;
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class BooleanToggleInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_TOGGLE> implements OnInit {
|
|
6
|
+
export declare class BooleanToggleInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_TOGGLE, boolean> implements OnInit {
|
|
7
7
|
ngOnInit(): void;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanToggleInputComponent<any>, never>;
|
|
9
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanToggleInputComponent<any>, "boolean-toggle-input", never, {}, {}, never, never>;
|
|
@@ -3,11 +3,11 @@ import { BaseEntityType } from '../../../classes/entity.model';
|
|
|
3
3
|
import { DecoratorTypes } from '../../../decorators/base/decorator-types.enum';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class CustomInputComponent<EntityType extends BaseEntityType<EntityType>, MetadataType extends BaseEntityType<MetadataType>, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, MetadataType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM> implements OnInit {
|
|
6
|
+
export declare class CustomInputComponent<EntityType extends BaseEntityType<EntityType>, MetadataType extends BaseEntityType<MetadataType>, ValueType, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType, MetadataType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType> implements OnInit {
|
|
7
7
|
private readonly viewContainerRef;
|
|
8
8
|
component: ComponentRef<ComponentType>;
|
|
9
9
|
constructor(viewContainerRef: ViewContainerRef);
|
|
10
10
|
ngOnInit(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CustomInputComponent<any, any, any>, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CustomInputComponent<any, any, any>, "custom-input", never, {}, {}, never, never>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomInputComponent<any, any, any, any>, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomInputComponent<any, any, any, any>, "custom-input", never, {}, {}, never, never>;
|
|
13
13
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
3
|
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
4
|
-
import { DateFilterFn } from '@angular/material/datepicker';
|
|
5
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
5
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class DateInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE> implements OnInit {
|
|
7
|
+
export declare class DateInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE, Date> implements OnInit {
|
|
9
8
|
DateUtilities: typeof DateUtilities;
|
|
10
|
-
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
11
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent<any>, never>;
|
|
12
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent<any>, "date-input", never, {}, {}, never, never>;
|
|
13
11
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
|
-
import { DateFilterFn } from '@angular/material/datepicker';
|
|
4
3
|
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
5
4
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
5
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class DateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_RANGE> implements OnInit {
|
|
7
|
+
export declare class DateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_RANGE, DateRange> implements OnInit {
|
|
9
8
|
dateRange: DateRange;
|
|
10
9
|
dateRangeStart?: Date;
|
|
11
10
|
dateRangeEnd?: Date;
|
|
12
|
-
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
11
|
+
defaultDateFilter: import("@angular/material/datepicker").DateFilterFn<Date | null | undefined>;
|
|
13
12
|
ngOnInit(): void;
|
|
14
13
|
/**
|
|
15
14
|
* Updates the date range values based on the start and end date.
|
|
@@ -7,9 +7,8 @@ import { DateUtilities } from '../../../../classes/date.utilities';
|
|
|
7
7
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
8
8
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class DateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_TIME> implements OnInit {
|
|
10
|
+
export declare class DateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_TIME, Date> implements OnInit {
|
|
11
11
|
DateUtilities: typeof DateUtilities;
|
|
12
|
-
dateTime?: Date;
|
|
13
12
|
time?: Time;
|
|
14
13
|
timeDropdownValues: DropdownValue<Time>[];
|
|
15
14
|
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
@@ -21,7 +20,7 @@ export declare class DateTimeInputComponent<EntityType extends BaseEntityType<En
|
|
|
21
20
|
* @param time2 - The second time to compare.
|
|
22
21
|
* @returns Whether or not the time objects are the same.
|
|
23
22
|
*/
|
|
24
|
-
compareTimes(time1
|
|
23
|
+
compareTimes(time1?: Time, time2?: Time): boolean;
|
|
25
24
|
/**
|
|
26
25
|
* Sets the time on a datetime property.
|
|
27
26
|
*/
|
|
@@ -5,7 +5,7 @@ import { FileData } from '../../../../decorators/file/file-decorator.data';
|
|
|
5
5
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
6
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class FileDefaultInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_DEFAULT> implements OnInit {
|
|
8
|
+
export declare class FileDefaultInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_DEFAULT, FileData | FileData[]> implements OnInit {
|
|
9
9
|
FileUtilities: typeof FileUtilities;
|
|
10
10
|
refreshFileData(fileData?: FileData | FileData[]): Promise<void>;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileDefaultInputComponent<any>, never>;
|
|
@@ -5,7 +5,7 @@ import { FileData } from '../../../../decorators/file/file-decorator.data';
|
|
|
5
5
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
6
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class FileImageInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_IMAGE> 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
10
|
singlePreviewImage?: string;
|
|
11
11
|
multiPreviewImages?: string[];
|
|
@@ -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
|
}
|
|
@@ -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>;
|
|
@@ -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,41 +3,44 @@ 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 "./
|
|
24
|
-
import * as i23 from "./input.
|
|
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/
|
|
38
|
-
import * as i37 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";
|
|
39
42
|
export declare class NgxMatEntityInputModule {
|
|
40
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputModule, never>;
|
|
41
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.StringInputComponent, typeof i2.StringTextboxInputComponent, typeof i3.StringAutocompleteInputComponent, typeof i4.StringDropdownInputComponent, typeof i5.
|
|
44
|
+
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 i25.NgxMatEntityInputComponent]>;
|
|
42
45
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInputModule>;
|
|
43
46
|
}
|
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class NumberDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER_DROPDOWN> implements OnInit {
|
|
6
|
+
export declare class NumberDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER_DROPDOWN, number> implements OnInit {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberDropdownInputComponent<any>, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<NumberDropdownInputComponent<any>, "number-dropdown-input", never, {}, {}, never, never>;
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class NumberInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER> implements OnInit {
|
|
6
|
+
export declare class NumberInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER, number> implements OnInit {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberInputComponent<any>, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<NumberInputComponent<any>, "number-input", never, {}, {}, never, never>;
|
|
9
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
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringAutocompleteInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_AUTOCOMPLETE> implements OnInit {
|
|
6
|
+
export declare class StringAutocompleteInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_AUTOCOMPLETE, string> implements OnInit {
|
|
7
7
|
autocompleteStrings: string[];
|
|
8
8
|
filteredAutocompleteStrings: string[];
|
|
9
9
|
ngOnInit(): void;
|
|
@@ -12,7 +12,7 @@ export declare class StringAutocompleteInputComponent<EntityType extends BaseEnt
|
|
|
12
12
|
*
|
|
13
13
|
* @param input - The input of the user.
|
|
14
14
|
*/
|
|
15
|
-
filterAutocompleteStrings(input
|
|
15
|
+
filterAutocompleteStrings(input?: string): void;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringAutocompleteInputComponent<any>, never>;
|
|
17
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<StringAutocompleteInputComponent<any>, "string-autocomplete-input", never, {}, {}, never, never>;
|
|
18
18
|
}
|
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_DROPDOWN> implements OnInit {
|
|
6
|
+
export declare class StringDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_DROPDOWN, string> implements OnInit {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringDropdownInputComponent<any>, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<StringDropdownInputComponent<any>, "string-dropdown-input", never, {}, {}, never, never>;
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING> implements OnInit {
|
|
6
|
+
export declare class StringInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING, string> implements OnInit {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringInputComponent<any>, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<StringInputComponent<any>, "string-input", never, {}, {}, never, never>;
|
|
9
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
|
+
}
|
|
@@ -3,7 +3,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
|
|
|
3
3
|
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
4
4
|
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class StringTextboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_TEXTBOX> implements OnInit {
|
|
6
|
+
export declare class StringTextboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_TEXTBOX, string> implements OnInit {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<StringTextboxInputComponent<any>, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<StringTextboxInputComponent<any>, "string-textbox-input", never, {}, {}, never, never>;
|
|
9
9
|
}
|
|
@@ -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.
|
|
@@ -24,6 +24,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
|
|
|
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;
|