ngx-material-entity 16.0.4 → 16.0.6

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 (209) hide show
  1. package/README.md +4 -4
  2. package/classes/base.builder.d.ts +0 -4
  3. package/classes/entity.model.d.ts +7 -0
  4. package/components/confirm-dialog/confirm-dialog-data.d.ts +0 -3
  5. package/components/confirm-dialog/confirm-dialog.component.d.ts +6 -0
  6. package/components/create-page/create-data.route.d.ts +16 -0
  7. package/components/create-page/create-page.component.d.ts +147 -0
  8. package/components/create-page/page-create-data.builder.d.ts +18 -0
  9. package/components/edit-page/edit-data.route.d.ts +3 -0
  10. package/components/edit-page/edit-page.component.d.ts +34 -9
  11. package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +3 -3
  12. package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +0 -2
  13. package/components/input/array/array-table.class.d.ts +0 -1
  14. package/components/input/base-input.component.d.ts +5 -2
  15. package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +0 -1
  16. package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +0 -1
  17. package/components/input/date/date-range-input/date-range-input.component.d.ts +2 -6
  18. package/components/input/date/date-time-input/date-time-input.component.d.ts +0 -1
  19. package/components/input/file/file-input/file-input.component.d.ts +1 -0
  20. package/components/input/input.component.d.ts +160 -38
  21. package/components/input/input.module.d.ts +48 -47
  22. package/components/input/number/number-input/number-input.component.d.ts +1 -1
  23. package/components/input/relations/references-many-input/references-many-input.component.d.ts +0 -1
  24. package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +0 -1
  25. package/components/input/string/string-input/string-input.component.d.ts +1 -1
  26. package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +1 -1
  27. package/components/table/create-dialog/{create-dialog-data.builder.d.ts → create-data.builder.d.ts} +7 -7
  28. package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +11 -13
  29. package/components/table/create-dialog/create-entity-dialog-data.d.ts +7 -9
  30. package/components/table/create-dialog/create-entity-dialog.component.d.ts +26 -5
  31. package/components/table/default.actions.d.ts +0 -4
  32. package/components/table/display-column-value/base-display-column-value.component.d.ts +3 -0
  33. package/components/table/display-column-value/display-column-value.component.d.ts +9 -0
  34. package/components/table/edit-dialog/edit-data.builder.d.ts +3 -3
  35. package/components/table/edit-dialog/edit-entity-data.d.ts +2 -4
  36. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +34 -4
  37. package/components/table/edit-dialog/edit-entity.builder.d.ts +3 -5
  38. package/components/table/table-data.builder.d.ts +6 -8
  39. package/components/table/table-data.d.ts +8 -18
  40. package/components/table/table.component.d.ts +35 -9
  41. package/components/tooltip/tooltip.component.d.ts +3 -0
  42. package/decorators/array/array-decorator-internal.data.d.ts +3 -2
  43. package/decorators/array/array-decorator.data.d.ts +6 -17
  44. package/decorators/array/array.decorator.d.ts +0 -1
  45. package/decorators/base/base-property.decorator.d.ts +0 -1
  46. package/decorators/base/property-decorator-internal.data.d.ts +0 -2
  47. package/decorators/base/property-decorator.data.d.ts +0 -10
  48. package/decorators/boolean/boolean-decorator.data.d.ts +0 -2
  49. package/decorators/boolean/boolean.decorator.d.ts +0 -1
  50. package/decorators/custom/custom-decorator.data.d.ts +0 -2
  51. package/decorators/custom/custom.decorator.d.ts +0 -1
  52. package/decorators/date/date-decorator.data.d.ts +0 -3
  53. package/decorators/date/date.decorator.d.ts +0 -1
  54. package/decorators/file/file-decorator.data.d.ts +0 -6
  55. package/decorators/file/file.decorator.d.ts +0 -1
  56. package/decorators/has-many/has-many-decorator-internal.data.d.ts +2 -4
  57. package/decorators/has-many/has-many-decorator.data.d.ts +2 -6
  58. package/decorators/has-many/has-many.decorator.d.ts +0 -1
  59. package/decorators/number/number-decorator-internal.data.d.ts +0 -1
  60. package/decorators/number/number.decorator.d.ts +0 -1
  61. package/decorators/object/object.decorator.d.ts +0 -1
  62. package/decorators/references-many/references-many-decorator-internal.data.d.ts +0 -1
  63. package/decorators/references-many/references-many-decorator.data.d.ts +0 -5
  64. package/decorators/references-many/references-many.decorator.d.ts +0 -1
  65. package/decorators/references-one/references-one.decorator.d.ts +0 -1
  66. package/decorators/string/string-decorator-internal.data.d.ts +1 -0
  67. package/decorators/string/string-decorator.data.d.ts +4 -2
  68. package/decorators/string/string.decorator.d.ts +0 -1
  69. package/default-global-configuration-values.d.ts +12 -0
  70. package/directives/drag-drop.directive.d.ts +0 -3
  71. package/directives/included-in.directive.d.ts +14 -0
  72. package/directives/number.directive.d.ts +0 -1
  73. package/encapsulation/js-2-xml.utilities.d.ts +0 -1
  74. package/encapsulation/jszip.utilities.d.ts +0 -1
  75. package/encapsulation/lodash.utilities.d.ts +2 -11
  76. package/encapsulation/reflect.utilities.d.ts +0 -7
  77. package/encapsulation/uuid.utilities.d.ts +0 -1
  78. package/esm2022/classes/base.builder.mjs +3 -6
  79. package/esm2022/classes/entity.model.mjs +1 -1
  80. package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +1 -3
  81. package/esm2022/components/confirm-dialog/confirm-dialog-data.mjs +1 -1
  82. package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +9 -3
  83. package/esm2022/components/create-page/create-data.route.mjs +11 -0
  84. package/esm2022/components/create-page/create-page.component.mjs +275 -0
  85. package/esm2022/components/create-page/page-create-data.builder.mjs +30 -0
  86. package/esm2022/components/edit-page/edit-data.route.mjs +4 -1
  87. package/esm2022/components/edit-page/edit-page.component.mjs +43 -18
  88. package/esm2022/components/edit-page/page-edit-data.builder.mjs +3 -3
  89. package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +11 -10
  90. package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +10 -9
  91. package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +13 -12
  92. package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +17 -13
  93. package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +8 -9
  94. package/esm2022/components/input/array/array-table.class.mjs +4 -6
  95. package/esm2022/components/input/base-input.component.mjs +8 -4
  96. package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +8 -11
  97. package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +8 -7
  98. package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +6 -9
  99. package/esm2022/components/input/custom/custom.component.mjs +2 -1
  100. package/esm2022/components/input/date/date-input/date-input.component.mjs +8 -7
  101. package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +38 -43
  102. package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +10 -10
  103. package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +4 -3
  104. package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +6 -5
  105. package/esm2022/components/input/file/file-input/file-input.component.mjs +9 -6
  106. package/esm2022/components/input/input.component.mjs +225 -91
  107. package/esm2022/components/input/input.module.mjs +84 -81
  108. package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +8 -7
  109. package/esm2022/components/input/number/number-input/number-input.component.mjs +6 -5
  110. package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +6 -5
  111. package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +24 -19
  112. package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +12 -8
  113. package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +8 -7
  114. package/esm2022/components/input/string/string-input/string-input.component.mjs +6 -5
  115. package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +8 -7
  116. package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +7 -6
  117. package/esm2022/components/table/create-dialog/create-data.builder.mjs +44 -0
  118. package/esm2022/components/table/create-dialog/create-entity-dialog-data.builder.mjs +8 -9
  119. package/esm2022/components/table/create-dialog/create-entity-dialog-data.mjs +1 -1
  120. package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +30 -9
  121. package/esm2022/components/table/default.actions.mjs +1 -5
  122. package/esm2022/components/table/display-column-value/base-display-column-value.component.mjs +5 -1
  123. package/esm2022/components/table/display-column-value/display-column-value.component.mjs +10 -2
  124. package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +3 -3
  125. package/esm2022/components/table/edit-dialog/edit-entity-data.mjs +1 -1
  126. package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +37 -7
  127. package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +3 -3
  128. package/esm2022/components/table/table-data.builder.mjs +12 -12
  129. package/esm2022/components/table/table-data.mjs +1 -1
  130. package/esm2022/components/table/table.component.mjs +63 -34
  131. package/esm2022/components/tooltip/tooltip.component.mjs +6 -3
  132. package/esm2022/decorators/array/array-decorator-internal.data.mjs +4 -2
  133. package/esm2022/decorators/array/array-decorator.data.mjs +1 -2
  134. package/esm2022/decorators/array/array.decorator.mjs +2 -3
  135. package/esm2022/decorators/base/base-property.decorator.mjs +1 -2
  136. package/esm2022/decorators/base/decorator-types.enum.mjs +1 -1
  137. package/esm2022/decorators/base/property-decorator-internal.data.mjs +1 -3
  138. package/esm2022/decorators/base/property-decorator.data.mjs +5 -11
  139. package/esm2022/decorators/boolean/boolean-decorator.data.mjs +1 -1
  140. package/esm2022/decorators/boolean/boolean.decorator.mjs +1 -2
  141. package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +1 -2
  142. package/esm2022/decorators/custom/custom-decorator.data.mjs +1 -1
  143. package/esm2022/decorators/custom/custom.decorator.mjs +1 -2
  144. package/esm2022/decorators/date/date-decorator-internal.data.mjs +2 -2
  145. package/esm2022/decorators/date/date-decorator.data.mjs +1 -1
  146. package/esm2022/decorators/date/date.decorator.mjs +2 -3
  147. package/esm2022/decorators/file/file-decorator-internal.data.mjs +1 -4
  148. package/esm2022/decorators/file/file-decorator.data.mjs +1 -6
  149. package/esm2022/decorators/file/file.decorator.mjs +2 -3
  150. package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +1 -2
  151. package/esm2022/decorators/has-many/has-many-decorator.data.mjs +1 -1
  152. package/esm2022/decorators/has-many/has-many.decorator.mjs +1 -2
  153. package/esm2022/decorators/number/number-decorator-internal.data.mjs +4 -5
  154. package/esm2022/decorators/number/number-decorator.data.mjs +1 -1
  155. package/esm2022/decorators/number/number.decorator.mjs +1 -2
  156. package/esm2022/decorators/object/object.decorator.mjs +1 -2
  157. package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +1 -2
  158. package/esm2022/decorators/references-many/references-many-decorator.data.mjs +1 -1
  159. package/esm2022/decorators/references-many/references-many.decorator.mjs +1 -2
  160. package/esm2022/decorators/references-one/references-one.decorator.mjs +1 -2
  161. package/esm2022/decorators/string/string-decorator-internal.data.mjs +7 -4
  162. package/esm2022/decorators/string/string-decorator.data.mjs +1 -1
  163. package/esm2022/decorators/string/string.decorator.mjs +1 -2
  164. package/esm2022/default-global-configuration-values.mjs +16 -1
  165. package/esm2022/directives/drag-drop.directive.mjs +1 -4
  166. package/esm2022/directives/included-in.directive.mjs +33 -0
  167. package/esm2022/directives/number.directive.mjs +1 -2
  168. package/esm2022/directives/password-match.directive.mjs +2 -2
  169. package/esm2022/encapsulation/js-2-xml.utilities.mjs +1 -2
  170. package/esm2022/encapsulation/jszip.utilities.mjs +1 -2
  171. package/esm2022/encapsulation/lodash.utilities.mjs +12 -19
  172. package/esm2022/encapsulation/reflect.utilities.mjs +1 -8
  173. package/esm2022/encapsulation/uuid.utilities.mjs +1 -2
  174. package/esm2022/functions/default-false.function.mjs +1 -2
  175. package/esm2022/functions/default-true.function.mjs +1 -2
  176. package/esm2022/functions/get-config-value.function.mjs +1 -2
  177. package/esm2022/functions/get-validation-error-message.function.mjs +13 -7
  178. package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +6 -4
  179. package/esm2022/functions/is-async-function.function.mjs +1 -2
  180. package/esm2022/global-configuration-values.mjs +5 -2
  181. package/esm2022/mocks/placeholder-data.png.mjs +3 -3
  182. package/esm2022/public-api.mjs +3 -1
  183. package/esm2022/services/entity.service.mjs +15 -21
  184. package/esm2022/services/unsaved-changes.guard.mjs +7 -2
  185. package/esm2022/utilities/date.utilities.mjs +3 -9
  186. package/esm2022/utilities/entity.utilities.mjs +82 -79
  187. package/esm2022/utilities/file.utilities.mjs +1 -10
  188. package/esm2022/utilities/selection.utilities.mjs +4 -7
  189. package/esm2022/utilities/validation.utilities.mjs +40 -35
  190. package/fesm2022/ngx-material-entity.mjs +1309 -752
  191. package/fesm2022/ngx-material-entity.mjs.map +1 -1
  192. package/functions/default-false.function.d.ts +0 -1
  193. package/functions/default-true.function.d.ts +0 -1
  194. package/functions/get-config-value.function.d.ts +0 -1
  195. package/functions/get-validation-error-message.function.d.ts +3 -0
  196. package/functions/get-validation-errors-tooltip-content.function.ts.d.ts +4 -2
  197. package/functions/is-async-function.function.d.ts +0 -1
  198. package/global-configuration-values.d.ts +9 -34
  199. package/mocks/placeholder-data.png.d.ts +1 -1
  200. package/package.json +2 -1
  201. package/public-api.d.ts +2 -0
  202. package/services/entity.service.d.ts +11 -16
  203. package/services/unsaved-changes.guard.d.ts +13 -1
  204. package/utilities/date.utilities.d.ts +0 -6
  205. package/utilities/entity.utilities.d.ts +10 -36
  206. package/utilities/file.utilities.d.ts +0 -9
  207. package/utilities/selection.utilities.d.ts +0 -3
  208. package/utilities/validation.utilities.d.ts +0 -3
  209. package/esm2022/components/table/create-dialog/create-dialog-data.builder.mjs +0 -44
@@ -2,7 +2,7 @@ import { Time } from '@angular/common';
2
2
  import { DateFilterFn } from '@angular/material/datepicker';
3
3
  import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
4
4
  import { ConfirmDialogData } from '../../components/confirm-dialog/confirm-dialog-data';
5
- import { CreateDialogData, DisplayColumn } from '../../components/table/table-data';
5
+ import { CreateData, DisplayColumn } from '../../components/table/table-data';
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';
@@ -17,7 +17,6 @@ export declare abstract class ArrayDecoratorConfig<ValueType> extends PropertyDe
17
17
  itemType: DecoratorTypes;
18
18
  /**
19
19
  * Whether or not duplicate values are allowed inside the array.
20
- *
21
20
  * @default false
22
21
  */
23
22
  allowDuplicates?: boolean;
@@ -61,7 +60,7 @@ export interface EntityArrayDecoratorConfig<EntityType extends BaseEntityType<En
61
60
  * The data for the add-item-dialog.
62
61
  * Can be omitted when adding items inline.
63
62
  */
64
- createDialogData?: CreateDialogData;
63
+ createDialogData?: CreateData;
65
64
  /**
66
65
  * The data for the edit-item-dialog.
67
66
  * Can be omitted when adding items inline.
@@ -70,19 +69,16 @@ export interface EntityArrayDecoratorConfig<EntityType extends BaseEntityType<En
70
69
  /**
71
70
  * Whether or not the form for adding items to the array
72
71
  * should be displayed inline.
73
- *
74
72
  * @default true
75
73
  */
76
74
  createInline?: boolean;
77
75
  /**
78
76
  * The label for the add button when createInline is true.
79
- *
80
77
  * @default 'Add'
81
78
  */
82
79
  addButtonLabel?: string;
83
80
  /**
84
81
  * The label for the remove button when createInline is true.
85
- *
86
82
  * @default 'Remove'
87
83
  */
88
84
  removeButtonLabel?: string;
@@ -103,13 +99,11 @@ export interface DateArrayDecoratorConfig extends ArrayDecoratorConfig<Date[]> {
103
99
  displayColumns: DisplayColumn<Date>[];
104
100
  /**
105
101
  * The label for the add button.
106
- *
107
102
  * @default 'Add'
108
103
  */
109
104
  addButtonLabel?: string;
110
105
  /**
111
106
  * The label for the remove button.
112
- *
113
107
  * @default 'Remove'
114
108
  */
115
109
  removeButtonLabel?: string;
@@ -142,13 +136,11 @@ export interface DateTimeArrayDecoratorConfig extends ArrayDecoratorConfig<Date[
142
136
  displayColumns: DisplayColumn<Date>[];
143
137
  /**
144
138
  * The label for the add button.
145
- *
146
139
  * @default 'Add'
147
140
  */
148
141
  addButtonLabel?: string;
149
142
  /**
150
143
  * The label for the remove button.
151
- *
152
144
  * @default 'Remove'
153
145
  */
154
146
  removeButtonLabel?: string;
@@ -162,7 +154,6 @@ export interface DateTimeArrayDecoratorConfig extends ArrayDecoratorConfig<Date[
162
154
  times?: DropdownValue<Time>[];
163
155
  /**
164
156
  * The name to use as a label for the time form field.
165
- *
166
157
  * @default 'Time'
167
158
  */
168
159
  timeDisplayName?: string;
@@ -203,13 +194,11 @@ export interface DateRangeArrayDecoratorConfig extends ArrayDecoratorConfig<Date
203
194
  displayColumns: DisplayColumn<DateRange>[];
204
195
  /**
205
196
  * The label for the add button.
206
- *
207
197
  * @default 'Add'
208
198
  */
209
199
  addButtonLabel?: string;
210
200
  /**
211
201
  * The label for the remove button.
212
- *
213
202
  * @default 'Remove'
214
203
  */
215
204
  removeButtonLabel?: string;
@@ -239,13 +228,11 @@ export interface DateRangeArrayDecoratorConfig extends ArrayDecoratorConfig<Date
239
228
  filter?: DateFilterFn<Date>;
240
229
  /**
241
230
  * The placeholder for the start date of the date range picker.
242
- *
243
231
  * @default "Start"
244
232
  */
245
233
  placeholderStart?: string;
246
234
  /**
247
235
  * The placeholder for the end date of the date range picker.
248
- *
249
236
  * @default "End"
250
237
  */
251
238
  placeholderEnd?: string;
@@ -257,7 +244,6 @@ export interface StringChipsArrayDecoratorConfig extends ArrayDecoratorConfig<st
257
244
  itemType: DecoratorTypes.STRING;
258
245
  /**
259
246
  * The class for the <i> tag used to remove an entry from the array.
260
- *
261
247
  * @default 'fas fa-circle-minus'
262
248
  */
263
249
  deleteIcon?: string;
@@ -281,7 +267,6 @@ export interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecora
281
267
  itemType: DecoratorTypes.STRING_AUTOCOMPLETE;
282
268
  /**
283
269
  * The class for the <i> tag used to remove an entry from the array.
284
- *
285
270
  * @default 'fas fa-circle-minus'
286
271
  */
287
272
  deleteIcon?: string;
@@ -301,4 +286,8 @@ export interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecora
301
286
  * A regex used for validation.
302
287
  */
303
288
  regex?: RegExp;
289
+ /**
290
+ * Whether or not valid inputs should be restricted to the autocomplete options.
291
+ */
292
+ restrictToOptions?: boolean;
304
293
  }
@@ -2,7 +2,6 @@ import { BaseEntityType } from '../../classes/entity.model';
2
2
  import { AutocompleteStringChipsArrayDecoratorConfig, DateArrayDecoratorConfig, DateRangeArrayDecoratorConfig, DateTimeArrayDecoratorConfig, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from './array-decorator.data';
3
3
  /**
4
4
  * Decorator for setting and getting array property metadata.
5
- *
6
5
  * @param metadata - The metadata of the array property.
7
6
  * @returns The method that defines the metadata.
8
7
  * @throws When the given type of the array-items is unknown.
@@ -1,7 +1,6 @@
1
1
  import { DecoratorType, DecoratorTypes } from './decorator-types.enum';
2
2
  /**
3
3
  * The base decorator for setting metadata on properties.
4
- *
5
4
  * @param metadata - The metadata to define.
6
5
  * @param type - The type of metadata.
7
6
  * @param metadataKeysToReset - Any metadata keys which values should be set to undefined on reset.
@@ -27,14 +27,12 @@ export declare abstract class PropertyDecoratorConfigInternal<ValueType> impleme
27
27
  constructor(data: PropertyDecoratorConfig<ValueType>);
28
28
  /**
29
29
  * Converts the default value to a function or undefined.
30
- *
31
30
  * @param value - The default value provided by the metadata.
32
31
  * @returns A function that returns a default value or undefined.
33
32
  */
34
33
  protected defaultToFunction(value?: ValueType | (() => ValueType)): (() => ValueType) | undefined;
35
34
  /**
36
35
  * Converts the given boolean or boolean function to a boolean function.
37
- *
38
36
  * @param value - The value to convert.
39
37
  * @returns A function that resolves to a boolean.
40
38
  */
@@ -8,7 +8,6 @@ export type Col = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
8
8
  export declare abstract class PropertyDecoratorConfig<ValueType> {
9
9
  /**
10
10
  * Whether or not the Property is displayed at all.
11
- *
12
11
  * @default true
13
12
  */
14
13
  display?: boolean | ((entity: any) => boolean);
@@ -18,19 +17,16 @@ export declare abstract class PropertyDecoratorConfig<ValueType> {
18
17
  displayName: string;
19
18
  /**
20
19
  * Whether or not the Property is required.
21
- *
22
20
  * @default true
23
21
  */
24
22
  required?: boolean | ((entity: any) => boolean);
25
23
  /**
26
24
  * Whether or not the property gets omitted when creating new Entities.
27
- *
28
25
  * @default false
29
26
  */
30
27
  omitForCreate?: boolean;
31
28
  /**
32
29
  * Whether or not the property gets omitted when updating Entities.
33
- *
34
30
  * @default false
35
31
  */
36
32
  omitForUpdate?: boolean;
@@ -38,13 +34,11 @@ export declare abstract class PropertyDecoratorConfig<ValueType> {
38
34
  * Defines the width of the input property when used inside the default create or edit dialog.
39
35
  * Has 3 bootstrap values for different breakpoints for simple responsive design.
40
36
  * The first value sets the columns for the screen size lg, the second for md and the third for sm.
41
- *
42
37
  * @default [6, 6, 12]
43
38
  */
44
39
  defaultWidths?: [Col, Col, Col];
45
40
  /**
46
41
  * Specifies the how to position this property when using default create/edit dialogs.
47
- *
48
42
  * @default { row: -1, order: -1} (Adds the property at the end)
49
43
  */
50
44
  position?: Position;
@@ -70,28 +64,24 @@ export interface Position {
70
64
  * Specifies a tab in which this property is displayed.
71
65
  * If no property has the tab metadata specified no tabs are displayed.
72
66
  * Ordering is ascending.
73
- *
74
67
  * @default -1 (sets this property in the first tab)
75
68
  */
76
69
  tab?: number;
77
70
  /**
78
71
  * Specifies the name of the tab. Can only be set by one property in each tab.
79
72
  * Requires "tab" to be set.
80
- *
81
73
  * @default `Tab ${numberOfTheTab}`
82
74
  */
83
75
  tabName?: string;
84
76
  /**
85
77
  * Specifies the (bootstrap)-row in which this property is displayed.
86
78
  * Ordering is ascending.
87
- *
88
79
  * @default -1 (sets this property after the last row)
89
80
  */
90
81
  row?: number;
91
82
  /**
92
83
  * Specifies order of the input property inside the specified row.
93
84
  * Ordering is ascending.
94
- *
95
85
  * @default -1 (sets this property at the end of the row)
96
86
  */
97
87
  order?: number;
@@ -15,13 +15,11 @@ export interface DropdownBooleanDecoratorConfig extends BooleanDecoratorConfig {
15
15
  displayStyle: 'dropdown';
16
16
  /**
17
17
  * The name of the true value if displayStyle dropdown is used.
18
- *
19
18
  * @default 'Yes'
20
19
  */
21
20
  dropdownTrue?: string;
22
21
  /**
23
22
  * The name of the false value if displayStyle dropdown is used.
24
- *
25
23
  * @default 'No'
26
24
  */
27
25
  dropdownFalse?: string;
@@ -1,7 +1,6 @@
1
1
  import { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig, ToggleBooleanDecoratorConfig } from './boolean-decorator.data';
2
2
  /**
3
3
  * Decorator for setting and getting boolean property metadata.
4
- *
5
4
  * @param metadata - The metadata of the boolean property.
6
5
  * @returns The method that defines the metadata.
7
6
  */
@@ -17,7 +17,6 @@ export interface CustomDecoratorConfig<EntityType extends BaseEntityType<EntityT
17
17
  * Needed for the edit and create dialogs.
18
18
  *
19
19
  * TIP: If you need additional data for checking if the value is valid, you can define them as metadata directly on the value.
20
- *
21
20
  * @default () => true
22
21
  */
23
22
  isValid?: (value: ValueType, omit?: 'create' | 'update') => boolean;
@@ -26,7 +25,6 @@ export interface CustomDecoratorConfig<EntityType extends BaseEntityType<EntityT
26
25
  * Needed for the edit and create dialogs.
27
26
  *
28
27
  * TIP: If you need additional data for checking if the value is valid, you can define them as metadata directly on the values.
29
- *
30
28
  * @default (value: ValueType, valuePriorChanges: ValueType) => LodashUtilities.isEqual(value, valuePriorChanges)
31
29
  */
32
30
  isEqual?: (value: ValueType, valuePriorChanges: ValueType, metadata: CustomDecoratorConfig<EntityType, ValueType, CustomMetadataType, ComponentType>) => boolean;
@@ -2,7 +2,6 @@ import { BaseEntityType } from '../../classes/entity.model';
2
2
  import { CustomDecoratorConfig } from './custom-decorator.data';
3
3
  /**
4
4
  * Decorator for setting and getting custom property metadata.
5
- *
6
5
  * @param metadata - The metadata of the custom property.
7
6
  * @param metadataKeysToReset - Any metadata keys which values should be set to undefined on reset.
8
7
  * @returns The method that defines the metadata.
@@ -75,13 +75,11 @@ export interface DateRangeDateDecoratorConfig extends DateDecoratorConfig<DateRa
75
75
  filter?: DateFilterFn<Date>;
76
76
  /**
77
77
  * The placeholder for the start date of the date range picker.
78
- *
79
78
  * @default "Start"
80
79
  */
81
80
  placeholderStart?: string;
82
81
  /**
83
82
  * The placeholder for the end date of the date range picker.
84
- *
85
83
  * @default "End"
86
84
  */
87
85
  placeholderEnd?: string;
@@ -97,7 +95,6 @@ export interface DateTimeDateDecoratorConfig extends DateDecoratorConfig<Date> {
97
95
  times?: DropdownValue<Time | undefined>[];
98
96
  /**
99
97
  * The name to use as a label for the time form field.
100
- *
101
98
  * @default 'Time'
102
99
  */
103
100
  timeDisplayName?: string;
@@ -1,7 +1,6 @@
1
1
  import { DateRangeDateDecoratorConfig, DateTimeDateDecoratorConfig, DefaultDateDecoratorConfig } from './date-decorator.data';
2
2
  /**
3
3
  * Decorator for setting and getting date property metadata.
4
- *
5
4
  * @param metadata - The metadata of the date property.
6
5
  * @returns The method that defines the metadata.
7
6
  */
@@ -19,13 +19,11 @@ declare abstract class FileDecoratorConfig extends PropertyDecoratorConfig<FileD
19
19
  type: 'image' | 'other';
20
20
  /**
21
21
  * The class for the <i> tag used to remove a file from the input.
22
- *
23
22
  * @default 'fas fa-circle-minus'
24
23
  */
25
24
  deleteIcon?: string;
26
25
  /**
27
26
  * Whether or not the file should be displayed inside a preview.
28
- *
29
27
  * @default true
30
28
  */
31
29
  preview?: boolean;
@@ -40,7 +38,6 @@ declare abstract class FileDecoratorConfig extends PropertyDecoratorConfig<FileD
40
38
  mimeTypeErrorDialog?: ConfirmDialogData;
41
39
  /**
42
40
  * The maximum allowed size of a single file in MB.
43
- *
44
41
  * @default 10
45
42
  */
46
43
  maxSize?: number;
@@ -50,7 +47,6 @@ declare abstract class FileDecoratorConfig extends PropertyDecoratorConfig<FileD
50
47
  maxSizeErrorDialog?: ConfirmDialogData;
51
48
  /**
52
49
  * The maximum allowed size of all files in MB.
53
- *
54
50
  * @default 100
55
51
  */
56
52
  maxSizeTotal?: number;
@@ -60,7 +56,6 @@ declare abstract class FileDecoratorConfig extends PropertyDecoratorConfig<FileD
60
56
  maxSizeTotalErrorDialog?: ConfirmDialogData;
61
57
  /**
62
58
  * Defines whether or not a dropdown box is displayed.
63
- *
64
59
  * @default
65
60
  * true // when multiple is set to true.
66
61
  * false // when multiple is set to false.
@@ -81,7 +76,6 @@ export interface ImageFileDecoratorConfig extends FileDecoratorConfig {
81
76
  type: 'image';
82
77
  /**
83
78
  * Specifies allowed File types like image/jpg etc. In a comma separated string.
84
- *
85
79
  * @default ['image/*']
86
80
  */
87
81
  allowedMimeTypes?: string[];
@@ -1,7 +1,6 @@
1
1
  import { DefaultFileDecoratorConfig, ImageFileDecoratorConfig } from './file-decorator.data';
2
2
  /**
3
3
  * Decorator for setting and getting file property metadata.
4
- *
5
4
  * @param metadata - The metadata of the file property.
6
5
  * @returns The method that defines the metadata.
7
6
  * @throws When an unknown metadata type was provided.
@@ -1,8 +1,6 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { BaseEntityType } from '../../classes/entity.model';
1
+ import { BaseEntityType, EntityServiceClassNewable } from '../../classes/entity.model';
3
2
  import { TableDataInternal } from '../../components/table/table-data.builder';
4
3
  import { NgxGlobalDefaultValues } from '../../global-configuration-values';
5
- import { EntityService } from '../../services/entity.service';
6
4
  import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
7
5
  import { HasManyDecoratorConfig } from './has-many-decorator.data';
8
6
  /**
@@ -11,7 +9,7 @@ import { HasManyDecoratorConfig } from './has-many-decorator.data';
11
9
  export declare class HasManyDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfigInternal<EntityType> implements HasManyDecoratorConfig<EntityType, RelatedBaseEntityType> {
12
10
  omitForCreate: true;
13
11
  tableData: TableDataInternal<EntityType>;
14
- RelatedEntityServiceClass: new (httpClient: HttpClient) => EntityService<RelatedBaseEntityType>;
12
+ RelatedEntityServiceClass: EntityServiceClassNewable<RelatedBaseEntityType>;
15
13
  createBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
16
14
  readBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
17
15
  constructor(data: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>, globalConfig: NgxGlobalDefaultValues);
@@ -1,7 +1,5 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { BaseEntityType } from '../../classes/entity.model';
1
+ import { BaseEntityType, EntityServiceClassNewable } from '../../classes/entity.model';
3
2
  import { TableData } from '../../components/table/table-data';
4
- import { EntityService } from '../../services/entity.service';
5
3
  import { PropertyDecoratorConfig } from '../base/property-decorator.data';
6
4
  /**
7
5
  * Definition for the @hasMany metadata.
@@ -22,16 +20,14 @@ export interface HasManyDecoratorConfig<EntityType extends BaseEntityType<Entity
22
20
  * This is used to generate the create and read base urls, eg. "customers/{id}/invoices".
23
21
  * If you want to override that behavior you can provide a custom createBaseUrl and readBaseUrl function.
24
22
  */
25
- RelatedEntityServiceClass: new (httpClient: HttpClient) => EntityService<RelatedBaseEntityType>;
23
+ RelatedEntityServiceClass: EntityServiceClassNewable<RelatedBaseEntityType>;
26
24
  /**
27
25
  * A function that generates a base url for create requests.
28
- *
29
26
  * @default `{baseEntityUrl}/{id}/{lastHasManyEntityUrlSegment}`
30
27
  */
31
28
  createBaseUrl?: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
32
29
  /**
33
30
  * A function that generates a base url for read requests.
34
- *
35
31
  * @default `{baseEntityUrl}/{id}/{lastHasManyEntityUrlSegment}`
36
32
  */
37
33
  readBaseUrl?: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
@@ -2,7 +2,6 @@ import { BaseEntityType } from '../../classes/entity.model';
2
2
  import { HasManyDecoratorConfig } from './has-many-decorator.data';
3
3
  /**
4
4
  * Decorator for setting and getting has many property metadata.
5
- *
6
5
  * @param metadata - The metadata of the has many property.
7
6
  * @returns The method that defines the metadata.
8
7
  */
@@ -33,7 +33,6 @@ export declare class SliderNumberDecoratorConfigInternal extends PropertyDecorat
33
33
  }
34
34
  /**
35
35
  * The default function to format values for the number slider thumb label.
36
- *
37
36
  * @param value - The value of the slider.
38
37
  * @returns Just the value without any formatting done.
39
38
  */
@@ -1,7 +1,6 @@
1
1
  import { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig, SliderNumberDecoratorConfig } from './number-decorator.data';
2
2
  /**
3
3
  * Decorator for setting and getting number property metadata.
4
- *
5
4
  * @param metadata - The metadata of the number property.
6
5
  * @returns The method that defines the metadata.
7
6
  */
@@ -2,7 +2,6 @@ import { DefaultObjectDecoratorConfig } from './object-decorator.data';
2
2
  import { BaseEntityType } from '../../classes/entity.model';
3
3
  /**
4
4
  * Decorator for setting and getting object property metadata.
5
- *
6
5
  * @param metadata - The metadata of the object property.
7
6
  * @returns The method that defines the metadata.
8
7
  */
@@ -21,7 +21,6 @@ export declare class ReferencesManyDecoratorConfigInternal<EntityType extends Ba
21
21
  }
22
22
  /**
23
23
  * The default function to use when trying to get the referenced entity for the given id.
24
- *
25
24
  * @param entityId - The id of the referenced entity.
26
25
  * @param allReferencedEntities - All referenced entities.
27
26
  * @returns The entity that has the given id.
@@ -25,31 +25,26 @@ export interface ReferencesManyDecoratorConfig<EntityType extends BaseEntityType
25
25
  displayColumns: DisplayColumn<EntityType>[];
26
26
  /**
27
27
  * The label for the dropdown input.
28
- *
29
28
  * @default 'Select'
30
29
  */
31
30
  dropdownLabel?: string;
32
31
  /**
33
32
  * Whether or not a button that adds all values exists.
34
- *
35
33
  * @default false
36
34
  */
37
35
  addAll?: boolean;
38
36
  /**
39
37
  * The label for the add all button.
40
- *
41
38
  * @default 'Add all'
42
39
  */
43
40
  addAllButtonLabel?: string;
44
41
  /**
45
42
  * The label for the add button when createInline is true.
46
- *
47
43
  * @default 'Add'
48
44
  */
49
45
  addButtonLabel?: string;
50
46
  /**
51
47
  * The label for the remove button when createInline is true.
52
- *
53
48
  * @default 'Remove'
54
49
  */
55
50
  removeButtonLabel?: string;
@@ -2,7 +2,6 @@ import { BaseEntityType } from '../../classes/entity.model';
2
2
  import { ReferencesManyDecoratorConfig } from './references-many-decorator.data';
3
3
  /**
4
4
  * Decorator for setting and getting references many property metadata.
5
- *
6
5
  * @param metadata - The metadata of the references many property.
7
6
  * @returns The method that defines the metadata.
8
7
  */
@@ -2,7 +2,6 @@ import { BaseEntityType } from '../../classes/entity.model';
2
2
  import { ReferencesOneDecoratorConfig } from './references-one-decorator.data';
3
3
  /**
4
4
  * Decorator for setting and getting references one property metadata.
5
- *
6
5
  * @param metadata - The metadata of the references one property.
7
6
  * @returns The method that defines the metadata.
8
7
  */
@@ -38,6 +38,7 @@ export declare class AutocompleteStringDecoratorConfigInternal extends PropertyD
38
38
  minLength?: number;
39
39
  maxLength?: number;
40
40
  regex?: RegExp;
41
+ restrictToOptions?: boolean;
41
42
  constructor(data: AutocompleteStringDecoratorConfig);
42
43
  }
43
44
  /**
@@ -74,6 +74,10 @@ export interface AutocompleteStringDecoratorConfig extends StringDecoratorConfig
74
74
  * A regex used for validation.
75
75
  */
76
76
  regex?: RegExp;
77
+ /**
78
+ * Whether or not valid inputs should be restricted to the autocomplete options.
79
+ */
80
+ restrictToOptions?: boolean;
77
81
  }
78
82
  /**
79
83
  * The configuration options for a string property displayed in a password input.
@@ -94,13 +98,11 @@ export interface PasswordStringDecoratorConfig extends StringDecoratorConfig {
94
98
  regex?: RegExp;
95
99
  /**
96
100
  * Whether or not the password needs to be retyped.
97
- *
98
101
  * @default true
99
102
  */
100
103
  needsConfirmation?: boolean;
101
104
  /**
102
105
  * The display name of the confirmation password input.
103
- *
104
106
  * @default 'Confirm Password'
105
107
  */
106
108
  confirmationDisplayName?: string;
@@ -1,7 +1,6 @@
1
1
  import { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, PasswordStringDecoratorConfig, TextboxStringDecoratorConfig } from './string-decorator.data';
2
2
  /**
3
3
  * Decorator for setting and getting string Property metadata.
4
- *
5
4
  * @param metadata - The metadata of the string property.
6
5
  * @returns The method that defines the metadata.
7
6
  */
@@ -1,6 +1,18 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { NgxGlobalDefaultValues } from './global-configuration-values';
3
+ /**
4
+ * The default configuration values of the library.
5
+ */
3
6
  export declare const defaultGlobalDefaults: NgxGlobalDefaultValues;
7
+ /**
8
+ * The key for a config value that still needs an update.
9
+ */
4
10
  export declare const CONFIG_NEEDS_UPDATE_KEY: string;
11
+ /**
12
+ * The global defaults for a configuration that needs update.
13
+ */
5
14
  export declare const needsUpdateGlobalDefaults: NgxGlobalDefaultValues;
15
+ /**
16
+ * The internal values consisting of default ones and values provided by the user in NGX_GLOBAL_DEFAULT_VALUES.
17
+ */
6
18
  export declare const NGX_INTERNAL_GLOBAL_DEFAULT_VALUES: InjectionToken<NgxGlobalDefaultValues>;
@@ -11,19 +11,16 @@ export declare class DragDropDirective {
11
11
  constructor();
12
12
  /**
13
13
  * Prevents the event default.
14
- *
15
14
  * @param evt - The Event when dragged files hover over the parent.
16
15
  */
17
16
  onDragOver(evt: DragEvent): void;
18
17
  /**
19
18
  * Prevents the event default.
20
- *
21
19
  * @param evt - The Event when dragged files leave the parent.
22
20
  */
23
21
  onDragLeave(evt: DragEvent): void;
24
22
  /**
25
23
  * Prevents the event default and emits the dropped files with the output.
26
- *
27
24
  * @param evt - The Event when files are dropped.
28
25
  */
29
26
  onDrop(evt: DragEvent): void;
@@ -0,0 +1,14 @@
1
+ import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * A Validator that checks if the input value is one of the provided values of the "includedIn" array.
5
+ */
6
+ export declare class IncludedInValidatorDirective implements Validator {
7
+ /**
8
+ * The values that are valid for the input.
9
+ */
10
+ includedIn: unknown[] | undefined;
11
+ validate(control: AbstractControl): ValidationErrors | null;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<IncludedInValidatorDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<IncludedInValidatorDirective, "[includedIn]", never, { "includedIn": { "alias": "includedIn"; "required": false; }; }, {}, never, never, true, never>;
14
+ }
@@ -8,7 +8,6 @@ export declare class NumberDirective {
8
8
  constructor(el: ElementRef);
9
9
  /**
10
10
  * Prevents the default event when a key is pressed that is not a valid number, eg. 'A', 'B', 'C', 'D' etc.
11
- *
12
11
  * @param e - The keydown event from the user.
13
12
  */
14
13
  onKeyDown(e: KeyboardEvent): void;
@@ -5,7 +5,6 @@ import * as js2xml from 'js2xmlparser';
5
5
  export declare abstract class Js2XmlUtilities {
6
6
  /**
7
7
  * Returns a XML string representation of the specified object using the specified options.
8
- *
9
8
  * @param root - Name of the xml root element.
10
9
  * @param value - The json value to convert. Will be a child of root.
11
10
  * @param options - Additional options for the conversion.
@@ -6,7 +6,6 @@ export type Zip = JSZip;
6
6
  export declare abstract class JSZipUtilities {
7
7
  /**
8
8
  * Generates a new JSZip object that is correctly typed.
9
- *
10
9
  * @returns A new JSZip object.
11
10
  */
12
11
  static new(): Zip;