ngx-material-entity 0.1.4 → 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 +416 -39
- package/capsulation/lodash.utilities.d.ts +62 -0
- package/capsulation/reflect.utilities.d.ts +56 -0
- package/classes/base.builder.d.ts +2 -1
- package/classes/date.utilities.d.ts +18 -6
- package/classes/entity.model.d.ts +9 -2
- package/classes/entity.service.d.ts +38 -1
- package/classes/entity.utilities.d.ts +45 -16
- package/classes/file.utilities.d.ts +52 -0
- package/components/input/add-array-item-dialog-data.builder.d.ts +3 -2
- package/components/input/add-array-item-dialog-data.d.ts +2 -1
- package/components/input/array/array-date-input/array-date-input.component.d.ts +11 -0
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +20 -0
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +22 -0
- package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +50 -0
- package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +42 -0
- package/components/input/array/array-table.class.d.ts +48 -0
- package/components/input/base-input.component.d.ts +57 -0
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +10 -0
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +9 -0
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +10 -0
- package/components/input/custom/custom.component.d.ts +13 -0
- package/components/input/date/date-input/date-input.component.d.ts +11 -0
- package/components/input/date/date-range-input/date-range-input.component.d.ts +19 -0
- package/components/input/date/date-time-input/date-time-input.component.d.ts +30 -0
- package/components/input/file/file-default-input/file-default-input.component.d.ts +13 -0
- package/components/input/file/file-image-input/file-image-input.component.d.ts +22 -0
- package/components/input/file/file-input/dragDrop.directive.d.ts +32 -0
- package/components/input/file/file-input/file-input.component.d.ts +33 -0
- package/components/input/input.component.d.ts +49 -92
- package/components/input/input.module.d.ts +41 -16
- package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +9 -0
- package/components/input/number/number-input/number-input.component.d.ts +9 -0
- 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 +18 -0
- package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +9 -0
- package/components/input/string/string-input/string-input.component.d.ts +9 -0
- 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 +9 -0
- package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +3 -2
- package/components/table/create-dialog/create-entity-dialog-data.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +7 -2
- package/components/table/edit-dialog/edit-dialog-data.builder.d.ts +3 -2
- package/components/table/edit-dialog/edit-entity-dialog-data.d.ts +6 -1
- package/components/table/edit-dialog/edit-entity-dialog.builder.d.ts +5 -3
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +6 -2
- package/components/table/table-data.builder.d.ts +9 -8
- package/components/table/table-data.d.ts +18 -10
- package/components/table/table.component.d.ts +2 -1
- package/decorators/array/array-decorator-internal.data.d.ts +71 -6
- package/decorators/array/array-decorator.data.d.ts +178 -12
- package/decorators/array/array.decorator.d.ts +3 -2
- package/decorators/base/base-property.decorator.d.ts +2 -3
- package/decorators/base/decorator-types.enum.d.ts +15 -5
- 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/date/date-decorator-internal.data.d.ts +2 -2
- package/decorators/date/date.decorator.d.ts +8 -0
- package/decorators/file/file-decorator-internal.data.d.ts +92 -0
- package/decorators/file/file-decorator.data.d.ts +92 -0
- package/decorators/file/file.decorator.d.ts +9 -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/object/object-decorator-internal.data.d.ts +2 -2
- package/decorators/object/object-decorator.data.d.ts +3 -3
- package/decorators/object/object.decorator.d.ts +2 -1
- 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/lodash.utilities.mjs +75 -0
- package/esm2020/capsulation/reflect.utilities.mjs +69 -0
- package/esm2020/classes/base.builder.mjs +2 -3
- package/esm2020/classes/date.utilities.mjs +35 -15
- package/esm2020/classes/entity.model.mjs +5 -1
- package/esm2020/classes/entity.service.mjs +103 -6
- package/esm2020/classes/entity.utilities.mjs +241 -71
- package/esm2020/classes/file.utilities.mjs +124 -0
- package/esm2020/components/confirm-dialog/confirm-dialog-data.builder.mjs +4 -4
- package/esm2020/components/confirm-dialog/confirm-dialog.component.mjs +3 -3
- package/esm2020/components/input/add-array-item-dialog-data.builder.mjs +2 -2
- package/esm2020/components/input/add-array-item-dialog-data.mjs +1 -1
- package/esm2020/components/input/array/array-date-input/array-date-input.component.mjs +26 -0
- package/esm2020/components/input/array/array-date-range-input/array-date-range-input.component.mjs +50 -0
- package/esm2020/components/input/array/array-date-time-input/array-date-time-input.component.mjs +50 -0
- package/esm2020/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +103 -0
- package/esm2020/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +85 -0
- package/esm2020/components/input/array/array-table.class.mjs +104 -0
- package/esm2020/components/input/base-input.component.mjs +65 -0
- package/esm2020/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +21 -0
- package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +17 -0
- package/esm2020/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +21 -0
- package/esm2020/components/input/custom/custom.component.mjs +26 -0
- package/esm2020/components/input/date/date-input/date-input.component.mjs +22 -0
- package/esm2020/components/input/date/date-range-input/date-range-input.component.mjs +51 -0
- package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +63 -0
- package/esm2020/components/input/file/file-default-input/file-default-input.component.mjs +23 -0
- package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +84 -0
- package/esm2020/components/input/file/file-input/dragDrop.directive.mjs +64 -0
- package/esm2020/components/input/file/file-input/file-input.component.mjs +154 -0
- package/esm2020/components/input/input.component.mjs +137 -236
- package/esm2020/components/input/input.module.mjs +82 -6
- package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +18 -0
- package/esm2020/components/input/number/number-input/number-input.component.mjs +16 -0
- 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 +35 -0
- package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +18 -0
- package/esm2020/components/input/string/string-input/string-input.component.mjs +16 -0
- 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 +17 -0
- package/esm2020/components/table/create-dialog/create-dialog-data.builder.mjs +2 -2
- package/esm2020/components/table/create-dialog/create-entity-dialog-data.builder.mjs +1 -1
- package/esm2020/components/table/create-dialog/create-entity-dialog-data.mjs +1 -1
- package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +15 -8
- package/esm2020/components/table/edit-dialog/edit-dialog-data.builder.mjs +2 -2
- 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 +19 -10
- 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 +35 -35
- package/esm2020/decorators/array/array-decorator-internal.data.mjs +102 -14
- package/esm2020/decorators/array/array-decorator.data.mjs +2 -2
- package/esm2020/decorators/array/array.decorator.mjs +8 -2
- package/esm2020/decorators/base/base-property.decorator.mjs +4 -3
- package/esm2020/decorators/base/decorator-types.enum.mjs +9 -1
- package/esm2020/decorators/base/property-decorator-internal.data.mjs +10 -10
- package/esm2020/decorators/base/property-decorator.data.mjs +1 -1
- package/esm2020/decorators/boolean/boolean-decorator-internal.data.mjs +3 -3
- 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/date/date-decorator-internal.data.mjs +5 -5
- package/esm2020/decorators/date/date.decorator.mjs +21 -0
- package/esm2020/decorators/file/file-decorator-internal.data.mjs +98 -0
- package/esm2020/decorators/file/file-decorator.data.mjs +7 -0
- package/esm2020/decorators/file/file.decorator.mjs +22 -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/object/object-decorator-internal.data.mjs +1 -1
- package/esm2020/decorators/object/object-decorator.data.mjs +1 -1
- package/esm2020/decorators/object/object.decorator.mjs +1 -1
- 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/mocks/placeholder-data.png.mjs +3 -0
- package/esm2020/public-api.mjs +9 -1
- package/fesm2015/ngx-material-entity.mjs +2488 -524
- package/fesm2015/ngx-material-entity.mjs.map +1 -1
- package/fesm2020/ngx-material-entity.mjs +2363 -493
- package/fesm2020/ngx-material-entity.mjs.map +1 -1
- package/mocks/placeholder-data.png.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +8 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
2
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { MatTableDataSource } from '@angular/material/table';
|
|
4
|
+
import { BaseEntityType } from '../../../classes/entity.model';
|
|
5
|
+
import { NgxMatEntityBaseInputComponent } from '../base-input.component';
|
|
6
|
+
import { DecoratorTypes } from '../../../decorators/base/decorator-types.enum';
|
|
7
|
+
import { OnInit } from '@angular/core';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
declare type ArrayTableType = DecoratorTypes.ARRAY | DecoratorTypes.ARRAY_DATE | DecoratorTypes.ARRAY_DATE_RANGE | DecoratorTypes.ARRAY_DATE_TIME;
|
|
10
|
+
/**
|
|
11
|
+
* The base data needed for all arrays that are displayed as a table.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class ArrayTableComponent<ValueType, EntityType extends BaseEntityType<EntityType>, ArrayType extends ArrayTableType> extends NgxMatEntityBaseInputComponent<EntityType, ArrayType, ValueType[]> implements OnInit {
|
|
14
|
+
private readonly matDialog;
|
|
15
|
+
input?: ValueType;
|
|
16
|
+
dataSource: MatTableDataSource<ValueType>;
|
|
17
|
+
selection: SelectionModel<ValueType>;
|
|
18
|
+
displayedColumns: string[];
|
|
19
|
+
constructor(matDialog: MatDialog);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Toggles all array-items in the table.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
masterToggle(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Checks if all array-items in the table have been selected.
|
|
28
|
+
* This is needed to display the "masterToggle"-checkbox correctly.
|
|
29
|
+
*
|
|
30
|
+
* @returns Whether or not all array-items in the table have been selected.
|
|
31
|
+
*/
|
|
32
|
+
isAllSelected(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Tries to add an item to the array.
|
|
35
|
+
*/
|
|
36
|
+
add(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Is split up from the add method to override this functionality more easily.
|
|
39
|
+
*/
|
|
40
|
+
protected resetInput(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Removes all selected entries from the entity array.
|
|
43
|
+
*/
|
|
44
|
+
remove(): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayTableComponent<any, any, any>, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayTableComponent<any, any, any>, "ngx-mat-entity-array-table", never, {}, {}, never, never>;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgModel } from '@angular/forms';
|
|
3
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
4
|
+
import { DecoratorType, DecoratorTypes } from '../../decorators/base/decorator-types.enum';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
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.
|
|
20
|
+
*/
|
|
21
|
+
export declare abstract class NgxMatEntityBaseInputComponent<EntityType extends BaseEntityType<EntityType>, Type extends DecoratorTypes, ValueType, CustomMetadataType extends BaseEntityType<CustomMetadataType> = {}> implements OnInit {
|
|
22
|
+
/**
|
|
23
|
+
* The entity that the property to display as an input comes from.
|
|
24
|
+
*/
|
|
25
|
+
entity: EntityType;
|
|
26
|
+
/**
|
|
27
|
+
* The key of the property to build the input for.
|
|
28
|
+
*/
|
|
29
|
+
key: keyof EntityType;
|
|
30
|
+
/**
|
|
31
|
+
* The function that generates the error message when the input is invalid.
|
|
32
|
+
*/
|
|
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;
|
|
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
|
+
*/
|
|
49
|
+
metadata: DecoratorType<Type, CustomMetadataType>;
|
|
50
|
+
ngOnInit(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Should emit when the input has changed. This is needed to trigger validation and dirty checks.
|
|
53
|
+
*/
|
|
54
|
+
emitChange(): void;
|
|
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>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 BooleanCheckboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_CHECKBOX, boolean> implements OnInit {
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanCheckboxInputComponent<any>, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanCheckboxInputComponent<any>, "boolean-checkbox-input", never, {}, {}, never, never>;
|
|
10
|
+
}
|
|
@@ -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 BooleanDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_DROPDOWN, boolean> implements OnInit {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanDropdownInputComponent<any>, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanDropdownInputComponent<any>, "boolean-dropdown-input", never, {}, {}, never, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 BooleanToggleInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_TOGGLE, boolean> implements OnInit {
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanToggleInputComponent<any>, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanToggleInputComponent<any>, "boolean-toggle-input", never, {}, {}, never, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentRef, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { BaseEntityType } from '../../../classes/entity.model';
|
|
3
|
+
import { DecoratorTypes } from '../../../decorators/base/decorator-types.enum';
|
|
4
|
+
import { NgxMatEntityBaseInputComponent } from '../base-input.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
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
|
+
private readonly viewContainerRef;
|
|
8
|
+
component: ComponentRef<ComponentType>;
|
|
9
|
+
constructor(viewContainerRef: ViewContainerRef);
|
|
10
|
+
ngOnInit(): void;
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
|
+
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
4
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DateInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE, Date> implements OnInit {
|
|
8
|
+
DateUtilities: typeof DateUtilities;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent<any>, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent<any>, "date-input", never, {}, {}, never, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
|
+
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
4
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_RANGE, DateRange> implements OnInit {
|
|
8
|
+
dateRange: DateRange;
|
|
9
|
+
dateRangeStart?: Date;
|
|
10
|
+
dateRangeEnd?: Date;
|
|
11
|
+
defaultDateFilter: import("@angular/material/datepicker").DateFilterFn<Date | null | undefined>;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Updates the date range values based on the start and end date.
|
|
15
|
+
*/
|
|
16
|
+
setDateRangeValues(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeInputComponent<any>, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangeInputComponent<any>, "date-range-input", never, {}, {}, never, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
3
|
+
import { DateFilterFn } from '@angular/material/datepicker';
|
|
4
|
+
import { Time } from '@angular/common';
|
|
5
|
+
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
6
|
+
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
7
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
8
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class DateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_TIME, Date> implements OnInit {
|
|
11
|
+
DateUtilities: typeof DateUtilities;
|
|
12
|
+
time?: Time;
|
|
13
|
+
timeDropdownValues: DropdownValue<Time>[];
|
|
14
|
+
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Checks if two times are equal. Is needed for the dropdown.
|
|
18
|
+
*
|
|
19
|
+
* @param time1 - The first time to compare.
|
|
20
|
+
* @param time2 - The second time to compare.
|
|
21
|
+
* @returns Whether or not the time objects are the same.
|
|
22
|
+
*/
|
|
23
|
+
compareTimes(time1?: Time, time2?: Time): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Sets the time on a datetime property.
|
|
26
|
+
*/
|
|
27
|
+
setTime(): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeInputComponent<any>, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeInputComponent<any>, "date-time-input", never, {}, {}, never, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FileUtilities } from '../../../../classes/file.utilities';
|
|
3
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
|
+
import { FileData } from '../../../../decorators/file/file-decorator.data';
|
|
5
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class FileDefaultInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_DEFAULT, FileData | FileData[]> implements OnInit {
|
|
9
|
+
FileUtilities: typeof FileUtilities;
|
|
10
|
+
refreshFileData(fileData?: FileData | FileData[]): Promise<void>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileDefaultInputComponent<any>, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileDefaultInputComponent<any>, "file-default-input", never, {}, {}, never, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FileUtilities } from '../../../../classes/file.utilities';
|
|
3
|
+
import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
|
|
4
|
+
import { FileData } from '../../../../decorators/file/file-decorator.data';
|
|
5
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
|
+
import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class FileImageInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_IMAGE, FileData | FileData[]> implements OnInit {
|
|
9
|
+
FileUtilities: typeof FileUtilities;
|
|
10
|
+
singlePreviewImage?: string;
|
|
11
|
+
multiPreviewImages?: string[];
|
|
12
|
+
imageIndex: number;
|
|
13
|
+
placeHolder: string;
|
|
14
|
+
private setSinglePreviewImage;
|
|
15
|
+
private setMultiPreviewImages;
|
|
16
|
+
refreshFileData(fileData?: FileData | FileData[]): Promise<void>;
|
|
17
|
+
prev(): Promise<void>;
|
|
18
|
+
next(): Promise<void>;
|
|
19
|
+
setIndex(index: number): Promise<void>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileImageInputComponent<any>, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileImageInputComponent<any>, "file-image-input", never, {}, {}, never, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Adds drag and drop functionality to an element.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DragDropDirective {
|
|
7
|
+
/**
|
|
8
|
+
* Emits the dropped files to the parent.
|
|
9
|
+
*/
|
|
10
|
+
files: EventEmitter<File[]>;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Prevents the event default.
|
|
14
|
+
*
|
|
15
|
+
* @param evt - The Event when dragged files hover over the parent.
|
|
16
|
+
*/
|
|
17
|
+
onDragOver(evt: DragEvent): void;
|
|
18
|
+
/**
|
|
19
|
+
* Prevents the event default.
|
|
20
|
+
*
|
|
21
|
+
* @param evt - The Event when dragged files leave the parent.
|
|
22
|
+
*/
|
|
23
|
+
onDragLeave(evt: DragEvent): void;
|
|
24
|
+
/**
|
|
25
|
+
* Prevents the event default and emits the dropped files with the output.
|
|
26
|
+
*
|
|
27
|
+
* @param evt - The Event when files are dropped.
|
|
28
|
+
*/
|
|
29
|
+
onDrop(evt: DragEvent): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragDropDirective, never>;
|
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragDropDirective, "[dragDrop]", never, {}, { "files": "files"; }, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgModel } from '@angular/forms';
|
|
3
|
+
import { DefaultFileDecoratorConfigInternal } from '../../../../decorators/file/file-decorator-internal.data';
|
|
4
|
+
import { FileUtilities } from '../../../../classes/file.utilities';
|
|
5
|
+
import { FileData } from '../../../../decorators/file/file-decorator.data';
|
|
6
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
7
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class FileInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
10
|
+
private readonly dialog;
|
|
11
|
+
singleFileData?: FileData;
|
|
12
|
+
multiFileData?: FileData[];
|
|
13
|
+
filenames?: string[];
|
|
14
|
+
FileUtilities: typeof FileUtilities;
|
|
15
|
+
entity: EntityType;
|
|
16
|
+
key: keyof EntityType;
|
|
17
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
18
|
+
isReadOnly: boolean;
|
|
19
|
+
fileDataChangeEvent: EventEmitter<FileData | FileData[]>;
|
|
20
|
+
metadata: DefaultFileDecoratorConfigInternal;
|
|
21
|
+
constructor(dialog: MatDialog);
|
|
22
|
+
ngOnInit(): Promise<void>;
|
|
23
|
+
private initMultiFile;
|
|
24
|
+
private initSingleFile;
|
|
25
|
+
setFileFromInput(event: Event): Promise<void>;
|
|
26
|
+
setFile(files: File[]): Promise<void>;
|
|
27
|
+
private resetFileInputs;
|
|
28
|
+
private setMultiFile;
|
|
29
|
+
private setSingleFile;
|
|
30
|
+
removeFile(name: string): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileInputComponent<any>, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent<any>, "file-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; "isReadOnly": "isReadOnly"; }, { "fileDataChangeEvent": "fileDataChangeEvent"; }, never, never>;
|
|
33
|
+
}
|
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
import { OnInit, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { NgModel } from '@angular/forms';
|
|
3
3
|
import { EntityRow, EntityUtilities } from '../../classes/entity.utilities';
|
|
4
4
|
import { DecoratorTypes } from '../../decorators/base/decorator-types.enum';
|
|
5
|
-
import {
|
|
6
|
-
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
7
|
-
import { AutocompleteStringChipsArrayDecoratorConfigInternal, EntityArrayDecoratorConfigInternal, StringChipsArrayDecoratorConfigInternal } from '../../decorators/array/array-decorator-internal.data';
|
|
8
|
-
import { DropdownBooleanDecoratorConfigInternal } from '../../decorators/boolean/boolean-decorator-internal.data';
|
|
9
|
-
import { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal } from '../../decorators/number/number-decorator-internal.data';
|
|
5
|
+
import { EntityArrayDecoratorConfigInternal } from '../../decorators/array/array-decorator-internal.data';
|
|
10
6
|
import { DefaultObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';
|
|
11
|
-
import { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../../decorators/string/string-decorator-internal.data';
|
|
12
7
|
import { PropertyDecoratorConfigInternal } from '../../decorators/base/property-decorator-internal.data';
|
|
13
8
|
import { MatTableDataSource } from '@angular/material/table';
|
|
14
9
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
15
10
|
import { AddArrayItemDialogDataInternal } from './add-array-item-dialog-data.builder';
|
|
16
11
|
import { AddArrayItemDialogData } from './add-array-item-dialog-data';
|
|
17
12
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
18
|
-
import { DateRangeDateDecoratorConfigInternal, DateTimeDateDecoratorConfigInternal, DefaultDateDecoratorConfigInternal } from '../../decorators/date/date-decorator-internal.data';
|
|
19
13
|
import { DateUtilities } from '../../classes/date.utilities';
|
|
20
|
-
import {
|
|
21
|
-
import { DateRange } from '../../decorators/date/date-decorator.data';
|
|
22
|
-
import { Time } from '@angular/common';
|
|
23
|
-
import { DropdownValue } from '../../decorators/base/dropdown-value.interface';
|
|
14
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
24
15
|
import * as i0 from "@angular/core";
|
|
25
16
|
/**
|
|
26
17
|
* The default input component. It gets the metadata of the property from the given @Input "entity" and @Input "propertyKey"
|
|
@@ -30,76 +21,71 @@ import * as i0 from "@angular/core";
|
|
|
30
21
|
* that it should be omitted for creating or updating.
|
|
31
22
|
* The last part being mostly relevant if you want to use this component inside an ngFor.
|
|
32
23
|
*/
|
|
33
|
-
export declare class NgxMatEntityInputComponent<EntityType extends
|
|
24
|
+
export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
34
25
|
private readonly dialog;
|
|
35
26
|
/**
|
|
36
27
|
* The entity on which the property exists. Used in conjunction with the "propertyKey"
|
|
37
28
|
* to determine the property for which the input should be generated.
|
|
38
29
|
*/
|
|
39
|
-
entity
|
|
30
|
+
entity?: EntityType;
|
|
31
|
+
internalEntity: EntityType;
|
|
40
32
|
/**
|
|
41
33
|
* The name of the property to generate the input for. Used in conjunction with the "entity".
|
|
42
34
|
*/
|
|
43
|
-
propertyKey
|
|
35
|
+
propertyKey?: keyof EntityType;
|
|
36
|
+
internalPropertyKey: keyof EntityType;
|
|
44
37
|
/**
|
|
45
38
|
* (optional) A custom function to generate the error-message for invalid inputs.
|
|
46
39
|
*/
|
|
47
|
-
getValidationErrorMessage
|
|
40
|
+
getValidationErrorMessage?: (model: NgModel) => string;
|
|
41
|
+
internalGetValidationErrorMessage: (model: NgModel) => string;
|
|
48
42
|
/**
|
|
49
43
|
* Whether to hide a value if it is omitted for creation.
|
|
50
44
|
* Is used internally for the object property.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
51
47
|
*/
|
|
52
48
|
hideOmitForCreate?: boolean;
|
|
53
49
|
/**
|
|
54
50
|
* Whether to hide a value if it is omitted for editing.
|
|
55
51
|
* Is used internally for the object property.
|
|
52
|
+
*
|
|
53
|
+
* @default false
|
|
56
54
|
*/
|
|
57
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;
|
|
64
|
+
inputChangeEvent: EventEmitter<void>;
|
|
58
65
|
addArrayItemDialog: TemplateRef<unknown>;
|
|
59
66
|
addArrayItemDialogRef: MatDialogRef<unknown>;
|
|
60
67
|
type: DecoratorTypes;
|
|
61
68
|
metadata: PropertyDecoratorConfigInternal;
|
|
62
|
-
metadataDefaultString: DefaultStringDecoratorConfigInternal;
|
|
63
|
-
metadataTextboxString: TextboxStringDecoratorConfigInternal;
|
|
64
|
-
metadataAutocompleteString: AutocompleteStringDecoratorConfigInternal;
|
|
65
|
-
autocompleteStrings: string[];
|
|
66
|
-
filteredAutocompleteStrings: string[];
|
|
67
|
-
metadataDropdownString: DropdownStringDecoratorConfigInternal;
|
|
68
|
-
metadataDropdownBoolean: DropdownBooleanDecoratorConfigInternal;
|
|
69
|
-
metadataDefaultNumber: DefaultNumberDecoratorConfigInternal;
|
|
70
|
-
metadataDropdownNumber: DropdownNumberDecoratorConfigInternal;
|
|
71
69
|
metadataDefaultObject: DefaultObjectDecoratorConfigInternal<EntityType>;
|
|
72
70
|
objectProperty: EntityType;
|
|
73
71
|
objectPropertyRows: EntityRow<EntityType>[];
|
|
74
72
|
metadataEntityArray: EntityArrayDecoratorConfigInternal<EntityType>;
|
|
75
73
|
entityArrayValues: EntityType[];
|
|
76
|
-
metadataStringChipsArray: StringChipsArrayDecoratorConfigInternal;
|
|
77
|
-
stringChipsArrayValues: string[];
|
|
78
|
-
chipsInput: string;
|
|
79
|
-
metadataAutocompleteStringChipsArray: AutocompleteStringChipsArrayDecoratorConfigInternal;
|
|
80
|
-
metadataDefaultDate: DefaultDateDecoratorConfigInternal;
|
|
81
|
-
metadataDateRangeDate: DateRangeDateDecoratorConfigInternal;
|
|
82
|
-
metadataDateTimeDate: DateTimeDateDecoratorConfigInternal;
|
|
83
|
-
dateRange: DateRange;
|
|
84
|
-
dateRangeStart: Date;
|
|
85
|
-
dateRangeEnd: Date;
|
|
86
|
-
dateTime: Date;
|
|
87
|
-
time: Time;
|
|
88
|
-
timeDropdownValues: DropdownValue<Time>[];
|
|
89
74
|
arrayItem: EntityType;
|
|
90
75
|
private arrayItemPriorChanges;
|
|
91
76
|
arrayItemInlineRows: EntityRow<EntityType>[];
|
|
92
77
|
dataSource: MatTableDataSource<EntityType>;
|
|
93
78
|
selection: SelectionModel<EntityType>;
|
|
94
79
|
displayedColumns: string[];
|
|
80
|
+
isArrayItemValid: boolean;
|
|
95
81
|
dialogInputData: AddArrayItemDialogData<EntityType>;
|
|
96
82
|
dialogData: AddArrayItemDialogDataInternal<EntityType>;
|
|
97
83
|
arrayItemDialogRows: EntityRow<EntityType>[];
|
|
84
|
+
isDialogArrayItemValid: boolean;
|
|
98
85
|
readonly DecoratorTypes: typeof DecoratorTypes;
|
|
99
86
|
EntityUtilities: typeof EntityUtilities;
|
|
100
87
|
DateUtilities: typeof DateUtilities;
|
|
101
88
|
constructor(dialog: MatDialog);
|
|
102
|
-
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
103
89
|
/**
|
|
104
90
|
* This is needed for the inputs to work inside an ngFor.
|
|
105
91
|
*
|
|
@@ -108,28 +94,26 @@ export declare class NgxMatEntityInputComponent<EntityType extends object> imple
|
|
|
108
94
|
*/
|
|
109
95
|
trackByFn(index: unknown): unknown;
|
|
110
96
|
ngOnInit(): void;
|
|
97
|
+
private initEntityArray;
|
|
98
|
+
private initObjectInput;
|
|
111
99
|
/**
|
|
112
|
-
* Checks if
|
|
113
|
-
*
|
|
114
|
-
* @param time1 - The first time to compare.
|
|
115
|
-
* @param time2 - The second time to compare.
|
|
116
|
-
* @returns Whether or not the time objects are the same.
|
|
100
|
+
* Checks if the arrayItem is valid.
|
|
117
101
|
*/
|
|
118
|
-
|
|
102
|
+
checkIsArrayItemValid(): void;
|
|
119
103
|
/**
|
|
120
|
-
*
|
|
104
|
+
* Checks if the arrayItem inside the dialog is valid.
|
|
121
105
|
*/
|
|
122
|
-
|
|
106
|
+
checkIsDialogArrayItemValid(): void;
|
|
123
107
|
/**
|
|
124
|
-
*
|
|
108
|
+
* Emits that a the value has been changed.
|
|
125
109
|
*/
|
|
126
|
-
|
|
110
|
+
emitChange(): void;
|
|
127
111
|
/**
|
|
128
|
-
* Tries to add an item to the array.
|
|
112
|
+
* Tries to add an item to the entity array.
|
|
129
113
|
* Does this either inline if the "createInline"-metadata is set to true
|
|
130
114
|
* or in a separate dialog if it is set to false.
|
|
131
115
|
*/
|
|
132
|
-
|
|
116
|
+
addEntity(): Promise<void>;
|
|
133
117
|
/**
|
|
134
118
|
* Adds the array item defined in the dialog.
|
|
135
119
|
*/
|
|
@@ -139,56 +123,29 @@ export declare class NgxMatEntityInputComponent<EntityType extends object> imple
|
|
|
139
123
|
*/
|
|
140
124
|
cancelAddArrayItem(): void;
|
|
141
125
|
/**
|
|
142
|
-
* Removes all selected entries from the array.
|
|
126
|
+
* Removes all selected entries from the entity array.
|
|
127
|
+
*
|
|
128
|
+
* @param selection - The selection containing the items to remove.
|
|
129
|
+
* @param values - The values of the dataSource.
|
|
130
|
+
* @param dataSource - The dataSource.
|
|
143
131
|
*/
|
|
144
|
-
remove(): void;
|
|
132
|
+
remove(selection: SelectionModel<any>, values: any[], dataSource: MatTableDataSource<any>): void;
|
|
145
133
|
/**
|
|
146
134
|
* Toggles all array-items in the table.
|
|
135
|
+
*
|
|
136
|
+
* @param selection - The selection to toggle.
|
|
137
|
+
* @param dataSource - The dataSource of the selection.
|
|
147
138
|
*/
|
|
148
|
-
masterToggle(): void;
|
|
139
|
+
masterToggle(selection: SelectionModel<any>, dataSource: MatTableDataSource<any>): void;
|
|
149
140
|
/**
|
|
150
141
|
* Checks if all array-items in the table have been selected.
|
|
151
142
|
* This is needed to display the "masterToggle"-checkbox correctly.
|
|
152
143
|
*
|
|
144
|
+
* @param selection - The selection to check.
|
|
145
|
+
* @param dataSource - The dataSource of the selection.
|
|
153
146
|
* @returns Whether or not all array-items in the table have been selected.
|
|
154
147
|
*/
|
|
155
|
-
isAllSelected(): boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Handles adding strings to the chipsArray.
|
|
158
|
-
* Checks validation and also creates a new array if it is undefined.
|
|
159
|
-
* This is needed because two things are validated: The array itself
|
|
160
|
-
* and the contents of the array. And we need a way to display an
|
|
161
|
-
* mat-error. As the only validation for the array is whether or not
|
|
162
|
-
* it contains values, we can set it to undefined when the last element is removed
|
|
163
|
-
* (removeStringChipArrayValue). That way we can use the "required" validator.
|
|
164
|
-
*
|
|
165
|
-
* @param event - The event that fires when a new chip is completed.
|
|
166
|
-
*/
|
|
167
|
-
addStringChipArrayValue(event: MatChipInputEvent): void;
|
|
168
|
-
/**
|
|
169
|
-
* Removes the given value from the array.
|
|
170
|
-
* Sets the array to undefined if it is now empty.
|
|
171
|
-
* This is needed because two things are validated: The array itself
|
|
172
|
-
* and the contents of the array. And we need a way to display an
|
|
173
|
-
* mat-error. As the only validation for the array is whether or not
|
|
174
|
-
* it is empty, setting it to undefined here enables us to use the "required" validator.
|
|
175
|
-
*
|
|
176
|
-
* @param value - The string to remove from the array.
|
|
177
|
-
*/
|
|
178
|
-
removeStringChipArrayValue(value: string): void;
|
|
179
|
-
/**
|
|
180
|
-
* Handles adding a string to the array when an autocomplete value has been selected.
|
|
181
|
-
*
|
|
182
|
-
* @param event - The autocomplete selected event.
|
|
183
|
-
* @param chipsInput - The element where the user typed the value.
|
|
184
|
-
*/
|
|
185
|
-
selected(event: MatAutocompleteSelectedEvent, chipsInput: HTMLInputElement): void;
|
|
186
|
-
/**
|
|
187
|
-
* Dynamically filters the Autocomplete options when the user inputs something.
|
|
188
|
-
*
|
|
189
|
-
* @param input - The input of the user.
|
|
190
|
-
*/
|
|
191
|
-
filterAutocompleteStrings(input: unknown): void;
|
|
148
|
+
isAllSelected(selection: SelectionModel<any>, dataSource: MatTableDataSource<any>): boolean;
|
|
192
149
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputComponent<any>, never>;
|
|
193
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInputComponent<any>, "ngx-mat-entity-input", never, { "entity": "entity"; "propertyKey": "propertyKey"; "getValidationErrorMessage": "getValidationErrorMessage"; "hideOmitForCreate": "hideOmitForCreate"; "hideOmitForEdit": "hideOmitForEdit"; }, {}, 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>;
|
|
194
151
|
}
|
|
@@ -1,21 +1,46 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./input.component";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "
|
|
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 "
|
|
16
|
-
import * as i15 from "
|
|
2
|
+
import * as i1 from "./string/string-input/string-input.component";
|
|
3
|
+
import * as i2 from "./string/string-textbox-input/string-textbox-input.component";
|
|
4
|
+
import * as i3 from "./string/string-autocomplete-input/string-autocomplete-input.component";
|
|
5
|
+
import * as i4 from "./string/string-dropdown-input/string-dropdown-input.component";
|
|
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";
|
|
17
42
|
export declare class NgxMatEntityInputModule {
|
|
18
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.NgxMatEntityInputComponent], [typeof
|
|
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]>;
|
|
20
45
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInputModule>;
|
|
21
46
|
}
|