ngx-material-entity 0.1.2 → 0.1.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 +533 -326
- package/capsulation/lodash.utilities.d.ts +62 -0
- package/capsulation/reflect.utilities.d.ts +56 -0
- package/classes/base.builder.d.ts +36 -0
- package/classes/date.utilities.d.ts +70 -0
- package/classes/entity.model.d.ts +19 -0
- package/classes/entity.service.d.ts +108 -0
- package/classes/entity.utilities.d.ts +180 -0
- package/classes/file.utilities.d.ts +52 -0
- package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +10 -11
- package/components/confirm-dialog/confirm-dialog-data.d.ts +4 -0
- package/components/confirm-dialog/confirm-dialog.component.d.ts +11 -0
- package/components/input/add-array-item-dialog-data.builder.d.ts +21 -0
- package/components/input/{array-table/add-array-item-dialog/add-array-item-dialog-data.d.ts → add-array-item-dialog-data.d.ts} +6 -3
- package/components/input/array/array-date-input/array-date-input.component.d.ts +22 -0
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +30 -0
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +32 -0
- package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +58 -0
- package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +51 -0
- package/components/input/array/array-table.class.d.ts +48 -0
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +17 -0
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +17 -0
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +17 -0
- package/components/input/date/date-input/date-input.component.d.ts +21 -0
- package/components/input/date/date-range-input/date-range-input.component.d.ts +27 -0
- package/components/input/date/date-time-input/date-time-input.component.d.ts +38 -0
- package/components/input/file/file-default-input/file-default-input.component.d.ts +21 -0
- package/components/input/file/file-image-input/file-image-input.component.d.ts +30 -0
- package/components/input/file/file-input/dragDrop.directive.d.ts +32 -0
- package/components/input/file/file-input/file-input.component.d.ts +32 -0
- package/components/input/input.component.d.ts +108 -39
- package/components/input/input.module.d.ts +37 -13
- package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +17 -0
- package/components/input/number/number-input/number-input.component.d.ts +17 -0
- package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +25 -0
- package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +17 -0
- package/components/input/string/string-input/string-input.component.d.ts +17 -0
- package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +17 -0
- package/components/table/create-dialog/create-dialog-data.builder.d.ts +9 -8
- package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +12 -6
- package/components/table/create-dialog/create-entity-dialog-data.d.ts +3 -3
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +23 -7
- package/components/table/edit-dialog/edit-dialog-data.builder.d.ts +11 -13
- package/components/table/edit-dialog/edit-entity-dialog-data.d.ts +3 -3
- package/components/table/edit-dialog/edit-entity-dialog.builder.d.ts +12 -6
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +25 -7
- package/components/table/table-data.builder.d.ts +25 -14
- package/components/table/table-data.d.ts +22 -10
- package/components/table/table.component.d.ts +48 -2
- package/components/table/table.module.d.ts +3 -1
- package/decorators/array/array-decorator-internal.data.d.ts +85 -9
- package/decorators/array/array-decorator.data.d.ts +200 -25
- package/decorators/array/array.decorator.d.ts +4 -4
- package/decorators/base/base-property.decorator.d.ts +2 -3
- package/decorators/base/decorator-types.enum.d.ts +13 -4
- package/decorators/base/dropdown-value.interface.d.ts +14 -0
- package/decorators/base/property-decorator-internal.data.d.ts +16 -3
- package/decorators/base/property-decorator.data.d.ts +26 -5
- package/decorators/boolean/boolean-decorator-internal.data.d.ts +9 -0
- package/decorators/boolean/boolean-decorator.data.d.ts +9 -0
- package/decorators/boolean/boolean.decorator.d.ts +1 -1
- package/decorators/date/date-decorator-internal.data.d.ts +44 -0
- package/decorators/date/date-decorator.data.d.ts +129 -0
- 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 +8 -4
- package/decorators/number/number-decorator.data.d.ts +8 -4
- package/decorators/number/number.decorator.d.ts +2 -2
- package/decorators/object/object-decorator-internal.data.d.ts +6 -3
- package/decorators/object/object-decorator.data.d.ts +8 -5
- package/decorators/object/object.decorator.d.ts +3 -3
- package/decorators/string/string-decorator-internal.data.d.ts +14 -4
- package/decorators/string/string-decorator.data.d.ts +14 -4
- package/decorators/string/string.decorator.d.ts +1 -1
- package/esm2020/capsulation/lodash.utilities.mjs +75 -0
- package/esm2020/capsulation/reflect.utilities.mjs +69 -0
- package/esm2020/classes/base.builder.mjs +42 -0
- package/esm2020/classes/date.utilities.mjs +158 -0
- package/esm2020/classes/entity.model.mjs +19 -0
- package/esm2020/classes/entity.service.mjs +180 -0
- package/esm2020/classes/entity.utilities.mjs +669 -0
- package/esm2020/classes/file.utilities.mjs +123 -0
- package/esm2020/components/confirm-dialog/confirm-dialog-data.builder.mjs +17 -50
- package/esm2020/components/confirm-dialog/confirm-dialog-data.mjs +1 -1
- package/esm2020/components/confirm-dialog/confirm-dialog.component.mjs +15 -4
- package/esm2020/components/get-validation-error-message.function.mjs +5 -1
- package/esm2020/components/input/add-array-item-dialog-data.builder.mjs +30 -0
- package/esm2020/components/input/add-array-item-dialog-data.mjs +2 -0
- package/esm2020/components/input/array/array-date-input/array-date-input.component.mjs +44 -0
- package/esm2020/components/input/array/array-date-range-input/array-date-range-input.component.mjs +68 -0
- package/esm2020/components/input/array/array-date-time-input/array-date-time-input.component.mjs +65 -0
- package/esm2020/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +131 -0
- package/esm2020/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +116 -0
- package/esm2020/components/input/array/array-table.class.mjs +92 -0
- package/esm2020/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +38 -0
- package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +35 -0
- package/esm2020/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +38 -0
- package/esm2020/components/input/date/date-input/date-input.component.mjs +38 -0
- package/esm2020/components/input/date/date-range-input/date-range-input.component.mjs +63 -0
- package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +74 -0
- package/esm2020/components/input/file/file-default-input/file-default-input.component.mjs +39 -0
- package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +95 -0
- package/esm2020/components/input/file/file-input/dragDrop.directive.mjs +64 -0
- package/esm2020/components/input/file/file-input/file-input.component.mjs +152 -0
- package/esm2020/components/input/input.component.mjs +207 -110
- package/esm2020/components/input/input.module.mjs +87 -10
- package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +36 -0
- package/esm2020/components/input/number/number-input/number-input.component.mjs +34 -0
- package/esm2020/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +52 -0
- package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +36 -0
- package/esm2020/components/input/string/string-input/string-input.component.mjs +34 -0
- package/esm2020/components/input/string/string-textbox-input/string-textbox-input.component.mjs +35 -0
- package/esm2020/components/table/create-dialog/create-dialog-data.builder.mjs +18 -40
- package/esm2020/components/table/create-dialog/create-entity-dialog-data.builder.mjs +15 -7
- package/esm2020/components/table/create-dialog/create-entity-dialog-data.mjs +1 -1
- package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +36 -22
- package/esm2020/components/table/create-dialog/create-entity-dialog.module.mjs +20 -4
- package/esm2020/components/table/edit-dialog/edit-dialog-data.builder.mjs +23 -63
- package/esm2020/components/table/edit-dialog/edit-entity-dialog-data.mjs +1 -1
- package/esm2020/components/table/edit-dialog/edit-entity-dialog.builder.mjs +15 -7
- package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +50 -31
- package/esm2020/components/table/table-data.builder.mjs +31 -15
- package/esm2020/components/table/table-data.mjs +1 -1
- package/esm2020/components/table/table.component.mjs +77 -32
- package/esm2020/components/table/table.module.mjs +12 -4
- package/esm2020/decorators/array/array-decorator-internal.data.mjs +111 -12
- package/esm2020/decorators/array/array-decorator.data.mjs +2 -2
- package/esm2020/decorators/array/array.decorator.mjs +9 -3
- package/esm2020/decorators/base/base-property.decorator.mjs +4 -3
- package/esm2020/decorators/base/decorator-types.enum.mjs +9 -1
- package/esm2020/decorators/base/dropdown-value.interface.mjs +2 -0
- package/esm2020/decorators/base/property-decorator-internal.data.mjs +33 -10
- package/esm2020/decorators/base/property-decorator.data.mjs +1 -1
- package/esm2020/decorators/boolean/boolean-decorator-internal.data.mjs +12 -1
- package/esm2020/decorators/boolean/boolean-decorator.data.mjs +1 -1
- package/esm2020/decorators/boolean/boolean.decorator.mjs +2 -2
- package/esm2020/decorators/date/date-decorator-internal.data.mjs +48 -0
- package/esm2020/decorators/date/date-decorator.data.mjs +7 -0
- 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 +7 -1
- package/esm2020/decorators/number/number-decorator.data.mjs +1 -1
- package/esm2020/decorators/number/number.decorator.mjs +3 -3
- package/esm2020/decorators/object/object-decorator-internal.data.mjs +5 -2
- package/esm2020/decorators/object/object-decorator.data.mjs +1 -1
- package/esm2020/decorators/object/object.decorator.mjs +2 -2
- package/esm2020/decorators/string/string-decorator-internal.data.mjs +13 -1
- package/esm2020/decorators/string/string-decorator.data.mjs +1 -1
- package/esm2020/decorators/string/string.decorator.mjs +2 -2
- package/esm2020/mocks/placeholder-data.png.mjs +3 -0
- package/esm2020/public-api.mjs +12 -5
- package/fesm2015/ngx-material-entity.mjs +3271 -894
- package/fesm2015/ngx-material-entity.mjs.map +1 -1
- package/fesm2020/ngx-material-entity.mjs +3140 -829
- package/fesm2020/ngx-material-entity.mjs.map +1 -1
- package/mocks/placeholder-data.png.d.ts +1 -0
- package/package.json +7 -1
- package/public-api.d.ts +12 -5
- package/classes/entity-model.class.d.ts +0 -9
- package/classes/entity-service.class.d.ts +0 -66
- package/classes/entity-utilities.class.d.ts +0 -112
- package/components/input/array-table/add-array-item-dialog/add-array-item-dialog-data.builder.d.ts +0 -17
- package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.d.ts +0 -22
- package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.d.ts +0 -12
- package/components/input/array-table/array-table.component.d.ts +0 -34
- package/components/input/array-table/array-table.module.d.ts +0 -19
- package/components/input/internal-input/internal-input.component.d.ts +0 -54
- package/components/input/internal-input/internal-input.module.d.ts +0 -16
- package/esm2020/classes/entity-model.class.mjs +0 -19
- package/esm2020/classes/entity-service.class.mjs +0 -76
- package/esm2020/classes/entity-utilities.class.mjs +0 -329
- package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog-data.builder.mjs +0 -33
- package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog-data.mjs +0 -2
- package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.mjs +0 -45
- package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.mjs +0 -22
- package/esm2020/components/input/array-table/array-table.component.mjs +0 -119
- package/esm2020/components/input/array-table/array-table.module.mjs +0 -66
- package/esm2020/components/input/internal-input/internal-input.component.mjs +0 -70
- package/esm2020/components/input/internal-input/internal-input.module.mjs +0 -54
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NgModel } from '@angular/forms';
|
|
2
|
+
import { BaseBuilder } from '../../classes/base.builder';
|
|
3
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
4
|
+
import { CreateDialogDataInternal } from '../table/create-dialog/create-dialog-data.builder';
|
|
5
|
+
import { AddArrayItemDialogData } from './add-array-item-dialog-data';
|
|
6
|
+
/**
|
|
7
|
+
* The internal AddArrayItemDialogData. Requires all default values the user can leave out.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AddArrayItemDialogDataInternal<EntityType extends BaseEntityType<EntityType>> implements AddArrayItemDialogData<EntityType> {
|
|
10
|
+
entity: EntityType;
|
|
11
|
+
createDialogData: CreateDialogDataInternal;
|
|
12
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
13
|
+
constructor(entity: EntityType, createDialogData: CreateDialogDataInternal, getValidationErrorMessage: (model: NgModel) => string);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The Builder for the AddArrayItemDialogData. Sets default values.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AddArrayItemDialogDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<AddArrayItemDialogDataInternal<EntityType>, AddArrayItemDialogData<EntityType>> {
|
|
19
|
+
constructor(data: AddArrayItemDialogData<EntityType>);
|
|
20
|
+
protected generateBaseData(data: AddArrayItemDialogData<EntityType>): AddArrayItemDialogDataInternal<EntityType>;
|
|
21
|
+
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { NgModel } from '@angular/forms';
|
|
2
|
-
import {
|
|
3
|
-
import { CreateDialogData } from '
|
|
4
|
-
|
|
2
|
+
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
|
+
import { CreateDialogData } from '../table/table-data';
|
|
4
|
+
/**
|
|
5
|
+
* The configuration options for the dialog that adds items to an array.
|
|
6
|
+
*/
|
|
7
|
+
export interface AddArrayItemDialogData<EntityType extends BaseEntityType<EntityType>> {
|
|
5
8
|
/**
|
|
6
9
|
* An empty entity that is used as the data model.
|
|
7
10
|
*/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DateArrayDecoratorConfigInternal } from '../../../../decorators/array/array-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
5
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
6
|
+
import { ArrayTable } from '../array-table.class';
|
|
7
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class ArrayDateInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTable<Date, EntityType> implements OnInit {
|
|
10
|
+
private readonly dialog;
|
|
11
|
+
DateUtilities: typeof DateUtilities;
|
|
12
|
+
entity: EntityType;
|
|
13
|
+
key: keyof EntityType;
|
|
14
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
15
|
+
inputChangeEvent: EventEmitter<void>;
|
|
16
|
+
metadata: DateArrayDecoratorConfigInternal;
|
|
17
|
+
constructor(dialog: MatDialog);
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
protected emitChange(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateInputComponent<any>, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateInputComponent<any>, "array-date-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgModel } from '@angular/forms';
|
|
3
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
4
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
|
+
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
6
|
+
import { DateRangeArrayDecoratorConfigInternal } from '../../../../decorators/array/array-decorator-internal.data';
|
|
7
|
+
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
8
|
+
import { ArrayTable } from '../array-table.class';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class ArrayDateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTable<DateRange, EntityType> implements OnInit {
|
|
11
|
+
private readonly dialog;
|
|
12
|
+
DateUtilities: typeof DateUtilities;
|
|
13
|
+
entity: EntityType;
|
|
14
|
+
key: keyof EntityType;
|
|
15
|
+
metadata: DateRangeArrayDecoratorConfigInternal;
|
|
16
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
17
|
+
inputChangeEvent: EventEmitter<void>;
|
|
18
|
+
dateRangeStart?: Date;
|
|
19
|
+
dateRangeEnd?: Date;
|
|
20
|
+
constructor(dialog: MatDialog);
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Adds a DateRange to the array.
|
|
24
|
+
*/
|
|
25
|
+
addDateRange(): void;
|
|
26
|
+
protected resetInput(): void;
|
|
27
|
+
protected emitChange(): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateRangeInputComponent<any>, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateRangeInputComponent<any>, "array-date-range-input", never, { "entity": "entity"; "key": "key"; "metadata": "metadata"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DateTimeArrayDecoratorConfigInternal } from '../../../../decorators/array/array-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
5
|
+
import { ArrayTable } from '../array-table.class';
|
|
6
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
7
|
+
import { Time } from '@angular/common';
|
|
8
|
+
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
9
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class ArrayDateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTable<Date, EntityType> implements OnInit {
|
|
12
|
+
private readonly dialog;
|
|
13
|
+
DateUtilities: typeof DateUtilities;
|
|
14
|
+
entity: EntityType;
|
|
15
|
+
key: keyof EntityType;
|
|
16
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
17
|
+
inputChangeEvent: EventEmitter<void>;
|
|
18
|
+
metadata: DateTimeArrayDecoratorConfigInternal;
|
|
19
|
+
dateTime?: Date;
|
|
20
|
+
time?: Time;
|
|
21
|
+
timeDropdownValues: DropdownValue<Time>[];
|
|
22
|
+
constructor(dialog: MatDialog);
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
protected resetInput(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Adds a date time to the array.
|
|
27
|
+
*/
|
|
28
|
+
addDateTime(): void;
|
|
29
|
+
protected emitChange(): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateTimeInputComponent<any>, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateTimeInputComponent<any>, "array-date-time-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgModel } from '@angular/forms';
|
|
3
|
+
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
4
|
+
import { MatChipInputEvent } from '@angular/material/chips';
|
|
5
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
6
|
+
import { AutocompleteStringChipsArrayDecoratorConfigInternal } from '../../../../decorators/array/array-decorator-internal.data';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class ArrayStringAutocompleteChipsComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
9
|
+
entity: EntityType;
|
|
10
|
+
key: keyof EntityType;
|
|
11
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
12
|
+
inputChangeEvent: EventEmitter<void>;
|
|
13
|
+
metadata: AutocompleteStringChipsArrayDecoratorConfigInternal;
|
|
14
|
+
stringChipsArrayValues?: string[];
|
|
15
|
+
filteredAutocompleteStrings: string[];
|
|
16
|
+
chipsInput: string;
|
|
17
|
+
constructor();
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Handles adding strings to the chipsArray.
|
|
21
|
+
* Checks validation and also creates a new array if it is undefined.
|
|
22
|
+
* This is needed because two things are validated: The array itself
|
|
23
|
+
* and the contents of the array. And we need a way to display an
|
|
24
|
+
* mat-error. As the only validation for the array is whether or not
|
|
25
|
+
* it contains values, we can set it to undefined when the last element is removed
|
|
26
|
+
* (removeStringChipArrayValue). That way we can use the "required" validator.
|
|
27
|
+
*
|
|
28
|
+
* @param event - The event that fires when a new chip is completed.
|
|
29
|
+
*/
|
|
30
|
+
addStringChipArrayValue(event: MatChipInputEvent): void;
|
|
31
|
+
/**
|
|
32
|
+
* Removes the given value from the array.
|
|
33
|
+
* Sets the array to undefined if it is now empty.
|
|
34
|
+
* This is needed because two things are validated: The array itself
|
|
35
|
+
* and the contents of the array. And we need a way to display an
|
|
36
|
+
* mat-error. As the only validation for the array is whether or not
|
|
37
|
+
* it is empty, setting it to undefined here enables us to use the "required" validator.
|
|
38
|
+
*
|
|
39
|
+
* @param value - The string to remove from the array.
|
|
40
|
+
*/
|
|
41
|
+
removeStringChipArrayValue(value: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Handles adding a string to the array when an autocomplete value has been selected.
|
|
44
|
+
*
|
|
45
|
+
* @param event - The autocomplete selected event.
|
|
46
|
+
* @param chipsInput - The element where the user typed the value.
|
|
47
|
+
*/
|
|
48
|
+
selected(event: MatAutocompleteSelectedEvent, chipsInput: HTMLInputElement): void;
|
|
49
|
+
/**
|
|
50
|
+
* Dynamically filters the Autocomplete options when the user inputs something.
|
|
51
|
+
*
|
|
52
|
+
* @param input - The input of the user.
|
|
53
|
+
*/
|
|
54
|
+
filterAutocompleteStrings(input: unknown): void;
|
|
55
|
+
emitChange(): void;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayStringAutocompleteChipsComponent<any>, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayStringAutocompleteChipsComponent<any>, "array-string-autocomplete-chips", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
58
|
+
}
|
package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { StringChipsArrayDecoratorConfigInternal } from '../../../../decorators/array/array-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
5
|
+
import { MatChipInputEvent } from '@angular/material/chips';
|
|
6
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class ArrayStringChipsInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
9
|
+
entity: EntityType;
|
|
10
|
+
key: keyof EntityType;
|
|
11
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
12
|
+
inputChangeEvent: EventEmitter<void>;
|
|
13
|
+
metadata: StringChipsArrayDecoratorConfigInternal;
|
|
14
|
+
stringChipsArrayValues?: string[];
|
|
15
|
+
chipsInput: string;
|
|
16
|
+
constructor();
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Handles adding strings to the chipsArray.
|
|
20
|
+
* Checks validation and also creates a new array if it is undefined.
|
|
21
|
+
* This is needed because two things are validated: The array itself
|
|
22
|
+
* and the contents of the array. And we need a way to display an
|
|
23
|
+
* mat-error. As the only validation for the array is whether or not
|
|
24
|
+
* it contains values, we can set it to undefined when the last element is removed
|
|
25
|
+
* (removeStringChipArrayValue). That way we can use the "required" validator.
|
|
26
|
+
*
|
|
27
|
+
* @param event - The event that fires when a new chip is completed.
|
|
28
|
+
*/
|
|
29
|
+
addStringChipArrayValue(event: MatChipInputEvent): void;
|
|
30
|
+
/**
|
|
31
|
+
* Removes the given value from the array.
|
|
32
|
+
* Sets the array to undefined if it is now empty.
|
|
33
|
+
* This is needed because two things are validated: The array itself
|
|
34
|
+
* and the contents of the array. And we need a way to display an
|
|
35
|
+
* mat-error. As the only validation for the array is whether or not
|
|
36
|
+
* it is empty, setting it to undefined here enables us to use the "required" validator.
|
|
37
|
+
*
|
|
38
|
+
* @param value - The string to remove from the array.
|
|
39
|
+
*/
|
|
40
|
+
removeStringChipArrayValue(value: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Handles adding a string to the array when an autocomplete value has been selected.
|
|
43
|
+
*
|
|
44
|
+
* @param event - The autocomplete selected event.
|
|
45
|
+
* @param chipsInput - The element where the user typed the value.
|
|
46
|
+
*/
|
|
47
|
+
selected(event: MatAutocompleteSelectedEvent, chipsInput: HTMLInputElement): void;
|
|
48
|
+
emitChange(): void;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayStringChipsInputComponent<any>, never>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayStringChipsInputComponent<any>, "array-string-chips-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
51
|
+
}
|
|
@@ -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 { DateArrayDecoratorConfigInternal, DateRangeArrayDecoratorConfigInternal, DateTimeArrayDecoratorConfigInternal } from '../../../decorators/array/array-decorator-internal.data';
|
|
5
|
+
import { NgModel } from '@angular/forms';
|
|
6
|
+
import { BaseEntityType } from '../../../classes/entity.model';
|
|
7
|
+
/**
|
|
8
|
+
* The base data needed for all arrays that are displayed as a table.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class ArrayTable<T, EntityType extends BaseEntityType<EntityType>> {
|
|
11
|
+
private readonly matDialog;
|
|
12
|
+
abstract entity: EntityType;
|
|
13
|
+
abstract key: keyof EntityType;
|
|
14
|
+
abstract getValidationErrorMessage: (model: NgModel) => string;
|
|
15
|
+
arrayValues: T[];
|
|
16
|
+
input?: T;
|
|
17
|
+
dataSource: MatTableDataSource<T>;
|
|
18
|
+
selection: SelectionModel<T>;
|
|
19
|
+
displayedColumns: string[];
|
|
20
|
+
abstract metadata: DateArrayDecoratorConfigInternal | DateTimeArrayDecoratorConfigInternal | DateRangeArrayDecoratorConfigInternal;
|
|
21
|
+
constructor(matDialog: MatDialog);
|
|
22
|
+
init(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Toggles all array-items in the table.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
masterToggle(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Checks if all array-items in the table have been selected.
|
|
30
|
+
* This is needed to display the "masterToggle"-checkbox correctly.
|
|
31
|
+
*
|
|
32
|
+
* @returns Whether or not all array-items in the table have been selected.
|
|
33
|
+
*/
|
|
34
|
+
isAllSelected(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Tries to add an item to the array.
|
|
37
|
+
*/
|
|
38
|
+
add(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Is split up from the add method to override this functionality more easily.
|
|
41
|
+
*/
|
|
42
|
+
protected resetInput(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Removes all selected entries from the entity array.
|
|
45
|
+
*/
|
|
46
|
+
remove(): void;
|
|
47
|
+
protected abstract emitChange(): void;
|
|
48
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { CheckboxBooleanDecoratorConfigInternal } from '../../../../decorators/boolean/boolean-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class BooleanCheckboxInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
+
entity: EntityType;
|
|
8
|
+
key: keyof EntityType;
|
|
9
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
+
inputChangeEvent: EventEmitter<void>;
|
|
11
|
+
metadata: CheckboxBooleanDecoratorConfigInternal;
|
|
12
|
+
constructor();
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
emitChange(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanCheckboxInputComponent<any>, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanCheckboxInputComponent<any>, "boolean-checkbox-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DropdownBooleanDecoratorConfigInternal } from '../../../../decorators/boolean/boolean-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class BooleanDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
+
entity: EntityType;
|
|
8
|
+
key: keyof EntityType;
|
|
9
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
+
inputChangeEvent: EventEmitter<void>;
|
|
11
|
+
metadata: DropdownBooleanDecoratorConfigInternal;
|
|
12
|
+
constructor();
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
emitChange(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanDropdownInputComponent<any>, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanDropdownInputComponent<any>, "boolean-dropdown-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ToggleBooleanDecoratorConfigInternal } from '../../../../decorators/boolean/boolean-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class BooleanToggleInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
7
|
+
entity: EntityType;
|
|
8
|
+
key: keyof EntityType;
|
|
9
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
10
|
+
inputChangeEvent: EventEmitter<void>;
|
|
11
|
+
metadata: ToggleBooleanDecoratorConfigInternal;
|
|
12
|
+
constructor();
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
emitChange(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanToggleInputComponent<any>, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanToggleInputComponent<any>, "boolean-toggle-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DefaultDateDecoratorConfigInternal } from '../../../../decorators/date/date-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
5
|
+
import { DateFilterFn } from '@angular/material/datepicker';
|
|
6
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class DateInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
9
|
+
DateUtilities: typeof DateUtilities;
|
|
10
|
+
entity: EntityType;
|
|
11
|
+
key: keyof EntityType;
|
|
12
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
13
|
+
inputChangeEvent: EventEmitter<void>;
|
|
14
|
+
metadata: DefaultDateDecoratorConfigInternal;
|
|
15
|
+
constructor();
|
|
16
|
+
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
emitChange(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent<any>, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent<any>, "date-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DateRangeDateDecoratorConfigInternal } from '../../../../decorators/date/date-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { DateFilterFn } from '@angular/material/datepicker';
|
|
5
|
+
import { DateRange } from '../../../../decorators/date/date-decorator.data';
|
|
6
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class DateRangeInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
9
|
+
entity: EntityType;
|
|
10
|
+
key: keyof EntityType;
|
|
11
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
12
|
+
inputChangeEvent: EventEmitter<void>;
|
|
13
|
+
metadata: DateRangeDateDecoratorConfigInternal;
|
|
14
|
+
dateRange: DateRange;
|
|
15
|
+
dateRangeStart?: Date;
|
|
16
|
+
dateRangeEnd?: Date;
|
|
17
|
+
constructor();
|
|
18
|
+
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Updates the date range values based on the start and end date.
|
|
22
|
+
*/
|
|
23
|
+
setDateRangeValues(): void;
|
|
24
|
+
emitChange(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeInputComponent<any>, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangeInputComponent<any>, "date-range-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DateTimeDateDecoratorConfigInternal } from '../../../../decorators/date/date-decorator-internal.data';
|
|
3
|
+
import { NgModel } from '@angular/forms';
|
|
4
|
+
import { DateFilterFn } from '@angular/material/datepicker';
|
|
5
|
+
import { Time } from '@angular/common';
|
|
6
|
+
import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
|
|
7
|
+
import { DateUtilities } from '../../../../classes/date.utilities';
|
|
8
|
+
import { BaseEntityType } from '../../../../classes/entity.model';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class DateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
11
|
+
DateUtilities: typeof DateUtilities;
|
|
12
|
+
entity: EntityType;
|
|
13
|
+
key: keyof EntityType;
|
|
14
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
15
|
+
inputChangeEvent: EventEmitter<void>;
|
|
16
|
+
metadata: DateTimeDateDecoratorConfigInternal;
|
|
17
|
+
dateTime?: Date;
|
|
18
|
+
time?: Time;
|
|
19
|
+
timeDropdownValues: DropdownValue<Time>[];
|
|
20
|
+
constructor();
|
|
21
|
+
defaultDateFilter: DateFilterFn<Date | null | undefined>;
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if two times are equal. Is needed for the dropdown.
|
|
25
|
+
*
|
|
26
|
+
* @param time1 - The first time to compare.
|
|
27
|
+
* @param time2 - The second time to compare.
|
|
28
|
+
* @returns Whether or not the time objects are the same.
|
|
29
|
+
*/
|
|
30
|
+
compareTimes(time1: Time, time2: Time): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Sets the time on a datetime property.
|
|
33
|
+
*/
|
|
34
|
+
setTime(): void;
|
|
35
|
+
emitChange(): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeInputComponent<any>, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeInputComponent<any>, "date-time-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { BaseEntityType } from '../../../../classes/entity.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class FileDefaultInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
9
|
+
FileUtilities: typeof FileUtilities;
|
|
10
|
+
entity: EntityType;
|
|
11
|
+
key: keyof EntityType;
|
|
12
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
13
|
+
inputChangeEvent: EventEmitter<void>;
|
|
14
|
+
metadata: DefaultFileDecoratorConfigInternal;
|
|
15
|
+
constructor();
|
|
16
|
+
ngOnInit(): Promise<void>;
|
|
17
|
+
refreshFileData(fileData?: FileData | FileData[]): Promise<void>;
|
|
18
|
+
emitChange(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileDefaultInputComponent<any>, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileDefaultInputComponent<any>, "file-default-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgModel } from '@angular/forms';
|
|
3
|
+
import { ImageFileDecoratorConfigInternal } 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 { BaseEntityType } from '../../../../classes/entity.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class FileImageInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
|
|
9
|
+
FileUtilities: typeof FileUtilities;
|
|
10
|
+
entity: EntityType;
|
|
11
|
+
key: keyof EntityType;
|
|
12
|
+
getValidationErrorMessage: (model: NgModel) => string;
|
|
13
|
+
inputChangeEvent: EventEmitter<void>;
|
|
14
|
+
metadata: ImageFileDecoratorConfigInternal;
|
|
15
|
+
singlePreviewImage?: string;
|
|
16
|
+
multiPreviewImages?: string[];
|
|
17
|
+
imageIndex: number;
|
|
18
|
+
placeHolder: string;
|
|
19
|
+
constructor();
|
|
20
|
+
ngOnInit(): Promise<void>;
|
|
21
|
+
private setSinglePreviewImage;
|
|
22
|
+
private setMultiPreviewImages;
|
|
23
|
+
refreshFileData(fileData?: FileData | FileData[]): Promise<void>;
|
|
24
|
+
prev(): Promise<void>;
|
|
25
|
+
next(): Promise<void>;
|
|
26
|
+
setIndex(index: number): Promise<void>;
|
|
27
|
+
emitChange(): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileImageInputComponent<any>, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileImageInputComponent<any>, "file-image-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never>;
|
|
30
|
+
}
|
|
@@ -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,32 @@
|
|
|
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
|
+
fileDataChangeEvent: EventEmitter<FileData | FileData[]>;
|
|
19
|
+
metadata: DefaultFileDecoratorConfigInternal;
|
|
20
|
+
constructor(dialog: MatDialog);
|
|
21
|
+
ngOnInit(): Promise<void>;
|
|
22
|
+
private initMultiFile;
|
|
23
|
+
private initSingleFile;
|
|
24
|
+
setFileFromInput(event: Event): Promise<void>;
|
|
25
|
+
setFile(files: File[]): Promise<void>;
|
|
26
|
+
private resetFileInputs;
|
|
27
|
+
private setMultiFile;
|
|
28
|
+
private setSingleFile;
|
|
29
|
+
removeFile(name: string): void;
|
|
30
|
+
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
|
+
}
|