ngx-material-entity 18.2.5 → 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 +165 -155
- 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 -1361
- 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,102 +0,0 @@
|
|
|
1
|
-
import { CreateDataInternal } from './create-dialog/create-data.builder';
|
|
2
|
-
import { EditDataInternal } from './edit-dialog/edit-data.builder';
|
|
3
|
-
import { BaseData, BaseTableAction, DisplayColumn, DynamicStyleClasses, MultiSelectAction, TableData } from './table-data';
|
|
4
|
-
import { BaseBuilder } from '../../classes/base.builder';
|
|
5
|
-
import { BaseEntityType, EntityClassNewable, EntityServiceClassNewable } from '../../classes/entity.model';
|
|
6
|
-
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
7
|
-
import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
|
|
8
|
-
/**
|
|
9
|
-
* The internal BaseTableAction. Sets default values.
|
|
10
|
-
*/
|
|
11
|
-
export declare class BaseTableActionInternal implements BaseTableAction {
|
|
12
|
-
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
13
|
-
type: 'default';
|
|
14
|
-
displayName: string;
|
|
15
|
-
action: () => Promise<unknown>;
|
|
16
|
-
enabled: (() => boolean);
|
|
17
|
-
requireConfirmDialog: (() => boolean);
|
|
18
|
-
confirmDialogData: ConfirmDialogDataInternal;
|
|
19
|
-
constructor(data: BaseTableAction, globalConfig: NgxGlobalDefaultValues);
|
|
20
|
-
private functionToAsync;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The internal BaseTableAction. Sets default values.
|
|
24
|
-
*/
|
|
25
|
-
export declare class MultiSelectActionInternal<EntityType extends BaseEntityType<EntityType>> implements MultiSelectAction<EntityType> {
|
|
26
|
-
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
27
|
-
type: 'multi-select';
|
|
28
|
-
displayName: string;
|
|
29
|
-
action: (selectedEntities: EntityType[]) => Promise<unknown>;
|
|
30
|
-
enabled: ((selectedEntities: EntityType[]) => boolean);
|
|
31
|
-
requireConfirmDialog: ((selectedEntities: EntityType[]) => boolean);
|
|
32
|
-
confirmDialogData: ConfirmDialogDataInternal;
|
|
33
|
-
constructor(data: MultiSelectAction<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
34
|
-
private functionToAsync;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* The Internal Table Action. Sets default values.
|
|
38
|
-
*/
|
|
39
|
-
export type TableActionInternal<EntityType extends BaseEntityType<EntityType>> = BaseTableActionInternal | MultiSelectActionInternal<EntityType>;
|
|
40
|
-
/**
|
|
41
|
-
* The internal TableData. Requires all default values the user can leave out.
|
|
42
|
-
*/
|
|
43
|
-
export declare class TableDataInternal<EntityType extends BaseEntityType<EntityType>> implements TableData<EntityType> {
|
|
44
|
-
baseData: BaseDataInternal<EntityType>;
|
|
45
|
-
createData: CreateDataInternal;
|
|
46
|
-
editData: EditDataInternal<EntityType>;
|
|
47
|
-
constructor(baseData: BaseDataInternal<EntityType>, createData: CreateDataInternal, editData: EditDataInternal<EntityType>);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* The Builder for the table BaseData. Sets default values.
|
|
51
|
-
*/
|
|
52
|
-
export declare class BaseDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<BaseDataInternal<EntityType>, BaseData<EntityType>> {
|
|
53
|
-
constructor(data: BaseData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
54
|
-
protected generateBaseData(data: BaseData<EntityType>): BaseDataInternal<EntityType>;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* The internal TableData. Requires all default values the user can leave out.
|
|
58
|
-
*/
|
|
59
|
-
export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityType>> implements BaseData<EntityType> {
|
|
60
|
-
protected readonly globalConfig: NgxGlobalDefaultValues;
|
|
61
|
-
title: string;
|
|
62
|
-
displayColumns: DisplayColumn<EntityType>[];
|
|
63
|
-
EntityServiceClass: EntityServiceClassNewable<EntityType>;
|
|
64
|
-
searchLabel: string;
|
|
65
|
-
createButtonLabel: string;
|
|
66
|
-
defaultEdit: 'dialog' | 'page';
|
|
67
|
-
defaultCreate: 'dialog' | 'page';
|
|
68
|
-
searchString: (entity: EntityType) => string;
|
|
69
|
-
allowCreate: () => boolean;
|
|
70
|
-
allowRead: (entity?: EntityType) => boolean;
|
|
71
|
-
allowUpdate: (entity?: EntityType) => boolean;
|
|
72
|
-
allowDelete: (entity?: EntityType) => boolean;
|
|
73
|
-
tableActions: TableActionInternal<EntityType>[];
|
|
74
|
-
tableActionsLabel: string;
|
|
75
|
-
displayLoadingSpinner: boolean;
|
|
76
|
-
allowJsonImport: boolean;
|
|
77
|
-
importActionData: Omit<BaseTableActionInternal, 'action'>;
|
|
78
|
-
dynamicRowStyleClasses: DynamicStyleClasses<EntityType>;
|
|
79
|
-
EntityClass?: EntityClassNewable<EntityType>;
|
|
80
|
-
edit?: (entity: EntityType) => unknown;
|
|
81
|
-
create?: (entity: EntityType) => unknown;
|
|
82
|
-
constructor(data: BaseData<EntityType>, globalConfig: NgxGlobalDefaultValues);
|
|
83
|
-
private buildImportActionData;
|
|
84
|
-
private allowDataToFunction;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* The Builder for the complete TableData. Sets default values and validates user input.
|
|
88
|
-
*/
|
|
89
|
-
export declare class TableDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<TableDataInternal<EntityType>, TableData<EntityType>> {
|
|
90
|
-
constructor(globalConfig: NgxGlobalDefaultValues, data: TableData<EntityType>);
|
|
91
|
-
protected generateBaseData(data: TableData<EntityType>): TableDataInternal<EntityType>;
|
|
92
|
-
protected validateInput(data: TableData<EntityType>): void;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* The default search function taken from googles mat table.
|
|
96
|
-
* This will be used if no custom search function is provided by the configuration.
|
|
97
|
-
*
|
|
98
|
-
* It generates a string from an entity which is then used to compare it to the search input.
|
|
99
|
-
* @param entity - An entity that is in the search.
|
|
100
|
-
* @returns The generated string of the given entity used for comparison with the search input.
|
|
101
|
-
*/
|
|
102
|
-
export declare function defaultSearchFunction<EntityType extends BaseEntityType<EntityType>>(entity: EntityType): string;
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { NgxMatEntityBaseDisplayColumnValueComponent } from './display-column-value/base-display-column-value.component';
|
|
3
|
-
import { BaseEntityType, EntityClassNewable, EntityServiceClassNewable } from '../../classes/entity.model';
|
|
4
|
-
import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
|
|
5
|
-
/**
|
|
6
|
-
* The value that can be displayed inside a table column.
|
|
7
|
-
*/
|
|
8
|
-
export type TableColumnValue = string | number | Date;
|
|
9
|
-
/**
|
|
10
|
-
* The Definition of a Column inside the table.
|
|
11
|
-
*/
|
|
12
|
-
export interface DisplayColumn<T> {
|
|
13
|
-
/**
|
|
14
|
-
* The name inside the header.
|
|
15
|
-
*/
|
|
16
|
-
displayName: string;
|
|
17
|
-
/**
|
|
18
|
-
* What to display inside the row.
|
|
19
|
-
*/
|
|
20
|
-
value: (value: T) => TableColumnValue;
|
|
21
|
-
/**
|
|
22
|
-
* A custom component to use instead of the value.
|
|
23
|
-
* You still need to provide a value function for the sorting by header to work.
|
|
24
|
-
*/
|
|
25
|
-
Component?: Type<NgxMatEntityBaseDisplayColumnValueComponent<T>>;
|
|
26
|
-
/**
|
|
27
|
-
* Whether or not the click event should be disabled.
|
|
28
|
-
* This can be useful if your component has a custom way to handle clicks.
|
|
29
|
-
*/
|
|
30
|
-
disableClick?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Dynamic css class that should be applied based on a condition.
|
|
34
|
-
*/
|
|
35
|
-
export type DynamicStyleClasses<T> = (value: T) => string[];
|
|
36
|
-
/**
|
|
37
|
-
* A table action that will run regardless if something has been selected in the table.
|
|
38
|
-
*/
|
|
39
|
-
export interface BaseTableAction {
|
|
40
|
-
/**
|
|
41
|
-
* The type of the table action to distinct between base and multi-select actions.
|
|
42
|
-
*/
|
|
43
|
-
type: 'default';
|
|
44
|
-
/**
|
|
45
|
-
* The name of the action.
|
|
46
|
-
*/
|
|
47
|
-
displayName: string;
|
|
48
|
-
/**
|
|
49
|
-
* The action itself.
|
|
50
|
-
*/
|
|
51
|
-
action: (() => unknown) | (() => Promise<unknown>);
|
|
52
|
-
/**
|
|
53
|
-
* A method that defines whether or not the action can be used.
|
|
54
|
-
* @default () => true
|
|
55
|
-
*/
|
|
56
|
-
enabled?: () => boolean;
|
|
57
|
-
/**
|
|
58
|
-
* A method that defines whether or not a confirm dialog is needed to run the action.
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
requireConfirmDialog?: () => boolean;
|
|
62
|
-
/**
|
|
63
|
-
* The data used to generate a confirmation dialog for the table action.
|
|
64
|
-
*/
|
|
65
|
-
confirmDialogData?: ConfirmDialogData;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* The Definition of an Action that can be run on multiple selected entities.
|
|
69
|
-
*/
|
|
70
|
-
export interface MultiSelectAction<EntityType extends BaseEntityType<EntityType>> {
|
|
71
|
-
/**
|
|
72
|
-
* The type of the table action to distinct between base and multi-select actions.
|
|
73
|
-
*/
|
|
74
|
-
type: 'multi-select';
|
|
75
|
-
/**
|
|
76
|
-
* The name of the action.
|
|
77
|
-
*/
|
|
78
|
-
displayName: string;
|
|
79
|
-
/**
|
|
80
|
-
* The action itself.
|
|
81
|
-
*/
|
|
82
|
-
action: ((selectedEntities: EntityType[]) => unknown) | ((selectedEntities: EntityType[]) => Promise<unknown>);
|
|
83
|
-
/**
|
|
84
|
-
* A method that defines whether or not the action can be used.
|
|
85
|
-
* @default (selectedEntities: EntityType[]) => !!selectedEntities.length
|
|
86
|
-
*/
|
|
87
|
-
enabled?: (selectedEntities: EntityType[]) => boolean;
|
|
88
|
-
/**
|
|
89
|
-
* A method that defines whether or not a confirm dialog is needed to run the action.
|
|
90
|
-
* @default false
|
|
91
|
-
*/
|
|
92
|
-
requireConfirmDialog?: (selectedEntities: EntityType[]) => boolean;
|
|
93
|
-
/**
|
|
94
|
-
* The data used to generate a confirmation dialog for the table action.
|
|
95
|
-
*/
|
|
96
|
-
confirmDialogData?: ConfirmDialogData;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* An action for the table. Can either be independent or run on the selected entities in the table.
|
|
100
|
-
*/
|
|
101
|
-
export type TableAction<EntityType extends BaseEntityType<EntityType>> = BaseTableAction | MultiSelectAction<EntityType>;
|
|
102
|
-
/**
|
|
103
|
-
* The base data of the ngx-mat-entity-table.
|
|
104
|
-
*/
|
|
105
|
-
export interface BaseData<EntityType extends BaseEntityType<EntityType>> {
|
|
106
|
-
/**
|
|
107
|
-
* The title of the table.
|
|
108
|
-
*/
|
|
109
|
-
title: string;
|
|
110
|
-
/**
|
|
111
|
-
* The definition of the columns to display. Consists of the displayName to show in the header of the row
|
|
112
|
-
* and the value, which is a function that generates the value to display inside a column.
|
|
113
|
-
*/
|
|
114
|
-
displayColumns: DisplayColumn<EntityType>[];
|
|
115
|
-
/**
|
|
116
|
-
* The Class of the service that handles the entities.
|
|
117
|
-
* Needs to be injectable and an extension of the "EntityService"-Class.
|
|
118
|
-
*/
|
|
119
|
-
EntityServiceClass: EntityServiceClassNewable<EntityType>;
|
|
120
|
-
/**
|
|
121
|
-
* The Class of the entities to manage.
|
|
122
|
-
*/
|
|
123
|
-
EntityClass?: EntityClassNewable<EntityType>;
|
|
124
|
-
/**
|
|
125
|
-
* The label on the search bar. Defaults to "Search".
|
|
126
|
-
*/
|
|
127
|
-
searchLabel?: string;
|
|
128
|
-
/**
|
|
129
|
-
* The label on the button for adding new entities. Defaults to "Create".
|
|
130
|
-
*/
|
|
131
|
-
createButtonLabel?: string;
|
|
132
|
-
/**
|
|
133
|
-
* Whether editing happens in a dialog or a separate page.
|
|
134
|
-
*/
|
|
135
|
-
defaultEdit?: 'dialog' | 'page';
|
|
136
|
-
/**
|
|
137
|
-
* Whether creating happens in a dialog or a separate page.
|
|
138
|
-
*/
|
|
139
|
-
defaultCreate?: 'dialog' | 'page';
|
|
140
|
-
/**
|
|
141
|
-
* Takes a custom edit method which runs when you click on a entity.
|
|
142
|
-
* If you don't need any special editing of entries you can also omit this.
|
|
143
|
-
* In that case a default edit dialog is generated.
|
|
144
|
-
*/
|
|
145
|
-
edit?: (entity: EntityType) => unknown;
|
|
146
|
-
/**
|
|
147
|
-
* Takes a method to run when you click on the new button.
|
|
148
|
-
* If you don't need anything special you can also omit this.
|
|
149
|
-
* In that case a default create dialog is generated.
|
|
150
|
-
*/
|
|
151
|
-
create?: (entity: EntityType) => unknown;
|
|
152
|
-
/**
|
|
153
|
-
* Defines how the search string of entities is generated.
|
|
154
|
-
*/
|
|
155
|
-
searchString?: (entity: EntityType) => string;
|
|
156
|
-
/**
|
|
157
|
-
* Defines whether or not the user can add new entities.
|
|
158
|
-
* @default () => true
|
|
159
|
-
*/
|
|
160
|
-
allowCreate?: boolean | (() => boolean);
|
|
161
|
-
/**
|
|
162
|
-
* Defines whether or not the user can view the specific entity.
|
|
163
|
-
* @default () => true
|
|
164
|
-
*/
|
|
165
|
-
allowRead?: boolean | ((entity?: EntityType) => boolean);
|
|
166
|
-
/**
|
|
167
|
-
* Defines whether or not the user can edit the specific entity.
|
|
168
|
-
* @default () => true
|
|
169
|
-
*/
|
|
170
|
-
allowUpdate?: boolean | ((entity?: EntityType) => boolean);
|
|
171
|
-
/**
|
|
172
|
-
* Whether or not the user can delete this specific entity.
|
|
173
|
-
* @default () => true
|
|
174
|
-
*/
|
|
175
|
-
allowDelete?: boolean | ((entity?: EntityType) => boolean);
|
|
176
|
-
/**
|
|
177
|
-
* All Actions that you want to run on the table can be defined here.
|
|
178
|
-
* (e.g. Download as zip-file, import or mass delete).
|
|
179
|
-
*/
|
|
180
|
-
tableActions?: TableAction<EntityType>[];
|
|
181
|
-
/**
|
|
182
|
-
* The Label for the button that opens all table-actions.
|
|
183
|
-
*/
|
|
184
|
-
tableActionsLabel?: string;
|
|
185
|
-
/**
|
|
186
|
-
* Whether or not to display a loading spinner while the entities of the table are loaded.
|
|
187
|
-
* @default true
|
|
188
|
-
*/
|
|
189
|
-
displayLoadingSpinner?: boolean;
|
|
190
|
-
/**
|
|
191
|
-
* Whether or not JSON imports are allowed.
|
|
192
|
-
* This adds an table select action.
|
|
193
|
-
* @default false
|
|
194
|
-
*/
|
|
195
|
-
allowJsonImport?: boolean;
|
|
196
|
-
/**
|
|
197
|
-
* Data to customize the json import action.
|
|
198
|
-
*/
|
|
199
|
-
importActionData?: Omit<BaseTableAction, 'action' | 'requireConfirmDialog' | 'type'>;
|
|
200
|
-
/**
|
|
201
|
-
* Configuration for css classes that should be applied to table rows based on a condition.
|
|
202
|
-
* This could be used to eg. Set the background color to green when an item has the status completed etc.
|
|
203
|
-
* INFO: You need to use ng-deep or apply the styling in the styles.scss.
|
|
204
|
-
* @default () => []
|
|
205
|
-
*/
|
|
206
|
-
dynamicRowStyleClasses?: DynamicStyleClasses<EntityType>;
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* The data of the default create-dialog.
|
|
210
|
-
*/
|
|
211
|
-
export interface CreateData {
|
|
212
|
-
/**
|
|
213
|
-
* The title of the default create-dialog.
|
|
214
|
-
*/
|
|
215
|
-
title?: string;
|
|
216
|
-
/**
|
|
217
|
-
* The label on the create-button of the default create-dialog. Defaults to "Create".
|
|
218
|
-
*/
|
|
219
|
-
createButtonLabel?: string;
|
|
220
|
-
/**
|
|
221
|
-
* The label on the cancel-button for the default create-dialog. Defaults to "Cancel".
|
|
222
|
-
*/
|
|
223
|
-
cancelButtonLabel?: string;
|
|
224
|
-
/**
|
|
225
|
-
* Whether or not the creation of an entry should require a confirm dialog.
|
|
226
|
-
*/
|
|
227
|
-
createRequiresConfirmDialog?: boolean;
|
|
228
|
-
/**
|
|
229
|
-
* The data used to generate a confirmation dialog for the create action.
|
|
230
|
-
*/
|
|
231
|
-
confirmCreateDialogData?: ConfirmDialogData;
|
|
232
|
-
/**
|
|
233
|
-
* Whether or not cancelling with unsaved changes should require a confirm dialog.
|
|
234
|
-
*/
|
|
235
|
-
unsavedChangesRequireConfirmDialog?: boolean;
|
|
236
|
-
/**
|
|
237
|
-
* The data used to generate a confirmation dialog for the cancel with unsaved changes action.
|
|
238
|
-
*/
|
|
239
|
-
confirmUnsavedChangesDialogData?: ConfirmDialogData;
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* An action that can be run from inside the edit dialog or page.
|
|
243
|
-
*/
|
|
244
|
-
export interface EditAction<EntityType extends BaseEntityType<EntityType>> {
|
|
245
|
-
/**
|
|
246
|
-
* The name of the action.
|
|
247
|
-
*/
|
|
248
|
-
displayName: string;
|
|
249
|
-
/**
|
|
250
|
-
* The action itself.
|
|
251
|
-
*/
|
|
252
|
-
action: ((entity: EntityType, entityPriorChanges: EntityType) => unknown) | ((entity: EntityType, entityPriorChanges: EntityType) => Promise<unknown>);
|
|
253
|
-
/**
|
|
254
|
-
* A method that defines whether or not the action can be used.
|
|
255
|
-
* @default () => true
|
|
256
|
-
*/
|
|
257
|
-
enabled?: (e: EntityType) => boolean;
|
|
258
|
-
/**
|
|
259
|
-
* A method that defines whether or not a confirm dialog is needed to run the action.
|
|
260
|
-
* @default false
|
|
261
|
-
*/
|
|
262
|
-
requireConfirmDialog?: (e: EntityType) => boolean;
|
|
263
|
-
/**
|
|
264
|
-
* The data used to generate a confirmation dialog for the action.
|
|
265
|
-
*/
|
|
266
|
-
confirmDialogData?: ConfirmDialogData;
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* The data of the default edit-dialog or page.
|
|
270
|
-
*/
|
|
271
|
-
export interface EditData<EntityType extends BaseEntityType<EntityType>> {
|
|
272
|
-
/**
|
|
273
|
-
* The title of the default edit-dialog.
|
|
274
|
-
*/
|
|
275
|
-
title?: (entity: EntityType) => string;
|
|
276
|
-
/**
|
|
277
|
-
* The label on the confirm-button of the default edit-dialog or page. Defaults to "Save".
|
|
278
|
-
*/
|
|
279
|
-
confirmButtonLabel?: string;
|
|
280
|
-
/**
|
|
281
|
-
* The label on the delete-button of the default edit-dialog or page. Defaults to "Delete".
|
|
282
|
-
*/
|
|
283
|
-
deleteButtonLabel?: string;
|
|
284
|
-
/**
|
|
285
|
-
* The label on the cancel-button for the default edit-dialog or page. Defaults to "Cancel".
|
|
286
|
-
*/
|
|
287
|
-
cancelButtonLabel?: string;
|
|
288
|
-
/**
|
|
289
|
-
* Whether or not the deletion of an entry should require a confirm dialog.
|
|
290
|
-
*/
|
|
291
|
-
deleteRequiresConfirmDialog?: boolean;
|
|
292
|
-
/**
|
|
293
|
-
* Whether or not the editing of an entry should require a confirm dialog.
|
|
294
|
-
*/
|
|
295
|
-
editRequiresConfirmDialog?: boolean;
|
|
296
|
-
/**
|
|
297
|
-
* The data used to generate a confirmation dialog for the delete action.
|
|
298
|
-
*/
|
|
299
|
-
confirmDeleteDialogData?: ConfirmDialogData;
|
|
300
|
-
/**
|
|
301
|
-
* The data used to generate a confirmation dialog for the edit action.
|
|
302
|
-
*/
|
|
303
|
-
confirmEditDialogData?: ConfirmDialogData;
|
|
304
|
-
/**
|
|
305
|
-
* Whether or not cancelling with unsaved changes should require a confirm dialog.
|
|
306
|
-
*/
|
|
307
|
-
unsavedChangesRequireConfirmDialog?: boolean;
|
|
308
|
-
/**
|
|
309
|
-
* The data used to generate a confirmation dialog for the cancel with unsaved changes action.
|
|
310
|
-
*/
|
|
311
|
-
confirmUnsavedChangesDialogData?: ConfirmDialogData;
|
|
312
|
-
/**
|
|
313
|
-
* The label of the actions button.
|
|
314
|
-
*/
|
|
315
|
-
actionsLabel?: string;
|
|
316
|
-
/**
|
|
317
|
-
* All actions of the edit page/dialog.
|
|
318
|
-
*/
|
|
319
|
-
actions?: EditAction<EntityType>[];
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* All the configuration data required to display a ngx-mat-entity-table.
|
|
323
|
-
*/
|
|
324
|
-
export interface TableData<EntityType extends BaseEntityType<EntityType>> {
|
|
325
|
-
/**
|
|
326
|
-
* The base data for the table-component.
|
|
327
|
-
* Includes stuff like the title for the table, what to display inside the rows etc.
|
|
328
|
-
*/
|
|
329
|
-
baseData: BaseData<EntityType>;
|
|
330
|
-
/**
|
|
331
|
-
* The data for the default create-dialog.
|
|
332
|
-
* Can be omitted when specifying a custom "create" method inside the baseData.
|
|
333
|
-
*/
|
|
334
|
-
createData?: CreateData;
|
|
335
|
-
/**
|
|
336
|
-
* The data for the default edit-dialog.
|
|
337
|
-
* Can be omitted when specifying a custom "edit" method inside the baseData.
|
|
338
|
-
*/
|
|
339
|
-
editData?: EditData<EntityType>;
|
|
340
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { EnvironmentInjector, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { Router } from '@angular/router';
|
|
4
|
-
import { DisplayColumn, TableData } from './table-data';
|
|
5
|
-
import { BaseTableActionInternal, TableActionInternal, TableDataInternal } from './table-data.builder';
|
|
6
|
-
import { BaseEntityType, Entity } from '../../classes/entity.model';
|
|
7
|
-
import { NgxGlobalDefaultValues } from '../../global-configuration-values';
|
|
8
|
-
import { CustomTableConfiguration } from '../custom-table/custom-table-configuration.model';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* Generates a fully functional table for displaying, creating, updating and deleting entities
|
|
12
|
-
* based on the configuration passed in the @Input "tableData".
|
|
13
|
-
*
|
|
14
|
-
* It offers a lot of customization options which can be found in "TableData".
|
|
15
|
-
*/
|
|
16
|
-
export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityType<Entity>> implements OnInit {
|
|
17
|
-
private readonly dialog;
|
|
18
|
-
private readonly injector;
|
|
19
|
-
private readonly router;
|
|
20
|
-
private readonly globalConfig;
|
|
21
|
-
/**
|
|
22
|
-
* The configuration for the component.
|
|
23
|
-
*/
|
|
24
|
-
tableData: TableData<EntityType>;
|
|
25
|
-
/**
|
|
26
|
-
* Emits when there are unsaved changes on either the create or update dialog.
|
|
27
|
-
*/
|
|
28
|
-
readonly unsavedDialogChanges: EventEmitter<boolean>;
|
|
29
|
-
/**
|
|
30
|
-
* The internal TableData.
|
|
31
|
-
*/
|
|
32
|
-
data: TableDataInternal<EntityType>;
|
|
33
|
-
/**
|
|
34
|
-
* Configuration for the table.
|
|
35
|
-
*/
|
|
36
|
-
tableConfig: CustomTableConfiguration<EntityType>;
|
|
37
|
-
/**
|
|
38
|
-
* The entities to display inside the table.
|
|
39
|
-
*/
|
|
40
|
-
entities: EntityType[];
|
|
41
|
-
/**
|
|
42
|
-
* A search string for filtering table results.
|
|
43
|
-
*/
|
|
44
|
-
searchString: string;
|
|
45
|
-
/**
|
|
46
|
-
* The currently selected entities.
|
|
47
|
-
*/
|
|
48
|
-
selected: EntityType[];
|
|
49
|
-
/**
|
|
50
|
-
* Whether or not the table content is currently loading.
|
|
51
|
-
*/
|
|
52
|
-
isLoading: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Whether or not the current user is allowed to create entries for the table.
|
|
55
|
-
*/
|
|
56
|
-
allowCreate: boolean;
|
|
57
|
-
private entityService;
|
|
58
|
-
/**
|
|
59
|
-
* The internal BaseTableAction. Sets default values.
|
|
60
|
-
*/
|
|
61
|
-
importAction: BaseTableActionInternal;
|
|
62
|
-
constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, globalConfig: NgxGlobalDefaultValues);
|
|
63
|
-
/**
|
|
64
|
-
* Sets up all the configuration for the table and the EntityService.
|
|
65
|
-
*/
|
|
66
|
-
ngOnInit(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Gets the value to display in the column.
|
|
69
|
-
* Runs in environment context to enable injection.
|
|
70
|
-
* @param entity - The entity to get the value from.
|
|
71
|
-
* @param displayColumn - The display column to get the value from.
|
|
72
|
-
* @returns The value of the display column.
|
|
73
|
-
*/
|
|
74
|
-
getDisplayColumnValue(entity: EntityType, displayColumn: DisplayColumn<EntityType>): unknown;
|
|
75
|
-
private startImportJson;
|
|
76
|
-
private importJson;
|
|
77
|
-
/**
|
|
78
|
-
* Edits an entity. This either calls the edit-Method provided by the user or uses a default edit-dialog.
|
|
79
|
-
* @param entity - The entity that should be updated.
|
|
80
|
-
* @throws When no EntityClass was provided, as a new call is needed to initialize metadata.
|
|
81
|
-
*/
|
|
82
|
-
editEntity(entity: EntityType): void;
|
|
83
|
-
/**
|
|
84
|
-
* Whether updating the provided entity is allowed.
|
|
85
|
-
* @param entity - The entity that the user wants to edit.
|
|
86
|
-
* @returns True when the user can edit the provided entity and false otherwise.
|
|
87
|
-
*/
|
|
88
|
-
allowUpdate(entity: EntityType): boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Whether viewing the provided entity is allowed.
|
|
91
|
-
* @param entity - The entity that the user wants to view.
|
|
92
|
-
* @returns True when the user can view the provided entity and false otherwise.
|
|
93
|
-
*/
|
|
94
|
-
allowRead(entity: EntityType): boolean;
|
|
95
|
-
private editDefaultPage;
|
|
96
|
-
private editDefaultDialog;
|
|
97
|
-
/**
|
|
98
|
-
* Creates a new Entity. This either calls the create-Method provided by the user or uses a default create-dialog.
|
|
99
|
-
* @throws When no EntityClass was provided, as a new call is needed to initialize metadata.
|
|
100
|
-
*/
|
|
101
|
-
createEntity(): void;
|
|
102
|
-
private createDefaultPage;
|
|
103
|
-
private createDefaultDialog;
|
|
104
|
-
/**
|
|
105
|
-
* Runs the TableAction for all selected entries.
|
|
106
|
-
* Also handles confirmation with an additional dialog if configured.
|
|
107
|
-
* @param action - The TableAction to run.
|
|
108
|
-
*/
|
|
109
|
-
runTableAction(action: TableActionInternal<EntityType>): Promise<void>;
|
|
110
|
-
private confirmRunTableAction;
|
|
111
|
-
/**
|
|
112
|
-
* Checks if an TableAction is disabled (e.g. Because no entries have been selected).
|
|
113
|
-
* @param action - The TableAction to check.
|
|
114
|
-
* @returns Whether or not the Action can be used.
|
|
115
|
-
*/
|
|
116
|
-
tableActionDisabled(action: TableActionInternal<EntityType>): boolean;
|
|
117
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityTableComponent<any>, never>;
|
|
118
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityTableComponent<any>, "ngx-mat-entity-table", never, { "tableData": { "alias": "tableData"; "required": true; }; }, { "unsavedDialogChanges": "unsavedDialogChanges"; }, never, never, true, never>;
|
|
119
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/angular-fontawesome';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* A component that displays an info-symbol and a tooltip when it is hovered/clicked.
|
|
5
|
-
*/
|
|
6
|
-
export declare class TooltipComponent {
|
|
7
|
-
faInfo: IconDefinition;
|
|
8
|
-
/**
|
|
9
|
-
* What to display inside the tooltip.
|
|
10
|
-
*/
|
|
11
|
-
tooltipContent: string;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "ngx-mat-entity-tooltip", never, { "tooltipContent": { "alias": "tooltipContent"; "required": true; }; }, {}, never, never, true, never>;
|
|
14
|
-
}
|