ngx-material-entity 18.2.6 → 20.0.1
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 +173 -168
- 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,17 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { CustomDecoratorConfig } from './custom-decorator.data';
|
|
3
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
4
|
-
import { NgxMatEntityBaseInputComponent } from '../../components/input/base-input.component';
|
|
5
|
-
import { DecoratorTypes } from '../base/decorator-types.enum';
|
|
6
|
-
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
7
|
-
/**
|
|
8
|
-
* The internal config for the @custom decorator.
|
|
9
|
-
* Sets default values.
|
|
10
|
-
*/
|
|
11
|
-
export declare class CustomDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, ValueType, MetadataType extends BaseEntityType<MetadataType>, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType, MetadataType>> extends PropertyDecoratorConfigInternal<ValueType> implements CustomDecoratorConfig<EntityType, ValueType, MetadataType, ComponentType> {
|
|
12
|
-
component: Type<ComponentType>;
|
|
13
|
-
isValid: (value: ValueType, omit?: 'create' | 'update') => boolean;
|
|
14
|
-
isEqual: (value: ValueType, valuePriorChanges: ValueType, metadata: CustomDecoratorConfig<EntityType, ValueType, MetadataType, ComponentType>) => boolean;
|
|
15
|
-
customMetadata: MetadataType;
|
|
16
|
-
constructor(data: CustomDecoratorConfig<EntityType, ValueType, MetadataType, ComponentType>);
|
|
17
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
|
-
import { NgxMatEntityBaseInputComponent } from '../../components/input/base-input.component';
|
|
4
|
-
import { DecoratorTypes } from '../base/decorator-types.enum';
|
|
5
|
-
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
6
|
-
/**
|
|
7
|
-
* Definition for a custom property. Use this if the provided decorators don't fit your needs.
|
|
8
|
-
*/
|
|
9
|
-
export interface CustomDecoratorConfig<EntityType extends BaseEntityType<EntityType>, ValueType, CustomMetadataType extends BaseEntityType<CustomMetadataType>, ComponentType extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.CUSTOM, ValueType, CustomMetadataType>> extends PropertyDecoratorConfig<ValueType> {
|
|
10
|
-
/**
|
|
11
|
-
* The component to use for this input.
|
|
12
|
-
*/
|
|
13
|
-
component: Type<ComponentType>;
|
|
14
|
-
/**
|
|
15
|
-
* The function that defines whether or not the value is valid.
|
|
16
|
-
* Used in addition to default checks like required etc.
|
|
17
|
-
* Needed for the edit and create dialogs.
|
|
18
|
-
*
|
|
19
|
-
* TIP: If you need additional data for checking if the value is valid, you can define them as metadata directly on the value.
|
|
20
|
-
* @default () => true
|
|
21
|
-
*/
|
|
22
|
-
isValid?: (value: ValueType, omit?: 'create' | 'update') => boolean;
|
|
23
|
-
/**
|
|
24
|
-
* The function that defines whether or not two of your custom values are equal.
|
|
25
|
-
* Needed for the edit and create dialogs.
|
|
26
|
-
*
|
|
27
|
-
* TIP: If you need additional data for checking if the value is valid, you can define them as metadata directly on the values.
|
|
28
|
-
* @default (value: ValueType, valuePriorChanges: ValueType) => LodashUtilities.isEqual(value, valuePriorChanges)
|
|
29
|
-
*/
|
|
30
|
-
isEqual?: (value: ValueType, valuePriorChanges: ValueType, metadata: CustomDecoratorConfig<EntityType, ValueType, CustomMetadataType, ComponentType>) => boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Any custom metadata you want to add to the property.
|
|
33
|
-
*/
|
|
34
|
-
customMetadata: CustomMetadataType;
|
|
35
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CustomDecoratorConfig } from './custom-decorator.data';
|
|
2
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
|
-
/**
|
|
4
|
-
* Decorator for setting and getting custom property metadata.
|
|
5
|
-
* @param metadata - The metadata of the custom property.
|
|
6
|
-
* @param metadataKeysToReset - Any metadata keys which values should be set to undefined on reset.
|
|
7
|
-
* @returns The method that defines the metadata.
|
|
8
|
-
*/
|
|
9
|
-
export declare function custom<ValueType, CustomMetadataType extends BaseEntityType<CustomMetadataType>, EntityType extends BaseEntityType<EntityType>>(metadata: CustomDecoratorConfig<EntityType, ValueType, CustomMetadataType, any>, metadataKeysToReset?: string[]): (target: object, propertyKey: string) => void;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { DateFilterFn } from '@angular/material/datepicker';
|
|
2
|
-
import { DateRange, DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
3
|
-
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
4
|
-
import { Time } from '../../utilities/date.utilities';
|
|
5
|
-
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
6
|
-
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
7
|
-
/**
|
|
8
|
-
* The internal DefaultDateDecoratorConfig. Sets default values.
|
|
9
|
-
*/
|
|
10
|
-
export declare class DefaultDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date> implements DefaultDateDecoratorConfig {
|
|
11
|
-
displayStyle: 'date';
|
|
12
|
-
min?: (date?: Date) => Date;
|
|
13
|
-
max?: (date?: Date) => Date;
|
|
14
|
-
filter?: DateFilterFn<Date | null | undefined>;
|
|
15
|
-
constructor(data: DefaultDateDecoratorConfig);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The internal DateRangeDateDecoratorConfig. Sets default values.
|
|
19
|
-
*/
|
|
20
|
-
export declare class DateRangeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<DateRange> implements DateRangeDateDecoratorConfig {
|
|
21
|
-
displayStyle: 'daterange';
|
|
22
|
-
minStart?: (date?: Date) => Date;
|
|
23
|
-
maxStart?: (date?: Date) => Date;
|
|
24
|
-
minEnd?: (date?: Date) => Date;
|
|
25
|
-
maxEnd?: (date?: Date) => Date;
|
|
26
|
-
filter?: DateFilterFn<Date>;
|
|
27
|
-
placeholderStart: string;
|
|
28
|
-
placeholderEnd: string;
|
|
29
|
-
constructor(data: DateRangeDateDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* The internal DateTimeDateDecoratorConfig. Sets default values.
|
|
33
|
-
*/
|
|
34
|
-
export declare class DateTimeDateDecoratorConfigInternal extends PropertyDecoratorConfigInternal<Date> implements DateTimeDateDecoratorConfig {
|
|
35
|
-
displayStyle: 'datetime';
|
|
36
|
-
times: DropdownValue<Time | undefined>[];
|
|
37
|
-
timeDisplayName: string;
|
|
38
|
-
minDate?: (date?: Date) => Date;
|
|
39
|
-
maxDate?: (date?: Date) => Date;
|
|
40
|
-
filterDate?: DateFilterFn<Date | null | undefined>;
|
|
41
|
-
minTime?: (date?: Date) => Time;
|
|
42
|
-
maxTime?: (date?: Date) => Time;
|
|
43
|
-
filterTime?: ((time: Time) => boolean) | (() => boolean);
|
|
44
|
-
constructor(data: DateTimeDateDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
45
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { DateFilterFn } from '@angular/material/datepicker';
|
|
2
|
-
import { Time } from '../../utilities/date.utilities';
|
|
3
|
-
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
4
|
-
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
5
|
-
/**
|
|
6
|
-
* This is the needed type for an property that should be displayed as a date range.
|
|
7
|
-
*/
|
|
8
|
-
export interface DateRange {
|
|
9
|
-
/**
|
|
10
|
-
* The start date of the range.
|
|
11
|
-
*/
|
|
12
|
-
start: Date;
|
|
13
|
-
/**
|
|
14
|
-
* The end date of the range.
|
|
15
|
-
*/
|
|
16
|
-
end: Date;
|
|
17
|
-
/**
|
|
18
|
-
* The actual Date values. These are needed if the date range might contain some values that are disabled.
|
|
19
|
-
* E.g. When you build a tool to request vacation you may want the user to select 3 weeks in the range picker
|
|
20
|
-
* but don't want the weekend dates in the final result.
|
|
21
|
-
*/
|
|
22
|
-
values: Date[];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Definition for the @date metadata.
|
|
26
|
-
*/
|
|
27
|
-
declare abstract class DateDecoratorConfig<ValueType> extends PropertyDecoratorConfig<ValueType> {
|
|
28
|
-
/**
|
|
29
|
-
* How to display the date.
|
|
30
|
-
*/
|
|
31
|
-
displayStyle: 'date' | 'datetime' | 'daterange';
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The configuration options for a date property displayed as a default single date picker.
|
|
35
|
-
*/
|
|
36
|
-
export interface DefaultDateDecoratorConfig extends DateDecoratorConfig<Date> {
|
|
37
|
-
displayStyle: 'date';
|
|
38
|
-
/**
|
|
39
|
-
* A function to get the minimum value of the date.
|
|
40
|
-
*/
|
|
41
|
-
min?: (date?: Date) => Date;
|
|
42
|
-
/**
|
|
43
|
-
* A function to get the maximum value of the date.
|
|
44
|
-
*/
|
|
45
|
-
max?: (date?: Date) => Date;
|
|
46
|
-
/**
|
|
47
|
-
* A filter function to do more specific filtering. This could be the removal of e.g. All weekends.
|
|
48
|
-
*/
|
|
49
|
-
filter?: DateFilterFn<Date | null | undefined>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* The configuration options for a date property displayed as a date range.
|
|
53
|
-
*/
|
|
54
|
-
export interface DateRangeDateDecoratorConfig extends DateDecoratorConfig<DateRange> {
|
|
55
|
-
displayStyle: 'daterange';
|
|
56
|
-
/**
|
|
57
|
-
* A function to get the minimum value of the start date.
|
|
58
|
-
*/
|
|
59
|
-
minStart?: (date?: Date) => Date;
|
|
60
|
-
/**
|
|
61
|
-
* A function to get the maximum value of the start date.
|
|
62
|
-
*/
|
|
63
|
-
maxStart?: (date?: Date) => Date;
|
|
64
|
-
/**
|
|
65
|
-
* A function to get the minimum value of the end date.
|
|
66
|
-
*/
|
|
67
|
-
minEnd?: (date?: Date) => Date;
|
|
68
|
-
/**
|
|
69
|
-
* A function to get the maximum value of the end date.
|
|
70
|
-
*/
|
|
71
|
-
maxEnd?: (date?: Date) => Date;
|
|
72
|
-
/**
|
|
73
|
-
* A filter function to do more specific filtering on the disallowed end date values. This could be the removal of e.g. All weekends.
|
|
74
|
-
*/
|
|
75
|
-
filter?: DateFilterFn<Date>;
|
|
76
|
-
/**
|
|
77
|
-
* The placeholder for the start date of the date range picker.
|
|
78
|
-
* @default "Start"
|
|
79
|
-
*/
|
|
80
|
-
placeholderStart?: string;
|
|
81
|
-
/**
|
|
82
|
-
* The placeholder for the end date of the date range picker.
|
|
83
|
-
* @default "End"
|
|
84
|
-
*/
|
|
85
|
-
placeholderEnd?: string;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* The configuration options for a date property displayed as date time.
|
|
89
|
-
*/
|
|
90
|
-
export interface DateTimeDateDecoratorConfig extends DateDecoratorConfig<Date> {
|
|
91
|
-
displayStyle: 'datetime';
|
|
92
|
-
/**
|
|
93
|
-
* The selectable times.
|
|
94
|
-
*/
|
|
95
|
-
times?: DropdownValue<Time | undefined>[];
|
|
96
|
-
/**
|
|
97
|
-
* The name to use as a label for the time form field.
|
|
98
|
-
* @default 'Time'
|
|
99
|
-
*/
|
|
100
|
-
timeDisplayName?: string;
|
|
101
|
-
/**
|
|
102
|
-
* A function to get the minimum value of the date.
|
|
103
|
-
*/
|
|
104
|
-
minDate?: (date?: Date) => Date;
|
|
105
|
-
/**
|
|
106
|
-
* A function to get the maximum value of the date.
|
|
107
|
-
*/
|
|
108
|
-
maxDate?: (date?: Date) => Date;
|
|
109
|
-
/**
|
|
110
|
-
* A filter function to do more specific date filtering. This could be the removal of e.g. All weekends.
|
|
111
|
-
*/
|
|
112
|
-
filterDate?: DateFilterFn<Date | null | undefined>;
|
|
113
|
-
/**
|
|
114
|
-
* A function to get the minimum value of the time.
|
|
115
|
-
*/
|
|
116
|
-
minTime?: (date?: Date) => Time;
|
|
117
|
-
/**
|
|
118
|
-
* A function to get the maximum value of the time.
|
|
119
|
-
*/
|
|
120
|
-
maxTime?: (date?: Date) => Time;
|
|
121
|
-
/**
|
|
122
|
-
* A filter function to do more specific time filtering. This could be e.g. The removal of lunch breaks.
|
|
123
|
-
*/
|
|
124
|
-
filterTime?: ((time: Time) => boolean) | (() => boolean);
|
|
125
|
-
}
|
|
126
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
|
|
2
|
-
/**
|
|
3
|
-
* Decorator for setting and getting date property metadata.
|
|
4
|
-
* @param metadata - The metadata of the date property.
|
|
5
|
-
* @returns The method that defines the metadata.
|
|
6
|
-
*/
|
|
7
|
-
export declare function date(metadata: DefaultDateDecoratorConfig | DateRangeDateDecoratorConfig | DateTimeDateDecoratorConfig): (target: object, propertyKey: string) => void;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/angular-fontawesome';
|
|
2
|
-
import { DefaultFileDecoratorConfig, FileData, ImageFileDecoratorConfig } from './file-decorator.data';
|
|
3
|
-
import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
|
|
4
|
-
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
5
|
-
/**
|
|
6
|
-
* Contains data about a file property where a blob exists.
|
|
7
|
-
*/
|
|
8
|
-
export interface FileDataWithFile {
|
|
9
|
-
/**
|
|
10
|
-
* The name of the file.
|
|
11
|
-
*/
|
|
12
|
-
name: string;
|
|
13
|
-
/**
|
|
14
|
-
* The file data itself in form of a blob.
|
|
15
|
-
*/
|
|
16
|
-
file: Blob;
|
|
17
|
-
/**
|
|
18
|
-
* The mime type of the file.
|
|
19
|
-
* This is needed to increase performance when checking if the provided file is valid.
|
|
20
|
-
*/
|
|
21
|
-
type: string;
|
|
22
|
-
/**
|
|
23
|
-
* The size of the file in bytes.
|
|
24
|
-
* This is needed to increase performance when checking if the provided file is valid.
|
|
25
|
-
*/
|
|
26
|
-
size: number;
|
|
27
|
-
/**
|
|
28
|
-
* The url where the blob is saved.
|
|
29
|
-
*/
|
|
30
|
-
url?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Contains data about a file property where no blob exists.
|
|
34
|
-
*/
|
|
35
|
-
export interface FileDataWithUrl {
|
|
36
|
-
/**
|
|
37
|
-
* The name of the file.
|
|
38
|
-
*/
|
|
39
|
-
name: string;
|
|
40
|
-
/**
|
|
41
|
-
* The file data itself in form of a blob.
|
|
42
|
-
*/
|
|
43
|
-
file?: Blob;
|
|
44
|
-
/**
|
|
45
|
-
* The mime type of the file.
|
|
46
|
-
* This is needed to increase performance when checking if the provided file is valid.
|
|
47
|
-
*/
|
|
48
|
-
type: string;
|
|
49
|
-
/**
|
|
50
|
-
* The size of the file in bytes.
|
|
51
|
-
* This is needed to increase performance when checking if the provided file is valid.
|
|
52
|
-
*/
|
|
53
|
-
size: number;
|
|
54
|
-
/**
|
|
55
|
-
* The url where the blob is saved.
|
|
56
|
-
*/
|
|
57
|
-
url: string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The internal DefaultFileDecoratorConfig. Sets default values.
|
|
61
|
-
*/
|
|
62
|
-
export declare class DefaultFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal<FileData> implements DefaultFileDecoratorConfig {
|
|
63
|
-
type: 'other';
|
|
64
|
-
preview: false;
|
|
65
|
-
multiple: boolean;
|
|
66
|
-
allowedMimeTypes: string[];
|
|
67
|
-
deleteIcon: IconDefinition;
|
|
68
|
-
maxSize: number;
|
|
69
|
-
maxSizeTotal: number;
|
|
70
|
-
mimeTypeErrorDialog: ConfirmDialogData;
|
|
71
|
-
maxSizeErrorDialog: ConfirmDialogData;
|
|
72
|
-
maxSizeTotalErrorDialog: ConfirmDialogData;
|
|
73
|
-
dragAndDrop: boolean;
|
|
74
|
-
constructor(data: DefaultFileDecoratorConfig);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* The internal ImageFileDecoratorConfig. Sets default values.
|
|
78
|
-
*/
|
|
79
|
-
export declare class ImageFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal<FileData> implements ImageFileDecoratorConfig {
|
|
80
|
-
type: 'image';
|
|
81
|
-
allowedMimeTypes: string[];
|
|
82
|
-
multiple: boolean;
|
|
83
|
-
preview: boolean;
|
|
84
|
-
previewPlaceholderUrl?: string;
|
|
85
|
-
deleteIcon: IconDefinition;
|
|
86
|
-
maxSize: number;
|
|
87
|
-
maxSizeTotal: number;
|
|
88
|
-
mimeTypeErrorDialog: ConfirmDialogData;
|
|
89
|
-
maxSizeErrorDialog: ConfirmDialogData;
|
|
90
|
-
maxSizeTotalErrorDialog: ConfirmDialogData;
|
|
91
|
-
dragAndDrop: boolean;
|
|
92
|
-
constructor(data: ImageFileDecoratorConfig);
|
|
93
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/angular-fontawesome';
|
|
2
|
-
import { FileDataWithFile, FileDataWithUrl } from './file-decorator-internal.data';
|
|
3
|
-
import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
|
|
4
|
-
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
5
|
-
/**
|
|
6
|
-
* The type of a property annotated with @file.
|
|
7
|
-
*/
|
|
8
|
-
export type FileData = FileDataWithFile | FileDataWithUrl;
|
|
9
|
-
/**
|
|
10
|
-
* Definition for the @file metadata.
|
|
11
|
-
*/
|
|
12
|
-
declare abstract class FileDecoratorConfig extends PropertyDecoratorConfig<FileData> {
|
|
13
|
-
/**
|
|
14
|
-
* Specifies whether or not the decorated property can have multiple files.
|
|
15
|
-
*/
|
|
16
|
-
multiple: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The type of the upload.
|
|
19
|
-
*/
|
|
20
|
-
type: 'image' | 'other';
|
|
21
|
-
/**
|
|
22
|
-
* The icon used to remove a file from the input.
|
|
23
|
-
* @default faCircleMinus
|
|
24
|
-
*/
|
|
25
|
-
deleteIcon?: IconDefinition;
|
|
26
|
-
/**
|
|
27
|
-
* Whether or not the file should be displayed inside a preview.
|
|
28
|
-
* @default true
|
|
29
|
-
*/
|
|
30
|
-
preview?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Specifies allowed File types like 'image/jpg' etc.
|
|
33
|
-
* Allows every file type if not set.
|
|
34
|
-
*/
|
|
35
|
-
allowedMimeTypes?: string[];
|
|
36
|
-
/**
|
|
37
|
-
* The error dialog to display when the user inputs files that are not of the allowed mime types.
|
|
38
|
-
*/
|
|
39
|
-
mimeTypeErrorDialog?: ConfirmDialogData;
|
|
40
|
-
/**
|
|
41
|
-
* The maximum allowed size of a single file in MB.
|
|
42
|
-
* @default 10
|
|
43
|
-
*/
|
|
44
|
-
maxSize?: number;
|
|
45
|
-
/**
|
|
46
|
-
* The error dialog to display when the user inputs a single file that is bigger than the 'maxSize' value.
|
|
47
|
-
*/
|
|
48
|
-
maxSizeErrorDialog?: ConfirmDialogData;
|
|
49
|
-
/**
|
|
50
|
-
* The maximum allowed size of all files in MB.
|
|
51
|
-
* @default 100
|
|
52
|
-
*/
|
|
53
|
-
maxSizeTotal?: number;
|
|
54
|
-
/**
|
|
55
|
-
* The error dialog to display when the user inputs files which are in total bigger than the 'maxSizeTotal' value.
|
|
56
|
-
*/
|
|
57
|
-
maxSizeTotalErrorDialog?: ConfirmDialogData;
|
|
58
|
-
/**
|
|
59
|
-
* Defines whether or not a dropdown box is displayed.
|
|
60
|
-
* @default
|
|
61
|
-
* true // when multiple is set to true.
|
|
62
|
-
* false // when multiple is set to false.
|
|
63
|
-
*/
|
|
64
|
-
dragAndDrop?: boolean;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Definition for a default file.
|
|
68
|
-
*/
|
|
69
|
-
export interface DefaultFileDecoratorConfig extends FileDecoratorConfig {
|
|
70
|
-
type: 'other';
|
|
71
|
-
preview?: false;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Definition for a image file.
|
|
75
|
-
*/
|
|
76
|
-
export interface ImageFileDecoratorConfig extends FileDecoratorConfig {
|
|
77
|
-
type: 'image';
|
|
78
|
-
/**
|
|
79
|
-
* Specifies allowed File types like image/jpg etc. In a comma separated string.
|
|
80
|
-
* @default ['image/*']
|
|
81
|
-
*/
|
|
82
|
-
allowedMimeTypes?: string[];
|
|
83
|
-
/**
|
|
84
|
-
* Url to the file that gets displayed in the preview when no file has been selected yet.
|
|
85
|
-
*/
|
|
86
|
-
previewPlaceholderUrl?: string;
|
|
87
|
-
}
|
|
88
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DefaultFileDecoratorConfig, ImageFileDecoratorConfig } from './file-decorator.data';
|
|
2
|
-
/**
|
|
3
|
-
* Decorator for setting and getting file property metadata.
|
|
4
|
-
* @param metadata - The metadata of the file property.
|
|
5
|
-
* @returns The method that defines the metadata.
|
|
6
|
-
* @throws When an unknown metadata type was provided.
|
|
7
|
-
*/
|
|
8
|
-
export declare function file(metadata: DefaultFileDecoratorConfig | ImageFileDecoratorConfig): (target: object, propertyKey: string) => void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { HasManyDecoratorConfig } from './has-many-decorator.data';
|
|
2
|
-
import { BaseEntityType, EntityServiceClassNewable } from '../../classes/entity.model';
|
|
3
|
-
import { TableDataInternal } from '../../components/table/table-data.builder';
|
|
4
|
-
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
5
|
-
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
6
|
-
/**
|
|
7
|
-
* The internal HasManyDecoratorConfig. Sets default values.
|
|
8
|
-
*/
|
|
9
|
-
export declare class HasManyDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements HasManyDecoratorConfig<EntityType, RelatedBaseEntityType> {
|
|
10
|
-
omitForCreate: true;
|
|
11
|
-
tableData: TableDataInternal<EntityType>;
|
|
12
|
-
RelatedEntityServiceClass: EntityServiceClassNewable<RelatedBaseEntityType>;
|
|
13
|
-
createBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
|
|
14
|
-
readBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
|
|
15
|
-
constructor(data: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
16
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { BaseEntityType, EntityServiceClassNewable } from '../../classes/entity.model';
|
|
2
|
-
import { TableData } from '../../components/table/table-data';
|
|
3
|
-
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
4
|
-
/**
|
|
5
|
-
* Definition for the @hasMany metadata.
|
|
6
|
-
*/
|
|
7
|
-
export interface HasManyDecoratorConfig<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfig<EntityType> {
|
|
8
|
-
/**
|
|
9
|
-
* Whether or not the property gets omitted when creating new Entities.
|
|
10
|
-
*
|
|
11
|
-
* For the hasMany property this is always true, as entities can't be created for a non existing base entity.
|
|
12
|
-
*/
|
|
13
|
-
omitForCreate?: true;
|
|
14
|
-
/**
|
|
15
|
-
* The configuration for the table with the hasMany entities.
|
|
16
|
-
*/
|
|
17
|
-
tableData: TableData<EntityType>;
|
|
18
|
-
/**
|
|
19
|
-
* The service class for the base entity that the has hasMany entities belong to.
|
|
20
|
-
* This is used to generate the create and read base urls, eg. "customers/{id}/invoices".
|
|
21
|
-
* If you want to override that behavior you can provide a custom createBaseUrl and readBaseUrl function.
|
|
22
|
-
*/
|
|
23
|
-
RelatedEntityServiceClass: EntityServiceClassNewable<RelatedBaseEntityType>;
|
|
24
|
-
/**
|
|
25
|
-
* A function that generates a base url for create requests.
|
|
26
|
-
* @default `{baseEntityUrl}/{id}/{lastHasManyEntityUrlSegment}`
|
|
27
|
-
*/
|
|
28
|
-
createBaseUrl?: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
|
|
29
|
-
/**
|
|
30
|
-
* A function that generates a base url for read requests.
|
|
31
|
-
* @default `{baseEntityUrl}/{id}/{lastHasManyEntityUrlSegment}`
|
|
32
|
-
*/
|
|
33
|
-
readBaseUrl?: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
|
|
34
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HasManyDecoratorConfig } from './has-many-decorator.data';
|
|
2
|
-
import { BaseEntityType } from '../../classes/entity.model';
|
|
3
|
-
/**
|
|
4
|
-
* Decorator for setting and getting has many property metadata.
|
|
5
|
-
* @param metadata - The metadata of the has many property.
|
|
6
|
-
* @returns The method that defines the metadata.
|
|
7
|
-
*/
|
|
8
|
-
export declare function hasMany<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>>(metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>): (target: object, propertyKey: string) => void;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig, SliderNumberDecoratorConfig } from './number-decorator.data';
|
|
2
|
-
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
3
|
-
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
4
|
-
/**
|
|
5
|
-
* The internal DefaultNumberDecoratorConfig. Sets default values.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DefaultNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal<number> implements DefaultNumberDecoratorConfig {
|
|
8
|
-
displayStyle: 'line';
|
|
9
|
-
min?: number;
|
|
10
|
-
max?: number;
|
|
11
|
-
constructor(data: DefaultNumberDecoratorConfig);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The internal DropdownNumberDecoratorConfig. Sets default values.
|
|
15
|
-
*/
|
|
16
|
-
export declare class DropdownNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal<number> implements DropdownNumberDecoratorConfig {
|
|
17
|
-
displayStyle: 'dropdown';
|
|
18
|
-
dropdownValues: ((entity: any) => Promise<DropdownValue<number | undefined>[]>);
|
|
19
|
-
constructor(data: DropdownNumberDecoratorConfig);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The internal SliderNumberDecoratorConfig. Sets default values.
|
|
23
|
-
*/
|
|
24
|
-
export declare class SliderNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal<number> implements SliderNumberDecoratorConfig {
|
|
25
|
-
displayStyle: 'slider';
|
|
26
|
-
min?: number;
|
|
27
|
-
max?: number;
|
|
28
|
-
step?: number;
|
|
29
|
-
formatThumbLabelValue: (value: number) => string;
|
|
30
|
-
showTickMarks?: boolean;
|
|
31
|
-
constructor(data: SliderNumberDecoratorConfig);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The default function to format values for the number slider thumb label.
|
|
35
|
-
* @param value - The value of the slider.
|
|
36
|
-
* @returns Just the value without any formatting done.
|
|
37
|
-
*/
|
|
38
|
-
export declare function defaultFormatThumbLabelValue(value: number): string;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
2
|
-
import { PropertyDecoratorConfig } from '../base/property-decorator.data';
|
|
3
|
-
export type NumberDropdownValues = DropdownValue<number | undefined>[] | ((entity: any) => DropdownValue<number | undefined>[]) | ((entity: any) => Promise<DropdownValue<number | undefined>[]>);
|
|
4
|
-
/**
|
|
5
|
-
* Definition for the @number metadata.
|
|
6
|
-
*/
|
|
7
|
-
declare abstract class NumberDecoratorConfig extends PropertyDecoratorConfig<number> {
|
|
8
|
-
/**
|
|
9
|
-
* Whether to display the number in a single line or as a dropdown.
|
|
10
|
-
*/
|
|
11
|
-
displayStyle: 'line' | 'dropdown' | 'slider';
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The configuration options for a number property displayed in a default number input.
|
|
15
|
-
*/
|
|
16
|
-
export interface DefaultNumberDecoratorConfig extends NumberDecoratorConfig {
|
|
17
|
-
displayStyle: 'line';
|
|
18
|
-
/**
|
|
19
|
-
* The minimum value of the number.
|
|
20
|
-
*/
|
|
21
|
-
min?: number;
|
|
22
|
-
/**
|
|
23
|
-
* The maximum value of the number.
|
|
24
|
-
*/
|
|
25
|
-
max?: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The configuration options for a number property displayed in a dropdown.
|
|
29
|
-
*/
|
|
30
|
-
export interface DropdownNumberDecoratorConfig extends NumberDecoratorConfig {
|
|
31
|
-
displayStyle: 'dropdown';
|
|
32
|
-
/**
|
|
33
|
-
* The values of the dropdown, consisting of a name to display and the actual value.
|
|
34
|
-
*/
|
|
35
|
-
dropdownValues: NumberDropdownValues;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* The configuration options for a number property displayed as a slider input.
|
|
39
|
-
*/
|
|
40
|
-
export interface SliderNumberDecoratorConfig extends NumberDecoratorConfig {
|
|
41
|
-
displayStyle: 'slider';
|
|
42
|
-
/**
|
|
43
|
-
* The minimum value of the number.
|
|
44
|
-
*/
|
|
45
|
-
min?: number;
|
|
46
|
-
/**
|
|
47
|
-
* The maximum value of the number.
|
|
48
|
-
*/
|
|
49
|
-
max?: number;
|
|
50
|
-
/**
|
|
51
|
-
* How big a single step is at which the thumb label will snap.
|
|
52
|
-
*/
|
|
53
|
-
step?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Function that transforms the value to display inside the thumb label.
|
|
56
|
-
*/
|
|
57
|
-
formatThumbLabelValue?: (value: number) => string;
|
|
58
|
-
/**
|
|
59
|
-
* Whether or not ticks should be displayed.
|
|
60
|
-
*/
|
|
61
|
-
showTickMarks?: boolean;
|
|
62
|
-
}
|
|
63
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig, SliderNumberDecoratorConfig } from './number-decorator.data';
|
|
2
|
-
/**
|
|
3
|
-
* Decorator for setting and getting number property metadata.
|
|
4
|
-
* @param metadata - The metadata of the number property.
|
|
5
|
-
* @returns The method that defines the metadata.
|
|
6
|
-
*/
|
|
7
|
-
export declare function number(metadata: DefaultNumberDecoratorConfig | DropdownNumberDecoratorConfig | SliderNumberDecoratorConfig): (target: object, propertyKey: string) => void;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DefaultObjectDecoratorConfig, DropdownObjectDecoratorConfig } from './object-decorator.data';
|
|
2
|
-
import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
|
|
3
|
-
import { DropdownValue } from '../base/dropdown-value.interface';
|
|
4
|
-
import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
|
|
5
|
-
/**
|
|
6
|
-
* The internal DefaultObjectDecoratorConfig. Sets default values.
|
|
7
|
-
*/
|
|
8
|
-
export declare class DefaultObjectDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements DefaultObjectDecoratorConfig<EntityType> {
|
|
9
|
-
displayStyle: 'inline';
|
|
10
|
-
EntityClass: EntityClassNewable<EntityType>;
|
|
11
|
-
omit: (keyof EntityType)[];
|
|
12
|
-
constructor(data: DefaultObjectDecoratorConfig<EntityType>);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* The internal DropdownObjectDecoratorConfig. Sets default values.
|
|
16
|
-
*/
|
|
17
|
-
export declare class DropdownObjectDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements DropdownObjectDecoratorConfig<EntityType> {
|
|
18
|
-
displayStyle: 'dropdown';
|
|
19
|
-
EntityClass: EntityClassNewable<EntityType>;
|
|
20
|
-
omit: (keyof EntityType)[];
|
|
21
|
-
dropdownValues: ((entity: any) => Promise<DropdownValue<EntityType | undefined>[]>);
|
|
22
|
-
constructor(data: DropdownObjectDecoratorConfig<EntityType>);
|
|
23
|
-
}
|