ngx-material-entity 16.1.5 → 18.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.
Files changed (121) hide show
  1. package/components/create-page/create-page.component.d.ts +2 -2
  2. package/components/edit-page/edit-page.component.d.ts +4 -4
  3. package/components/form/form.component.d.ts +7 -2
  4. package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +1 -2
  5. package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +1 -1
  6. package/components/input/base-input.component.d.ts +2 -2
  7. package/components/input/date/date-time-input/date-time-input.component.d.ts +1 -2
  8. package/components/input/file/file-input/file-input.component.d.ts +3 -3
  9. package/components/input/input.component.d.ts +64 -37
  10. package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +1 -1
  11. package/components/input/relations/references-many-input/references-many-input.component.d.ts +1 -1
  12. package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +1 -1
  13. package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +1 -1
  14. package/components/table/create-dialog/create-entity-dialog.component.d.ts +1 -1
  15. package/components/table/display-column-value/base-display-column-value.component.d.ts +2 -5
  16. package/components/table/display-column-value/display-column-value.component.d.ts +1 -1
  17. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +4 -4
  18. package/components/table/table.component.d.ts +3 -3
  19. package/components/tooltip/tooltip.component.d.ts +1 -1
  20. package/decorators/array/array-decorator-internal.data.d.ts +1 -1
  21. package/decorators/array/array-decorator.data.d.ts +1 -1
  22. package/decorators/date/date-decorator-internal.data.d.ts +1 -1
  23. package/decorators/date/date-decorator.data.d.ts +1 -1
  24. package/directives/drag-drop.directive.d.ts +1 -1
  25. package/directives/tooltip.directive.d.ts +1 -1
  26. package/esm2022/classes/base.builder.mjs +2 -2
  27. package/esm2022/classes/entity.model.mjs +1 -1
  28. package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +2 -2
  29. package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +7 -7
  30. package/esm2022/components/create-page/create-data.route.mjs +2 -1
  31. package/esm2022/components/create-page/create-page.component.mjs +26 -23
  32. package/esm2022/components/create-page/page-create-data.builder.mjs +2 -1
  33. package/esm2022/components/edit-page/edit-data.route.mjs +2 -1
  34. package/esm2022/components/edit-page/edit-page.component.mjs +55 -54
  35. package/esm2022/components/edit-page/page-edit-data.builder.mjs +2 -1
  36. package/esm2022/components/form/form.component.mjs +14 -6
  37. package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +7 -7
  38. package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +7 -7
  39. package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +8 -8
  40. package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +8 -8
  41. package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +5 -5
  42. package/esm2022/components/input/array/array-table.class.mjs +21 -20
  43. package/esm2022/components/input/base-input.component.mjs +14 -9
  44. package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +5 -5
  45. package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +6 -6
  46. package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +5 -5
  47. package/esm2022/components/input/custom/custom.component.mjs +4 -4
  48. package/esm2022/components/input/date/date-input/date-input.component.mjs +3 -3
  49. package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +7 -7
  50. package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +9 -12
  51. package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +5 -7
  52. package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +6 -6
  53. package/esm2022/components/input/file/file-input/file-input.component.mjs +22 -24
  54. package/esm2022/components/input/input.component.mjs +194 -147
  55. package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +10 -10
  56. package/esm2022/components/input/number/number-input/number-input.component.mjs +3 -3
  57. package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +3 -3
  58. package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +21 -21
  59. package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +10 -11
  60. package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +9 -9
  61. package/esm2022/components/input/string/string-input/string-input.component.mjs +3 -3
  62. package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +8 -11
  63. package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +3 -3
  64. package/esm2022/components/table/create-dialog/create-data.builder.mjs +3 -1
  65. package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +9 -7
  66. package/esm2022/components/table/default.actions.mjs +4 -3
  67. package/esm2022/components/table/display-column-value/base-display-column-value.component.mjs +8 -13
  68. package/esm2022/components/table/display-column-value/display-column-value.component.mjs +9 -13
  69. package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +9 -3
  70. package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +37 -34
  71. package/esm2022/components/table/table-data.builder.mjs +12 -5
  72. package/esm2022/components/table/table-data.mjs +1 -1
  73. package/esm2022/components/table/table.component.mjs +25 -24
  74. package/esm2022/components/tooltip/tooltip.component.mjs +7 -8
  75. package/esm2022/decorators/array/array-decorator-internal.data.mjs +1 -1
  76. package/esm2022/decorators/array/array-decorator.data.mjs +1 -1
  77. package/esm2022/decorators/array/array.decorator.mjs +1 -1
  78. package/esm2022/decorators/base/base-property.decorator.mjs +1 -1
  79. package/esm2022/decorators/base/decorator-types.enum.mjs +1 -1
  80. package/esm2022/decorators/base/property-decorator-internal.data.mjs +6 -6
  81. package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +2 -1
  82. package/esm2022/decorators/boolean/boolean.decorator.mjs +1 -1
  83. package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +1 -1
  84. package/esm2022/decorators/custom/custom-decorator.data.mjs +1 -1
  85. package/esm2022/decorators/date/date-decorator-internal.data.mjs +1 -1
  86. package/esm2022/decorators/date/date-decorator.data.mjs +1 -1
  87. package/esm2022/decorators/date/date.decorator.mjs +1 -1
  88. package/esm2022/decorators/file/file-decorator-internal.data.mjs +8 -4
  89. package/esm2022/decorators/file/file.decorator.mjs +1 -1
  90. package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +2 -1
  91. package/esm2022/decorators/number/number-decorator.data.mjs +1 -1
  92. package/esm2022/decorators/number/number.decorator.mjs +1 -1
  93. package/esm2022/decorators/object/object-decorator.data.mjs +1 -1
  94. package/esm2022/decorators/object/object.decorator.mjs +2 -1
  95. package/esm2022/decorators/string/string-decorator-internal.data.mjs +1 -1
  96. package/esm2022/decorators/string/string-decorator.data.mjs +1 -1
  97. package/esm2022/decorators/string/string.decorator.mjs +1 -1
  98. package/esm2022/directives/drag-drop.directive.mjs +5 -5
  99. package/esm2022/directives/dynamic-style-class.directive.mjs +5 -5
  100. package/esm2022/directives/included-in.directive.mjs +6 -5
  101. package/esm2022/directives/number.directive.mjs +6 -6
  102. package/esm2022/directives/password-match.directive.mjs +5 -5
  103. package/esm2022/directives/tooltip.directive.mjs +22 -20
  104. package/esm2022/encapsulation/reflect.utilities.mjs +2 -2
  105. package/esm2022/functions/dropdown-values-to-function.function.mjs +1 -1
  106. package/esm2022/functions/get-config-value.function.mjs +2 -2
  107. package/esm2022/functions/get-validation-error-message.function.mjs +1 -1
  108. package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +1 -1
  109. package/esm2022/global-configuration-values.mjs +2 -1
  110. package/esm2022/mocks/placeholder-data.png.mjs +2 -2
  111. package/esm2022/services/entity.service.mjs +10 -11
  112. package/esm2022/services/unsaved-changes.guard.mjs +1 -1
  113. package/esm2022/utilities/date.utilities.mjs +10 -25
  114. package/esm2022/utilities/entity.utilities.mjs +15 -19
  115. package/esm2022/utilities/file.utilities.mjs +8 -10
  116. package/esm2022/utilities/selection.utilities.mjs +6 -4
  117. package/esm2022/utilities/validation.utilities.mjs +35 -38
  118. package/fesm2022/ngx-material-entity.mjs +723 -671
  119. package/fesm2022/ngx-material-entity.mjs.map +1 -1
  120. package/package.json +8 -8
  121. package/utilities/date.utilities.d.ts +29 -1
@@ -104,7 +104,7 @@ export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEnti
104
104
  private inConfirmNavigation;
105
105
  get hasUnsavedChanges(): boolean;
106
106
  constructor(dialog: MatDialog, location: Location, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageCreateData<EntityType>, http: HttpClient, el: ElementRef, renderer: Renderer2, globalConfig: NgxGlobalDefaultValues);
107
- ngOnInit(): Promise<void>;
107
+ ngOnInit(): void;
108
108
  canDeactivate(): boolean;
109
109
  /**
110
110
  * Checks if the bottom row should be displayed as fixed.
@@ -119,7 +119,7 @@ export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEnti
119
119
  * Tries create the entity and navigate back afterwards.
120
120
  * Also handles the confirmation if required.
121
121
  */
122
- create(): void;
122
+ create(): Promise<void>;
123
123
  private confirmCreate;
124
124
  /**
125
125
  * Tries to navigate back.
@@ -114,7 +114,7 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
114
114
  private inConfirmNavigation;
115
115
  get hasUnsavedChanges(): boolean;
116
116
  constructor(dialog: MatDialog, location: Location, route: ActivatedRoute, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageEditData<EntityType>, http: HttpClient, el: ElementRef, renderer: Renderer2, globalConfig: NgxGlobalDefaultValues);
117
- ngOnInit(): Promise<void>;
117
+ ngOnInit(): void;
118
118
  /**
119
119
  * Checks if the bottom row should be displayed as fixed.
120
120
  */
@@ -129,13 +129,13 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
129
129
  * Tries to save the changes and close the dialog afterwards.
130
130
  * Also handles the confirmation if required.
131
131
  */
132
- edit(): void;
132
+ edit(): Promise<void>;
133
133
  private confirmEdit;
134
134
  /**
135
135
  * Tries to delete the entity and close the dialog afterwards.
136
136
  * Also handles the confirmation if required.
137
137
  */
138
- delete(): void;
138
+ delete(): Promise<void>;
139
139
  private confirmDelete;
140
140
  /**
141
141
  * Tries to navigate back.
@@ -147,7 +147,7 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
147
147
  * Runs the edit action on the entity.
148
148
  * @param action - The action to run.
149
149
  */
150
- runEditAction(action: EditActionInternal<EntityType>): void;
150
+ runEditAction(action: EditActionInternal<EntityType>): Promise<void>;
151
151
  private confirmRunEditAction;
152
152
  /**
153
153
  * Checks if an EditAction is disabled (e.g. Because the current entry doesn't fullfil the requirements).
@@ -41,11 +41,11 @@ export declare class NgxMatEntityFormComponent<EntityType extends BaseEntityType
41
41
  /**
42
42
  * Fires whenever an input of the form changes.
43
43
  */
44
- formChange: EventEmitter<void>;
44
+ readonly formChange: EventEmitter<void>;
45
45
  /**
46
46
  * Fires when the selected tab has been changed.
47
47
  */
48
- selectedTabChange: EventEmitter<MatTabChangeEvent>;
48
+ readonly selectedTabChange: EventEmitter<MatTabChangeEvent>;
49
49
  constructor(injector: EnvironmentInjector);
50
50
  ngOnInit(): void;
51
51
  /**
@@ -54,6 +54,11 @@ export declare class NgxMatEntityFormComponent<EntityType extends BaseEntityType
54
54
  * @returns Whether or not the input for the key is read only.
55
55
  */
56
56
  isReadOnly(key: keyof EntityType): boolean;
57
+ /**
58
+ * What happens when an input changes its value.
59
+ * This refreshes the entity tabs to check if there are now different inputs to display and emits the form change.
60
+ */
61
+ inputChange(): void;
57
62
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityFormComponent<any>, never>;
58
63
  static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityFormComponent<any>, "ngx-mat-entity-form", never, { "entity": { "alias": "entity"; "required": true; }; "isEntityReadOnly": { "alias": "isEntityReadOnly"; "required": false; }; "hideOmitForCreate": { "alias": "hideOmitForCreate"; "required": false; }; "hideOmitForEdit": { "alias": "hideOmitForEdit"; "required": false; }; "additionalOmitKeys": { "alias": "additionalOmitKeys"; "required": false; }; }, { "formChange": "formChange"; "selectedTabChange": "selectedTabChange"; }, never, never, true, never>;
59
64
  }
@@ -1,4 +1,3 @@
1
- import { Time } from '@angular/common';
2
1
  import { HttpClient } from '@angular/common/http';
3
2
  import { EnvironmentInjector, OnInit } from '@angular/core';
4
3
  import { MatDialog } from '@angular/material/dialog';
@@ -6,7 +5,7 @@ import { BaseEntityType } from '../../../../classes/entity.model';
6
5
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
7
6
  import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
8
7
  import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
9
- import { DateUtilities } from '../../../../utilities/date.utilities';
8
+ import { DateUtilities, Time } from '../../../../utilities/date.utilities';
10
9
  import { ArrayTableComponent } from '../array-table.class';
11
10
  import * as i0 from "@angular/core";
12
11
  export declare class ArrayDateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayTableComponent<Date, EntityType, DecoratorTypes.ARRAY_DATE_TIME> implements OnInit {
@@ -11,7 +11,7 @@ export declare class ArrayStringAutocompleteChipsComponent<EntityType extends Ba
11
11
  autocompleteStrings: string[];
12
12
  get autocompleteMetadata(): AutocompleteStringChipsArrayDecoratorConfigInternal;
13
13
  constructor(injector: EnvironmentInjector);
14
- ngOnInit(): Promise<void>;
14
+ ngOnInit(): void;
15
15
  /**
16
16
  * Handles adding a string to the array when an autocomplete value has been selected.
17
17
  * @param event - The autocomplete selected event.
@@ -39,7 +39,7 @@ export declare abstract class NgxMatEntityBaseInputComponent<EntityType extends
39
39
  /**
40
40
  * Emits when the property value has changed.
41
41
  */
42
- inputChangeEvent: EventEmitter<void>;
42
+ readonly inputChangeEvent: EventEmitter<void>;
43
43
  /**
44
44
  * The property value of entity[key] correctly typed.
45
45
  * Uses getters and setters so that inputs are always linked to the original value.
@@ -60,5 +60,5 @@ export declare abstract class NgxMatEntityBaseInputComponent<EntityType extends
60
60
  */
61
61
  emitChange(): void;
62
62
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, never>;
63
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, "ngx-mat-entity-base-input", never, { "entity": { "alias": "entity"; "required": false; }; "key": { "alias": "key"; "required": false; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": false; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; }; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, false, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, "ngx-mat-entity-base-input", never, { "entity": { "alias": "entity"; "required": true; }; "key": { "alias": "key"; "required": true; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": true; }; "isReadOnly": { "alias": "isReadOnly"; "required": true; }; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, false, never>;
64
64
  }
@@ -1,11 +1,10 @@
1
- import { Time } from '@angular/common';
2
1
  import { OnInit } from '@angular/core';
3
2
  import { DateFilterFn } from '@angular/material/datepicker';
4
3
  import { BaseEntityType } from '../../../../classes/entity.model';
5
4
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
6
5
  import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
7
6
  import { NgxGlobalDefaultValues } from '../../../../global-configuration-values';
8
- import { DateUtilities } from '../../../../utilities/date.utilities';
7
+ import { DateUtilities, Time } from '../../../../utilities/date.utilities';
9
8
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
10
9
  import * as i0 from "@angular/core";
11
10
  export declare class DateTimeInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.DATE_TIME, Date> implements OnInit {
@@ -19,10 +19,10 @@ export declare class FileInputComponent<EntityType extends BaseEntityType<Entity
19
19
  metadata: DefaultFileDecoratorConfigInternal | ImageFileDecoratorConfigInternal;
20
20
  getValidationErrorMessage: (model: NgModel) => string;
21
21
  isReadOnly: boolean;
22
- fileDataChangeEvent: EventEmitter<FileData | FileData[]>;
22
+ readonly fileDataChangeEvent: EventEmitter<FileData | FileData[]>;
23
23
  acceptString: string;
24
24
  constructor(dialog: MatDialog, http: HttpClient);
25
- ngOnInit(): Promise<void>;
25
+ ngOnInit(): void;
26
26
  private initMultiFile;
27
27
  private initSingleFile;
28
28
  setFileFromInput(event: Event): Promise<void>;
@@ -35,5 +35,5 @@ export declare class FileInputComponent<EntityType extends BaseEntityType<Entity
35
35
  downloadAllEnabled(): boolean;
36
36
  downloadAll(): Promise<void>;
37
37
  static ɵfac: i0.ɵɵFactoryDeclaration<FileInputComponent<any>, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent<any>, "file-input", never, { "propertyValue": { "alias": "propertyValue"; "required": false; }; "entity": { "alias": "entity"; "required": false; }; "key": { "alias": "key"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": false; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; }; }, { "fileDataChangeEvent": "fileDataChangeEvent"; }, never, never, true, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent<any>, "file-input", never, { "propertyValue": { "alias": "propertyValue"; "required": true; }; "entity": { "alias": "entity"; "required": true; }; "key": { "alias": "key"; "required": true; }; "metadata": { "alias": "metadata"; "required": true; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": true; }; "isReadOnly": { "alias": "isReadOnly"; "required": true; }; }, { "fileDataChangeEvent": "fileDataChangeEvent"; }, never, never, true, never>;
39
39
  }
@@ -24,6 +24,46 @@ import { EditActionInternal } from '../table/edit-dialog/edit-data.builder';
24
24
  import { DisplayColumn } from '../table/table-data';
25
25
  import { BaseTableActionInternal, TableActionInternal } from '../table/table-data.builder';
26
26
  import * as i0 from "@angular/core";
27
+ /**
28
+ * A form context that is used to fill an inline template.
29
+ * This is used to go around the limitations of having everything in the same file due to circular dependencies.
30
+ * The forms are used for object, hasMany, referencesMany and the dialogs.
31
+ */
32
+ type FormContext<EntityType extends BaseEntityType<EntityType>> = {
33
+ /**
34
+ * The actual value. The $implicit is needed so that we don't need to specify a key when writing "let-context" in the html template.
35
+ */
36
+ $implicit: {
37
+ /**
38
+ * The entity to build the form for.
39
+ */
40
+ entity: EntityType;
41
+ /**
42
+ * The tabs to display.
43
+ */
44
+ tabs: EntityTab<EntityType>[];
45
+ /**
46
+ * Whether or not edit values should be omitted.
47
+ */
48
+ hideOmitForEdit?: boolean;
49
+ /**
50
+ * Whether or not create values should be omitted.
51
+ */
52
+ hideOmitForCreate?: boolean;
53
+ /**
54
+ * What happens when the input changes.
55
+ */
56
+ inputChangeEvent: () => void | Promise<void>;
57
+ /**
58
+ * Whether or not the input is readonly.
59
+ */
60
+ isReadOnly?: (property: EntityType, key: keyof EntityType) => boolean;
61
+ /**
62
+ * Whether or not the input is valid empty.
63
+ */
64
+ validEmpty?: () => boolean;
65
+ };
66
+ };
27
67
  /**
28
68
  * The default input component. It gets the metadata of the property from the given @Input "entity" and @Input "propertyKey"
29
69
  * and displays the input field accordingly.
@@ -81,7 +121,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
81
121
  /**
82
122
  * Emits when the input value has been changed.
83
123
  */
84
- inputChangeEvent: EventEmitter<void>;
124
+ readonly inputChangeEvent: EventEmitter<void>;
85
125
  /**
86
126
  * The type of the decorator for this input.
87
127
  */
@@ -95,13 +135,9 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
95
135
  */
96
136
  metadataDefaultObject: DefaultObjectDecoratorConfigInternal<EntityType>;
97
137
  /**
98
- * The object property value.
99
- */
100
- objectProperty: EntityType;
101
- /**
102
- * The tabs for the object property.
138
+ * The form context for an object property.
103
139
  */
104
- objectPropertyTabs: EntityTab<EntityType>[];
140
+ objectFormContext: FormContext<EntityType>;
105
141
  /**
106
142
  * The metadata of an dropdown object property.
107
143
  */
@@ -152,9 +188,13 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
152
188
  */
153
189
  arrayItemPriorChanges: EntityType;
154
190
  /**
155
- * The inline tabs for adding an array item.
191
+ * The form context for adding an array item.
156
192
  */
157
- arrayItemInlineTabs: EntityTab<EntityType>[];
193
+ addArrayItemFormContext: FormContext<EntityType>;
194
+ /**
195
+ * The form context for editing an array item.
196
+ */
197
+ editArrayItemFormContext: FormContext<EntityType>;
158
198
  /**
159
199
  * The dataSource for the entity array.
160
200
  */
@@ -183,10 +223,6 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
183
223
  * Config for the dialog that adds a new array item.
184
224
  */
185
225
  addArrayItemDialogData: CreateDataInternal;
186
- /**
187
- * The tabs to display inside the create array item dialog.
188
- */
189
- arrayItemDialogTabs: EntityTab<EntityType>[];
190
226
  /**
191
227
  * The tabs to display inside the edit array item dialog.
192
228
  */
@@ -270,26 +306,18 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
270
306
  */
271
307
  hasManyAllowCreate: boolean;
272
308
  /**
273
- * The tabs to display when creating a new has many entity.
309
+ * The form context for creating an has many entity.
274
310
  */
275
- hasManyCreateTabs: EntityTab<EntityType>[];
311
+ hasManyCreateFormContext: FormContext<EntityType>;
276
312
  /**
277
- * The tabs to display when updating a has many entity.
313
+ * The form context for editing an has many entity.
278
314
  */
279
- hasManyUpdateTabs: EntityTab<EntityType>[];
315
+ hasManyEditFormContext: FormContext<EntityType>;
280
316
  private hasManyCreateBaseUrl;
281
317
  /**
282
318
  * The metadata for a references one property.
283
319
  */
284
320
  metadataReferencesOne: ReferencesOneDecoratorConfigInternal<EntityType>;
285
- /**
286
- * The references one object.
287
- */
288
- referencesOneObject: EntityType;
289
- /**
290
- * The tabs to display for the references one entity.
291
- */
292
- referencesOnePropertyTabs: EntityTab<EntityType>[];
293
321
  /**
294
322
  * The values that can be possibly referenced.
295
323
  */
@@ -306,6 +334,10 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
306
334
  * A unique input name for the references one property.
307
335
  */
308
336
  referencesOneName: string;
337
+ /**
338
+ * The form context for an object property.
339
+ */
340
+ referencesOneFormContext: FormContext<EntityType>;
309
341
  /**
310
342
  * The enum Values for all the different DecoratorTypes.
311
343
  */
@@ -341,12 +373,6 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
341
373
  * @returns Whether or not the input is readonly.
342
374
  */
343
375
  isPropertyReadOnly(property: EntityType, key: keyof EntityType): boolean;
344
- /**
345
- * This is needed for the inputs to work inside an ngFor.
346
- * @param index - The index of the element in the ngFor.
347
- * @returns The index.
348
- */
349
- trackByFn(index: unknown): unknown;
350
376
  /**
351
377
  * Gets the value to display in the column.
352
378
  * Runs in environment context to enable injection.
@@ -355,7 +381,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
355
381
  * @returns The value of the display column.
356
382
  */
357
383
  getDisplayColumnValue(entity: EntityType, displayColumn: DisplayColumn<EntityType>): unknown;
358
- ngOnInit(): Promise<void>;
384
+ ngOnInit(): void;
359
385
  private initReferencesOne;
360
386
  /**
361
387
  * Filters the references one dropdown values.
@@ -419,7 +445,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
419
445
  * Runs the edit action on the entity.
420
446
  * @param action - The action to run.
421
447
  */
422
- hasManyRunEditAction(action: EditActionInternal<EntityType>): void;
448
+ hasManyRunEditAction(action: EditActionInternal<EntityType>): Promise<void>;
423
449
  private confirmHasManyRunEditAction;
424
450
  private editHasManyDefaultPage;
425
451
  private editHasManyDefaultDialog;
@@ -427,13 +453,13 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
427
453
  * Tries to save the changes and close the dialog afterwards.
428
454
  * Also handles the confirmation if required.
429
455
  */
430
- dialogEditHasMany(): void;
456
+ dialogEditHasMany(): Promise<void>;
431
457
  private dialogConfirmEditHasMany;
432
458
  /**
433
459
  * Tries to delete the entity and close the dialog afterwards.
434
460
  * Also handles the confirmation if required.
435
461
  */
436
- deleteHasManyEntity(): void;
462
+ deleteHasManyEntity(): Promise<void>;
437
463
  private confirmDeleteHasManyEntity;
438
464
  /**
439
465
  * Cancels the editing of the has many entity and closes the dialog.
@@ -449,7 +475,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
449
475
  /**
450
476
  * Creates the has many entity over the dialog.
451
477
  */
452
- dialogCreateHasMany(): void;
478
+ dialogCreateHasMany(): Promise<void>;
453
479
  private dialogConfirmCreateHasMany;
454
480
  /**
455
481
  * Cancels the creating of the has many entity and closes the dialog.
@@ -460,7 +486,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
460
486
  * Also handles confirmation with an additional dial#og if configured.
461
487
  * @param action - The TableAction to run.
462
488
  */
463
- runHasManyTableAction(action: TableActionInternal<EntityType>): void;
489
+ runHasManyTableAction(action: TableActionInternal<EntityType>): Promise<void>;
464
490
  private confirmRunHasManyTableAction;
465
491
  /**
466
492
  * Checks if an TableAction is disabled (e.g. Because no entries have been selected).
@@ -533,3 +559,4 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
533
559
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputComponent<any>, never>;
534
560
  static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInputComponent<any>, "ngx-mat-entity-input", never, { "entity": { "alias": "entity"; "required": true; }; "propertyKey": { "alias": "propertyKey"; "required": true; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": false; }; "hideOmitForCreate": { "alias": "hideOmitForCreate"; "required": false; }; "hideOmitForEdit": { "alias": "hideOmitForEdit"; "required": false; }; "validEmpty": { "alias": "validEmpty"; "required": false; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; }; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, true, never>;
535
561
  }
562
+ export {};
@@ -11,7 +11,7 @@ export declare class NumberDropdownInputComponent<EntityType extends BaseEntityT
11
11
  get currentDropdownValue(): DropdownValue<number | undefined> | undefined;
12
12
  get shouldDisplayCurrentValue(): boolean;
13
13
  constructor(injector: EnvironmentInjector);
14
- ngOnInit(): Promise<void>;
14
+ ngOnInit(): void;
15
15
  /**
16
16
  * Filters the dropdown values.
17
17
  * @param searchInput - The search input to filter for.
@@ -24,7 +24,7 @@ export declare class ReferencesManyInputComponent<EntityType extends BaseEntityT
24
24
  get currentDropdownValue(): DropdownValue<string> | undefined;
25
25
  get shouldDisplayCurrentValue(): boolean;
26
26
  constructor(injector: EnvironmentInjector, globalConfig: NgxGlobalDefaultValues);
27
- ngOnInit(): Promise<void>;
27
+ ngOnInit(): void;
28
28
  /**
29
29
  * Filters the dropdown values.
30
30
  * @param searchInput - The search input to filter for.
@@ -8,7 +8,7 @@ export declare class StringAutocompleteInputComponent<EntityType extends BaseEnt
8
8
  autocompleteStrings: string[];
9
9
  filteredAutocompleteStrings: string[];
10
10
  constructor(injector: EnvironmentInjector);
11
- ngOnInit(): Promise<void>;
11
+ ngOnInit(): void;
12
12
  /**
13
13
  * Dynamically filters the Autocomplete options when the user inputs something.
14
14
  * @param input - The input of the user.
@@ -11,7 +11,7 @@ export declare class StringDropdownInputComponent<EntityType extends BaseEntityT
11
11
  get currentDropdownValue(): DropdownValue<string | undefined> | undefined;
12
12
  get shouldDisplayCurrentValue(): boolean;
13
13
  constructor(injector: EnvironmentInjector);
14
- ngOnInit(): Promise<void>;
14
+ ngOnInit(): void;
15
15
  /**
16
16
  * Filters the dropdown values.
17
17
  * @param searchInput - The search input to filter for.
@@ -25,7 +25,7 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
25
25
  /**
26
26
  * Emits when the form is dirty.
27
27
  */
28
- unsavedChanges: EventEmitter<boolean>;
28
+ readonly unsavedChanges: EventEmitter<boolean>;
29
29
  /**
30
30
  * Contains HelperMethods around handling Entities and their property-metadata.
31
31
  */
@@ -1,4 +1,3 @@
1
- import { OnInit } from '@angular/core';
2
1
  import { BaseEntityType } from '../../../classes/entity.model';
3
2
  import * as i0 from "@angular/core";
4
3
  /**
@@ -6,13 +5,11 @@ import * as i0 from "@angular/core";
6
5
  *
7
6
  * Contains the entity for which the component gets displayed.
8
7
  */
9
- export declare abstract class NgxMatEntityBaseDisplayColumnValueComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
8
+ export declare abstract class NgxMatEntityBaseDisplayColumnValueComponent<EntityType extends BaseEntityType<EntityType>> {
10
9
  /**
11
10
  * The entity for which the component gets displayed.
12
11
  */
13
12
  entity: EntityType;
14
- constructor();
15
- ngOnInit(): void;
16
13
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityBaseDisplayColumnValueComponent<any>, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseDisplayColumnValueComponent<any>, "ngx-mat-entity-base-display-column-value", never, { "entity": { "alias": "entity"; "required": false; }; }, {}, never, never, false, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseDisplayColumnValueComponent<any>, "ngx-mat-entity-base-display-column-value", never, { "entity": { "alias": "entity"; "required": true; }; }, {}, never, never, false, never>;
18
15
  }
@@ -22,5 +22,5 @@ export declare class DisplayColumnValueComponent<EntityType extends BaseEntityTy
22
22
  constructor(viewContainerRef: ViewContainerRef);
23
23
  ngOnInit(): void;
24
24
  static ɵfac: i0.ɵɵFactoryDeclaration<DisplayColumnValueComponent<any>, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<DisplayColumnValueComponent<any>, "display-column-value", never, { "entity": { "alias": "entity"; "required": false; }; "ComponentClass": { "alias": "ComponentClass"; "required": false; }; }, {}, never, never, true, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<DisplayColumnValueComponent<any>, "display-column-value", never, { "entity": { "alias": "entity"; "required": true; }; "ComponentClass": { "alias": "ComponentClass"; "required": true; }; }, {}, never, never, true, never>;
26
26
  }
@@ -26,7 +26,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
26
26
  /**
27
27
  * Emits when the form is dirty.
28
28
  */
29
- unsavedChanges: EventEmitter<boolean>;
29
+ readonly unsavedChanges: EventEmitter<boolean>;
30
30
  /**
31
31
  * Contains HelperMethods around handling Entities and their property-metadata.
32
32
  */
@@ -88,13 +88,13 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
88
88
  * Tries to save the changes and close the dialog afterwards.
89
89
  * Also handles the confirmation if required.
90
90
  */
91
- edit(): void;
91
+ edit(): Promise<void>;
92
92
  private confirmEdit;
93
93
  /**
94
94
  * Tries to delete the entity and close the dialog afterwards.
95
95
  * Also handles the confirmation if required.
96
96
  */
97
- delete(): void;
97
+ delete(): Promise<void>;
98
98
  private confirmDelete;
99
99
  /**
100
100
  * Closes the dialog.
@@ -105,7 +105,7 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
105
105
  * Runs the edit action on the entity.
106
106
  * @param action - The action to run.
107
107
  */
108
- runEditAction(action: EditActionInternal<EntityType>): void;
108
+ runEditAction(action: EditActionInternal<EntityType>): Promise<void>;
109
109
  private confirmRunEditAction;
110
110
  /**
111
111
  * Checks if an EditAction is disabled (e.g. Because the current entry doesn't fullfil the requirements).
@@ -29,7 +29,7 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
29
29
  /**
30
30
  * Emits when there are unsaved changes on either the create or update dialog.
31
31
  */
32
- unsavedDialogChanges: EventEmitter<boolean>;
32
+ readonly unsavedDialogChanges: EventEmitter<boolean>;
33
33
  /**
34
34
  * The internal TableData.
35
35
  */
@@ -123,7 +123,7 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
123
123
  * Also handles confirmation with an additional dialog if configured.
124
124
  * @param action - The TableAction to run.
125
125
  */
126
- runTableAction(action: TableActionInternal<EntityType>): void;
126
+ runTableAction(action: TableActionInternal<EntityType>): Promise<void>;
127
127
  private confirmRunTableAction;
128
128
  /**
129
129
  * Checks if an TableAction is disabled (e.g. Because no entries have been selected).
@@ -137,5 +137,5 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
137
137
  */
138
138
  applyFilter(event: Event): void;
139
139
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityTableComponent<any>, never>;
140
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityTableComponent<any>, "ngx-mat-entity-table", never, { "tableData": { "alias": "tableData"; "required": false; }; }, { "unsavedDialogChanges": "unsavedDialogChanges"; }, never, never, true, never>;
140
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityTableComponent<any>, "ngx-mat-entity-table", never, { "tableData": { "alias": "tableData"; "required": true; }; }, { "unsavedDialogChanges": "unsavedDialogChanges"; }, never, never, true, never>;
141
141
  }
@@ -8,5 +8,5 @@ export declare class TooltipComponent {
8
8
  */
9
9
  tooltipContent: string;
10
10
  static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "ngx-mat-entity-tooltip", never, { "tooltipContent": { "alias": "tooltipContent"; "required": false; }; }, {}, never, never, true, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "ngx-mat-entity-tooltip", never, { "tooltipContent": { "alias": "tooltipContent"; "required": true; }; }, {}, never, never, true, never>;
12
12
  }
@@ -1,10 +1,10 @@
1
- import { Time } from '@angular/common';
2
1
  import { DateFilterFn } from '@angular/material/datepicker';
3
2
  import { AutocompleteStringChipsArrayDecoratorConfig, DateArrayDecoratorConfig, DateRangeArrayDecoratorConfig, DateTimeArrayDecoratorConfig, EditArrayItemDialogData, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from './array-decorator.data';
4
3
  import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
5
4
  import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
6
5
  import { CreateData, DisplayColumn } from '../../components/table/table-data';
7
6
  import { NgxGlobalDefaultValues } from '../../global-configuration-values';
7
+ import { Time } from '../../utilities/date.utilities';
8
8
  import { DecoratorTypes } from '../base/decorator-types.enum';
9
9
  import { DropdownValue } from '../base/dropdown-value.interface';
10
10
  import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
@@ -1,8 +1,8 @@
1
- import { Time } from '@angular/common';
2
1
  import { DateFilterFn } from '@angular/material/datepicker';
3
2
  import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
4
3
  import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
5
4
  import { CreateData, DisplayColumn } from '../../components/table/table-data';
5
+ import { Time } from '../../utilities/date.utilities';
6
6
  import { DecoratorTypes } from '../base/decorator-types.enum';
7
7
  import { DropdownValue } from '../base/dropdown-value.interface';
8
8
  import { PropertyDecoratorConfig } from '../base/property-decorator.data';
@@ -1,7 +1,7 @@
1
- import { Time } from '@angular/common';
2
1
  import { DateFilterFn } from '@angular/material/datepicker';
3
2
  import { DateRange, DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
4
3
  import { NgxGlobalDefaultValues } from '../../global-configuration-values';
4
+ import { Time } from '../../utilities/date.utilities';
5
5
  import { DropdownValue } from '../base/dropdown-value.interface';
6
6
  import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { Time } from '@angular/common';
2
1
  import { DateFilterFn } from '@angular/material/datepicker';
2
+ import { Time } from '../../utilities/date.utilities';
3
3
  import { DropdownValue } from '../base/dropdown-value.interface';
4
4
  import { PropertyDecoratorConfig } from '../base/property-decorator.data';
5
5
  /**
@@ -7,7 +7,7 @@ export declare class DragDropDirective {
7
7
  /**
8
8
  * Emits the dropped files to the parent.
9
9
  */
10
- files: EventEmitter<File[]>;
10
+ readonly files: EventEmitter<File[]>;
11
11
  constructor();
12
12
  /**
13
13
  * Prevents the event default.
@@ -38,5 +38,5 @@ export declare class TooltipDirective implements OnDestroy {
38
38
  private removeCloseListeners;
39
39
  ngOnDestroy(): void;
40
40
  static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
41
- static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tooltip]", never, { "tooltip": { "alias": "tooltip"; "required": false; }; }, {}, never, never, true, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tooltip]", never, { "tooltip": { "alias": "tooltip"; "required": true; }; }, {}, never, never, true, never>;
42
42
  }
@@ -31,7 +31,7 @@ export class BaseBuilder {
31
31
  * @returns The Builder.
32
32
  */
33
33
  withDefault(key, value) {
34
- if (this.inputData?.[key] == null || this.inputData[key] === CONFIG_NEEDS_UPDATE_KEY) {
34
+ if (this.inputData?.[key] == undefined || this.inputData[key] === CONFIG_NEEDS_UPDATE_KEY) {
35
35
  this.data[key] = value;
36
36
  }
37
37
  return this;
@@ -44,4 +44,4 @@ export class BaseBuilder {
44
44
  return this.data;
45
45
  }
46
46
  }
47
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5idWlsZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY2xhc3Nlcy9iYXNlLmJ1aWxkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sd0NBQXdDLENBQUM7QUFHakY7O0dBRUc7QUFDSCxNQUFNLE9BQWdCLFdBQVc7SUFFWixJQUFJLENBQWU7SUFDbkIsU0FBUyxDQUFhO0lBQ3ZDOztPQUVHO0lB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