ngx-material-entity 18.2.6 → 20.0.0
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/fesm2022/ngx-material-entity.mjs +154 -150
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/index.d.ts +4501 -3
- package/package.json +10 -12
- package/classes/base.builder.d.ts +0 -37
- package/classes/entity.model.d.ts +0 -27
- package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +0 -24
- package/components/confirm-dialog/confirm-dialog-data.d.ts +0 -48
- package/components/confirm-dialog/confirm-dialog.component.d.ts +0 -36
- package/components/create-page/create-data.route.d.ts +0 -16
- package/components/create-page/create-page.component.d.ts +0 -141
- package/components/create-page/page-create-data.builder.d.ts +0 -18
- package/components/custom-table/custom-table-configuration.model.d.ts +0 -65
- package/components/custom-table/custom-table.component.d.ts +0 -111
- package/components/edit-page/edit-data.route.d.ts +0 -16
- package/components/edit-page/edit-page.component.d.ts +0 -167
- package/components/edit-page/page-edit-data.builder.d.ts +0 -18
- package/components/form/form.component.d.ts +0 -64
- package/components/input/array/array-date-input/array-date-input.component.d.ts +0 -17
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +0 -25
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +0 -26
- package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +0 -30
- package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +0 -36
- package/components/input/array/array-table.class.d.ts +0 -56
- package/components/input/base-input.component.d.ts +0 -64
- package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +0 -10
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +0 -13
- package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +0 -10
- package/components/input/custom/custom.component.d.ts +0 -13
- package/components/input/date/date-input/date-input.component.d.ts +0 -11
- package/components/input/date/date-range-input/date-range-input.component.d.ts +0 -22
- package/components/input/date/date-time-input/date-time-input.component.d.ts +0 -32
- package/components/input/file/file-default-input/file-default-input.component.d.ts +0 -11
- package/components/input/file/file-image-input/file-image-input.component.d.ts +0 -28
- package/components/input/file/file-input/file-input.component.d.ts +0 -45
- package/components/input/input.component.d.ts +0 -590
- package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +0 -24
- package/components/input/number/number-input/number-input.component.d.ts +0 -9
- package/components/input/number/number-slider-input/number-slider-input.component.d.ts +0 -10
- package/components/input/relations/references-many-input/references-many-input.component.d.ts +0 -43
- package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +0 -19
- package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +0 -24
- package/components/input/string/string-input/string-input.component.d.ts +0 -9
- package/components/input/string/string-password-input/string-password-input.component.d.ts +0 -31
- package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +0 -9
- package/components/table/create-dialog/create-data.builder.d.ts +0 -25
- package/components/table/create-dialog/create-entity-data.builder.d.ts +0 -21
- package/components/table/create-dialog/create-entity-data.d.ts +0 -19
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +0 -77
- package/components/table/default.actions.d.ts +0 -25
- package/components/table/display-column-value/base-display-column-value.component.d.ts +0 -15
- package/components/table/display-column-value/display-column-value.component.d.ts +0 -26
- package/components/table/edit-dialog/edit-data.builder.d.ts +0 -44
- package/components/table/edit-dialog/edit-entity-data.d.ts +0 -27
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +0 -118
- package/components/table/edit-dialog/edit-entity.builder.d.ts +0 -23
- package/components/table/table-data.builder.d.ts +0 -102
- package/components/table/table-data.d.ts +0 -340
- package/components/table/table.component.d.ts +0 -119
- package/components/tooltip/tooltip.component.d.ts +0 -14
- package/decorators/array/array-decorator-internal.data.d.ts +0 -129
- package/decorators/array/array-decorator.data.d.ts +0 -252
- package/decorators/array/array.decorator.d.ts +0 -9
- package/decorators/base/base-property.decorator.d.ts +0 -9
- package/decorators/base/decorator-types.enum.d.ts +0 -48
- package/decorators/base/dropdown-value.interface.d.ts +0 -14
- package/decorators/base/property-decorator-internal.data.d.ts +0 -41
- package/decorators/base/property-decorator.data.d.ts +0 -88
- package/decorators/boolean/boolean-decorator-internal.data.d.ts +0 -26
- package/decorators/boolean/boolean-decorator.data.d.ts +0 -39
- package/decorators/boolean/boolean.decorator.d.ts +0 -7
- package/decorators/custom/custom-decorator-internal.data.d.ts +0 -17
- package/decorators/custom/custom-decorator.data.d.ts +0 -35
- package/decorators/custom/custom.decorator.d.ts +0 -9
- package/decorators/date/date-decorator-internal.data.d.ts +0 -45
- package/decorators/date/date-decorator.data.d.ts +0 -126
- package/decorators/date/date.decorator.d.ts +0 -7
- package/decorators/file/file-decorator-internal.data.d.ts +0 -93
- package/decorators/file/file-decorator.data.d.ts +0 -88
- package/decorators/file/file.decorator.d.ts +0 -8
- package/decorators/has-many/has-many-decorator-internal.data.d.ts +0 -16
- package/decorators/has-many/has-many-decorator.data.d.ts +0 -34
- package/decorators/has-many/has-many.decorator.d.ts +0 -8
- package/decorators/number/number-decorator-internal.data.d.ts +0 -38
- package/decorators/number/number-decorator.data.d.ts +0 -63
- package/decorators/number/number.decorator.d.ts +0 -7
- package/decorators/object/object-decorator-internal.data.d.ts +0 -23
- package/decorators/object/object-decorator.data.d.ts +0 -42
- package/decorators/object/object.decorator.d.ts +0 -8
- package/decorators/references-many/references-many-decorator-internal.data.d.ts +0 -30
- package/decorators/references-many/references-many-decorator.data.d.ts +0 -63
- package/decorators/references-many/references-many.decorator.d.ts +0 -8
- package/decorators/references-one/references-one-decorator-internal.data.d.ts +0 -16
- package/decorators/references-one/references-one-decorator.data.d.ts +0 -32
- package/decorators/references-one/references-one.decorator.d.ts +0 -8
- package/decorators/string/string-decorator-internal.data.d.ts +0 -56
- package/decorators/string/string-decorator.data.d.ts +0 -116
- package/decorators/string/string.decorator.d.ts +0 -7
- package/default-global-configuration-values.d.ts +0 -13
- package/directives/drag-drop.directive.d.ts +0 -29
- package/directives/dynamic-style-class.directive.d.ts +0 -24
- package/directives/included-in.directive.d.ts +0 -14
- package/directives/number.directive.d.ts +0 -16
- package/directives/password-match.directive.d.ts +0 -14
- package/directives/tooltip.directive.d.ts +0 -42
- package/encapsulation/js-2-xml.utilities.d.ts +0 -14
- package/encapsulation/jszip.utilities.d.ts +0 -12
- package/encapsulation/lodash.utilities.d.ts +0 -60
- package/encapsulation/reflect.utilities.d.ts +0 -59
- package/encapsulation/uuid.utilities.d.ts +0 -10
- package/esm2022/classes/base.builder.mjs +0 -47
- package/esm2022/classes/entity.model.mjs +0 -26
- package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +0 -57
- package/esm2022/components/confirm-dialog/confirm-dialog-data.mjs +0 -2
- package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +0 -71
- package/esm2022/components/create-page/create-data.route.mjs +0 -12
- package/esm2022/components/create-page/create-page.component.mjs +0 -276
- package/esm2022/components/create-page/page-create-data.builder.mjs +0 -30
- package/esm2022/components/custom-table/custom-table-configuration.model.mjs +0 -37
- package/esm2022/components/custom-table/custom-table.component.mjs +0 -213
- package/esm2022/components/edit-page/edit-data.route.mjs +0 -12
- package/esm2022/components/edit-page/edit-page.component.mjs +0 -362
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +0 -33
- package/esm2022/components/form/form.component.mjs +0 -106
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +0 -56
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +0 -82
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +0 -82
- package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +0 -81
- package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +0 -74
- package/esm2022/components/input/array/array-table.class.mjs +0 -107
- package/esm2022/components/input/base-input.component.mjs +0 -102
- package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +0 -29
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +0 -40
- package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +0 -29
- package/esm2022/components/input/custom/custom.component.mjs +0 -28
- package/esm2022/components/input/date/date-input/date-input.component.mjs +0 -28
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +0 -84
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +0 -90
- package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +0 -18
- package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +0 -104
- package/esm2022/components/input/file/file-input/file-input.component.mjs +0 -228
- package/esm2022/components/input/input.component.mjs +0 -1367
- package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +0 -65
- package/esm2022/components/input/number/number-input/number-input.component.mjs +0 -23
- package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +0 -27
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +0 -145
- package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +0 -56
- package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +0 -65
- package/esm2022/components/input/string/string-input/string-input.component.mjs +0 -23
- package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +0 -107
- package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +0 -24
- package/esm2022/components/table/create-dialog/create-data.builder.mjs +0 -56
- package/esm2022/components/table/create-dialog/create-entity-data.builder.mjs +0 -32
- package/esm2022/components/table/create-dialog/create-entity-data.mjs +0 -2
- package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +0 -180
- package/esm2022/components/table/default.actions.mjs +0 -83
- package/esm2022/components/table/display-column-value/base-display-column-value.component.mjs +0 -27
- package/esm2022/components/table/display-column-value/display-column-value.component.mjs +0 -41
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +0 -136
- package/esm2022/components/table/edit-dialog/edit-entity-data.mjs +0 -2
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +0 -295
- package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +0 -39
- package/esm2022/components/table/table-data.builder.mjs +0 -304
- package/esm2022/components/table/table-data.mjs +0 -2
- package/esm2022/components/table/table.component.mjs +0 -324
- package/esm2022/components/tooltip/tooltip.component.mjs +0 -26
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +0 -310
- package/esm2022/decorators/array/array-decorator.data.mjs +0 -51
- package/esm2022/decorators/array/array.decorator.mjs +0 -37
- package/esm2022/decorators/base/base-property.decorator.mjs +0 -17
- package/esm2022/decorators/base/decorator-types.enum.mjs +0 -35
- package/esm2022/decorators/base/dropdown-value.interface.mjs +0 -2
- package/esm2022/decorators/base/property-decorator-internal.data.mjs +0 -101
- package/esm2022/decorators/base/property-decorator.data.mjs +0 -59
- package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +0 -45
- package/esm2022/decorators/boolean/boolean-decorator.data.mjs +0 -11
- package/esm2022/decorators/boolean/boolean.decorator.mjs +0 -21
- package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +0 -34
- package/esm2022/decorators/custom/custom-decorator.data.mjs +0 -2
- package/esm2022/decorators/custom/custom.decorator.mjs +0 -13
- package/esm2022/decorators/date/date-decorator-internal.data.mjs +0 -92
- package/esm2022/decorators/date/date-decorator.data.mjs +0 -11
- package/esm2022/decorators/date/date.decorator.mjs +0 -22
- package/esm2022/decorators/file/file-decorator-internal.data.mjs +0 -143
- package/esm2022/decorators/file/file-decorator.data.mjs +0 -59
- package/esm2022/decorators/file/file.decorator.mjs +0 -25
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +0 -41
- package/esm2022/decorators/has-many/has-many-decorator.data.mjs +0 -2
- package/esm2022/decorators/has-many/has-many.decorator.mjs +0 -13
- package/esm2022/decorators/number/number-decorator-internal.data.mjs +0 -68
- package/esm2022/decorators/number/number-decorator.data.mjs +0 -11
- package/esm2022/decorators/number/number.decorator.mjs +0 -22
- package/esm2022/decorators/object/object-decorator-internal.data.mjs +0 -42
- package/esm2022/decorators/object/object-decorator.data.mjs +0 -22
- package/esm2022/decorators/object/object.decorator.mjs +0 -20
- package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +0 -55
- package/esm2022/decorators/references-many/references-many-decorator.data.mjs +0 -2
- package/esm2022/decorators/references-many/references-many.decorator.mjs +0 -13
- package/esm2022/decorators/references-one/references-one-decorator-internal.data.mjs +0 -34
- package/esm2022/decorators/references-one/references-one-decorator.data.mjs +0 -2
- package/esm2022/decorators/references-one/references-one.decorator.mjs +0 -12
- package/esm2022/decorators/string/string-decorator-internal.data.mjs +0 -119
- package/esm2022/decorators/string/string-decorator.data.mjs +0 -11
- package/esm2022/decorators/string/string.decorator.mjs +0 -29
- package/esm2022/default-global-configuration-values.mjs +0 -91
- package/esm2022/directives/drag-drop.directive.mjs +0 -60
- package/esm2022/directives/dynamic-style-class.directive.mjs +0 -51
- package/esm2022/directives/included-in.directive.mjs +0 -33
- package/esm2022/directives/number.directive.mjs +0 -37
- package/esm2022/directives/password-match.directive.mjs +0 -30
- package/esm2022/directives/tooltip.directive.mjs +0 -142
- package/esm2022/encapsulation/js-2-xml.utilities.mjs +0 -17
- package/esm2022/encapsulation/jszip.utilities.mjs +0 -16
- package/esm2022/encapsulation/lodash.utilities.mjs +0 -80
- package/esm2022/encapsulation/reflect.utilities.mjs +0 -79
- package/esm2022/encapsulation/uuid.utilities.mjs +0 -14
- package/esm2022/functions/default-false.function.mjs +0 -9
- package/esm2022/functions/default-style-classes.function.mjs +0 -7
- package/esm2022/functions/default-true.function.mjs +0 -9
- package/esm2022/functions/dropdown-values-to-function.function.mjs +0 -15
- package/esm2022/functions/get-changes-tooltip-content.function.mjs +0 -23
- package/esm2022/functions/get-config-value.function.mjs +0 -14
- package/esm2022/functions/get-validation-error-message.function.mjs +0 -54
- package/esm2022/functions/get-validation-errors-tooltip-content.function.mjs +0 -23
- package/esm2022/functions/is-async-function.function.mjs +0 -9
- package/esm2022/functions/table-column-value-to-sort-value.function.mjs +0 -33
- package/esm2022/global-configuration-values.mjs +0 -27
- package/esm2022/mocks/placeholder-data.png.mjs +0 -3
- package/esm2022/ngx-material-entity.mjs +0 -5
- package/esm2022/public-api.mjs +0 -68
- package/esm2022/services/entity.service.mjs +0 -269
- package/esm2022/services/unsaved-changes.guard.mjs +0 -13
- package/esm2022/utilities/date.utilities.mjs +0 -138
- package/esm2022/utilities/entity.utilities.mjs +0 -611
- package/esm2022/utilities/file.utilities.mjs +0 -172
- package/esm2022/utilities/selection.utilities.mjs +0 -49
- package/esm2022/utilities/validation.utilities.mjs +0 -543
- package/functions/default-false.function.d.ts +0 -6
- package/functions/default-style-classes.function.d.ts +0 -6
- package/functions/default-true.function.d.ts +0 -6
- package/functions/dropdown-values-to-function.function.d.ts +0 -11
- package/functions/get-changes-tooltip-content.function.d.ts +0 -13
- package/functions/get-config-value.function.d.ts +0 -7
- package/functions/get-validation-error-message.function.d.ts +0 -5
- package/functions/get-validation-errors-tooltip-content.function.d.ts +0 -12
- package/functions/is-async-function.function.d.ts +0 -6
- package/functions/table-column-value-to-sort-value.function.d.ts +0 -9
- package/global-configuration-values.d.ts +0 -205
- package/mocks/placeholder-data.png.d.ts +0 -1
- package/public-api.d.ts +0 -60
- package/services/entity.service.d.ts +0 -146
- package/services/unsaved-changes.guard.d.ts +0 -23
- package/utilities/date.utilities.d.ts +0 -92
- package/utilities/entity.utilities.d.ts +0 -236
- package/utilities/file.utilities.d.ts +0 -67
- package/utilities/selection.utilities.d.ts +0 -28
- package/utilities/validation.utilities.d.ts +0 -58
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { EnvironmentInjector } from '@angular/core';
|
|
3
|
-
import { BaseEntityType } from '../classes/entity.model';
|
|
4
|
-
import { DecoratorType, DecoratorTypes } from '../decorators/base/decorator-types.enum';
|
|
5
|
-
import { PropertyDecoratorConfigInternal } from '../decorators/base/property-decorator-internal.data';
|
|
6
|
-
/**
|
|
7
|
-
* Shows information about differences between two entities.
|
|
8
|
-
*/
|
|
9
|
-
export interface Difference<EntityType extends BaseEntityType<EntityType>> {
|
|
10
|
-
/**
|
|
11
|
-
* The key where the two entities have different values.
|
|
12
|
-
*/
|
|
13
|
-
key: keyof EntityType;
|
|
14
|
-
/**
|
|
15
|
-
* The value before any changes.
|
|
16
|
-
*/
|
|
17
|
-
before: unknown;
|
|
18
|
-
/**
|
|
19
|
-
* The current value after changes.
|
|
20
|
-
*/
|
|
21
|
-
after: unknown;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Contains HelperMethods around handling Entities and their property-metadata.
|
|
25
|
-
*/
|
|
26
|
-
export declare abstract class EntityUtilities {
|
|
27
|
-
/**
|
|
28
|
-
* The key for all keys of metadata that should be set to undefined when the entity gets reset.
|
|
29
|
-
*/
|
|
30
|
-
static readonly METADATA_KEYS_TO_RESET_KEY: string;
|
|
31
|
-
/**
|
|
32
|
-
* The key for the metadata that saves the single preview image value on image properties.
|
|
33
|
-
*/
|
|
34
|
-
static readonly SINGLE_PREVIEW_IMAGE_KEY: string;
|
|
35
|
-
/**
|
|
36
|
-
* The key for the metadata that saves the multi preview images value on image properties.
|
|
37
|
-
*/
|
|
38
|
-
static readonly MULTI_PREVIEW_IMAGES_KEY: string;
|
|
39
|
-
/**
|
|
40
|
-
* The key for the metadata that saves the filenames value on file properties.
|
|
41
|
-
*/
|
|
42
|
-
static readonly FILENAMES_KEY: string;
|
|
43
|
-
/**
|
|
44
|
-
* The key for the metadata that saves the confirm password value on password properties.
|
|
45
|
-
*/
|
|
46
|
-
static readonly CONFIRM_PASSWORD_KEY: string;
|
|
47
|
-
/**
|
|
48
|
-
* The key for the metadata that saves the time value on date time properties.
|
|
49
|
-
*/
|
|
50
|
-
static readonly TIME_KEY: string;
|
|
51
|
-
/**
|
|
52
|
-
* Gets the properties to omit when updating the entity.
|
|
53
|
-
* @param entity - The entity to get the properties which should be left out for updating from.
|
|
54
|
-
* @returns The properties which should be left out for updating an Entity.
|
|
55
|
-
*/
|
|
56
|
-
static getOmitForUpdate<EntityType extends BaseEntityType<EntityType>>(entity: EntityType): (keyof EntityType)[];
|
|
57
|
-
/**
|
|
58
|
-
* Gets the properties to omit when creating new entities.
|
|
59
|
-
* @param entity - The entity to get the properties which should be left out for creating from.
|
|
60
|
-
* @returns The properties which should be left out for creating a new Entity.
|
|
61
|
-
*/
|
|
62
|
-
static getOmitForCreate<EntityType extends BaseEntityType<EntityType>>(entity: EntityType): (keyof EntityType)[];
|
|
63
|
-
/**
|
|
64
|
-
* Returns the given entity without the values that should be omitted for creation.
|
|
65
|
-
* @param entity - The entity with all its values.
|
|
66
|
-
* @returns The reduced entity object.
|
|
67
|
-
*/
|
|
68
|
-
static getWithoutOmitCreateValues<EntityType extends BaseEntityType<EntityType>>(entity: EntityType): Partial<EntityType>;
|
|
69
|
-
/**
|
|
70
|
-
* Returns the given entity without the values that should be omitted for updating.
|
|
71
|
-
* This also handles omitting keys for @object or @array values and removes values that haven't been changed by default.
|
|
72
|
-
* @param entity - The entity with all its values.
|
|
73
|
-
* @param entityPriorChanges - The entity before any changes were applied.
|
|
74
|
-
* @param http - The angular HttpClient. Used to fetch files.
|
|
75
|
-
* @param injector - An angular environment injector.
|
|
76
|
-
* @returns The reduced entity object.
|
|
77
|
-
*/
|
|
78
|
-
static getWithoutOmitUpdateValues<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType, http: HttpClient, injector: EnvironmentInjector): Promise<Partial<EntityType>>;
|
|
79
|
-
/**
|
|
80
|
-
* Sets all default values on the given entity.
|
|
81
|
-
* @param entity - The entity to set the default values on.
|
|
82
|
-
*/
|
|
83
|
-
static setDefaultValues<EntityType extends BaseEntityType<EntityType>>(entity: EntityType): void;
|
|
84
|
-
/**
|
|
85
|
-
* Gets all properties on the given entity which are files.
|
|
86
|
-
* @param entity - The entity to check for file properties.
|
|
87
|
-
* @param omit - Whether to leave out values that are omitted for create or delete.
|
|
88
|
-
* @returns The keys of all file properties on the given entity.
|
|
89
|
-
*/
|
|
90
|
-
static getFileProperties<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, omit?: 'create' | 'update'): (keyof EntityType)[];
|
|
91
|
-
/**
|
|
92
|
-
* Gets the metadata included in an property.
|
|
93
|
-
* @param entity - The entity with the property to get the metadata from.
|
|
94
|
-
* @param propertyKey - The property on the given Entity to get the metadata from.
|
|
95
|
-
* @param type - For secure Typing, defines the returned PropertyConfig.
|
|
96
|
-
* @returns The metadata of the property.
|
|
97
|
-
* @throws When no metadata can be found for the given property.
|
|
98
|
-
*/
|
|
99
|
-
static getPropertyMetadata<EntityType extends BaseEntityType<EntityType>, T extends DecoratorTypes, CustomMetadataType extends Record<string, unknown>>(entity: EntityType, propertyKey: keyof EntityType, type?: T): DecoratorType<T, CustomMetadataType> | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* Gets the type of the property-metadata.
|
|
102
|
-
* @param entity - The entity with the property to get the type from.
|
|
103
|
-
* @param propertyKey - The property on the given Entity to get the type from.
|
|
104
|
-
* @returns The type of the metadata.
|
|
105
|
-
* @throws Will throw an error if no metadata can be found for the given property.
|
|
106
|
-
*/
|
|
107
|
-
static getPropertyType<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, propertyKey: keyof EntityType): DecoratorTypes | undefined;
|
|
108
|
-
/**
|
|
109
|
-
* Sets all property values based on a given entity data-object.
|
|
110
|
-
* @param target - The target object that needs to be constructed (if called inside an Entity constructor its usually this).
|
|
111
|
-
* @param entity - The data object to get the property values from.
|
|
112
|
-
* @alias new
|
|
113
|
-
* @alias build
|
|
114
|
-
* @alias construct
|
|
115
|
-
*/
|
|
116
|
-
static new<EntityType extends BaseEntityType<EntityType>>(target: EntityType, entity?: EntityType): void;
|
|
117
|
-
static construct: typeof EntityUtilities.new;
|
|
118
|
-
static build: typeof EntityUtilities.new;
|
|
119
|
-
/**
|
|
120
|
-
* Checks if an entity is "dirty" (if its values have changed).
|
|
121
|
-
* @param entity - The entity after all changes.
|
|
122
|
-
* @param entityPriorChanges - The entity before the changes.
|
|
123
|
-
* @param http - The angular HttpClient. Used to fetch files.
|
|
124
|
-
* @param injector - An angular environment injector.
|
|
125
|
-
* @returns Whether or not the entity is dirty.
|
|
126
|
-
*/
|
|
127
|
-
static isDirty<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType, http: HttpClient, injector: EnvironmentInjector): Promise<boolean>;
|
|
128
|
-
/**
|
|
129
|
-
* Gets the differences between the two given entities. Only checks properties which are decorated.
|
|
130
|
-
* @param entity - The entity as is.
|
|
131
|
-
* @param entityPriorChanges - The entity before any changes have been made.
|
|
132
|
-
* @param http - The angular http client, is needed to check if files are equal.
|
|
133
|
-
* @param injector - An angular environment injector.
|
|
134
|
-
* @returns The differences as an array consisting of key, before and after.
|
|
135
|
-
*/
|
|
136
|
-
static getDifferencesBetweenEntities<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType, http: HttpClient, injector: EnvironmentInjector): Promise<Difference<EntityType>[]>;
|
|
137
|
-
/**
|
|
138
|
-
* Checks if two given values are equal.
|
|
139
|
-
* It uses the isEqual method from LodashUtilities and extends it with functionality regarding Dates.
|
|
140
|
-
* @param value - The updated value.
|
|
141
|
-
* @param valuePriorChanges - The value before any changes.
|
|
142
|
-
* @param metadata - The metadata of the property.
|
|
143
|
-
* @param type - The type of the property.
|
|
144
|
-
* @param http - The angular HttpClient. Used to fetch files.
|
|
145
|
-
* @returns Whether or not the given values are equal.
|
|
146
|
-
*/
|
|
147
|
-
static isEqual(value: unknown, valuePriorChanges: unknown, metadata: PropertyDecoratorConfigInternal<unknown> | undefined, type: DecoratorTypes | undefined, http: HttpClient): Promise<boolean>;
|
|
148
|
-
private static differenceIsUndefinedAndEmptyString;
|
|
149
|
-
private static differenceIsUndefinedAndEmptyArray;
|
|
150
|
-
private static isEqualArrayString;
|
|
151
|
-
private static isEqualArrayDate;
|
|
152
|
-
private static isEqualArrayDateRange;
|
|
153
|
-
private static isEqualDateTime;
|
|
154
|
-
private static isEqualDate;
|
|
155
|
-
private static isEqualDateRange;
|
|
156
|
-
private static isEqualFile;
|
|
157
|
-
private static isEqualCustom;
|
|
158
|
-
/**
|
|
159
|
-
* Compare function for sorting entity keys by their order value.
|
|
160
|
-
* @param a - First key of entity.
|
|
161
|
-
* @param b - Second key of entity.
|
|
162
|
-
* @param entity - Current entity (used to get metadata of entity keys).
|
|
163
|
-
* @returns 0 if both values have the same order, a negative value if 'a' comes before 'b', a positive value if 'a' comes behind 'b'.
|
|
164
|
-
*/
|
|
165
|
-
static compareOrder<EntityType extends BaseEntityType<EntityType>>(a: keyof EntityType, b: keyof EntityType, entity: EntityType): number;
|
|
166
|
-
/**
|
|
167
|
-
* Gets the responsive column classes for "lg", "md" and "sm".
|
|
168
|
-
* @param entity - Entity to get the responsive column classes for.
|
|
169
|
-
* @param key - Key of the property to get the responsive column classes from.
|
|
170
|
-
* @returns Responsive column classes for large, middle and small displays.
|
|
171
|
-
* @throws When no metadata for the given key was found.
|
|
172
|
-
*/
|
|
173
|
-
static getWidthClasses<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, key: keyof EntityType): string;
|
|
174
|
-
/**
|
|
175
|
-
* Resets all changes on an entity.
|
|
176
|
-
* @param entity - The entity to reset.
|
|
177
|
-
* @param entityPriorChanges - The entity before any changes.
|
|
178
|
-
*/
|
|
179
|
-
static resetChangesOnEntity<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType): void;
|
|
180
|
-
private static getEntityRows;
|
|
181
|
-
/**
|
|
182
|
-
* Gets the tabs that are used to display the given entity.
|
|
183
|
-
* @param entity - The entity to get the rows from.
|
|
184
|
-
* @param injector - An angular environment injector.
|
|
185
|
-
* @param hideOmitForCreate - Whether or not keys with the metadata omitForCreate should be filtered out.
|
|
186
|
-
* @param hideOmitForEdit - Whether or not keys with the metadata omitForUpdate should be filtered out.
|
|
187
|
-
* @param additionalOmitKeys - Additional omit values.
|
|
188
|
-
* @returns The sorted Tabs containing the rows and the keys to display in that row.
|
|
189
|
-
*/
|
|
190
|
-
static getEntityTabs<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, injector: EnvironmentInjector, hideOmitForCreate?: boolean, hideOmitForEdit?: boolean, additionalOmitKeys?: (keyof EntityType)[]): EntityTab<EntityType>[];
|
|
191
|
-
private static getKeysForRow;
|
|
192
|
-
private static getNumberOfRows;
|
|
193
|
-
private static getNumberOfTabs;
|
|
194
|
-
private static getTabName;
|
|
195
|
-
private static getFirstTabName;
|
|
196
|
-
/**
|
|
197
|
-
* Gets the keys of the provided entity correctly typed.
|
|
198
|
-
* @param entity - The entity to get the keys of.
|
|
199
|
-
* @param injector - An angular environment injector.
|
|
200
|
-
* @param hideOmitForCreate - Whether or not keys with the metadata omitForCreate should be filtered out.
|
|
201
|
-
* @param hideOmitForEdit - Whether or not keys with the metadata omitForUpdate should be filtered out.
|
|
202
|
-
* @returns An array of keys of the entity.
|
|
203
|
-
*/
|
|
204
|
-
static keysOf<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, injector: EnvironmentInjector, hideOmitForCreate?: boolean, hideOmitForEdit?: boolean): (keyof EntityType)[];
|
|
205
|
-
private static getDontDisplayKeys;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* A row that contains information about how to display an entity.
|
|
209
|
-
*/
|
|
210
|
-
export interface EntityRow<EntityType extends BaseEntityType<EntityType>> {
|
|
211
|
-
/**
|
|
212
|
-
* The row in which this should be displayed.
|
|
213
|
-
*/
|
|
214
|
-
row: number;
|
|
215
|
-
/**
|
|
216
|
-
* The keys of the values that should be displayed in that row.
|
|
217
|
-
*/
|
|
218
|
-
keys: (keyof EntityType)[];
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* A tab that contains all the information about how to display an entity.
|
|
222
|
-
*/
|
|
223
|
-
export interface EntityTab<EntityType extends BaseEntityType<EntityType>> {
|
|
224
|
-
/**
|
|
225
|
-
* The tab in which the rows should be displayed.
|
|
226
|
-
*/
|
|
227
|
-
tab: number;
|
|
228
|
-
/**
|
|
229
|
-
* The name to display inside the tab.
|
|
230
|
-
*/
|
|
231
|
-
tabName: string;
|
|
232
|
-
/**
|
|
233
|
-
* The rows that should be displayed inside this tab,.
|
|
234
|
-
*/
|
|
235
|
-
rows: EntityRow<EntityType>[];
|
|
236
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { FileDataWithFile } from '../decorators/file/file-decorator-internal.data';
|
|
3
|
-
import { FileData } from '../decorators/file/file-decorator.data';
|
|
4
|
-
/**
|
|
5
|
-
* Provides functionality regarding files.
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class FileUtilities {
|
|
8
|
-
/**
|
|
9
|
-
* Gets the accept value for the html input.
|
|
10
|
-
* @param mimeTypes - The mimeTypes to get the accept string from.
|
|
11
|
-
* @returns A comma separated string of all the provided mime types.
|
|
12
|
-
*/
|
|
13
|
-
static getAcceptString(mimeTypes?: string[]): string;
|
|
14
|
-
/**
|
|
15
|
-
* Reads a url to display the given file.
|
|
16
|
-
* @param file - The file to get the url from.
|
|
17
|
-
* @returns A promise of the url. Undefined if no file was provided.
|
|
18
|
-
*/
|
|
19
|
-
static getDataURLFromFile(file?: Blob): Promise<string | undefined>;
|
|
20
|
-
/**
|
|
21
|
-
* Gets a file from the given url.
|
|
22
|
-
* @param url - The url to get the file from.
|
|
23
|
-
* @param http - The angular HttpClient. Used to fetch files.
|
|
24
|
-
* @returns A promise of the File.
|
|
25
|
-
*/
|
|
26
|
-
private static getFileFromUrl;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the file data with the blob from the given File Data.
|
|
29
|
-
* @param data - The File Data to get the file data with blob from.
|
|
30
|
-
* @param http - The angular HttpClient. Used to fetch files.
|
|
31
|
-
* @returns FileDataWithFile.
|
|
32
|
-
*/
|
|
33
|
-
static getFileData(data: FileData, http: HttpClient): Promise<FileDataWithFile>;
|
|
34
|
-
/**
|
|
35
|
-
* Downloads a single file from the given File Data.
|
|
36
|
-
* @param fileData - The file data. Needs to contain a blob.
|
|
37
|
-
*/
|
|
38
|
-
static downloadSingleFile(fileData: FileDataWithFile): void;
|
|
39
|
-
/**
|
|
40
|
-
* Downloads a blob.
|
|
41
|
-
* @param blob - The blob to download.
|
|
42
|
-
* @param name - The name of the downloaded file.
|
|
43
|
-
*/
|
|
44
|
-
static downLoadBlob(blob: Blob, name?: string): void;
|
|
45
|
-
/**
|
|
46
|
-
* Downloads multiple files as a zip with the given name.
|
|
47
|
-
* @param name - The name of the zip file to generate.
|
|
48
|
-
* @param multiFileData - The file data array to put in the zip.
|
|
49
|
-
* @param http - The angular HttpClient. Used to fetch files.
|
|
50
|
-
*/
|
|
51
|
-
static downloadMultipleFiles(name: string, multiFileData: FileData[], http: HttpClient): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Checks if the given file has a valid mime type.
|
|
54
|
-
* @param type - The type of the file to check.
|
|
55
|
-
* @param allowedMimeTypes - The allowed mime types.
|
|
56
|
-
* @returns Whether or not the given file has a valid mime type.
|
|
57
|
-
*/
|
|
58
|
-
static isMimeTypeValid(type: string, allowedMimeTypes: string[]): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Transform the given value to Megabytes.
|
|
61
|
-
* @param value - The original value.
|
|
62
|
-
* @param unit - If the value is B, KB or GB.
|
|
63
|
-
* @returns The given value as bytes.
|
|
64
|
-
*/
|
|
65
|
-
static transformToMegaBytes(value: number, unit: 'B' | 'KB' | 'GB'): number;
|
|
66
|
-
private static transformToBytes;
|
|
67
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { SelectionModel } from '@angular/cdk/collections';
|
|
2
|
-
import { MatTableDataSource } from '@angular/material/table';
|
|
3
|
-
/**
|
|
4
|
-
* Provides functionality around material selections inside of tables.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class SelectionUtilities {
|
|
7
|
-
/**
|
|
8
|
-
* Checks if all items in the table have been selected.
|
|
9
|
-
* This is needed to display the "masterToggle"-checkbox correctly.
|
|
10
|
-
* @param selection - The selection to check.
|
|
11
|
-
* @param dataSource - The dataSource of the selection.
|
|
12
|
-
* @returns Whether or not all items in the table have been selected.
|
|
13
|
-
*/
|
|
14
|
-
static isAllSelected(selection: SelectionModel<any>, dataSource: MatTableDataSource<any>): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Toggles all items in the table.
|
|
17
|
-
* @param selection - The selection to toggle.
|
|
18
|
-
* @param dataSource - The dataSource of the selection.
|
|
19
|
-
*/
|
|
20
|
-
static masterToggle(selection: SelectionModel<any>, dataSource: MatTableDataSource<any>): void;
|
|
21
|
-
/**
|
|
22
|
-
* Removes all selected entries from the array.
|
|
23
|
-
* @param selection - The selection containing the items to remove.
|
|
24
|
-
* @param values - The values of the dataSource.
|
|
25
|
-
* @param dataSource - The dataSource.
|
|
26
|
-
*/
|
|
27
|
-
static remove(selection: SelectionModel<any>, values: any[], dataSource: MatTableDataSource<any>): void;
|
|
28
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { EnvironmentInjector } from '@angular/core';
|
|
2
|
-
import { BaseEntityType } from '../classes/entity.model';
|
|
3
|
-
/**
|
|
4
|
-
* A validation error reported by the validation utilities.
|
|
5
|
-
* Consists of the property name where the error originated from and a message.
|
|
6
|
-
*/
|
|
7
|
-
export interface ValidationError {
|
|
8
|
-
/**
|
|
9
|
-
* The property name on which the error occurred. This is the displayName value.
|
|
10
|
-
*/
|
|
11
|
-
property: string;
|
|
12
|
-
/**
|
|
13
|
-
* The validation error message.
|
|
14
|
-
*/
|
|
15
|
-
message: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Contains HelperMethods around handling Validation of entities and properties.
|
|
19
|
-
*/
|
|
20
|
-
export declare abstract class ValidationUtilities {
|
|
21
|
-
/**
|
|
22
|
-
* Checks if the values on an entity are valid.
|
|
23
|
-
* Also checks all the validators given by the metadata ("required", "maxLength" etc.).
|
|
24
|
-
* @param entity - The entity to validate.
|
|
25
|
-
* @param injector - An angular environment injector.
|
|
26
|
-
* @param omit - Whether to check for creating or editing validity.
|
|
27
|
-
* @returns Whether or not the entity is valid.
|
|
28
|
-
*/
|
|
29
|
-
static isEntityValid<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, injector: EnvironmentInjector, omit?: 'create' | 'update'): Promise<boolean>;
|
|
30
|
-
/**
|
|
31
|
-
* Gets all validation errors on the given entity.
|
|
32
|
-
* @param entity - The entity to validate.
|
|
33
|
-
* @param injector - An angular environment injector.
|
|
34
|
-
* @param omit - What keys not to check. An empty value means no keys are omitted.
|
|
35
|
-
* @returns An array of validation errors on the provided entity.
|
|
36
|
-
*/
|
|
37
|
-
static getEntityValidationErrors<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, injector: EnvironmentInjector, omit?: 'create' | 'update'): Promise<ValidationError[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Validates the property on the given entity with the given key.
|
|
40
|
-
* @param entity - The entity on which the property to check is.
|
|
41
|
-
* @param key - The key of the property to validate.
|
|
42
|
-
* @param omit - What keys not to check. An empty value means no keys are omitted.
|
|
43
|
-
* @returns A validation error when the property is not valid, undefined otherwise.
|
|
44
|
-
* @throws When the type of the property is not known.
|
|
45
|
-
*/
|
|
46
|
-
static getPropertyValidationError<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, key: keyof EntityType, omit?: 'create' | 'update'): Promise<ValidationError | undefined>;
|
|
47
|
-
private static getArrayStringAutocompleteChipsValidationError;
|
|
48
|
-
private static getBooleanValidationError;
|
|
49
|
-
private static getStringValidationError;
|
|
50
|
-
private static getAutocompleteStringValidationError;
|
|
51
|
-
private static getTextboxValidationError;
|
|
52
|
-
private static getPasswordValidationError;
|
|
53
|
-
private static getNumberValidationError;
|
|
54
|
-
private static getDateValidationError;
|
|
55
|
-
private static getDateRangeValidationError;
|
|
56
|
-
private static getDateTimeValidationError;
|
|
57
|
-
private static getFileDataValidationError;
|
|
58
|
-
}
|