ngx-material-entity 18.0.1 → 18.2.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.
Files changed (109) hide show
  1. package/README.md +10 -13
  2. package/components/create-page/create-page.component.d.ts +3 -0
  3. package/components/custom-table/custom-table-configuration.model.d.ts +65 -0
  4. package/components/custom-table/custom-table.component.d.ts +111 -0
  5. package/components/edit-page/edit-page.component.d.ts +8 -1
  6. package/components/input/array/array-date-input/array-date-input.component.d.ts +2 -2
  7. package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +3 -3
  8. package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +3 -3
  9. package/components/input/array/array-table.class.d.ts +25 -19
  10. package/components/input/file/file-default-input/file-default-input.component.d.ts +1 -1
  11. package/components/input/file/file-image-input/file-image-input.component.d.ts +3 -0
  12. package/components/input/file/file-input/file-input.component.d.ts +8 -2
  13. package/components/input/input.component.d.ts +101 -80
  14. package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +2 -0
  15. package/components/input/relations/references-many-input/references-many-input.component.d.ts +14 -17
  16. package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +2 -0
  17. package/components/input/string/string-password-input/string-password-input.component.d.ts +3 -0
  18. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +5 -5
  19. package/components/table/table-data.d.ts +9 -4
  20. package/components/table/table.component.d.ts +15 -37
  21. package/components/tooltip/tooltip.component.d.ts +2 -0
  22. package/decorators/array/array-decorator-internal.data.d.ts +8 -3
  23. package/decorators/array/array-decorator.data.d.ts +45 -88
  24. package/decorators/base/property-decorator.data.d.ts +2 -2
  25. package/decorators/file/file-decorator-internal.data.d.ts +3 -2
  26. package/decorators/file/file-decorator.data.d.ts +4 -3
  27. package/decorators/references-many/references-many-decorator-internal.data.d.ts +3 -1
  28. package/decorators/references-many/references-many-decorator.data.d.ts +13 -1
  29. package/directives/dynamic-style-class.directive.d.ts +4 -5
  30. package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +7 -8
  31. package/esm2022/components/create-page/create-page.component.mjs +17 -11
  32. package/esm2022/components/custom-table/custom-table-configuration.model.mjs +37 -0
  33. package/esm2022/components/custom-table/custom-table.component.mjs +213 -0
  34. package/esm2022/components/edit-page/edit-page.component.mjs +29 -12
  35. package/esm2022/components/form/form.component.mjs +7 -8
  36. package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +17 -21
  37. package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +28 -27
  38. package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +18 -22
  39. package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +9 -7
  40. package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +9 -7
  41. package/esm2022/components/input/array/array-table.class.mjs +53 -45
  42. package/esm2022/components/input/base-input.component.mjs +3 -3
  43. package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +4 -4
  44. package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +3 -3
  45. package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +4 -4
  46. package/esm2022/components/input/custom/custom.component.mjs +3 -3
  47. package/esm2022/components/input/date/date-input/date-input.component.mjs +3 -3
  48. package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +7 -8
  49. package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +6 -6
  50. package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +5 -5
  51. package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +10 -9
  52. package/esm2022/components/input/file/file-input/file-input.component.mjs +27 -15
  53. package/esm2022/components/input/input.component.mjs +162 -114
  54. package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +11 -8
  55. package/esm2022/components/input/number/number-input/number-input.component.mjs +3 -3
  56. package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +4 -4
  57. package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +46 -57
  58. package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +6 -7
  59. package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +11 -8
  60. package/esm2022/components/input/string/string-input/string-input.component.mjs +3 -3
  61. package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +13 -8
  62. package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +3 -3
  63. package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +9 -10
  64. package/esm2022/components/table/display-column-value/base-display-column-value.component.mjs +3 -3
  65. package/esm2022/components/table/display-column-value/display-column-value.component.mjs +3 -3
  66. package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +1 -1
  67. package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +21 -16
  68. package/esm2022/components/table/table-data.builder.mjs +3 -1
  69. package/esm2022/components/table/table-data.mjs +1 -1
  70. package/esm2022/components/table/table.component.mjs +41 -114
  71. package/esm2022/components/tooltip/tooltip.component.mjs +9 -5
  72. package/esm2022/decorators/array/array-decorator-internal.data.mjs +18 -3
  73. package/esm2022/decorators/array/array-decorator.data.mjs +33 -2
  74. package/esm2022/decorators/array/array.decorator.mjs +15 -8
  75. package/esm2022/decorators/base/property-decorator.data.mjs +2 -2
  76. package/esm2022/decorators/file/file-decorator-internal.data.mjs +4 -3
  77. package/esm2022/decorators/file/file-decorator.data.mjs +3 -3
  78. package/esm2022/decorators/file/file.decorator.mjs +7 -4
  79. package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +1 -1
  80. package/esm2022/decorators/number/number.decorator.mjs +7 -4
  81. package/esm2022/decorators/object/object.decorator.mjs +5 -3
  82. package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +8 -1
  83. package/esm2022/decorators/references-many/references-many-decorator.data.mjs +1 -1
  84. package/esm2022/decorators/string/string-decorator-internal.data.mjs +2 -1
  85. package/esm2022/decorators/string/string.decorator.mjs +11 -6
  86. package/esm2022/directives/drag-drop.directive.mjs +3 -3
  87. package/esm2022/directives/dynamic-style-class.directive.mjs +7 -7
  88. package/esm2022/directives/included-in.directive.mjs +3 -3
  89. package/esm2022/directives/number.directive.mjs +3 -3
  90. package/esm2022/directives/password-match.directive.mjs +3 -3
  91. package/esm2022/directives/tooltip.directive.mjs +7 -4
  92. package/esm2022/functions/dropdown-values-to-function.function.mjs +2 -1
  93. package/esm2022/functions/get-changes-tooltip-content.function.mjs +23 -0
  94. package/esm2022/functions/get-validation-errors-tooltip-content.function.mjs +23 -0
  95. package/esm2022/functions/table-column-value-to-sort-value.function.mjs +33 -0
  96. package/esm2022/public-api.mjs +3 -2
  97. package/esm2022/utilities/date.utilities.mjs +7 -6
  98. package/esm2022/utilities/entity.utilities.mjs +58 -27
  99. package/esm2022/utilities/file.utilities.mjs +7 -4
  100. package/esm2022/utilities/validation.utilities.mjs +41 -21
  101. package/fesm2022/ngx-material-entity.mjs +2767 -2336
  102. package/fesm2022/ngx-material-entity.mjs.map +1 -1
  103. package/functions/get-changes-tooltip-content.function.d.ts +13 -0
  104. package/functions/table-column-value-to-sort-value.function.d.ts +9 -0
  105. package/package.json +4 -2
  106. package/public-api.d.ts +2 -1
  107. package/utilities/entity.utilities.d.ts +11 -7
  108. package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +0 -23
  109. /package/functions/{get-validation-errors-tooltip-content.function.ts.d.ts → get-validation-errors-tooltip-content.function.d.ts} +0 -0
package/README.md CHANGED
@@ -65,8 +65,6 @@ NgxMaterialEntity aims to have a fast way to get started with a lot of default o
65
65
 
66
66
  # Requirements
67
67
  This package relies on the [angular material library](https://material.angular.io/guide/getting-started) to render its components.
68
- <br>
69
- It also uses [bootstrap](https://getbootstrap.com/) for responsive design.
70
68
 
71
69
  # Basic Usage
72
70
  ## Create your entity
@@ -136,7 +134,7 @@ It is pretty easy to use the input component inside a for-loop that iterates ove
136
134
  <br>
137
135
  We thought this approach a bit further and build a complete CRUD table component with support for:
138
136
  - omitting values for creating or updating entities
139
- - layouting & responsive design (based on bootstrap)
137
+ - layouting & responsive design
140
138
  - multi select actions
141
139
  - validation
142
140
 
@@ -250,7 +248,7 @@ export abstract class PropertyDecoratorConfig {
250
248
  omitForUpdate?: boolean;
251
249
  /**
252
250
  * Defines the width of the input property when used inside the default create or edit dialog.
253
- * Has 3 bootstrap values for different breakpoints for simple responsive design.
251
+ * Has 3 values for different breakpoints for simple responsive design based on bootstrap (1-12).
254
252
  * The first value sets the columns for the screen size lg, the second for md and the third for sm.
255
253
  *
256
254
  * @default [6, 6, 12]
@@ -264,7 +262,6 @@ export abstract class PropertyDecoratorConfig {
264
262
  position?: Position
265
263
  }
266
264
  ```
267
- For more information regarding the "defaultWidths" see the bootstrap guide about the [Grid system](https://getbootstrap.com/docs/5.0/layout/grid/).
268
265
 
269
266
  ## @string default
270
267
  The "default" display of a string value. Inside a single line mat-input.
@@ -614,11 +611,11 @@ export interface StringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {
614
611
  displayStyle: 'chips',
615
612
 
616
613
  /**
617
- * The class for the <i> tag used to remove an entry from the array.
614
+ * The icon used to remove an entry from the array.
618
615
  *
619
- * @default 'fas fa-circle-minus'
616
+ * @default faCircleMinus
620
617
  */
621
- deleteIcon?: string,
618
+ deleteIcon?: IconDefinition,
622
619
  /**
623
620
  * The minimum required length of the string.
624
621
  */
@@ -644,11 +641,11 @@ export interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecora
644
641
  displayStyle: 'chips',
645
642
 
646
643
  /**
647
- * The class for the <i> tag used to remove an entry from the array.
644
+ * The icon used to remove an entry from the array.
648
645
  *
649
- * @default 'fas fa-circle-minus'
646
+ * @default faCircleMinus
650
647
  */
651
- deleteIcon?: string,
648
+ deleteIcon?: IconDefinition,
652
649
  /**
653
650
  * The autocomplete values.
654
651
  */
@@ -885,9 +882,9 @@ abstract class FileDecoratorConfig extends PropertyDecoratorConfig {
885
882
  type!: 'image' | 'other';
886
883
 
887
884
  /**
888
- * The class for the <i> tag used to remove a file from the input.
885
+ * The icon used to remove a file from the input.
889
886
  *
890
- * @default 'fas fa-circle-minus'
887
+ * @default faCircleMinus
891
888
  */
892
889
  deleteIcon?: string;
893
890
 
@@ -2,6 +2,7 @@ import { Location } from '@angular/common';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import { ElementRef, EnvironmentInjector, InjectionToken, OnInit, Renderer2 } from '@angular/core';
4
4
  import { MatDialog } from '@angular/material/dialog';
5
+ import { IconDefinition } from '@fortawesome/angular-fontawesome';
5
6
  import { PageCreateDataInternal } from './page-create-data.builder';
6
7
  import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
7
8
  import { NgxGlobalDefaultValues } from '../../global-configuration-values';
@@ -64,6 +65,8 @@ export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEnti
64
65
  private readonly el;
65
66
  private readonly renderer;
66
67
  protected readonly globalConfig: NgxGlobalDefaultValues;
68
+ faChevronLeft: IconDefinition;
69
+ faWarning: IconDefinition;
67
70
  /**
68
71
  * Contains HelperMethods around handling Entities and their property-metadata.
69
72
  */
@@ -0,0 +1,65 @@
1
+ import { NgxGlobalDefaultValues } from '../../global-configuration-values';
2
+ import { DisplayColumn, DynamicStyleClasses } from '../table/table-data';
3
+ /**
4
+ * Configuration for the custom table.
5
+ */
6
+ export interface CustomTableConfiguration<T = unknown> {
7
+ /**
8
+ * Configuration for css classes that should be applied to table rows based on a condition.
9
+ * This could be used to eg. Set the background color to green when an item has the status completed etc.
10
+ * INFO: You need to use ng-deep or apply the styling in the styles.scss.
11
+ * @default () => []
12
+ */
13
+ dynamicRowStyleClasses?: DynamicStyleClasses<T>;
14
+ /**
15
+ * The columns to display inside the custom table.
16
+ */
17
+ displayColumns: DisplayColumn<T>[];
18
+ /**
19
+ * Whether or not a loading spinner should be shown.
20
+ * Only works when you provide the "loading" input to the custom table.
21
+ * @default true
22
+ */
23
+ displayLoadingSpinner?: boolean;
24
+ /**
25
+ * Whether or not the select column should be enabled.
26
+ * @default true
27
+ */
28
+ withSelection: boolean;
29
+ /**
30
+ * A function that resolves a row value to a string that can be searched for.
31
+ * By default this uses a built in search filter.
32
+ */
33
+ searchStringForRow?: (value: T) => string;
34
+ /**
35
+ * Whether or not the user is allowed to click on entries in the custom table.
36
+ * @default () => true
37
+ */
38
+ allowClick?: (value: T) => boolean;
39
+ /**
40
+ * An error message to show when the table contains no entries.
41
+ * Also applies styling to the table.
42
+ */
43
+ emptyErrorMessage?: string;
44
+ /**
45
+ * Resolves the given id for an entity.
46
+ * This is used for the referencesMany input,
47
+ * where you want to show values of the entity in the table rows and not the id.
48
+ */
49
+ resolveToReferencedEntity?: (id: unknown) => unknown;
50
+ }
51
+ /**
52
+ * Internal configuration for the custom table.
53
+ * Provides default values.
54
+ */
55
+ export declare class InternalCustomTableConfiguration<T = unknown> implements CustomTableConfiguration<T> {
56
+ dynamicRowStyleClasses: DynamicStyleClasses<T>;
57
+ displayColumns: DisplayColumn<T>[];
58
+ displayLoadingSpinner: boolean;
59
+ withSelection: boolean;
60
+ searchStringForRow: (value: T) => string;
61
+ allowClick: (value: T) => boolean;
62
+ emptyErrorMessage: string;
63
+ resolveToReferencedEntity?: (id: unknown) => unknown;
64
+ constructor(globalConfig: NgxGlobalDefaultValues, configuration: CustomTableConfiguration<T>);
65
+ }
@@ -0,0 +1,111 @@
1
+ import { SelectionModel } from '@angular/cdk/collections';
2
+ import { EnvironmentInjector, EventEmitter, OnInit } from '@angular/core';
3
+ import { MatCheckboxChange } from '@angular/material/checkbox';
4
+ import { MatTableDataSource } from '@angular/material/table';
5
+ import { CustomTableConfiguration, InternalCustomTableConfiguration } from './custom-table-configuration.model';
6
+ import { BaseEntityType } from '../../classes/entity.model';
7
+ import { NgxGlobalDefaultValues } from '../../global-configuration-values';
8
+ import { SelectionUtilities } from '../../utilities/selection.utilities';
9
+ import { DisplayColumn, TableColumnValue } from '../table/table-data';
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * The event for clicking on a table cell.
13
+ */
14
+ export type CellClickedEvent<T> = {
15
+ /**
16
+ * The column that was clicked.
17
+ */
18
+ displayColumn: DisplayColumn<T>;
19
+ /**
20
+ * The value of the row that was clicked.
21
+ */
22
+ value: T;
23
+ };
24
+ /**
25
+ * A custom table that has things like sorting and pagination already built in.
26
+ */
27
+ export declare class CustomTableComponent<T, EntityType extends BaseEntityType<EntityType>> implements OnInit {
28
+ private readonly injector;
29
+ private readonly globalConfig;
30
+ SelectionUtilities: typeof SelectionUtilities;
31
+ /**
32
+ * Updates the table entries.
33
+ */
34
+ set data(value: T[]);
35
+ /**
36
+ * Applies the given string as a filter to the table.
37
+ */
38
+ set searchString(value: string);
39
+ set required(value: boolean);
40
+ /**
41
+ * Whether or not the table should show an error message when the table is empty.
42
+ */
43
+ shouldShowMissingError: boolean;
44
+ /**
45
+ * Whether or not the table data is currently loading.
46
+ */
47
+ isLoading: boolean;
48
+ /**
49
+ * The configuration of the table.
50
+ */
51
+ configuration: CustomTableConfiguration<T>;
52
+ internalConfiguration: InternalCustomTableConfiguration<T>;
53
+ /**
54
+ * Emits when a cell is clicked that is neither disabled nor disallowed to be clicked.
55
+ */
56
+ readonly cellClicked: EventEmitter<CellClickedEvent<T>>;
57
+ /**
58
+ * Emits when the selected values change.
59
+ */
60
+ readonly selectionChanged: EventEmitter<T[]>;
61
+ /**
62
+ * The paginator from the html.
63
+ */
64
+ private readonly paginator;
65
+ /**
66
+ * The sort from the html.
67
+ */
68
+ private readonly sort;
69
+ /**
70
+ * The data source for the table.
71
+ */
72
+ dataSource: MatTableDataSource<T>;
73
+ /**
74
+ * The selection of the table.
75
+ */
76
+ selection: SelectionModel<T>;
77
+ /**
78
+ * The columns of the table.
79
+ */
80
+ displayedColumns: string[];
81
+ constructor(injector: EnvironmentInjector, globalConfig: NgxGlobalDefaultValues);
82
+ ngOnInit(): void;
83
+ private setupDataSource;
84
+ /**
85
+ * Emits a cellClicked event when the clicked column is enabled and clicking is allowed by the configuration.
86
+ * @param value - The value of the row that was clicked.
87
+ * @param dCol - The display column of the row that was clicked.
88
+ */
89
+ clickCell(value: T, dCol: DisplayColumn<T>): void;
90
+ /**
91
+ * Toggles a single table row.
92
+ * @param value - The value of the row that was clicked.
93
+ * @param event - The change event from the checkbox.
94
+ */
95
+ toggle(value: T, event?: MatCheckboxChange): void;
96
+ /**
97
+ * Toggles all table rows.
98
+ * @param event - The change event from the checkbox.
99
+ */
100
+ masterToggle(event?: MatCheckboxChange): void;
101
+ /**
102
+ * Gets the value to display in the column.
103
+ * Runs in environment context to enable injection.
104
+ * @param value - The column value to get the display string from.
105
+ * @param displayColumn - The display column to get the value from.
106
+ * @returns The value of the display column.
107
+ */
108
+ getDisplayColumnValue(value: T, displayColumn: DisplayColumn<T>): TableColumnValue;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomTableComponent<any, any>, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomTableComponent<any, any>, "custom-table", never, { "data": { "alias": "data"; "required": true; }; "searchString": { "alias": "searchString"; "required": false; }; "required": { "alias": "required"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "configuration": { "alias": "configuration"; "required": true; }; }, { "cellClicked": "cellClicked"; "selectionChanged": "selectionChanged"; }, never, never, true, never>;
111
+ }
@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http';
3
3
  import { ElementRef, EnvironmentInjector, InjectionToken, OnInit, Renderer2 } from '@angular/core';
4
4
  import { MatDialog } from '@angular/material/dialog';
5
5
  import { ActivatedRoute } from '@angular/router';
6
+ import { IconDefinition } from '@fortawesome/angular-fontawesome';
6
7
  import { PageEditDataInternal } from './page-edit-data.builder';
7
8
  import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
8
9
  import { NgxGlobalDefaultValues } from '../../global-configuration-values';
9
10
  import { EntityService } from '../../services/entity.service';
10
11
  import { UnsavedChangesPage } from '../../services/unsaved-changes.guard';
11
- import { EntityUtilities } from '../../utilities/entity.utilities';
12
+ import { Difference, EntityUtilities } from '../../utilities/entity.utilities';
12
13
  import { ValidationError } from '../../utilities/validation.utilities';
13
14
  import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
14
15
  import { EditActionInternal } from '../table/edit-dialog/edit-data.builder';
@@ -67,6 +68,8 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
67
68
  private readonly el;
68
69
  private readonly renderer;
69
70
  protected readonly globalConfig: NgxGlobalDefaultValues;
71
+ faChevronLeft: IconDefinition;
72
+ faWarning: IconDefinition;
70
73
  /**
71
74
  * Contains HelperMethods around handling Entities and their property-metadata.
72
75
  */
@@ -91,6 +94,10 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
91
94
  * Whether or not the entity is valid.
92
95
  */
93
96
  isEntityValid: boolean;
97
+ /**
98
+ * All changes that have been done to the entity.
99
+ */
100
+ changes: Difference<EntityType>[];
94
101
  /**
95
102
  * Whether or not the entity is dirty.
96
103
  */
@@ -1,5 +1,5 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { EnvironmentInjector, OnInit } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
3
  import { MatDialog } from '@angular/material/dialog';
4
4
  import { BaseEntityType } from '../../../../classes/entity.model';
5
5
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
10
10
  export declare class ArrayDateInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<Date, EntityType, DecoratorTypes.ARRAY_DATE> implements OnInit {
11
11
  private readonly globalConfig;
12
12
  DateUtilities: typeof DateUtilities;
13
- constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
13
+ constructor(dialog: MatDialog, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
14
14
  ngOnInit(): void;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateInputComponent<any>, never>;
16
16
  static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateInputComponent<any>, "array-date-input", never, {}, {}, never, never, true, never>;
@@ -1,5 +1,5 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { EnvironmentInjector, OnInit } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
3
  import { MatDialog } from '@angular/material/dialog';
4
4
  import { BaseEntityType } from '../../../../classes/entity.model';
5
5
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
@@ -13,12 +13,12 @@ export declare class ArrayDateRangeInputComponent<EntityType extends BaseEntityT
13
13
  DateUtilities: typeof DateUtilities;
14
14
  dateRangeStart?: Date;
15
15
  dateRangeEnd?: Date;
16
- constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
16
+ constructor(dialog: MatDialog, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
17
17
  ngOnInit(): void;
18
18
  /**
19
19
  * Adds a DateRange to the array.
20
20
  */
21
- addDateRange(): void;
21
+ add(): Promise<void>;
22
22
  protected resetInput(): void;
23
23
  static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateRangeInputComponent<any>, never>;
24
24
  static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateRangeInputComponent<any>, "array-date-range-input", never, {}, {}, never, never, true, never>;
@@ -1,5 +1,5 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { EnvironmentInjector, OnInit } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
3
  import { MatDialog } from '@angular/material/dialog';
4
4
  import { BaseEntityType } from '../../../../classes/entity.model';
5
5
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
@@ -14,13 +14,13 @@ export declare class ArrayDateTimeInputComponent<EntityType extends BaseEntityTy
14
14
  dateTime?: Date;
15
15
  time?: Time;
16
16
  timeDropdownValues: DropdownValue<Time>[];
17
- constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
17
+ constructor(matDialog: MatDialog, http: HttpClient, globalConfig: NgxGlobalDefaultValues);
18
18
  ngOnInit(): void;
19
19
  protected resetInput(): void;
20
20
  /**
21
21
  * Adds a date time to the array.
22
22
  */
23
- addDateTime(): void;
23
+ addDateTime(): Promise<void>;
24
24
  static ɵfac: i0.ɵɵFactoryDeclaration<ArrayDateTimeInputComponent<any>, never>;
25
25
  static ɵcmp: i0.ɵɵComponentDeclaration<ArrayDateTimeInputComponent<any>, "array-date-time-input", never, {}, {}, never, never, true, never>;
26
26
  }
@@ -1,41 +1,47 @@
1
- import { SelectionModel } from '@angular/cdk/collections';
2
1
  import { HttpClient } from '@angular/common/http';
3
- import { EnvironmentInjector, OnInit } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
4
3
  import { MatDialog } from '@angular/material/dialog';
5
- import { MatTableDataSource } from '@angular/material/table';
6
4
  import { BaseEntityType } from '../../../classes/entity.model';
7
5
  import { DecoratorTypes } from '../../../decorators/base/decorator-types.enum';
8
- import { SelectionUtilities } from '../../../utilities/selection.utilities';
9
- import { DisplayColumn } from '../../table/table-data';
6
+ import { CustomTableConfiguration } from '../../custom-table/custom-table-configuration.model';
10
7
  import { NgxMatEntityBaseInputComponent } from '../base-input.component';
11
8
  import * as i0 from "@angular/core";
9
+ /**
10
+ * The Decorator Types that use the array table class.
11
+ */
12
12
  type ArrayTableType = DecoratorTypes.ARRAY | DecoratorTypes.ARRAY_DATE | DecoratorTypes.ARRAY_DATE_RANGE | DecoratorTypes.ARRAY_DATE_TIME;
13
13
  /**
14
14
  * The base component needed for all arrays that are displayed as a table.
15
15
  */
16
16
  export declare abstract class ArrayTableComponent<ValueType, EntityType extends BaseEntityType<EntityType>, ArrayType extends ArrayTableType> extends NgxMatEntityBaseInputComponent<EntityType, ArrayType, ValueType[]> implements OnInit {
17
- private readonly matDialog;
18
- private readonly injector;
17
+ private readonly dialog;
19
18
  private readonly http;
19
+ /**
20
+ * The input that should be added to the array.
21
+ */
20
22
  input?: ValueType;
21
- dataSource: MatTableDataSource<ValueType>;
22
- selection: SelectionModel<ValueType>;
23
- displayedColumns: string[];
24
- SelectionUtilities: typeof SelectionUtilities;
25
- constructor(matDialog: MatDialog, injector: EnvironmentInjector, http: HttpClient);
23
+ /**
24
+ * The currently selected values.
25
+ */
26
+ selected: ValueType[];
27
+ /**
28
+ * The configuration of the table.
29
+ */
30
+ tableConfig: CustomTableConfiguration;
31
+ get propertyValue(): ValueType[];
32
+ set propertyValue(value: ValueType[]);
33
+ constructor(dialog: MatDialog, http: HttpClient);
26
34
  ngOnInit(): void;
27
35
  /**
28
- * Gets the value to display in the column.
29
- * Runs in environment context to enable injection.
30
- * @param entity - The entity to get the value from.
31
- * @param displayColumn - The display column to get the value from.
32
- * @returns The value of the display column.
36
+ * Sets the table config.
37
+ * This is not included in the ngOnInit for child classes to be able to set their metadata.
38
+ * (which is used in the table config).
33
39
  */
34
- getDisplayColumnValue(entity: ValueType, displayColumn: DisplayColumn<ValueType>): unknown;
40
+ protected setTableConfig(): void;
35
41
  /**
36
42
  * Tries to add an item to the array.
37
43
  */
38
- add(): void;
44
+ add(): Promise<void>;
39
45
  /**
40
46
  * Is split up from the add method to override this functionality more easily.
41
47
  */
@@ -5,7 +5,7 @@ import { FileData } from '../../../../decorators/file/file-decorator.data';
5
5
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class FileDefaultInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_DEFAULT, FileData | FileData[]> implements OnInit {
8
- refreshFileData(fileData?: FileData | FileData[]): Promise<void>;
8
+ refreshFileData(fileData?: FileData | FileData[]): void;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<FileDefaultInputComponent<any>, never>;
10
10
  static ɵcmp: i0.ɵɵComponentDeclaration<FileDefaultInputComponent<any>, "file-default-input", never, {}, {}, never, never, true, never>;
11
11
  }
@@ -1,5 +1,6 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { OnInit } from '@angular/core';
3
+ import { IconDefinition } from '@fortawesome/angular-fontawesome';
3
4
  import { BaseEntityType } from '../../../../classes/entity.model';
4
5
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
5
6
  import { FileData } from '../../../../decorators/file/file-decorator.data';
@@ -7,6 +8,8 @@ import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class FileImageInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.FILE_IMAGE, FileData | FileData[]> implements OnInit {
9
10
  private readonly http;
11
+ faAngleLeft: IconDefinition;
12
+ faAngleRight: IconDefinition;
10
13
  get multiPreviewImages(): string[] | undefined;
11
14
  set multiPreviewImages(value: string[] | undefined);
12
15
  get singlePreviewImage(): string | undefined;
@@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http';
2
2
  import { EventEmitter, OnInit } from '@angular/core';
3
3
  import { NgModel } from '@angular/forms';
4
4
  import { MatDialog } from '@angular/material/dialog';
5
+ import { IconDefinition } from '@fortawesome/angular-fontawesome';
5
6
  import { BaseEntityType } from '../../../../classes/entity.model';
6
7
  import { DefaultFileDecoratorConfigInternal, ImageFileDecoratorConfigInternal } from '../../../../decorators/file/file-decorator-internal.data';
7
8
  import { FileData } from '../../../../decorators/file/file-decorator.data';
@@ -10,6 +11,11 @@ import * as i0 from "@angular/core";
10
11
  export declare class FileInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
11
12
  private readonly dialog;
12
13
  private readonly http;
14
+ faFileArrowUp: IconDefinition;
15
+ faUpload: IconDefinition;
16
+ faPlusCircle: IconDefinition;
17
+ faFileZipper: IconDefinition;
18
+ faDownload: IconDefinition;
13
19
  get filenames(): string[] | undefined;
14
20
  set filenames(value: string[] | undefined);
15
21
  FileUtilities: typeof FileUtilities;
@@ -25,8 +31,8 @@ export declare class FileInputComponent<EntityType extends BaseEntityType<Entity
25
31
  ngOnInit(): void;
26
32
  private initMultiFile;
27
33
  private initSingleFile;
28
- setFileFromInput(event: Event): Promise<void>;
29
- setFile(files: File[]): Promise<void>;
34
+ setFileFromInput(event: Event): void;
35
+ setFile(files: File[]): void;
30
36
  private resetFileInputs;
31
37
  private setMultiFile;
32
38
  private setSingleFile;