ngx-material-entity 15.1.1 → 15.1.3

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 (47) hide show
  1. package/classes/date.utilities.d.ts +1 -1
  2. package/classes/entity.utilities.d.ts +36 -0
  3. package/components/input/date/date-range-input/date-range-input.component.d.ts +6 -3
  4. package/components/input/date/date-time-input/date-time-input.component.d.ts +3 -2
  5. package/components/input/file/file-image-input/file-image-input.component.d.ts +4 -2
  6. package/components/input/file/file-input/file-input.component.d.ts +5 -2
  7. package/components/input/string/string-password-input/string-password-input.component.d.ts +2 -1
  8. package/decorators/base/base-property.decorator.d.ts +2 -1
  9. package/decorators/boolean/boolean-decorator.data.d.ts +6 -2
  10. package/decorators/custom/custom.decorator.d.ts +2 -1
  11. package/decorators/date/date-decorator-internal.data.d.ts +1 -1
  12. package/decorators/date/date-decorator.data.d.ts +1 -1
  13. package/decorators/number/number-decorator-internal.data.d.ts +1 -1
  14. package/decorators/number/number-decorator.data.d.ts +1 -1
  15. package/decorators/string/string-decorator-internal.data.d.ts +1 -1
  16. package/decorators/string/string-decorator.data.d.ts +1 -1
  17. package/encapsulation/reflect.utilities.d.ts +9 -0
  18. package/esm2020/classes/date.utilities.mjs +1 -1
  19. package/esm2020/classes/entity.utilities.mjs +51 -4
  20. package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +3 -3
  21. package/esm2020/components/input/date/date-range-input/date-range-input.component.mjs +21 -1
  22. package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +11 -3
  23. package/esm2020/components/input/file/file-default-input/file-default-input.component.mjs +3 -3
  24. package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +17 -3
  25. package/esm2020/components/input/file/file-input/file-input.component.mjs +14 -2
  26. package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +3 -3
  27. package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +3 -3
  28. package/esm2020/components/input/string/string-password-input/string-password-input.component.mjs +8 -3
  29. package/esm2020/decorators/base/base-property.decorator.mjs +6 -2
  30. package/esm2020/decorators/boolean/boolean-decorator-internal.data.mjs +3 -3
  31. package/esm2020/decorators/boolean/boolean-decorator.data.mjs +1 -1
  32. package/esm2020/decorators/custom/custom.decorator.mjs +4 -3
  33. package/esm2020/decorators/date/date-decorator-internal.data.mjs +1 -1
  34. package/esm2020/decorators/date/date-decorator.data.mjs +1 -1
  35. package/esm2020/decorators/date/date.decorator.mjs +4 -3
  36. package/esm2020/decorators/file/file.decorator.mjs +4 -3
  37. package/esm2020/decorators/number/number-decorator-internal.data.mjs +1 -1
  38. package/esm2020/decorators/number/number-decorator.data.mjs +1 -1
  39. package/esm2020/decorators/string/string-decorator-internal.data.mjs +1 -1
  40. package/esm2020/decorators/string/string-decorator.data.mjs +1 -1
  41. package/esm2020/decorators/string/string.decorator.mjs +3 -2
  42. package/esm2020/encapsulation/reflect.utilities.mjs +12 -1
  43. package/fesm2015/ngx-material-entity.mjs +351 -238
  44. package/fesm2015/ngx-material-entity.mjs.map +1 -1
  45. package/fesm2020/ngx-material-entity.mjs +347 -235
  46. package/fesm2020/ngx-material-entity.mjs.map +1 -1
  47. package/package.json +1 -1
@@ -45,89 +45,6 @@ import { MatSort } from '@angular/material/sort';
45
45
  import * as i9 from '@angular/material/menu';
46
46
  import { MatMenuModule } from '@angular/material/menu';
47
47
 
48
- /**
49
- * Encapsulates all functionality of Reflect.
50
- */
51
- class ReflectUtilities {
52
- /**
53
- * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
54
- *
55
- * @param metadataKey - A key used to store and retrieve metadata.
56
- * @param target - The target object on which the metadata is defined.
57
- * @param propertyKey - The property key for the target.
58
- * @returns The metadata value for the metadata key if found; otherwise, undefined.
59
- */
60
- static getMetadata(metadataKey, target, propertyKey) {
61
- return Reflect.getMetadata(metadataKey, target, propertyKey);
62
- }
63
- /**
64
- * Returns the string and symbol keys of the own properties of an object. The own properties of an object
65
- * are those that are defined directly on that object, and are not inherited from the object's prototype.
66
- *
67
- * @param target - Object that contains the own properties.
68
- * @returns The keys of the given object.
69
- */
70
- static ownKeys(target) {
71
- return Reflect.ownKeys(target);
72
- }
73
- /**
74
- * Gets the property of target, equivalent to `target[propertyKey]`.
75
- *
76
- * @param target - Object that contains the property on itself or in its prototype chain.
77
- * @param propertyKey - The property name.
78
- * @returns The property of the target of the given key.
79
- */
80
- static get(target, propertyKey) {
81
- return Reflect.get(target, propertyKey);
82
- }
83
- /**
84
- * Sets the property of target, equivalent to `target[propertyKey] = value`.
85
- *
86
- * @param target - Object that contains the property on itself or in its prototype chain.
87
- * @param propertyKey - The property name.
88
- * @param value - The value to set the property to.
89
- * @returns If setting the value was successful.
90
- */
91
- static set(target, propertyKey, value) {
92
- return Reflect.set(target, propertyKey, value);
93
- }
94
- /**
95
- * Equivalent to `propertyKey in target`.
96
- *
97
- * @param target - Object that contains the property on itself or in its prototype chain.
98
- * @param propertyKey - Name of the property.
99
- * @returns Whether or not the given target has the key.
100
- */
101
- static has(target, propertyKey) {
102
- return Reflect.has(target, propertyKey);
103
- }
104
- /**
105
- * Define a unique metadata entry on the target.
106
- *
107
- * @param metadataKey - A key used to store and retrieve metadata.
108
- * @param metadataValue - A value that contains attached metadata.
109
- * @param target - The target object on which to define metadata.
110
- * @param propertyKey - The property key for the target.
111
- */
112
- static defineMetadata(metadataKey, metadataValue, target, propertyKey) {
113
- Reflect.defineMetadata(metadataKey, metadataValue, target, propertyKey);
114
- }
115
- }
116
-
117
- /**
118
- * The base decorator for setting metadata on properties.
119
- *
120
- * @param metadata - The metadata to define.
121
- * @param type - The type of metadata.
122
- * @returns The method that sets the metadata.
123
- */
124
- function baseProperty(metadata, type) {
125
- return function (target, propertyKey) {
126
- ReflectUtilities.defineMetadata('metadata', metadata, target, propertyKey);
127
- ReflectUtilities.defineMetadata('type', type, target, propertyKey);
128
- };
129
- }
130
-
131
48
  /**
132
49
  * The enum Values for all the different DecoratorTypes.
133
50
  */
@@ -160,135 +77,6 @@ var DecoratorTypes;
160
77
  DecoratorTypes["CUSTOM"] = "custom";
161
78
  })(DecoratorTypes || (DecoratorTypes = {}));
162
79
 
163
- /**
164
- * The internal Position. Sets default values and validates user input.
165
- */
166
- class PositionInternal {
167
- constructor(data) {
168
- var _a, _b, _c;
169
- this.validateInput(data);
170
- this.row = (_a = data === null || data === void 0 ? void 0 : data.row) !== null && _a !== void 0 ? _a : -1;
171
- this.order = (_b = data === null || data === void 0 ? void 0 : data.order) !== null && _b !== void 0 ? _b : -1;
172
- this.tab = (_c = data === null || data === void 0 ? void 0 : data.tab) !== null && _c !== void 0 ? _c : -1;
173
- this.tabName = data === null || data === void 0 ? void 0 : data.tabName;
174
- }
175
- validateInput(data) {
176
- if ((data === null || data === void 0 ? void 0 : data.order) != null) {
177
- if (data.order < 1) {
178
- throw new Error('order must be at least 1');
179
- }
180
- if (data.order > 12) {
181
- throw new Error('order cannot be bigger than 12 (the minimum value for a bootstrap column)');
182
- }
183
- }
184
- if ((data === null || data === void 0 ? void 0 : data.row) != null && data.row < 1) {
185
- throw new Error('row must be at least 1');
186
- }
187
- if ((data === null || data === void 0 ? void 0 : data.tab) != null && data.tab != -1 && data.tab < 2) {
188
- throw new Error('tab must be either -1 for the first tab or at least 2');
189
- }
190
- }
191
- }
192
- /**
193
- * The internal PropertyDecoratorConfig. Sets default values.
194
- */
195
- class PropertyDecoratorConfigInternal {
196
- constructor(data) {
197
- var _a, _b, _c, _d, _e;
198
- this.display = (_a = data.display) !== null && _a !== void 0 ? _a : true;
199
- this.displayName = data.displayName;
200
- this.required = (_b = data.required) !== null && _b !== void 0 ? _b : true;
201
- this.omitForCreate = (_c = data.omitForCreate) !== null && _c !== void 0 ? _c : false;
202
- this.omitForUpdate = (_d = data.omitForUpdate) !== null && _d !== void 0 ? _d : false;
203
- this.defaultWidths = (_e = data.defaultWidths) !== null && _e !== void 0 ? _e : [6, 6, 12];
204
- this.position = new PositionInternal(data.position);
205
- }
206
- }
207
-
208
- /**
209
- * The internal DropdownStringDecoratorConfig. Sets default values.
210
- */
211
- class DropdownStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
212
- constructor(data) {
213
- super(data);
214
- this.displayStyle = data.displayStyle;
215
- this.dropdownValues = data.dropdownValues;
216
- }
217
- }
218
- /**
219
- * The internal DefaultStringDecoratorConfig. Sets default values.
220
- */
221
- class DefaultStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
222
- constructor(data) {
223
- super(data);
224
- this.displayStyle = data.displayStyle;
225
- this.minLength = data.minLength;
226
- this.maxLength = data.maxLength;
227
- this.regex = data.regex;
228
- }
229
- }
230
- /**
231
- * The internal TextboxStringDecoratorConfig. Sets default values.
232
- */
233
- class TextboxStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
234
- constructor(data) {
235
- super(data);
236
- this.displayStyle = data.displayStyle;
237
- this.minLength = data.minLength;
238
- this.maxLength = data.maxLength;
239
- }
240
- }
241
- /**
242
- * The internal AutocompleteStringDecoratorConfig. Sets default values.
243
- */
244
- class AutocompleteStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
245
- constructor(data) {
246
- super(data);
247
- this.displayStyle = data.displayStyle;
248
- this.autocompleteValues = data.autocompleteValues;
249
- this.minLength = data.minLength;
250
- this.maxLength = data.maxLength;
251
- this.regex = data.regex;
252
- }
253
- }
254
- /**
255
- * The internal PasswordStringDecoratorConfig. Sets default values.
256
- */
257
- class PasswordStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
258
- constructor(data) {
259
- var _a, _b, _c;
260
- super(data);
261
- this.displayStyle = data.displayStyle;
262
- this.minLength = data.minLength;
263
- this.maxLength = data.maxLength;
264
- this.regex = data.regex;
265
- this.needsConfirmation = (_a = data.needsConfirmation) !== null && _a !== void 0 ? _a : true;
266
- this.confirmationDisplayName = (_b = data.confirmationDisplayName) !== null && _b !== void 0 ? _b : 'Confirm Password';
267
- this.passwordsDontMatchErrorMessage = (_c = data.passwordsDontMatchErrorMessage) !== null && _c !== void 0 ? _c : 'Passwords need to match!';
268
- }
269
- }
270
-
271
- /**
272
- * Decorator for setting and getting string Property metadata.
273
- *
274
- * @param metadata - The metadata of the string property.
275
- * @returns The method that defines the metadata.
276
- */
277
- function string(metadata) {
278
- switch (metadata.displayStyle) {
279
- case 'dropdown':
280
- return baseProperty(new DropdownStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_DROPDOWN);
281
- case 'autocomplete':
282
- return baseProperty(new AutocompleteStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_AUTOCOMPLETE);
283
- case 'textbox':
284
- return baseProperty(new TextboxStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_TEXTBOX);
285
- case 'password':
286
- return baseProperty(new PasswordStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_PASSWORD);
287
- default:
288
- return baseProperty(new DefaultStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING);
289
- }
290
- }
291
-
292
80
  /**
293
81
  * Encapsulates all functionality of lodash.
294
82
  */
@@ -363,6 +151,86 @@ class LodashUtilities {
363
151
  }
364
152
  }
365
153
 
154
+ /**
155
+ * Encapsulates all functionality of Reflect.
156
+ */
157
+ class ReflectUtilities {
158
+ /**
159
+ * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
160
+ *
161
+ * @param metadataKey - A key used to store and retrieve metadata.
162
+ * @param target - The target object on which the metadata is defined.
163
+ * @param propertyKey - The property key for the target.
164
+ * @returns The metadata value for the metadata key if found; otherwise, undefined.
165
+ */
166
+ static getMetadata(metadataKey, target, propertyKey) {
167
+ return Reflect.getMetadata(metadataKey, target, propertyKey);
168
+ }
169
+ /**
170
+ * Returns the string and symbol keys of the own properties of an object. The own properties of an object
171
+ * are those that are defined directly on that object, and are not inherited from the object's prototype.
172
+ *
173
+ * @param target - Object that contains the own properties.
174
+ * @returns The keys of the given object.
175
+ */
176
+ static ownKeys(target) {
177
+ return Reflect.ownKeys(target);
178
+ }
179
+ /**
180
+ * Gets the property of target, equivalent to `target[propertyKey]`.
181
+ *
182
+ * @param target - Object that contains the property on itself or in its prototype chain.
183
+ * @param propertyKey - The property name.
184
+ * @returns The property of the target of the given key.
185
+ */
186
+ static get(target, propertyKey) {
187
+ return Reflect.get(target, propertyKey);
188
+ }
189
+ /**
190
+ * Sets the property of target, equivalent to `target[propertyKey] = value`.
191
+ *
192
+ * @param target - Object that contains the property on itself or in its prototype chain.
193
+ * @param propertyKey - The property name.
194
+ * @param value - The value to set the property to.
195
+ * @returns If setting the value was successful.
196
+ */
197
+ static set(target, propertyKey, value) {
198
+ return Reflect.set(target, propertyKey, value);
199
+ }
200
+ /**
201
+ * Equivalent to `propertyKey in target`.
202
+ *
203
+ * @param target - Object that contains the property on itself or in its prototype chain.
204
+ * @param propertyKey - Name of the property.
205
+ * @returns Whether or not the given target has the key.
206
+ */
207
+ static has(target, propertyKey) {
208
+ return Reflect.has(target, propertyKey);
209
+ }
210
+ /**
211
+ * Checks if the targets key entry has a metadata value for the given metadata key.
212
+ *
213
+ * @returns Whether the metadata is null or not.
214
+ * @param metadataKey - The key of the metadata on the property.
215
+ * @param target - Object that contains the property on itself or in its prototype chain.
216
+ * @param propertyKey - The key of the target.
217
+ */
218
+ static hasMetadata(metadataKey, target, propertyKey) {
219
+ return this.getMetadata(metadataKey, target, propertyKey) != null;
220
+ }
221
+ /**
222
+ * Define a unique metadata entry on the target.
223
+ *
224
+ * @param metadataKey - A key used to store and retrieve metadata.
225
+ * @param metadataValue - A value that contains attached metadata.
226
+ * @param target - The target object on which to define metadata.
227
+ * @param propertyKey - The property key for the target.
228
+ */
229
+ static defineMetadata(metadataKey, metadataValue, target, propertyKey) {
230
+ Reflect.defineMetadata(metadataKey, metadataValue, target, propertyKey);
231
+ }
232
+ }
233
+
366
234
  const DAY_IN_MS = 1000 * 60 * 60 * 24;
367
235
  /**
368
236
  * Contains Helper Functions for handling date properties.
@@ -907,7 +775,7 @@ class EntityUtilities {
907
775
  case DecoratorTypes.STRING_PASSWORD:
908
776
  const entityPassword = entity[key];
909
777
  const passwordMetadata = metadata;
910
- const confirmPassword = ReflectUtilities.getMetadata('confirmPassword', entity, key);
778
+ const confirmPassword = ReflectUtilities.getMetadata(this.CONFIRM_PASSWORD_KEY, entity, key);
911
779
  if (!EntityUtilities.isPasswordValid(entityPassword, passwordMetadata, confirmPassword)) {
912
780
  return false;
913
781
  }
@@ -960,7 +828,8 @@ class EntityUtilities {
960
828
  case DecoratorTypes.DATE_TIME:
961
829
  const entityDateTime = new Date(entity[key]);
962
830
  const dateTimeMetadata = metadata;
963
- if (!EntityUtilities.isDateTimeValid(entityDateTime, dateTimeMetadata)) {
831
+ const hasTime = ReflectUtilities.hasMetadata(this.TIME_KEY, entity, key);
832
+ if (!EntityUtilities.isDateTimeValid(entityDateTime, dateTimeMetadata, hasTime)) {
964
833
  return false;
965
834
  }
966
835
  break;
@@ -1089,7 +958,10 @@ class EntityUtilities {
1089
958
  }
1090
959
  return true;
1091
960
  }
1092
- static isDateTimeValid(value, metadata) {
961
+ static isDateTimeValid(value, metadata, hasTime) {
962
+ if (!hasTime) {
963
+ return false;
964
+ }
1093
965
  if (metadata.minDate && value.getTime() < metadata.minDate(value).getTime()) {
1094
966
  return false;
1095
967
  }
@@ -1385,6 +1257,13 @@ class EntityUtilities {
1385
1257
  static resetChangesOnEntity(entity, entityPriorChanges) {
1386
1258
  for (const key in entityPriorChanges) {
1387
1259
  ReflectUtilities.set(entity, key, ReflectUtilities.get(entityPriorChanges, key));
1260
+ if (ReflectUtilities.hasMetadata(this.METADATA_KEYS_TO_RESET_KEY, entity, key)) {
1261
+ for (const k of ReflectUtilities.getMetadata(this.METADATA_KEYS_TO_RESET_KEY, entity, key)) {
1262
+ if (ReflectUtilities.hasMetadata(k, entity, key)) {
1263
+ ReflectUtilities.defineMetadata(k, undefined, entity, key);
1264
+ }
1265
+ }
1266
+ }
1388
1267
  }
1389
1268
  }
1390
1269
  static getEntityRows(entity, tab, hideOmitForCreate, hideOmitForEdit) {
@@ -1489,11 +1368,193 @@ class EntityUtilities {
1489
1368
  return keys;
1490
1369
  }
1491
1370
  }
1371
+ /**
1372
+ * The key for all keys of metadata that should be set to undefined when the entity gets reset.
1373
+ */
1374
+ EntityUtilities.METADATA_KEYS_TO_RESET_KEY = 'metadataKeysToReset';
1375
+ /**
1376
+ * The key for the metadata that saves the single preview image value on image properties.
1377
+ */
1378
+ EntityUtilities.SINGLE_PREVIEW_IMAGE_KEY = 'singlePreviewImage';
1379
+ /**
1380
+ * The key for the metadata that saves the multi preview images value on image properties.
1381
+ */
1382
+ EntityUtilities.MULTI_PREVIEW_IMAGES_KEY = 'multiPreviewImages';
1383
+ /**
1384
+ * The key for the metadata that saves the filenames value on file properties.
1385
+ */
1386
+ EntityUtilities.FILENAMES_KEY = 'fileNames';
1387
+ /**
1388
+ * The key for the metadata that saves the confirm password value on password properties.
1389
+ */
1390
+ EntityUtilities.CONFIRM_PASSWORD_KEY = 'confirmPassword';
1391
+ /**
1392
+ * The key for the metadata that saves the time value on date time properties.
1393
+ */
1394
+ EntityUtilities.TIME_KEY = 'time';
1395
+ /**
1396
+ * The key for the metadata that saves the date range value on date range properties.
1397
+ */
1398
+ EntityUtilities.DATE_RANGE_KEY = 'dateRange';
1399
+ /**
1400
+ * The key for the metadata that saves the date range start value on date range properties.
1401
+ */
1402
+ EntityUtilities.DATE_RANGE_START_KEY = 'dateRangeStart';
1403
+ /**
1404
+ * The key for the metadata that saves the date range end value on date range properties.
1405
+ */
1406
+ EntityUtilities.DATE_RANGE_END_KEY = 'dateRangeEnd';
1492
1407
  // eslint-disable-next-line @typescript-eslint/member-ordering, jsdoc/require-jsdoc, @typescript-eslint/typedef
1493
1408
  EntityUtilities.construct = EntityUtilities.new;
1494
1409
  // eslint-disable-next-line @typescript-eslint/member-ordering, jsdoc/require-jsdoc, @typescript-eslint/typedef
1495
1410
  EntityUtilities.build = EntityUtilities.new;
1496
1411
 
1412
+ /**
1413
+ * The base decorator for setting metadata on properties.
1414
+ *
1415
+ * @param metadata - The metadata to define.
1416
+ * @param type - The type of metadata.
1417
+ * @param metadataKeysToReset - Any metadata keys which values should be set to undefined on reset.
1418
+ * @returns The method that sets the metadata.
1419
+ */
1420
+ function baseProperty(metadata, type, metadataKeysToReset) {
1421
+ return function (target, propertyKey) {
1422
+ ReflectUtilities.defineMetadata('metadata', metadata, target, propertyKey);
1423
+ ReflectUtilities.defineMetadata('type', type, target, propertyKey);
1424
+ // eslint-disable-next-line max-len
1425
+ ReflectUtilities.defineMetadata(EntityUtilities.METADATA_KEYS_TO_RESET_KEY, metadataKeysToReset, target, propertyKey);
1426
+ };
1427
+ }
1428
+
1429
+ /**
1430
+ * The internal Position. Sets default values and validates user input.
1431
+ */
1432
+ class PositionInternal {
1433
+ constructor(data) {
1434
+ var _a, _b, _c;
1435
+ this.validateInput(data);
1436
+ this.row = (_a = data === null || data === void 0 ? void 0 : data.row) !== null && _a !== void 0 ? _a : -1;
1437
+ this.order = (_b = data === null || data === void 0 ? void 0 : data.order) !== null && _b !== void 0 ? _b : -1;
1438
+ this.tab = (_c = data === null || data === void 0 ? void 0 : data.tab) !== null && _c !== void 0 ? _c : -1;
1439
+ this.tabName = data === null || data === void 0 ? void 0 : data.tabName;
1440
+ }
1441
+ validateInput(data) {
1442
+ if ((data === null || data === void 0 ? void 0 : data.order) != null) {
1443
+ if (data.order < 1) {
1444
+ throw new Error('order must be at least 1');
1445
+ }
1446
+ if (data.order > 12) {
1447
+ throw new Error('order cannot be bigger than 12 (the minimum value for a bootstrap column)');
1448
+ }
1449
+ }
1450
+ if ((data === null || data === void 0 ? void 0 : data.row) != null && data.row < 1) {
1451
+ throw new Error('row must be at least 1');
1452
+ }
1453
+ if ((data === null || data === void 0 ? void 0 : data.tab) != null && data.tab != -1 && data.tab < 2) {
1454
+ throw new Error('tab must be either -1 for the first tab or at least 2');
1455
+ }
1456
+ }
1457
+ }
1458
+ /**
1459
+ * The internal PropertyDecoratorConfig. Sets default values.
1460
+ */
1461
+ class PropertyDecoratorConfigInternal {
1462
+ constructor(data) {
1463
+ var _a, _b, _c, _d, _e;
1464
+ this.display = (_a = data.display) !== null && _a !== void 0 ? _a : true;
1465
+ this.displayName = data.displayName;
1466
+ this.required = (_b = data.required) !== null && _b !== void 0 ? _b : true;
1467
+ this.omitForCreate = (_c = data.omitForCreate) !== null && _c !== void 0 ? _c : false;
1468
+ this.omitForUpdate = (_d = data.omitForUpdate) !== null && _d !== void 0 ? _d : false;
1469
+ this.defaultWidths = (_e = data.defaultWidths) !== null && _e !== void 0 ? _e : [6, 6, 12];
1470
+ this.position = new PositionInternal(data.position);
1471
+ }
1472
+ }
1473
+
1474
+ /**
1475
+ * The internal DropdownStringDecoratorConfig. Sets default values.
1476
+ */
1477
+ class DropdownStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
1478
+ constructor(data) {
1479
+ super(data);
1480
+ this.displayStyle = data.displayStyle;
1481
+ this.dropdownValues = data.dropdownValues;
1482
+ }
1483
+ }
1484
+ /**
1485
+ * The internal DefaultStringDecoratorConfig. Sets default values.
1486
+ */
1487
+ class DefaultStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
1488
+ constructor(data) {
1489
+ super(data);
1490
+ this.displayStyle = data.displayStyle;
1491
+ this.minLength = data.minLength;
1492
+ this.maxLength = data.maxLength;
1493
+ this.regex = data.regex;
1494
+ }
1495
+ }
1496
+ /**
1497
+ * The internal TextboxStringDecoratorConfig. Sets default values.
1498
+ */
1499
+ class TextboxStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
1500
+ constructor(data) {
1501
+ super(data);
1502
+ this.displayStyle = data.displayStyle;
1503
+ this.minLength = data.minLength;
1504
+ this.maxLength = data.maxLength;
1505
+ }
1506
+ }
1507
+ /**
1508
+ * The internal AutocompleteStringDecoratorConfig. Sets default values.
1509
+ */
1510
+ class AutocompleteStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
1511
+ constructor(data) {
1512
+ super(data);
1513
+ this.displayStyle = data.displayStyle;
1514
+ this.autocompleteValues = data.autocompleteValues;
1515
+ this.minLength = data.minLength;
1516
+ this.maxLength = data.maxLength;
1517
+ this.regex = data.regex;
1518
+ }
1519
+ }
1520
+ /**
1521
+ * The internal PasswordStringDecoratorConfig. Sets default values.
1522
+ */
1523
+ class PasswordStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
1524
+ constructor(data) {
1525
+ var _a, _b, _c;
1526
+ super(data);
1527
+ this.displayStyle = data.displayStyle;
1528
+ this.minLength = data.minLength;
1529
+ this.maxLength = data.maxLength;
1530
+ this.regex = data.regex;
1531
+ this.needsConfirmation = (_a = data.needsConfirmation) !== null && _a !== void 0 ? _a : true;
1532
+ this.confirmationDisplayName = (_b = data.confirmationDisplayName) !== null && _b !== void 0 ? _b : 'Confirm Password';
1533
+ this.passwordsDontMatchErrorMessage = (_c = data.passwordsDontMatchErrorMessage) !== null && _c !== void 0 ? _c : 'Passwords need to match!';
1534
+ }
1535
+ }
1536
+
1537
+ /**
1538
+ * Decorator for setting and getting string Property metadata.
1539
+ *
1540
+ * @param metadata - The metadata of the string property.
1541
+ * @returns The method that defines the metadata.
1542
+ */
1543
+ function string(metadata) {
1544
+ switch (metadata.displayStyle) {
1545
+ case 'dropdown':
1546
+ return baseProperty(new DropdownStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_DROPDOWN);
1547
+ case 'autocomplete':
1548
+ return baseProperty(new AutocompleteStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_AUTOCOMPLETE);
1549
+ case 'textbox':
1550
+ return baseProperty(new TextboxStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_TEXTBOX);
1551
+ case 'password':
1552
+ return baseProperty(new PasswordStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_PASSWORD, [EntityUtilities.CONFIRM_PASSWORD_KEY]);
1553
+ default:
1554
+ return baseProperty(new DefaultStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING);
1555
+ }
1556
+ }
1557
+
1497
1558
  /**
1498
1559
  * A base Entity class with a builtin id.
1499
1560
  */
@@ -2270,10 +2331,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
2270
2331
  class BooleanDropdownInputComponent extends NgxMatEntityBaseInputComponent {
2271
2332
  }
2272
2333
  BooleanDropdownInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: BooleanDropdownInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2273
- BooleanDropdownInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: BooleanDropdownInputComponent, selector: "boolean-dropdown-input", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select\n (ngModelChange)=\"emitChange()\"\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option [value]=\"undefined\">-</mat-option>\n <mat-option [value]=\"true\">{{metadata.dropdownTrue}}</mat-option>\n <mat-option [value]=\"false\">{{metadata.dropdownFalse}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
2334
+ BooleanDropdownInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: BooleanDropdownInputComponent, selector: "boolean-dropdown-input", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option [value]=\"undefined\" (click)=\"emitChange()\">-</mat-option>\n <mat-option [value]=\"true\" (click)=\"emitChange()\">{{metadata.dropdownTrue}}</mat-option>\n <mat-option [value]=\"false\" (click)=\"emitChange()\">{{metadata.dropdownFalse}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
2274
2335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: BooleanDropdownInputComponent, decorators: [{
2275
2336
  type: Component,
2276
- args: [{ selector: 'boolean-dropdown-input', template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select\n (ngModelChange)=\"emitChange()\"\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option [value]=\"undefined\">-</mat-option>\n <mat-option [value]=\"true\">{{metadata.dropdownTrue}}</mat-option>\n <mat-option [value]=\"false\">{{metadata.dropdownFalse}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
2337
+ args: [{ selector: 'boolean-dropdown-input', template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option [value]=\"undefined\" (click)=\"emitChange()\">-</mat-option>\n <mat-option [value]=\"true\" (click)=\"emitChange()\">{{metadata.dropdownTrue}}</mat-option>\n <mat-option [value]=\"false\" (click)=\"emitChange()\">{{metadata.dropdownFalse}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
2277
2338
  }] });
2278
2339
 
2279
2340
  /* eslint-disable jsdoc/require-jsdoc */
@@ -2339,6 +2400,24 @@ class DateRangeInputComponent extends NgxMatEntityBaseInputComponent {
2339
2400
  super(...arguments);
2340
2401
  this.defaultDateFilter = DateUtilities.defaultDateFilter;
2341
2402
  }
2403
+ get dateRange() {
2404
+ return ReflectUtilities.getMetadata(EntityUtilities.DATE_RANGE_KEY, this.entity, this.key);
2405
+ }
2406
+ set dateRange(value) {
2407
+ ReflectUtilities.defineMetadata(EntityUtilities.DATE_RANGE_KEY, value, this.entity, this.key);
2408
+ }
2409
+ get dateRangeStart() {
2410
+ return ReflectUtilities.getMetadata(EntityUtilities.DATE_RANGE_START_KEY, this.entity, this.key);
2411
+ }
2412
+ set dateRangeStart(value) {
2413
+ ReflectUtilities.defineMetadata(EntityUtilities.DATE_RANGE_START_KEY, value, this.entity, this.key);
2414
+ }
2415
+ get dateRangeEnd() {
2416
+ return ReflectUtilities.getMetadata(EntityUtilities.DATE_RANGE_END_KEY, this.entity, this.key);
2417
+ }
2418
+ set dateRangeEnd(value) {
2419
+ ReflectUtilities.defineMetadata(EntityUtilities.DATE_RANGE_END_KEY, value, this.entity, this.key);
2420
+ }
2342
2421
  ngOnInit() {
2343
2422
  var _a;
2344
2423
  super.ngOnInit();
@@ -2377,6 +2456,12 @@ class DateTimeInputComponent extends NgxMatEntityBaseInputComponent {
2377
2456
  this.DateUtilities = DateUtilities;
2378
2457
  this.defaultDateFilter = () => true;
2379
2458
  }
2459
+ get time() {
2460
+ return ReflectUtilities.getMetadata(EntityUtilities.TIME_KEY, this.entity, this.key);
2461
+ }
2462
+ set time(value) {
2463
+ ReflectUtilities.defineMetadata(EntityUtilities.TIME_KEY, value, this.entity, this.key);
2464
+ }
2380
2465
  ngOnInit() {
2381
2466
  super.ngOnInit();
2382
2467
  this.time = DateUtilities.getTimeFromDate(this.propertyValue);
@@ -2417,10 +2502,10 @@ class DateTimeInputComponent extends NgxMatEntityBaseInputComponent {
2417
2502
  }
2418
2503
  }
2419
2504
  DateTimeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DateTimeInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2420
- DateTimeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: DateTimeInputComponent, selector: "date-time-input", usesInheritance: true, ngImport: i0, template: "<div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required\"\n [min]=\"metadata.minDate ? metadata.minDate(propertyValue) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(propertyValue) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? defaultDateFilter\"\n (dateInput)=\"setTime()\"\n [disabled]=\"isReadOnly\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n <mat-form-field class=\"timepicker\">\n <mat-label>{{metadata.timeDisplayName}}</mat-label>\n <mat-select\n [(ngModel)]=\"time\"\n [name]=\"key.toString() + 'time'\"\n #timeModel=\"ngModel\"\n [required]=\"metadata.required\"\n [compareWith]=\"compareTimes\"\n (ngModelChange)=\"setTime()\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option *ngFor=\"let validTime of DateUtilities.getValidTimesForDropdown(\n metadata.times,\n propertyValue,\n metadata.minTime,\n metadata.maxTime,\n metadata.filterTime\n )\"\n [value]=\"validTime.value\"\n >\n {{validTime.displayName}}\n </mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(timeModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: ["mat-form-field{width:100%}.date-time{display:flex;align-items:baseline}.date-time .timepicker{margin-left:10px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
2505
+ DateTimeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: DateTimeInputComponent, selector: "date-time-input", usesInheritance: true, ngImport: i0, template: "<div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required\"\n [min]=\"metadata.minDate ? metadata.minDate(propertyValue) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(propertyValue) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? defaultDateFilter\"\n (dateInput)=\"setTime()\"\n [disabled]=\"isReadOnly\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n <mat-form-field class=\"timepicker\">\n <mat-label>{{metadata.timeDisplayName}}</mat-label>\n <mat-select\n [(ngModel)]=\"time\"\n [name]=\"key.toString() + 'time'\"\n #timeModel=\"ngModel\"\n [required]=\"metadata.required\"\n [compareWith]=\"compareTimes\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option *ngFor=\"let validTime of DateUtilities.getValidTimesForDropdown(\n metadata.times,\n propertyValue,\n metadata.minTime,\n metadata.maxTime,\n metadata.filterTime\n )\"\n [value]=\"validTime.value\"\n (click)=\"setTime()\"\n >\n {{validTime.displayName}}\n </mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(timeModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: ["mat-form-field{width:100%}.date-time{display:flex;align-items:baseline}.date-time .timepicker{margin-left:10px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
2421
2506
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DateTimeInputComponent, decorators: [{
2422
2507
  type: Component,
2423
- args: [{ selector: 'date-time-input', template: "<div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required\"\n [min]=\"metadata.minDate ? metadata.minDate(propertyValue) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(propertyValue) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? defaultDateFilter\"\n (dateInput)=\"setTime()\"\n [disabled]=\"isReadOnly\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n <mat-form-field class=\"timepicker\">\n <mat-label>{{metadata.timeDisplayName}}</mat-label>\n <mat-select\n [(ngModel)]=\"time\"\n [name]=\"key.toString() + 'time'\"\n #timeModel=\"ngModel\"\n [required]=\"metadata.required\"\n [compareWith]=\"compareTimes\"\n (ngModelChange)=\"setTime()\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option *ngFor=\"let validTime of DateUtilities.getValidTimesForDropdown(\n metadata.times,\n propertyValue,\n metadata.minTime,\n metadata.maxTime,\n metadata.filterTime\n )\"\n [value]=\"validTime.value\"\n >\n {{validTime.displayName}}\n </mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(timeModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: ["mat-form-field{width:100%}.date-time{display:flex;align-items:baseline}.date-time .timepicker{margin-left:10px}\n"] }]
2508
+ args: [{ selector: 'date-time-input', template: "<div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"propertyValue\"\n [name]=\"key.toString()\"\n #model=\"ngModel\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required\"\n [min]=\"metadata.minDate ? metadata.minDate(propertyValue) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(propertyValue) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? defaultDateFilter\"\n (dateInput)=\"setTime()\"\n [disabled]=\"isReadOnly\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n <mat-form-field class=\"timepicker\">\n <mat-label>{{metadata.timeDisplayName}}</mat-label>\n <mat-select\n [(ngModel)]=\"time\"\n [name]=\"key.toString() + 'time'\"\n #timeModel=\"ngModel\"\n [required]=\"metadata.required\"\n [compareWith]=\"compareTimes\"\n [disabled]=\"isReadOnly\"\n >\n <mat-option *ngFor=\"let validTime of DateUtilities.getValidTimesForDropdown(\n metadata.times,\n propertyValue,\n metadata.minTime,\n metadata.maxTime,\n metadata.filterTime\n )\"\n [value]=\"validTime.value\"\n (click)=\"setTime()\"\n >\n {{validTime.displayName}}\n </mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(timeModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: ["mat-form-field{width:100%}.date-time{display:flex;align-items:baseline}.date-time .timepicker{margin-left:10px}\n"] }]
2424
2509
  }] });
2425
2510
 
2426
2511
  /**
@@ -2490,6 +2575,12 @@ class FileInputComponent {
2490
2575
  this.FileUtilities = FileUtilities;
2491
2576
  this.fileDataChangeEvent = new EventEmitter();
2492
2577
  }
2578
+ get filenames() {
2579
+ return ReflectUtilities.getMetadata(EntityUtilities.FILENAMES_KEY, this.entity, this.key);
2580
+ }
2581
+ set filenames(value) {
2582
+ ReflectUtilities.defineMetadata(EntityUtilities.FILENAMES_KEY, value, this.entity, this.key);
2583
+ }
2493
2584
  ngOnInit() {
2494
2585
  return __awaiter(this, void 0, void 0, function* () {
2495
2586
  if (this.metadata.multiple) {
@@ -2653,12 +2744,16 @@ class FileInputComponent {
2653
2744
  }
2654
2745
  }
2655
2746
  FileInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FileInputComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2656
- FileInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: FileInputComponent, selector: "file-input", inputs: { propertyValue: "propertyValue", metadata: "metadata", getValidationErrorMessage: "getValidationErrorMessage", isReadOnly: "isReadOnly" }, outputs: { fileDataChangeEvent: "fileDataChangeEvent" }, ngImport: i0, template: "<input #fileInput\n type=\"file\" hidden\n [multiple]=\"metadata.multiple\"\n [accept]=\"FileUtilities.getAcceptString(metadata.allowedMimeTypes)\"\n (change)=\"setFileFromInput($event)\"\n>\n\n<mat-form-field floatLabel=\"always\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n [(ngModel)]=\"filenames\" name=\"file\" #model=\"ngModel\"\n [required]=\"metadata.required\"\n >\n <mat-chip-row *ngFor=\"let name of filenames\" (removed)=\"removeFile(name)\">\n {{name}}\n <span class=\"mat-mdc-chip-remove mat-mdc-chip-trailing-icon ngx-mat-grey\" (click)=\"downloadFile(name)\">\n <i class=\"fas fa-download\"></i>\n </span>\n <button *ngIf=\"!isReadOnly\" type=\"button\" matChipRemove>\n <i class=\"{{metadata.deleteIcon}}\"></i>\n </button>\n </mat-chip-row>\n <input [matChipInputFor]=\"chipGrid\" [readonly]=\"true\" hidden>\n </mat-chip-grid>\n <button *ngIf=\"downloadAllEnabled()\" type=\"button\" class=\"ngx-mat-grey\" mat-icon-button matSuffix (click)=\"downloadAll()\">\n <i class=\"fas fa-file-zipper\"></i>\n </button>\n <button type=\"button\" class=\"ngx-mat-grey\" mat-icon-button matSuffix [disabled]=\"isReadOnly\" (click)=\"fileInput.click()\">\n <i class=\"fas fa-upload\"></i>\n </button>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>\n\n<div *ngIf=\"metadata.dragAndDrop && !isReadOnly\" class=\"drag-drop\" dragDrop (files)=\"setFile($event)\">\n <button type=\"button\" mat-icon-button [disabled]=\"isReadOnly\" (click)=\"fileInput.click()\">\n <i class=\"fas fa-file-arrow-up ngx-mat-grey\"></i>\n </button>\n</div>", styles: ["mat-form-field{width:100%}.ngx-mat-grey{opacity:1;color:#0000008a}.drag-drop{display:flex;align-items:center;justify-content:center;height:200px;border:2px dashed rgba(0,0,0,.54);border-radius:15px;margin-top:5px;margin-bottom:5px}.drag-drop i{font-size:30px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: DragDropDirective, selector: "[dragDrop]", outputs: ["files"] }] });
2747
+ FileInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: FileInputComponent, selector: "file-input", inputs: { propertyValue: "propertyValue", entity: "entity", key: "key", metadata: "metadata", getValidationErrorMessage: "getValidationErrorMessage", isReadOnly: "isReadOnly" }, outputs: { fileDataChangeEvent: "fileDataChangeEvent" }, ngImport: i0, template: "<input #fileInput\n type=\"file\" hidden\n [multiple]=\"metadata.multiple\"\n [accept]=\"FileUtilities.getAcceptString(metadata.allowedMimeTypes)\"\n (change)=\"setFileFromInput($event)\"\n>\n\n<mat-form-field floatLabel=\"always\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n [(ngModel)]=\"filenames\" name=\"file\" #model=\"ngModel\"\n [required]=\"metadata.required\"\n >\n <mat-chip-row *ngFor=\"let name of filenames\" (removed)=\"removeFile(name)\">\n {{name}}\n <span class=\"mat-mdc-chip-remove mat-mdc-chip-trailing-icon ngx-mat-grey\" (click)=\"downloadFile(name)\">\n <i class=\"fas fa-download\"></i>\n </span>\n <button *ngIf=\"!isReadOnly\" type=\"button\" matChipRemove>\n <i class=\"{{metadata.deleteIcon}}\"></i>\n </button>\n </mat-chip-row>\n <input [matChipInputFor]=\"chipGrid\" [readonly]=\"true\" hidden>\n </mat-chip-grid>\n <button *ngIf=\"downloadAllEnabled()\" type=\"button\" class=\"ngx-mat-grey\" mat-icon-button matSuffix (click)=\"downloadAll()\">\n <i class=\"fas fa-file-zipper\"></i>\n </button>\n <button type=\"button\" class=\"ngx-mat-grey\" mat-icon-button matSuffix [disabled]=\"isReadOnly\" (click)=\"fileInput.click()\">\n <i class=\"fas fa-upload\"></i>\n </button>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>\n\n<div *ngIf=\"metadata.dragAndDrop && !isReadOnly\" class=\"drag-drop\" dragDrop (files)=\"setFile($event)\">\n <button type=\"button\" mat-icon-button [disabled]=\"isReadOnly\" (click)=\"fileInput.click()\">\n <i class=\"fas fa-file-arrow-up ngx-mat-grey\"></i>\n </button>\n</div>", styles: ["mat-form-field{width:100%}.ngx-mat-grey{opacity:1;color:#0000008a}.drag-drop{display:flex;align-items:center;justify-content:center;height:200px;border:2px dashed rgba(0,0,0,.54);border-radius:15px;margin-top:5px;margin-bottom:5px}.drag-drop i{font-size:30px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: DragDropDirective, selector: "[dragDrop]", outputs: ["files"] }] });
2657
2748
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FileInputComponent, decorators: [{
2658
2749
  type: Component,
2659
2750
  args: [{ selector: 'file-input', template: "<input #fileInput\n type=\"file\" hidden\n [multiple]=\"metadata.multiple\"\n [accept]=\"FileUtilities.getAcceptString(metadata.allowedMimeTypes)\"\n (change)=\"setFileFromInput($event)\"\n>\n\n<mat-form-field floatLabel=\"always\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n [(ngModel)]=\"filenames\" name=\"file\" #model=\"ngModel\"\n [required]=\"metadata.required\"\n >\n <mat-chip-row *ngFor=\"let name of filenames\" (removed)=\"removeFile(name)\">\n {{name}}\n <span class=\"mat-mdc-chip-remove mat-mdc-chip-trailing-icon ngx-mat-grey\" (click)=\"downloadFile(name)\">\n <i class=\"fas fa-download\"></i>\n </span>\n <button *ngIf=\"!isReadOnly\" type=\"button\" matChipRemove>\n <i class=\"{{metadata.deleteIcon}}\"></i>\n </button>\n </mat-chip-row>\n <input [matChipInputFor]=\"chipGrid\" [readonly]=\"true\" hidden>\n </mat-chip-grid>\n <button *ngIf=\"downloadAllEnabled()\" type=\"button\" class=\"ngx-mat-grey\" mat-icon-button matSuffix (click)=\"downloadAll()\">\n <i class=\"fas fa-file-zipper\"></i>\n </button>\n <button type=\"button\" class=\"ngx-mat-grey\" mat-icon-button matSuffix [disabled]=\"isReadOnly\" (click)=\"fileInput.click()\">\n <i class=\"fas fa-upload\"></i>\n </button>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>\n\n<div *ngIf=\"metadata.dragAndDrop && !isReadOnly\" class=\"drag-drop\" dragDrop (files)=\"setFile($event)\">\n <button type=\"button\" mat-icon-button [disabled]=\"isReadOnly\" (click)=\"fileInput.click()\">\n <i class=\"fas fa-file-arrow-up ngx-mat-grey\"></i>\n </button>\n</div>", styles: ["mat-form-field{width:100%}.ngx-mat-grey{opacity:1;color:#0000008a}.drag-drop{display:flex;align-items:center;justify-content:center;height:200px;border:2px dashed rgba(0,0,0,.54);border-radius:15px;margin-top:5px;margin-bottom:5px}.drag-drop i{font-size:30px}\n"] }]
2660
2751
  }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { propertyValue: [{
2661
2752
  type: Input
2753
+ }], entity: [{
2754
+ type: Input
2755
+ }], key: [{
2756
+ type: Input
2662
2757
  }], metadata: [{
2663
2758
  type: Input
2664
2759
  }], getValidationErrorMessage: [{
@@ -2682,10 +2777,10 @@ class FileDefaultInputComponent extends NgxMatEntityBaseInputComponent {
2682
2777
  }
2683
2778
  }
2684
2779
  FileDefaultInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FileDefaultInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2685
- FileDefaultInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: FileDefaultInputComponent, selector: "file-default-input", usesInheritance: true, ngImport: i0, template: "<div [class.file-input]=\"metadata.dragAndDrop\" [class.mat-elevation-z8]=\"metadata.dragAndDrop\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n >\n </file-input>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}\n"], dependencies: [{ kind: "component", type: FileInputComponent, selector: "file-input", inputs: ["propertyValue", "metadata", "getValidationErrorMessage", "isReadOnly"], outputs: ["fileDataChangeEvent"] }] });
2780
+ FileDefaultInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: FileDefaultInputComponent, selector: "file-default-input", usesInheritance: true, ngImport: i0, template: "<div [class.file-input]=\"metadata.dragAndDrop\" [class.mat-elevation-z8]=\"metadata.dragAndDrop\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n >\n </file-input>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}\n"], dependencies: [{ kind: "component", type: FileInputComponent, selector: "file-input", inputs: ["propertyValue", "entity", "key", "metadata", "getValidationErrorMessage", "isReadOnly"], outputs: ["fileDataChangeEvent"] }] });
2686
2781
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FileDefaultInputComponent, decorators: [{
2687
2782
  type: Component,
2688
- args: [{ selector: 'file-default-input', template: "<div [class.file-input]=\"metadata.dragAndDrop\" [class.mat-elevation-z8]=\"metadata.dragAndDrop\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n >\n </file-input>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}\n"] }]
2783
+ args: [{ selector: 'file-default-input', template: "<div [class.file-input]=\"metadata.dragAndDrop\" [class.mat-elevation-z8]=\"metadata.dragAndDrop\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n >\n </file-input>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}\n"] }]
2689
2784
  }] });
2690
2785
 
2691
2786
  // eslint-disable-next-line max-len
@@ -2698,6 +2793,18 @@ class FileImageInputComponent extends NgxMatEntityBaseInputComponent {
2698
2793
  this.imageIndex = 0;
2699
2794
  this.placeHolder = placeholder;
2700
2795
  }
2796
+ get multiPreviewImages() {
2797
+ return ReflectUtilities.getMetadata(EntityUtilities.MULTI_PREVIEW_IMAGES_KEY, this.entity, this.key);
2798
+ }
2799
+ set multiPreviewImages(value) {
2800
+ ReflectUtilities.defineMetadata(EntityUtilities.MULTI_PREVIEW_IMAGES_KEY, value, this.entity, this.key);
2801
+ }
2802
+ get singlePreviewImage() {
2803
+ return ReflectUtilities.getMetadata(EntityUtilities.SINGLE_PREVIEW_IMAGE_KEY, this.entity, this.key);
2804
+ }
2805
+ set singlePreviewImage(value) {
2806
+ ReflectUtilities.defineMetadata(EntityUtilities.SINGLE_PREVIEW_IMAGE_KEY, value, this.entity, this.key);
2807
+ }
2701
2808
  setSinglePreviewImage() {
2702
2809
  return __awaiter(this, void 0, void 0, function* () {
2703
2810
  if (this.propertyValue) {
@@ -2773,10 +2880,10 @@ class FileImageInputComponent extends NgxMatEntityBaseInputComponent {
2773
2880
  }
2774
2881
  }
2775
2882
  FileImageInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FileImageInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2776
- FileImageInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: FileImageInputComponent, selector: "file-image-input", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"!metadata.dragAndDrop && !metadata.preview\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n >\n </file-input>\n</div>\n\n<div *ngIf=\"metadata.dragAndDrop || metadata.preview\" class=\"file-input mat-elevation-z8\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n >\n </file-input>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && metadata.multiple\">\n <i (click)=\"prev()\" [class.disabled]=\"imageIndex === 0\" class=\"prev-button fa-solid fa-angle-left\"></i>\n <img *ngIf=\"multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"multiPreviewImages?.[imageIndex]\">\n <img *ngIf=\"!multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"metadata.previewPlaceholderUrl ?? placeHolder\">\n <i (click)=\"next()\"\n [class.disabled]=\"!multiPreviewImages || !multiPreviewImages.length || imageIndex === (multiPreviewImages.length - 1)\"\n class=\"next-button fa-solid fa-angle-right\"\n >\n </i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && metadata.multiple\">\n <button type=\"button\" (click)=\"setIndex(imageIndex-4)\" mat-icon-button *ngIf=\"\n this.multiPreviewImages\n && multiPreviewImages[imageIndex-4]\n && imageIndex === (this.multiPreviewImages.length - 1)\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 3}}</span>\n </button>\n <!-- eslint-disable-next-line @angular-eslint/template/conditional-complexity -->\n <button type=\"button\" (click)=\"setIndex(imageIndex-3)\" mat-icon-button *ngIf=\"this.multiPreviewImages\n && multiPreviewImages[imageIndex-3]\n && (\n imageIndex === (this.multiPreviewImages.length - 2)\n || imageIndex === (this.multiPreviewImages.length - 1)\n )\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-1]\">\n <i class=\"dot\"></i>\n <span class=\"image-index\">{{imageIndex}}</span>\n </button>\n <button type=\"button\" mat-icon-button disabled>\n <i class=\"dot selected\"></i>\n <span class=\"image-index\">{{imageIndex + 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+1]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 3}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+3)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+3] && imageIndex <= 1\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 4}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+4)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+4] && imageIndex === 0\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 5}}</span>\n </button>\n </div>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <i class=\"prev-button disabled fa-solid fa-angle-left\"></i>\n <img class=\"mat-elevation-z2\" [src]=\"singlePreviewImage ?? metadata.previewPlaceholderUrl ?? placeHolder\">\n <i class=\"next-button disabled fa-solid fa-angle-right\"></i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <button type=\"button\" disabled mat-icon-button>\n <span class=\"dot selected\"></span>\n <span class=\"image-index\">1</span>\n </button>\n </div>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}.image-preview{height:250px;display:flex;align-items:center;padding-top:15px;padding-bottom:15px}.image-preview .prev-button{font-size:100px;margin-left:5px;color:#0000008a}.image-preview .next-button{font-size:100px;margin-right:5px;color:#0000008a}.image-preview .prev-button:hover,.image-preview .next-button:hover{cursor:pointer;color:#000000b3;transition:all .5s ease}.image-preview .prev-button.disabled,.image-preview .next-button.disabled{color:#00000042}.image-preview .prev-button.disabled:hover,.image-preview .next-button.disabled:hover{color:#00000042;transition:none;cursor:default}.image-preview img{max-width:calc(100% - 100px);max-height:100%;margin-left:auto;margin-right:auto;border-radius:3px}.preview-nav{text-align:center}.preview-nav button{display:inline-block;width:18px;height:18px;margin-left:5px;margin-right:5px}.preview-nav button .dot{height:100%;width:100%;background-color:#00000061;border-radius:50%;display:block}.preview-nav button .dot.selected{background-color:#0000008a}.preview-nav button .image-index{position:absolute;height:100%;width:100%;display:block;top:-11.5px;color:#fff}.preview-nav button:hover .dot{background-color:#0000008a;transition:all .3s ease}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: FileInputComponent, selector: "file-input", inputs: ["propertyValue", "metadata", "getValidationErrorMessage", "isReadOnly"], outputs: ["fileDataChangeEvent"] }] });
2883
+ FileImageInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: FileImageInputComponent, selector: "file-image-input", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"!metadata.dragAndDrop && !metadata.preview\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n >\n </file-input>\n</div>\n\n<div *ngIf=\"metadata.dragAndDrop || metadata.preview\" class=\"file-input mat-elevation-z8\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n >\n </file-input>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && metadata.multiple\">\n <i (click)=\"prev()\" [class.disabled]=\"imageIndex === 0\" class=\"prev-button fa-solid fa-angle-left\"></i>\n <img *ngIf=\"multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"multiPreviewImages?.[imageIndex]\">\n <img *ngIf=\"!multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"metadata.previewPlaceholderUrl ?? placeHolder\">\n <i (click)=\"next()\"\n [class.disabled]=\"!multiPreviewImages || !multiPreviewImages.length || imageIndex === (multiPreviewImages.length - 1)\"\n class=\"next-button fa-solid fa-angle-right\"\n >\n </i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && metadata.multiple\">\n <button type=\"button\" (click)=\"setIndex(imageIndex-4)\" mat-icon-button *ngIf=\"\n this.multiPreviewImages\n && multiPreviewImages[imageIndex-4]\n && imageIndex === (this.multiPreviewImages.length - 1)\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 3}}</span>\n </button>\n <!-- eslint-disable-next-line @angular-eslint/template/conditional-complexity -->\n <button type=\"button\" (click)=\"setIndex(imageIndex-3)\" mat-icon-button *ngIf=\"this.multiPreviewImages\n && multiPreviewImages[imageIndex-3]\n && (\n imageIndex === (this.multiPreviewImages.length - 2)\n || imageIndex === (this.multiPreviewImages.length - 1)\n )\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-1]\">\n <i class=\"dot\"></i>\n <span class=\"image-index\">{{imageIndex}}</span>\n </button>\n <button type=\"button\" mat-icon-button disabled>\n <i class=\"dot selected\"></i>\n <span class=\"image-index\">{{imageIndex + 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+1]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 3}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+3)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+3] && imageIndex <= 1\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 4}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+4)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+4] && imageIndex === 0\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 5}}</span>\n </button>\n </div>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <i class=\"prev-button disabled fa-solid fa-angle-left\"></i>\n <img class=\"mat-elevation-z2\" [src]=\"singlePreviewImage ?? metadata.previewPlaceholderUrl ?? placeHolder\">\n <i class=\"next-button disabled fa-solid fa-angle-right\"></i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <button type=\"button\" disabled mat-icon-button>\n <span class=\"dot selected\"></span>\n <span class=\"image-index\">1</span>\n </button>\n </div>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}.image-preview{height:250px;display:flex;align-items:center;padding-top:15px;padding-bottom:15px}.image-preview .prev-button{font-size:100px;margin-left:5px;color:#0000008a}.image-preview .next-button{font-size:100px;margin-right:5px;color:#0000008a}.image-preview .prev-button:hover,.image-preview .next-button:hover{cursor:pointer;color:#000000b3;transition:all .5s ease}.image-preview .prev-button.disabled,.image-preview .next-button.disabled{color:#00000042}.image-preview .prev-button.disabled:hover,.image-preview .next-button.disabled:hover{color:#00000042;transition:none;cursor:default}.image-preview img{max-width:calc(100% - 100px);max-height:100%;margin-left:auto;margin-right:auto;border-radius:3px}.preview-nav{text-align:center}.preview-nav button{display:inline-block;width:18px;height:18px;margin-left:5px;margin-right:5px}.preview-nav button .dot{height:100%;width:100%;background-color:#00000061;border-radius:50%;display:block}.preview-nav button .dot.selected{background-color:#0000008a}.preview-nav button .image-index{position:absolute;height:100%;width:100%;display:block;top:-11.5px;color:#fff}.preview-nav button:hover .dot{background-color:#0000008a;transition:all .3s ease}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: FileInputComponent, selector: "file-input", inputs: ["propertyValue", "entity", "key", "metadata", "getValidationErrorMessage", "isReadOnly"], outputs: ["fileDataChangeEvent"] }] });
2777
2884
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FileImageInputComponent, decorators: [{
2778
2885
  type: Component,
2779
- args: [{ selector: 'file-image-input', template: "<div *ngIf=\"!metadata.dragAndDrop && !metadata.preview\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n >\n </file-input>\n</div>\n\n<div *ngIf=\"metadata.dragAndDrop || metadata.preview\" class=\"file-input mat-elevation-z8\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n >\n </file-input>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && metadata.multiple\">\n <i (click)=\"prev()\" [class.disabled]=\"imageIndex === 0\" class=\"prev-button fa-solid fa-angle-left\"></i>\n <img *ngIf=\"multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"multiPreviewImages?.[imageIndex]\">\n <img *ngIf=\"!multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"metadata.previewPlaceholderUrl ?? placeHolder\">\n <i (click)=\"next()\"\n [class.disabled]=\"!multiPreviewImages || !multiPreviewImages.length || imageIndex === (multiPreviewImages.length - 1)\"\n class=\"next-button fa-solid fa-angle-right\"\n >\n </i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && metadata.multiple\">\n <button type=\"button\" (click)=\"setIndex(imageIndex-4)\" mat-icon-button *ngIf=\"\n this.multiPreviewImages\n && multiPreviewImages[imageIndex-4]\n && imageIndex === (this.multiPreviewImages.length - 1)\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 3}}</span>\n </button>\n <!-- eslint-disable-next-line @angular-eslint/template/conditional-complexity -->\n <button type=\"button\" (click)=\"setIndex(imageIndex-3)\" mat-icon-button *ngIf=\"this.multiPreviewImages\n && multiPreviewImages[imageIndex-3]\n && (\n imageIndex === (this.multiPreviewImages.length - 2)\n || imageIndex === (this.multiPreviewImages.length - 1)\n )\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-1]\">\n <i class=\"dot\"></i>\n <span class=\"image-index\">{{imageIndex}}</span>\n </button>\n <button type=\"button\" mat-icon-button disabled>\n <i class=\"dot selected\"></i>\n <span class=\"image-index\">{{imageIndex + 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+1]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 3}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+3)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+3] && imageIndex <= 1\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 4}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+4)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+4] && imageIndex === 0\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 5}}</span>\n </button>\n </div>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <i class=\"prev-button disabled fa-solid fa-angle-left\"></i>\n <img class=\"mat-elevation-z2\" [src]=\"singlePreviewImage ?? metadata.previewPlaceholderUrl ?? placeHolder\">\n <i class=\"next-button disabled fa-solid fa-angle-right\"></i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <button type=\"button\" disabled mat-icon-button>\n <span class=\"dot selected\"></span>\n <span class=\"image-index\">1</span>\n </button>\n </div>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}.image-preview{height:250px;display:flex;align-items:center;padding-top:15px;padding-bottom:15px}.image-preview .prev-button{font-size:100px;margin-left:5px;color:#0000008a}.image-preview .next-button{font-size:100px;margin-right:5px;color:#0000008a}.image-preview .prev-button:hover,.image-preview .next-button:hover{cursor:pointer;color:#000000b3;transition:all .5s ease}.image-preview .prev-button.disabled,.image-preview .next-button.disabled{color:#00000042}.image-preview .prev-button.disabled:hover,.image-preview .next-button.disabled:hover{color:#00000042;transition:none;cursor:default}.image-preview img{max-width:calc(100% - 100px);max-height:100%;margin-left:auto;margin-right:auto;border-radius:3px}.preview-nav{text-align:center}.preview-nav button{display:inline-block;width:18px;height:18px;margin-left:5px;margin-right:5px}.preview-nav button .dot{height:100%;width:100%;background-color:#00000061;border-radius:50%;display:block}.preview-nav button .dot.selected{background-color:#0000008a}.preview-nav button .image-index{position:absolute;height:100%;width:100%;display:block;top:-11.5px;color:#fff}.preview-nav button:hover .dot{background-color:#0000008a;transition:all .3s ease}\n"] }]
2886
+ args: [{ selector: 'file-image-input', template: "<div *ngIf=\"!metadata.dragAndDrop && !metadata.preview\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n >\n </file-input>\n</div>\n\n<div *ngIf=\"metadata.dragAndDrop || metadata.preview\" class=\"file-input mat-elevation-z8\">\n <file-input\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n >\n </file-input>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && metadata.multiple\">\n <i (click)=\"prev()\" [class.disabled]=\"imageIndex === 0\" class=\"prev-button fa-solid fa-angle-left\"></i>\n <img *ngIf=\"multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"multiPreviewImages?.[imageIndex]\">\n <img *ngIf=\"!multiPreviewImages?.[imageIndex]\" class=\"mat-elevation-z2\" [src]=\"metadata.previewPlaceholderUrl ?? placeHolder\">\n <i (click)=\"next()\"\n [class.disabled]=\"!multiPreviewImages || !multiPreviewImages.length || imageIndex === (multiPreviewImages.length - 1)\"\n class=\"next-button fa-solid fa-angle-right\"\n >\n </i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && metadata.multiple\">\n <button type=\"button\" (click)=\"setIndex(imageIndex-4)\" mat-icon-button *ngIf=\"\n this.multiPreviewImages\n && multiPreviewImages[imageIndex-4]\n && imageIndex === (this.multiPreviewImages.length - 1)\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 3}}</span>\n </button>\n <!-- eslint-disable-next-line @angular-eslint/template/conditional-complexity -->\n <button type=\"button\" (click)=\"setIndex(imageIndex-3)\" mat-icon-button *ngIf=\"this.multiPreviewImages\n && multiPreviewImages[imageIndex-3]\n && (\n imageIndex === (this.multiPreviewImages.length - 2)\n || imageIndex === (this.multiPreviewImages.length - 1)\n )\"\n >\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex - 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex-1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex-1]\">\n <i class=\"dot\"></i>\n <span class=\"image-index\">{{imageIndex}}</span>\n </button>\n <button type=\"button\" mat-icon-button disabled>\n <i class=\"dot selected\"></i>\n <span class=\"image-index\">{{imageIndex + 1}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+1)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+1]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 2}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+2)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+2]\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 3}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+3)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+3] && imageIndex <= 1\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 4}}</span>\n </button>\n <button type=\"button\" (click)=\"setIndex(imageIndex+4)\" mat-icon-button *ngIf=\"multiPreviewImages?.[imageIndex+4] && imageIndex === 0\">\n <span class=\"dot\"></span>\n <span class=\"image-index\">{{imageIndex + 5}}</span>\n </button>\n </div>\n\n <div class=\"image-preview\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <i class=\"prev-button disabled fa-solid fa-angle-left\"></i>\n <img class=\"mat-elevation-z2\" [src]=\"singlePreviewImage ?? metadata.previewPlaceholderUrl ?? placeHolder\">\n <i class=\"next-button disabled fa-solid fa-angle-right\"></i>\n </div>\n <div class=\"preview-nav\" *ngIf=\"metadata.preview && !metadata.multiple\">\n <button type=\"button\" disabled mat-icon-button>\n <span class=\"dot selected\"></span>\n <span class=\"image-index\">1</span>\n </button>\n </div>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}.image-preview{height:250px;display:flex;align-items:center;padding-top:15px;padding-bottom:15px}.image-preview .prev-button{font-size:100px;margin-left:5px;color:#0000008a}.image-preview .next-button{font-size:100px;margin-right:5px;color:#0000008a}.image-preview .prev-button:hover,.image-preview .next-button:hover{cursor:pointer;color:#000000b3;transition:all .5s ease}.image-preview .prev-button.disabled,.image-preview .next-button.disabled{color:#00000042}.image-preview .prev-button.disabled:hover,.image-preview .next-button.disabled:hover{color:#00000042;transition:none;cursor:default}.image-preview img{max-width:calc(100% - 100px);max-height:100%;margin-left:auto;margin-right:auto;border-radius:3px}.preview-nav{text-align:center}.preview-nav button{display:inline-block;width:18px;height:18px;margin-left:5px;margin-right:5px}.preview-nav button .dot{height:100%;width:100%;background-color:#00000061;border-radius:50%;display:block}.preview-nav button .dot.selected{background-color:#0000008a}.preview-nav button .image-index{position:absolute;height:100%;width:100%;display:block;top:-11.5px;color:#fff}.preview-nav button:hover .dot{background-color:#0000008a;transition:all .3s ease}\n"] }]
2780
2887
  }] });
2781
2888
 
2782
2889
  const NGX_GET_VALIDATION_ERROR_MESSAGE = new InjectionToken('Provider for the default getValidationErrorMessage.', {
@@ -2933,10 +3040,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
2933
3040
  class StringDropdownInputComponent extends NgxMatEntityBaseInputComponent {
2934
3041
  }
2935
3042
  StringDropdownInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: StringDropdownInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2936
- StringDropdownInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: StringDropdownInputComponent, selector: "string-dropdown-input", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select (ngModelChange)=\"emitChange()\" [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
3043
+ StringDropdownInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: StringDropdownInputComponent, selector: "string-dropdown-input", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\" (click)=\"emitChange()\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
2937
3044
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: StringDropdownInputComponent, decorators: [{
2938
3045
  type: Component,
2939
- args: [{ selector: 'string-dropdown-input', template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select (ngModelChange)=\"emitChange()\" [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
3046
+ args: [{ selector: 'string-dropdown-input', template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\" (click)=\"emitChange()\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
2940
3047
  }] });
2941
3048
 
2942
3049
  /* eslint-disable jsdoc/require-jsdoc */
@@ -2946,15 +3053,19 @@ class StringPasswordInputComponent extends NgxMatEntityBaseInputComponent {
2946
3053
  this.hide = true;
2947
3054
  this.hideConfirm = true;
2948
3055
  }
3056
+ get confirmPassword() {
3057
+ return ReflectUtilities.getMetadata(EntityUtilities.CONFIRM_PASSWORD_KEY, this.entity, this.key);
3058
+ }
3059
+ set confirmPassword(value) {
3060
+ ReflectUtilities.defineMetadata(EntityUtilities.CONFIRM_PASSWORD_KEY, value, this.entity, this.key);
3061
+ }
2949
3062
  ngOnInit() {
2950
3063
  super.ngOnInit();
2951
3064
  this.confirmRequired = this.metadata.required;
2952
3065
  this.confirmPassword = LodashUtilities.cloneDeep(this.propertyValue);
2953
- ReflectUtilities.defineMetadata('confirmPassword', this.confirmPassword, this.entity, this.key);
2954
3066
  }
2955
3067
  passwordInput() {
2956
3068
  this.confirmRequired = Boolean(this.propertyValue);
2957
- ReflectUtilities.defineMetadata('confirmPassword', this.confirmPassword, this.entity, this.key);
2958
3069
  this.emitChange();
2959
3070
  }
2960
3071
  }
@@ -2979,10 +3090,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
2979
3090
  class NumberDropdownInputComponent extends NgxMatEntityBaseInputComponent {
2980
3091
  }
2981
3092
  NumberDropdownInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NumberDropdownInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2982
- NumberDropdownInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NumberDropdownInputComponent, selector: "number-dropdown-input", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select (ngModelChange)=\"emitChange()\" [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
3093
+ NumberDropdownInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NumberDropdownInputComponent, selector: "number-dropdown-input", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\" (click)=\"emitChange()\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
2983
3094
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NumberDropdownInputComponent, decorators: [{
2984
3095
  type: Component,
2985
- args: [{ selector: 'number-dropdown-input', template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select (ngModelChange)=\"emitChange()\" [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
3096
+ args: [{ selector: 'number-dropdown-input', template: "<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"propertyValue\" [name]=\"key.toString()\" #model=\"ngModel\" [required]=\"metadata.required\" [disabled]=\"isReadOnly\">\n <mat-option *ngFor=\"let value of metadata.dropdownValues\" [value]=\"value.value\" (click)=\"emitChange()\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
2986
3097
  }] });
2987
3098
 
2988
3099
  /* eslint-disable jsdoc/require-jsdoc */
@@ -4275,10 +4386,11 @@ class ArrayDecoratorConfig extends PropertyDecoratorConfig {
4275
4386
  */
4276
4387
  class DropdownBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
4277
4388
  constructor(data) {
4389
+ var _a, _b;
4278
4390
  super(data);
4279
4391
  this.displayStyle = data.displayStyle;
4280
- this.dropdownTrue = data.dropdownTrue;
4281
- this.dropdownFalse = data.dropdownFalse;
4392
+ this.dropdownTrue = (_a = data.dropdownTrue) !== null && _a !== void 0 ? _a : 'Yes';
4393
+ this.dropdownFalse = (_b = data.dropdownFalse) !== null && _b !== void 0 ? _b : 'No';
4282
4394
  }
4283
4395
  }
4284
4396
  /**
@@ -4387,10 +4499,10 @@ function date(metadata) {
4387
4499
  return baseProperty(new DefaultDateDecoratorConfigInternal(metadata), DecoratorTypes.DATE);
4388
4500
  }
4389
4501
  else if (metadata.displayStyle === 'datetime') {
4390
- return baseProperty(new DateTimeDateDecoratorConfigInternal(metadata), DecoratorTypes.DATE_TIME);
4502
+ return baseProperty(new DateTimeDateDecoratorConfigInternal(metadata), DecoratorTypes.DATE_TIME, [EntityUtilities.TIME_KEY]);
4391
4503
  }
4392
4504
  else {
4393
- return baseProperty(new DateRangeDateDecoratorConfigInternal(metadata), DecoratorTypes.DATE_RANGE);
4505
+ return baseProperty(new DateRangeDateDecoratorConfigInternal(metadata), DecoratorTypes.DATE_RANGE, [EntityUtilities.DATE_RANGE_END_KEY, EntityUtilities.DATE_RANGE_KEY, EntityUtilities.DATE_RANGE_START_KEY]);
4394
4506
  }
4395
4507
  }
4396
4508
 
@@ -4653,9 +4765,9 @@ function getDefaultMaxSizeTotalErrorDialogData(data) {
4653
4765
  function file(metadata) {
4654
4766
  switch (metadata.type) {
4655
4767
  case 'other':
4656
- return baseProperty(new DefaultFileDecoratorConfigInternal(metadata), DecoratorTypes.FILE_DEFAULT);
4768
+ return baseProperty(new DefaultFileDecoratorConfigInternal(metadata), DecoratorTypes.FILE_DEFAULT, [EntityUtilities.FILENAMES_KEY]);
4657
4769
  case 'image':
4658
- return baseProperty(new ImageFileDecoratorConfigInternal(metadata), DecoratorTypes.FILE_IMAGE);
4770
+ return baseProperty(new ImageFileDecoratorConfigInternal(metadata), DecoratorTypes.FILE_IMAGE, [EntityUtilities.FILENAMES_KEY, EntityUtilities.MULTI_PREVIEW_IMAGES_KEY, EntityUtilities.SINGLE_PREVIEW_IMAGE_KEY]);
4659
4771
  default:
4660
4772
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
4661
4773
  throw new Error(`Unknown metadata type ${metadata.type}`);
@@ -4697,10 +4809,11 @@ class CustomDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
4697
4809
  * Decorator for setting and getting custom property metadata.
4698
4810
  *
4699
4811
  * @param metadata - The metadata of the custom property.
4812
+ * @param metadataKeysToReset - Any metadata keys which values should be set to undefined on reset.
4700
4813
  * @returns The method that defines the metadata.
4701
4814
  */
4702
- function custom(metadata) {
4703
- return baseProperty(new CustomDecoratorConfigInternal(metadata), DecoratorTypes.CUSTOM);
4815
+ function custom(metadata, metadataKeysToReset) {
4816
+ return baseProperty(new CustomDecoratorConfigInternal(metadata), DecoratorTypes.CUSTOM, metadataKeysToReset);
4704
4817
  }
4705
4818
 
4706
4819
  /**