ngx-material-entity 16.0.7 → 16.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +10 -5
- package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +4 -2
- package/components/input/input.component.d.ts +28 -8
- package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +12 -2
- package/components/input/relations/references-many-input/references-many-input.component.d.ts +10 -2
- package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +4 -2
- package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +12 -2
- package/components/input/string/string-password-input/string-password-input.component.d.ts +12 -0
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +1 -1
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +1 -1
- package/components/table/table-data.builder.d.ts +2 -1
- package/components/table/table-data.d.ts +10 -0
- package/decorators/array/array-decorator-internal.data.d.ts +2 -1
- package/decorators/array/array-decorator.data.d.ts +3 -1
- package/decorators/string/string-decorator-internal.data.d.ts +3 -1
- package/decorators/string/string-decorator.data.d.ts +7 -1
- package/directives/dynamic-style-class.directive.d.ts +25 -0
- package/directives/included-in.directive.d.ts +1 -1
- package/directives/tooltip.directive.d.ts +9 -0
- package/esm2022/classes/entity.model.mjs +1 -1
- package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +1 -2
- package/esm2022/components/create-page/create-data.route.mjs +1 -1
- package/esm2022/components/create-page/create-page.component.mjs +11 -10
- package/esm2022/components/create-page/page-create-data.builder.mjs +1 -2
- package/esm2022/components/edit-page/edit-data.route.mjs +1 -1
- package/esm2022/components/edit-page/edit-page.component.mjs +11 -10
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +1 -2
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +28 -15
- package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +14 -19
- package/esm2022/components/input/base-input.component.mjs +6 -2
- package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +1 -1
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +1 -1
- package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +1 -1
- package/esm2022/components/input/custom/custom.component.mjs +1 -1
- package/esm2022/components/input/date/date-input/date-input.component.mjs +1 -1
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +1 -1
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-input/file-input.component.mjs +1 -2
- package/esm2022/components/input/input.component.mjs +72 -40
- package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +36 -8
- package/esm2022/components/input/number/number-input/number-input.component.mjs +1 -1
- package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +1 -1
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +29 -5
- package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +17 -10
- package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +36 -8
- package/esm2022/components/input/string/string-input/string-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +57 -3
- package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +1 -1
- package/esm2022/components/table/create-dialog/create-data.builder.mjs +1 -2
- package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +4 -4
- package/esm2022/components/table/display-column-value/display-column-value.component.mjs +1 -1
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +1 -2
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +8 -7
- package/esm2022/components/table/table-data.builder.mjs +5 -3
- package/esm2022/components/table/table-data.mjs +1 -1
- package/esm2022/components/table/table.component.mjs +6 -4
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +11 -3
- package/esm2022/decorators/array/array-decorator.data.mjs +1 -1
- package/esm2022/decorators/base/base-property.decorator.mjs +1 -2
- package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +2 -2
- package/esm2022/decorators/custom/custom-decorator.data.mjs +1 -1
- package/esm2022/decorators/file/file-decorator-internal.data.mjs +1 -3
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +1 -2
- package/esm2022/decorators/string/string-decorator-internal.data.mjs +14 -3
- package/esm2022/decorators/string/string-decorator.data.mjs +1 -1
- package/esm2022/default-global-configuration-values.mjs +1 -2
- package/esm2022/directives/dynamic-style-class.directive.mjs +51 -0
- package/esm2022/directives/included-in.directive.mjs +2 -3
- package/esm2022/directives/tooltip.directive.mjs +36 -9
- package/esm2022/encapsulation/reflect.utilities.mjs +6 -2
- package/esm2022/functions/default-style-classes.function.mjs +7 -0
- package/esm2022/functions/get-validation-error-message.function.mjs +1 -2
- package/esm2022/global-configuration-values.mjs +1 -2
- package/esm2022/mocks/placeholder-data.png.mjs +2 -2
- package/esm2022/public-api.mjs +6 -1
- package/esm2022/services/entity.service.mjs +1 -1
- package/esm2022/utilities/date.utilities.mjs +1 -2
- package/esm2022/utilities/entity.utilities.mjs +36 -35
- package/esm2022/utilities/validation.utilities.mjs +45 -15
- package/fesm2022/ngx-material-entity.mjs +521 -214
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/functions/default-style-classes.function.d.ts +6 -0
- package/package.json +1 -2
- package/public-api.d.ts +4 -0
- package/utilities/entity.utilities.d.ts +4 -3
- package/utilities/validation.utilities.d.ts +7 -3
|
@@ -24,7 +24,7 @@ import * as i5$1 from '@angular/material/tabs';
|
|
|
24
24
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
25
25
|
import * as i4$1 from '@angular/material/autocomplete';
|
|
26
26
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
27
|
-
import * as i6$
|
|
27
|
+
import * as i6$2 from '@angular/material/chips';
|
|
28
28
|
import { MatChipsModule } from '@angular/material/chips';
|
|
29
29
|
import * as i7 from '@angular/material/datepicker';
|
|
30
30
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
@@ -37,7 +37,7 @@ import * as i13 from '@angular/material/menu';
|
|
|
37
37
|
import { MatMenuModule } from '@angular/material/menu';
|
|
38
38
|
import * as i14 from '@angular/material/paginator';
|
|
39
39
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
40
|
-
import * as
|
|
40
|
+
import * as i6$1 from '@angular/material/select';
|
|
41
41
|
import { MatSelectModule } from '@angular/material/select';
|
|
42
42
|
import * as i4$2 from '@angular/material/slide-toggle';
|
|
43
43
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
@@ -45,7 +45,7 @@ import * as i4$3 from '@angular/material/slider';
|
|
|
45
45
|
import { MatSliderModule } from '@angular/material/slider';
|
|
46
46
|
import * as i17 from '@angular/material/sort';
|
|
47
47
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
48
|
-
import * as
|
|
48
|
+
import * as i9 from '@angular/material/table';
|
|
49
49
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
50
50
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
51
51
|
import * as uuid from 'uuid';
|
|
@@ -188,7 +188,11 @@ class ReflectUtilities {
|
|
|
188
188
|
* @returns The keys of the given object.
|
|
189
189
|
*/
|
|
190
190
|
static ownKeys(target) {
|
|
191
|
-
|
|
191
|
+
const res = [];
|
|
192
|
+
for (const key in target) {
|
|
193
|
+
res.push(key);
|
|
194
|
+
}
|
|
195
|
+
return res;
|
|
192
196
|
}
|
|
193
197
|
/**
|
|
194
198
|
* Gets the property of target, equivalent to `target[propertyKey]`.
|
|
@@ -249,7 +253,6 @@ function defaultTrue() {
|
|
|
249
253
|
return true;
|
|
250
254
|
}
|
|
251
255
|
|
|
252
|
-
// eslint-disable-next-line constCase/uppercase
|
|
253
256
|
const DAY_IN_MS = 1000 * 60 * 60 * 24;
|
|
254
257
|
/**
|
|
255
258
|
* Contains Helper Functions for handling date properties.
|
|
@@ -618,9 +621,9 @@ class EntityUtilities {
|
|
|
618
621
|
*/
|
|
619
622
|
static getOmitForUpdate(entity) {
|
|
620
623
|
const res = [];
|
|
621
|
-
for (const key
|
|
624
|
+
for (const key in entity) {
|
|
622
625
|
const metadata = this.getPropertyMetadata(entity, key);
|
|
623
|
-
if (metadata.omitForUpdate) {
|
|
626
|
+
if (!metadata || metadata.omitForUpdate) {
|
|
624
627
|
res.push(key);
|
|
625
628
|
}
|
|
626
629
|
}
|
|
@@ -633,9 +636,9 @@ class EntityUtilities {
|
|
|
633
636
|
*/
|
|
634
637
|
static getOmitForCreate(entity) {
|
|
635
638
|
const res = [];
|
|
636
|
-
for (const key
|
|
639
|
+
for (const key in entity) {
|
|
637
640
|
const metadata = this.getPropertyMetadata(entity, key);
|
|
638
|
-
if (metadata.omitForCreate) {
|
|
641
|
+
if (!metadata || metadata.omitForCreate) {
|
|
639
642
|
res.push(key);
|
|
640
643
|
}
|
|
641
644
|
}
|
|
@@ -688,7 +691,7 @@ class EntityUtilities {
|
|
|
688
691
|
static setDefaultValues(entity) {
|
|
689
692
|
for (const key in entity) {
|
|
690
693
|
const metadata = this.getPropertyMetadata(entity, key);
|
|
691
|
-
if (metadata
|
|
694
|
+
if (metadata?.default) {
|
|
692
695
|
// eslint-disable-next-line typescript/no-unsafe-assignment, typescript/no-explicit-any
|
|
693
696
|
entity[key] = metadata.default();
|
|
694
697
|
}
|
|
@@ -702,7 +705,7 @@ class EntityUtilities {
|
|
|
702
705
|
*/
|
|
703
706
|
static getFileProperties(entity, omit) {
|
|
704
707
|
const res = [];
|
|
705
|
-
for (const key
|
|
708
|
+
for (const key in entity) {
|
|
706
709
|
const type = this.getPropertyType(entity, key);
|
|
707
710
|
if (type === DecoratorTypes.FILE_DEFAULT || type === DecoratorTypes.FILE_IMAGE) {
|
|
708
711
|
const metadata = this.getPropertyMetadata(entity, key);
|
|
@@ -725,9 +728,9 @@ class EntityUtilities {
|
|
|
725
728
|
// eslint-disable-next-line typescript/no-unused-vars
|
|
726
729
|
type) {
|
|
727
730
|
const metadata = ReflectUtilities.getMetadata('metadata', entity, propertyKey);
|
|
728
|
-
if (metadata == null) {
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
+
// if (metadata == null) {
|
|
732
|
+
// throw new Error(`Could not find metadata for property ${String(propertyKey)} on the entity ${JSON.stringify(entity)}`);
|
|
733
|
+
// }
|
|
731
734
|
return metadata;
|
|
732
735
|
}
|
|
733
736
|
/**
|
|
@@ -738,16 +741,7 @@ class EntityUtilities {
|
|
|
738
741
|
* @throws Will throw an error if no metadata can be found for the given property.
|
|
739
742
|
*/
|
|
740
743
|
static getPropertyType(entity, propertyKey) {
|
|
741
|
-
|
|
742
|
-
const propertyType = ReflectUtilities.getMetadata('type', entity, propertyKey);
|
|
743
|
-
if (propertyType == null) {
|
|
744
|
-
throw new Error(`Could not find type metadata for property ${String(propertyKey)} on the entity ${JSON.stringify(entity)}`);
|
|
745
|
-
}
|
|
746
|
-
return propertyType;
|
|
747
|
-
}
|
|
748
|
-
catch (error) {
|
|
749
|
-
throw new Error(`Could not find type metadata for property ${String(propertyKey)} on the entity ${JSON.stringify(entity)}`);
|
|
750
|
-
}
|
|
744
|
+
return ReflectUtilities.getMetadata('type', entity, propertyKey);
|
|
751
745
|
}
|
|
752
746
|
/**
|
|
753
747
|
* Sets all property values based on a given entity data-object.
|
|
@@ -764,7 +758,9 @@ class EntityUtilities {
|
|
|
764
758
|
switch (type) {
|
|
765
759
|
case DecoratorTypes.OBJECT:
|
|
766
760
|
// eslint-disable-next-line typescript/no-explicit-any
|
|
767
|
-
const objectMetadata
|
|
761
|
+
const objectMetadata
|
|
762
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
763
|
+
= this.getPropertyMetadata(target, key, DecoratorTypes.OBJECT);
|
|
768
764
|
value = new objectMetadata.EntityClass(value);
|
|
769
765
|
break;
|
|
770
766
|
case DecoratorTypes.ARRAY:
|
|
@@ -772,7 +768,9 @@ class EntityUtilities {
|
|
|
772
768
|
const resArray = [];
|
|
773
769
|
if (inputArray) {
|
|
774
770
|
// eslint-disable-next-line typescript/no-explicit-any
|
|
775
|
-
const arrayMetadata
|
|
771
|
+
const arrayMetadata
|
|
772
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
773
|
+
= this.getPropertyMetadata(target, key, DecoratorTypes.ARRAY);
|
|
776
774
|
for (const item of inputArray) {
|
|
777
775
|
const itemWithMetadata = new arrayMetadata.EntityClass(item);
|
|
778
776
|
resArray.push(itemWithMetadata);
|
|
@@ -813,9 +811,9 @@ class EntityUtilities {
|
|
|
813
811
|
*/
|
|
814
812
|
static async getDifferencesBetweenEntities(entity, entityPriorChanges, http) {
|
|
815
813
|
const res = [];
|
|
816
|
-
for (const key
|
|
817
|
-
const metadata = this.getPropertyMetadata(entity, key);
|
|
814
|
+
for (const key in entity) {
|
|
818
815
|
const type = this.getPropertyType(entity, key);
|
|
816
|
+
const metadata = this.getPropertyMetadata(entity, key);
|
|
819
817
|
if (!(await this.isEqual(entity[key], entityPriorChanges[key], metadata, type, http))) {
|
|
820
818
|
res.push({
|
|
821
819
|
key: key,
|
|
@@ -932,7 +930,6 @@ class EntityUtilities {
|
|
|
932
930
|
if (dateRange?.start && dateRange.end) {
|
|
933
931
|
dateRange.values = DateUtilities.getDatesBetween(dateRange.start, dateRange.end, filter);
|
|
934
932
|
}
|
|
935
|
-
// eslint-disable-next-line max-len
|
|
936
933
|
const dateRangePriorChanges = LodashUtilities.cloneDeep(valuePriorChanges);
|
|
937
934
|
if (dateRangePriorChanges?.start) {
|
|
938
935
|
dateRangePriorChanges.start = new Date(dateRangePriorChanges.start);
|
|
@@ -1001,6 +998,9 @@ class EntityUtilities {
|
|
|
1001
998
|
static compareOrder(a, b, entity) {
|
|
1002
999
|
const metadataA = this.getPropertyMetadata(entity, a);
|
|
1003
1000
|
const metadataB = this.getPropertyMetadata(entity, b);
|
|
1001
|
+
if (!metadataA || !metadataB) {
|
|
1002
|
+
return 0;
|
|
1003
|
+
}
|
|
1004
1004
|
if (metadataA.position.order === -1) {
|
|
1005
1005
|
if (metadataB.position.order === -1) {
|
|
1006
1006
|
return 0;
|
|
@@ -1017,9 +1017,13 @@ class EntityUtilities {
|
|
|
1017
1017
|
* @param entity - Entity to get the bootstrap column values of the key.
|
|
1018
1018
|
* @param key - Key of the property to get bootstrap column values from.
|
|
1019
1019
|
* @returns Bootstrap column classes.
|
|
1020
|
+
* @throws When no metadata for the given key was found.
|
|
1020
1021
|
*/
|
|
1021
1022
|
static getWidthClasses(entity, key) {
|
|
1022
1023
|
const metadata = this.getPropertyMetadata(entity, key);
|
|
1024
|
+
if (!metadata) {
|
|
1025
|
+
throw new Error(`Could not get metadata for property "${key.toString()}"`);
|
|
1026
|
+
}
|
|
1023
1027
|
return `col-lg-${metadata.defaultWidths[0]} col-md-${metadata.defaultWidths[1]} col-sm-${metadata.defaultWidths[2]}`;
|
|
1024
1028
|
}
|
|
1025
1029
|
/**
|
|
@@ -1074,7 +1078,6 @@ class EntityUtilities {
|
|
|
1074
1078
|
const keys = this.keysOf(entity, injector, hideOmitForCreate, hideOmitForEdit)
|
|
1075
1079
|
.filter(k => !additionalOmitValues.includes(k));
|
|
1076
1080
|
const numberOfTabs = this.getNumberOfTabs(keys, entity);
|
|
1077
|
-
// eslint-disable-next-line max-len
|
|
1078
1081
|
const firstTabRows = this.getEntityRows(entity, -1, hideOmitForCreate, hideOmitForEdit, additionalOmitValues, injector);
|
|
1079
1082
|
if (firstTabRows.length) {
|
|
1080
1083
|
const firstTab = {
|
|
@@ -1099,31 +1102,32 @@ class EntityUtilities {
|
|
|
1099
1102
|
}
|
|
1100
1103
|
static getKeysForRow(keys, entity, row, tab) {
|
|
1101
1104
|
return keys
|
|
1102
|
-
.filter(k => this.getPropertyMetadata(entity, k)
|
|
1103
|
-
.filter(k => this.getPropertyMetadata(entity, k)
|
|
1105
|
+
.filter(k => this.getPropertyMetadata(entity, k)?.position.row === row)
|
|
1106
|
+
.filter(k => this.getPropertyMetadata(entity, k)?.position.tab === tab)
|
|
1104
1107
|
.sort((a, b) => this.compareOrder(a, b, entity));
|
|
1105
1108
|
}
|
|
1106
1109
|
static getNumberOfRows(keys, entity, tab) {
|
|
1107
1110
|
return keys
|
|
1108
|
-
.filter(k => this.getPropertyMetadata(entity, k)
|
|
1109
|
-
.map(k => this.getPropertyMetadata(entity, k)
|
|
1111
|
+
.filter(k => this.getPropertyMetadata(entity, k)?.position.tab === tab)
|
|
1112
|
+
.map(k => this.getPropertyMetadata(entity, k)?.position.row)
|
|
1110
1113
|
.sort((a, b) => (a > b ? -1 : 1))[0];
|
|
1111
1114
|
}
|
|
1112
1115
|
static getNumberOfTabs(keys, entity) {
|
|
1113
1116
|
return keys
|
|
1114
|
-
.
|
|
1117
|
+
.filter(k => this.getPropertyMetadata(entity, k) != null)
|
|
1118
|
+
.map(k => this.getPropertyMetadata(entity, k)?.position.tab)
|
|
1115
1119
|
.sort((a, b) => (a > b ? -1 : 1))[0];
|
|
1116
1120
|
}
|
|
1117
1121
|
static getTabName(entity, tab) {
|
|
1118
1122
|
const providedTabName = ReflectUtilities.ownKeys(entity)
|
|
1119
1123
|
.map(k => this.getPropertyMetadata(entity, k))
|
|
1120
|
-
.find(m => m
|
|
1124
|
+
.find(m => m?.position.tab === tab && m.position.tabName)?.position.tabName;
|
|
1121
1125
|
return providedTabName ?? `Tab ${tab}`;
|
|
1122
1126
|
}
|
|
1123
1127
|
static getFirstTabName(entity) {
|
|
1124
1128
|
const providedTabName = ReflectUtilities.ownKeys(entity)
|
|
1125
1129
|
.map(k => this.getPropertyMetadata(entity, k))
|
|
1126
|
-
.find(m => m
|
|
1130
|
+
.find(m => m?.position.tabName && m.position.tab === -1)?.position.tabName;
|
|
1127
1131
|
return providedTabName ?? 'Tab 1';
|
|
1128
1132
|
}
|
|
1129
1133
|
/**
|
|
@@ -1150,9 +1154,9 @@ class EntityUtilities {
|
|
|
1150
1154
|
}
|
|
1151
1155
|
static getDontDisplayKeys(entity, injector) {
|
|
1152
1156
|
const res = [];
|
|
1153
|
-
for (const key
|
|
1157
|
+
for (const key in entity) {
|
|
1154
1158
|
const metadata = this.getPropertyMetadata(entity, key);
|
|
1155
|
-
if (runInInjectionContext(injector, () => !metadata.display(entity))) {
|
|
1159
|
+
if (runInInjectionContext(injector, () => !metadata || !metadata.display(entity))) {
|
|
1156
1160
|
res.push(key);
|
|
1157
1161
|
}
|
|
1158
1162
|
}
|
|
@@ -1171,7 +1175,6 @@ function baseProperty(metadata, type, metadataKeysToReset) {
|
|
|
1171
1175
|
return function (target, propertyKey) {
|
|
1172
1176
|
ReflectUtilities.defineMetadata('metadata', metadata, target, propertyKey);
|
|
1173
1177
|
ReflectUtilities.defineMetadata('type', type, target, propertyKey);
|
|
1174
|
-
// eslint-disable-next-line max-len
|
|
1175
1178
|
ReflectUtilities.defineMetadata(EntityUtilities.METADATA_KEYS_TO_RESET_KEY, metadataKeysToReset, target, propertyKey);
|
|
1176
1179
|
};
|
|
1177
1180
|
}
|
|
@@ -1349,7 +1352,7 @@ class TextboxStringDecoratorConfigInternal extends PropertyDecoratorConfigIntern
|
|
|
1349
1352
|
class AutocompleteStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
1350
1353
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1351
1354
|
displayStyle;
|
|
1352
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1355
|
+
// eslint-disable-next-line jsdoc/require-jsdoc, typescript/no-explicit-any
|
|
1353
1356
|
autocompleteValues;
|
|
1354
1357
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1355
1358
|
minLength;
|
|
@@ -1362,12 +1365,20 @@ class AutocompleteStringDecoratorConfigInternal extends PropertyDecoratorConfigI
|
|
|
1362
1365
|
constructor(data) {
|
|
1363
1366
|
super(data);
|
|
1364
1367
|
this.displayStyle = data.displayStyle;
|
|
1365
|
-
this.autocompleteValues = data.autocompleteValues;
|
|
1368
|
+
this.autocompleteValues = this.autocompleteValuesToFunction(data.autocompleteValues);
|
|
1366
1369
|
this.minLength = data.minLength;
|
|
1367
1370
|
this.maxLength = data.maxLength;
|
|
1368
1371
|
this.regex = data.regex;
|
|
1369
1372
|
this.restrictToOptions = data.restrictToOptions;
|
|
1370
1373
|
}
|
|
1374
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
1375
|
+
autocompleteValuesToFunction(autocompleteValues) {
|
|
1376
|
+
if (Array.isArray(autocompleteValues)) {
|
|
1377
|
+
return async () => autocompleteValues;
|
|
1378
|
+
}
|
|
1379
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
1380
|
+
return async (e) => await autocompleteValues(e);
|
|
1381
|
+
}
|
|
1371
1382
|
}
|
|
1372
1383
|
/**
|
|
1373
1384
|
* The internal PasswordStringDecoratorConfig. Sets default values.
|
|
@@ -1385,6 +1396,8 @@ class PasswordStringDecoratorConfigInternal extends PropertyDecoratorConfigInter
|
|
|
1385
1396
|
needsConfirmation;
|
|
1386
1397
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1387
1398
|
confirmationDisplayName;
|
|
1399
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1400
|
+
displayPasswordStrength;
|
|
1388
1401
|
constructor(data) {
|
|
1389
1402
|
super(data);
|
|
1390
1403
|
this.displayStyle = data.displayStyle;
|
|
@@ -1393,6 +1406,7 @@ class PasswordStringDecoratorConfigInternal extends PropertyDecoratorConfigInter
|
|
|
1393
1406
|
this.regex = data.regex;
|
|
1394
1407
|
this.needsConfirmation = data.needsConfirmation ?? true;
|
|
1395
1408
|
this.confirmationDisplayName = data.confirmationDisplayName ?? 'Confirm Password';
|
|
1409
|
+
this.displayPasswordStrength = data.displayPasswordStrength ?? true;
|
|
1396
1410
|
this.defaultWidths = data.defaultWidths ?? [12, 12, 12];
|
|
1397
1411
|
}
|
|
1398
1412
|
}
|
|
@@ -1445,7 +1459,6 @@ __decorate([
|
|
|
1445
1459
|
/**
|
|
1446
1460
|
* The provider for global configuration values.
|
|
1447
1461
|
*/
|
|
1448
|
-
// eslint-disable-next-line max-len, constCase/uppercase
|
|
1449
1462
|
const NGX_GLOBAL_DEFAULT_VALUES = new InjectionToken('NGX_GLOBAL_DEFAULT_VALUES', {
|
|
1450
1463
|
providedIn: 'root',
|
|
1451
1464
|
factory: () => {
|
|
@@ -1543,7 +1556,6 @@ const needsUpdateGlobalDefaults = {
|
|
|
1543
1556
|
/**
|
|
1544
1557
|
* The internal values consisting of default ones and values provided by the user in NGX_GLOBAL_DEFAULT_VALUES.
|
|
1545
1558
|
*/
|
|
1546
|
-
// eslint-disable-next-line constCase/uppercase
|
|
1547
1559
|
const NGX_INTERNAL_GLOBAL_DEFAULT_VALUES = new InjectionToken('NGX_INTERNAL_GLOBAL_DEFAULT_VALUES', {
|
|
1548
1560
|
providedIn: 'root',
|
|
1549
1561
|
factory: () => {
|
|
@@ -1657,7 +1669,6 @@ class ConfirmDialogDataBuilder extends BaseBuilder {
|
|
|
1657
1669
|
return;
|
|
1658
1670
|
}
|
|
1659
1671
|
if (data.requireConfirmation === true && !data.confirmationText) {
|
|
1660
|
-
// eslint-disable-next-line max-len
|
|
1661
1672
|
throw new Error('Missing required Input data "confirmationText". You can only omit this value when "requireConfirmation" is false.');
|
|
1662
1673
|
}
|
|
1663
1674
|
if (data.requireConfirmation !== true && data.confirmationText) {
|
|
@@ -2051,22 +2062,24 @@ class ValidationUtilities {
|
|
|
2051
2062
|
* Checks if the values on an entity are valid.
|
|
2052
2063
|
* Also checks all the validators given by the metadata ("required", "maxLength" etc.).
|
|
2053
2064
|
* @param entity - The entity to validate.
|
|
2065
|
+
* @param injector - An angular environment injector.
|
|
2054
2066
|
* @param omit - Whether to check for creating or editing validity.
|
|
2055
2067
|
* @returns Whether or not the entity is valid.
|
|
2056
2068
|
*/
|
|
2057
|
-
static isEntityValid(entity, omit) {
|
|
2058
|
-
return this.getEntityValidationErrors(entity, omit).length === 0;
|
|
2069
|
+
static async isEntityValid(entity, injector, omit) {
|
|
2070
|
+
return (await this.getEntityValidationErrors(entity, injector, omit)).length === 0;
|
|
2059
2071
|
}
|
|
2060
2072
|
/**
|
|
2061
2073
|
* Gets all validation errors on the given entity.
|
|
2062
2074
|
* @param entity - The entity to validate.
|
|
2075
|
+
* @param injector - An angular environment injector.
|
|
2063
2076
|
* @param omit - What keys not to check. An empty value means no keys are omitted.
|
|
2064
2077
|
* @returns An array of validation errors on the provided entity.
|
|
2065
2078
|
*/
|
|
2066
|
-
static getEntityValidationErrors(entity, omit) {
|
|
2079
|
+
static async getEntityValidationErrors(entity, injector, omit) {
|
|
2067
2080
|
const res = [];
|
|
2068
|
-
for (const key
|
|
2069
|
-
const err = this.getPropertyValidationError(entity, key, omit);
|
|
2081
|
+
for (const key of EntityUtilities.keysOf(entity, injector)) {
|
|
2082
|
+
const err = await this.getPropertyValidationError(entity, key, omit);
|
|
2070
2083
|
if (err) {
|
|
2071
2084
|
res.push(err);
|
|
2072
2085
|
}
|
|
@@ -2097,9 +2110,16 @@ class ValidationUtilities {
|
|
|
2097
2110
|
* @returns A validation error when the property is not valid, undefined otherwise.
|
|
2098
2111
|
* @throws When the type of the property is not known.
|
|
2099
2112
|
*/
|
|
2100
|
-
static getPropertyValidationError(entity, key, omit) {
|
|
2113
|
+
static async getPropertyValidationError(entity, key, omit) {
|
|
2101
2114
|
const type = EntityUtilities.getPropertyType(entity, key);
|
|
2115
|
+
if (type == null) {
|
|
2116
|
+
return undefined;
|
|
2117
|
+
}
|
|
2102
2118
|
const metadata = EntityUtilities.getPropertyMetadata(entity, key, type);
|
|
2119
|
+
// istanbul ignore next
|
|
2120
|
+
if (metadata == null) {
|
|
2121
|
+
return undefined;
|
|
2122
|
+
}
|
|
2103
2123
|
if (metadata.omitForCreate && omit === 'create') {
|
|
2104
2124
|
return undefined;
|
|
2105
2125
|
}
|
|
@@ -2135,9 +2155,8 @@ class ValidationUtilities {
|
|
|
2135
2155
|
return this.getStringValidationError(entityString, stringMetadata);
|
|
2136
2156
|
case DecoratorTypes.STRING_AUTOCOMPLETE:
|
|
2137
2157
|
const entityAutocompleteString = entity[key];
|
|
2138
|
-
// eslint-disable-next-line max-len
|
|
2139
2158
|
const stringAutocompleteMetadata = metadata;
|
|
2140
|
-
return this.getAutocompleteStringValidationError(entityAutocompleteString, stringAutocompleteMetadata);
|
|
2159
|
+
return this.getAutocompleteStringValidationError(entity, entityAutocompleteString, stringAutocompleteMetadata);
|
|
2141
2160
|
case DecoratorTypes.STRING_TEXTBOX:
|
|
2142
2161
|
const entityTextbox = entity[key];
|
|
2143
2162
|
const textboxMetadata = metadata;
|
|
@@ -2161,7 +2180,7 @@ class ValidationUtilities {
|
|
|
2161
2180
|
const value = entityObject[parameterKey];
|
|
2162
2181
|
if (!metadata.omit.includes(parameterKey)
|
|
2163
2182
|
&& !(!metadata.required(entity) && (value == null || value == ''))) {
|
|
2164
|
-
const err = this.getPropertyValidationError(entityObject, parameterKey, omit);
|
|
2183
|
+
const err = await this.getPropertyValidationError(entityObject, parameterKey, omit);
|
|
2165
2184
|
if (err) {
|
|
2166
2185
|
return {
|
|
2167
2186
|
property: metadata.displayName,
|
|
@@ -2171,14 +2190,16 @@ class ValidationUtilities {
|
|
|
2171
2190
|
}
|
|
2172
2191
|
}
|
|
2173
2192
|
break;
|
|
2174
|
-
case DecoratorTypes.ARRAY_STRING_CHIPS:
|
|
2175
2193
|
case DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS:
|
|
2194
|
+
const stringAutocompleteArray = entity[key];
|
|
2195
|
+
const stringAutocompleteArrayMetadata = metadata;
|
|
2196
|
+
return await this.getArrayStringAutocompleteChipsValidationError(entity, stringAutocompleteArrayMetadata, stringAutocompleteArray);
|
|
2197
|
+
case DecoratorTypes.ARRAY_STRING_CHIPS:
|
|
2176
2198
|
case DecoratorTypes.ARRAY_DATE:
|
|
2177
2199
|
case DecoratorTypes.ARRAY_DATE_TIME:
|
|
2178
2200
|
case DecoratorTypes.ARRAY_DATE_RANGE:
|
|
2179
2201
|
case DecoratorTypes.ARRAY:
|
|
2180
2202
|
const entityArray = entity[key];
|
|
2181
|
-
// eslint-disable-next-line max-len
|
|
2182
2203
|
const arrayMetadata = metadata;
|
|
2183
2204
|
if (arrayMetadata.required(entity) && !entityArray.length) {
|
|
2184
2205
|
return {
|
|
@@ -2210,7 +2231,7 @@ class ValidationUtilities {
|
|
|
2210
2231
|
case DecoratorTypes.HAS_MANY:
|
|
2211
2232
|
break;
|
|
2212
2233
|
case DecoratorTypes.CUSTOM:
|
|
2213
|
-
// eslint-disable-next-line typescript/no-explicit-any
|
|
2234
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
2214
2235
|
const customMetadata = metadata;
|
|
2215
2236
|
if (!customMetadata.isValid(entity[key], omit)) {
|
|
2216
2237
|
return {
|
|
@@ -2224,6 +2245,26 @@ class ValidationUtilities {
|
|
|
2224
2245
|
}
|
|
2225
2246
|
return undefined;
|
|
2226
2247
|
}
|
|
2248
|
+
static async getArrayStringAutocompleteChipsValidationError(entity, metadata, stringAutocompleteArray) {
|
|
2249
|
+
if (metadata.required(entity) && !stringAutocompleteArray.length) {
|
|
2250
|
+
return {
|
|
2251
|
+
property: metadata.displayName,
|
|
2252
|
+
message: 'no items in array'
|
|
2253
|
+
};
|
|
2254
|
+
}
|
|
2255
|
+
if (metadata.restrictToOptions == true) {
|
|
2256
|
+
const autocompleteValues = await metadata.autocompleteValues(entity);
|
|
2257
|
+
for (const value of stringAutocompleteArray) {
|
|
2258
|
+
if (!autocompleteValues.includes(value)) {
|
|
2259
|
+
return {
|
|
2260
|
+
property: metadata.displayName,
|
|
2261
|
+
message: `The value "${value}" needs to be one of the provided values`
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
return undefined;
|
|
2267
|
+
}
|
|
2227
2268
|
static getBooleanValidationError(entity, value, metadata) {
|
|
2228
2269
|
if (metadata.required(entity) && !value) {
|
|
2229
2270
|
return {
|
|
@@ -2254,7 +2295,7 @@ class ValidationUtilities {
|
|
|
2254
2295
|
}
|
|
2255
2296
|
return undefined;
|
|
2256
2297
|
}
|
|
2257
|
-
static getAutocompleteStringValidationError(value, metadata) {
|
|
2298
|
+
static async getAutocompleteStringValidationError(entity, value, metadata) {
|
|
2258
2299
|
if (metadata.maxLength && value.length > metadata.maxLength) {
|
|
2259
2300
|
return {
|
|
2260
2301
|
property: metadata.displayName,
|
|
@@ -2273,7 +2314,7 @@ class ValidationUtilities {
|
|
|
2273
2314
|
message: 'invalid'
|
|
2274
2315
|
};
|
|
2275
2316
|
}
|
|
2276
|
-
if (metadata.restrictToOptions == true && !metadata.autocompleteValues.includes(value)) {
|
|
2317
|
+
if (metadata.restrictToOptions == true && !(await metadata.autocompleteValues(entity)).includes(value)) {
|
|
2277
2318
|
return {
|
|
2278
2319
|
property: metadata.displayName,
|
|
2279
2320
|
message: 'Needs to be one of the provided values'
|
|
@@ -2595,10 +2636,9 @@ class IncludedInValidatorDirective {
|
|
|
2595
2636
|
includedIn;
|
|
2596
2637
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
2597
2638
|
validate(control) {
|
|
2598
|
-
if (!this.includedIn?.length) {
|
|
2639
|
+
if (!this.includedIn?.length || !(Boolean(control.value))) {
|
|
2599
2640
|
return null;
|
|
2600
2641
|
}
|
|
2601
|
-
// eslint-disable-next-line typescript/no-unsafe-assignment
|
|
2602
2642
|
return this.includedIn.includes(control.value) ? null : { includedIn: { value: control.value, validValues: this.includedIn } };
|
|
2603
2643
|
}
|
|
2604
2644
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: IncludedInValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2732,10 +2772,24 @@ class TooltipDirective {
|
|
|
2732
2772
|
tooltip;
|
|
2733
2773
|
tooltipElement;
|
|
2734
2774
|
closeListeners = [];
|
|
2775
|
+
openedByClick = false;
|
|
2735
2776
|
constructor(el, renderer) {
|
|
2736
2777
|
this.el = el;
|
|
2737
2778
|
this.renderer = renderer;
|
|
2738
2779
|
}
|
|
2780
|
+
/**
|
|
2781
|
+
* Toggles the tooltip.
|
|
2782
|
+
*/
|
|
2783
|
+
onClick() {
|
|
2784
|
+
if (!this.tooltipElement) {
|
|
2785
|
+
this.showTooltip();
|
|
2786
|
+
this.registerCloseListeners();
|
|
2787
|
+
this.openedByClick = true;
|
|
2788
|
+
return;
|
|
2789
|
+
}
|
|
2790
|
+
this.hideTooltip();
|
|
2791
|
+
this.removeCloseListeners();
|
|
2792
|
+
}
|
|
2739
2793
|
/**
|
|
2740
2794
|
* Shows the tooltip.
|
|
2741
2795
|
*/
|
|
@@ -2743,16 +2797,28 @@ class TooltipDirective {
|
|
|
2743
2797
|
if (!this.tooltipElement) {
|
|
2744
2798
|
this.showTooltip();
|
|
2745
2799
|
this.registerCloseListeners();
|
|
2800
|
+
return;
|
|
2746
2801
|
}
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
this.removeCloseListeners();
|
|
2802
|
+
if (this.openedByClick) {
|
|
2803
|
+
return;
|
|
2750
2804
|
}
|
|
2805
|
+
this.hideTooltip();
|
|
2806
|
+
this.removeCloseListeners();
|
|
2751
2807
|
}
|
|
2752
2808
|
/**
|
|
2753
2809
|
* Hides the tooltip.
|
|
2754
2810
|
*/
|
|
2755
2811
|
onMouseLeave() {
|
|
2812
|
+
if (this.openedByClick) {
|
|
2813
|
+
return;
|
|
2814
|
+
}
|
|
2815
|
+
this.hideTooltip();
|
|
2816
|
+
this.removeCloseListeners();
|
|
2817
|
+
}
|
|
2818
|
+
/**
|
|
2819
|
+
* Hides the tooltip.
|
|
2820
|
+
*/
|
|
2821
|
+
onResize() {
|
|
2756
2822
|
this.hideTooltip();
|
|
2757
2823
|
this.removeCloseListeners();
|
|
2758
2824
|
}
|
|
@@ -2795,12 +2861,13 @@ class TooltipDirective {
|
|
|
2795
2861
|
listener();
|
|
2796
2862
|
}
|
|
2797
2863
|
this.closeListeners = [];
|
|
2864
|
+
this.openedByClick = false;
|
|
2798
2865
|
}
|
|
2799
2866
|
ngOnDestroy() {
|
|
2800
2867
|
this.removeCloseListeners();
|
|
2801
2868
|
}
|
|
2802
2869
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2803
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip" }, host: { listeners: { "
|
|
2870
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip" }, host: { listeners: { "click": "onClick()", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "window:resize": "onResize()" } }, ngImport: i0 });
|
|
2804
2871
|
}
|
|
2805
2872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
2806
2873
|
type: Directive,
|
|
@@ -2810,16 +2877,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
2810
2877
|
}]
|
|
2811
2878
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { tooltip: [{
|
|
2812
2879
|
type: Input
|
|
2880
|
+
}], onClick: [{
|
|
2881
|
+
type: HostListener,
|
|
2882
|
+
args: ['click']
|
|
2813
2883
|
}], onMouseEnter: [{
|
|
2814
2884
|
type: HostListener,
|
|
2815
2885
|
args: ['mouseenter']
|
|
2816
|
-
}, {
|
|
2817
|
-
type: HostListener,
|
|
2818
|
-
args: ['click']
|
|
2819
2886
|
}], onMouseLeave: [{
|
|
2820
2887
|
type: HostListener,
|
|
2821
2888
|
args: ['mouseleave']
|
|
2822
|
-
}, {
|
|
2889
|
+
}], onResize: [{
|
|
2823
2890
|
type: HostListener,
|
|
2824
2891
|
args: ['window:resize']
|
|
2825
2892
|
}] } });
|
|
@@ -3081,7 +3148,7 @@ class StringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInt
|
|
|
3081
3148
|
* The internal AutocompleteStringChipsArrayDecoratorConfig. Sets default values.
|
|
3082
3149
|
*/
|
|
3083
3150
|
class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
3084
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3151
|
+
// eslint-disable-next-line jsdoc/require-jsdoc, typescript/no-explicit-any
|
|
3085
3152
|
autocompleteValues;
|
|
3086
3153
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3087
3154
|
itemType;
|
|
@@ -3101,7 +3168,7 @@ class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecora
|
|
|
3101
3168
|
restrictToOptions;
|
|
3102
3169
|
constructor(data, globalConfig) {
|
|
3103
3170
|
super(data);
|
|
3104
|
-
this.autocompleteValues = data.autocompleteValues;
|
|
3171
|
+
this.autocompleteValues = this.autocompleteValuesToFunction(data.autocompleteValues);
|
|
3105
3172
|
this.deleteIcon = data.deleteIcon ?? 'fas fa-circle-minus';
|
|
3106
3173
|
this.itemType = data.itemType;
|
|
3107
3174
|
this.allowDuplicates = data.allowDuplicates ?? false;
|
|
@@ -3112,6 +3179,14 @@ class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecora
|
|
|
3112
3179
|
this.restrictToOptions = data.restrictToOptions;
|
|
3113
3180
|
this.defaultWidths = data.defaultWidths ?? [6, 12, 12];
|
|
3114
3181
|
}
|
|
3182
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
3183
|
+
autocompleteValuesToFunction(autocompleteValues) {
|
|
3184
|
+
if (Array.isArray(autocompleteValues)) {
|
|
3185
|
+
return async () => autocompleteValues;
|
|
3186
|
+
}
|
|
3187
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
3188
|
+
return async (e) => await autocompleteValues(e);
|
|
3189
|
+
}
|
|
3115
3190
|
}
|
|
3116
3191
|
/**
|
|
3117
3192
|
* Gets the default dialog data for the error dialog to display when the user tries to add a duplicate value.
|
|
@@ -3246,7 +3321,11 @@ class NgxMatEntityBaseInputComponent {
|
|
|
3246
3321
|
*/
|
|
3247
3322
|
name;
|
|
3248
3323
|
ngOnInit() {
|
|
3249
|
-
|
|
3324
|
+
const foundMetadata = EntityUtilities.getPropertyMetadata(this.entity, this.key);
|
|
3325
|
+
if (!foundMetadata) {
|
|
3326
|
+
throw new Error(`No metadata was found for the key "${String(this.key)}"`);
|
|
3327
|
+
}
|
|
3328
|
+
this.metadata = foundMetadata;
|
|
3250
3329
|
this.name = this.key.toString() + UUIDUtilities.create();
|
|
3251
3330
|
}
|
|
3252
3331
|
/**
|
|
@@ -3376,7 +3455,7 @@ class ArrayDateInputComponent extends ArrayTableComponent {
|
|
|
3376
3455
|
ReflectUtilities.defineMetadata('metadata', this.metadata, this.entity, this.key);
|
|
3377
3456
|
}
|
|
3378
3457
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayDateInputComponent, deps: [{ token: i1.MatDialog }, { token: i0.EnvironmentInjector }, { token: i2$1.HttpClient }, { token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }], target: i0.ɵɵFactoryTarget.Component });
|
|
3379
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayDateInputComponent, selector: "array-date-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n <div *ngIf=\"!isReadOnly\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.min ? metadata.min(input) : undefined\"\n [max]=\"metadata.max ? metadata.max(input) : undefined\"\n [matDatepickerFilter]=\"metadata.filter ?? DateUtilities.defaultDateFilter\"\n [(ngModel)]=\"input\"\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 \n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"model.errors\"\n (click)=\"add()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n </div>\n\n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [disabled]=\"!dataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\" [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\" (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\">\n {{getDisplayColumnValue(entity, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <div *ngIf=\"metadata.required(entity) && !dataSource.data.length\" class=\"array-error\">\n {{metadata.missingErrorMessage}}\n </div>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}mat-form-field{width:100%}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}.array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}\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: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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:
|
|
3458
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayDateInputComponent, selector: "array-date-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n <div *ngIf=\"!isReadOnly\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.min ? metadata.min(input) : undefined\"\n [max]=\"metadata.max ? metadata.max(input) : undefined\"\n [matDatepickerFilter]=\"metadata.filter ?? DateUtilities.defaultDateFilter\"\n [(ngModel)]=\"input\"\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 \n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"model.errors\"\n (click)=\"add()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n </div>\n\n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [disabled]=\"!dataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\" [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\" (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\">\n {{getDisplayColumnValue(entity, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <div *ngIf=\"metadata.required(entity) && !dataSource.data.length\" class=\"array-error\">\n {{metadata.missingErrorMessage}}\n </div>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}mat-form-field{width:100%}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}.array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}\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: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }] });
|
|
3380
3459
|
}
|
|
3381
3460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayDateInputComponent, decorators: [{
|
|
3382
3461
|
type: Component,
|
|
@@ -3425,7 +3504,7 @@ class ArrayDateRangeInputComponent extends ArrayTableComponent {
|
|
|
3425
3504
|
this.dateRangeEnd = undefined;
|
|
3426
3505
|
}
|
|
3427
3506
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayDateRangeInputComponent, deps: [{ token: i1.MatDialog }, { token: i0.EnvironmentInjector }, { token: i2$1.HttpClient }, { token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }], target: i0.ɵɵFactoryTarget.Component });
|
|
3428
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayDateRangeInputComponent, selector: "array-date-range-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n <div *ngIf=\"!isReadOnly\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n \n <mat-date-range-input [rangePicker]=\"picker\" [required]=\"metadata.required(entity)\" [dateFilter]=\"metadata.filter ? metadata.filter : DateUtilities.defaultDateFilter\">\n <input #startModel=\"ngModel\"\n matStartDate\n [name]=\"name + 'start'\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minStart ? metadata.minStart(input?.start) : undefined\"\n [max]=\"metadata.maxStart ? metadata.maxStart(input?.start) : undefined\"\n [placeholder]=\"metadata.placeholderStart\"\n [(ngModel)]=\"dateRangeStart\"\n >\n <input #endModel=\"ngModel\"\n matEndDate\n [name]=\"name + 'end'\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minEnd ? metadata.minEnd(input?.end) : undefined\"\n [max]=\"metadata.maxEnd ? metadata.maxEnd(input?.end) : undefined\"\n [placeholder]=\"metadata.placeholderEnd\"\n [(ngModel)]=\"dateRangeEnd\"\n >\n </mat-date-range-input>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker #picker></mat-date-range-picker>\n \n <mat-error *ngIf=\"startModel.errors\">{{getValidationErrorMessage(startModel)}}</mat-error>\n <mat-error *ngIf=\"!startModel.errors && endModel.errors\">{{getValidationErrorMessage(endModel)}}</mat-error>\n </mat-form-field>\n \n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"startModel.errors || endModel.errors\"\n (click)=\"addDateRange()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n </div>\n\n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [disabled]=\"!dataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\" [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\" (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\">\n {{getDisplayColumnValue(entity, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <div *ngIf=\"metadata.required(entity) && !dataSource.data.length\" class=\"array-error\">\n {{metadata.missingErrorMessage}}\n </div>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}mat-form-field{width:100%}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}.array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}\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: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i7.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i7.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i7.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i7.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type:
|
|
3507
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayDateRangeInputComponent, selector: "array-date-range-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n <div *ngIf=\"!isReadOnly\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n \n <mat-date-range-input [rangePicker]=\"picker\" [required]=\"metadata.required(entity)\" [dateFilter]=\"metadata.filter ? metadata.filter : DateUtilities.defaultDateFilter\">\n <input #startModel=\"ngModel\"\n matStartDate\n [name]=\"name + 'start'\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minStart ? metadata.minStart(input?.start) : undefined\"\n [max]=\"metadata.maxStart ? metadata.maxStart(input?.start) : undefined\"\n [placeholder]=\"metadata.placeholderStart\"\n [(ngModel)]=\"dateRangeStart\"\n >\n <input #endModel=\"ngModel\"\n matEndDate\n [name]=\"name + 'end'\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minEnd ? metadata.minEnd(input?.end) : undefined\"\n [max]=\"metadata.maxEnd ? metadata.maxEnd(input?.end) : undefined\"\n [placeholder]=\"metadata.placeholderEnd\"\n [(ngModel)]=\"dateRangeEnd\"\n >\n </mat-date-range-input>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker #picker></mat-date-range-picker>\n \n <mat-error *ngIf=\"startModel.errors\">{{getValidationErrorMessage(startModel)}}</mat-error>\n <mat-error *ngIf=\"!startModel.errors && endModel.errors\">{{getValidationErrorMessage(endModel)}}</mat-error>\n </mat-form-field>\n \n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"startModel.errors || endModel.errors\"\n (click)=\"addDateRange()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n </div>\n\n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [disabled]=\"!dataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\" [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\" (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\">\n {{getDisplayColumnValue(entity, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <div *ngIf=\"metadata.required(entity) && !dataSource.data.length\" class=\"array-error\">\n {{metadata.missingErrorMessage}}\n </div>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}mat-form-field{width:100%}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}.array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}\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: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i7.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i7.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i7.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i7.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }] });
|
|
3429
3508
|
}
|
|
3430
3509
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayDateRangeInputComponent, decorators: [{
|
|
3431
3510
|
type: Component,
|
|
@@ -3471,7 +3550,7 @@ class ArrayDateTimeInputComponent extends ArrayTableComponent {
|
|
|
3471
3550
|
}
|
|
3472
3551
|
}
|
|
3473
3552
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayDateTimeInputComponent, deps: [{ token: i1.MatDialog }, { token: i0.EnvironmentInjector }, { token: i2$1.HttpClient }, { token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }], target: i0.ɵɵFactoryTarget.Component });
|
|
3474
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayDateTimeInputComponent, selector: "array-date-time-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n <div *ngIf=\"!isReadOnly\">\n <div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minDate ? metadata.minDate(input) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(input) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? DateUtilities.defaultDateFilter\"\n [(ngModel)]=\"input\"\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 #timeModel=\"ngModel\"\n [name]=\"name + 'time'\"\n [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"time\"\n >\n <mat-option *ngFor=\"let validTime of DateUtilities.getValidTimesForDropdown(\n metadata.times,\n input,\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>\n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"model.errors || timeModel.errors || DateUtilities.timeIsUnprocessable(time)\"\n (click)=\"addDateTime()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n </div>\n\n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [disabled]=\"!dataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\" [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\" (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\">\n {{getDisplayColumnValue(entity, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <div *ngIf=\"metadata.required(entity) && !dataSource.data.length\" class=\"array-error\">\n {{metadata.missingErrorMessage}}\n </div>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}mat-form-field{width:100%}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}.array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.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: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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:
|
|
3553
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayDateTimeInputComponent, selector: "array-date-time-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n <div *ngIf=\"!isReadOnly\">\n <div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minDate ? metadata.minDate(input) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(input) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? DateUtilities.defaultDateFilter\"\n [(ngModel)]=\"input\"\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 #timeModel=\"ngModel\"\n [name]=\"name + 'time'\"\n [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"time\"\n >\n <mat-option *ngFor=\"let validTime of DateUtilities.getValidTimesForDropdown(\n metadata.times,\n input,\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>\n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"model.errors || timeModel.errors || DateUtilities.timeIsUnprocessable(time)\"\n (click)=\"addDateTime()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n </div>\n\n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [disabled]=\"!dataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\" [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\" (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\">\n {{getDisplayColumnValue(entity, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <div *ngIf=\"metadata.required(entity) && !dataSource.data.length\" class=\"array-error\">\n {{metadata.missingErrorMessage}}\n </div>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}mat-form-field{width:100%}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}.array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.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: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }] });
|
|
3475
3554
|
}
|
|
3476
3555
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayDateTimeInputComponent, decorators: [{
|
|
3477
3556
|
type: Component,
|
|
@@ -3495,10 +3574,15 @@ class ArrayStringChipsInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
3495
3574
|
* it contains values, we can set it to undefined when the last element is removed
|
|
3496
3575
|
* (removeStringChipArrayValue). That way we can use the "required" validator.
|
|
3497
3576
|
* @param event - The event that fires when a new chip is completed.
|
|
3577
|
+
* @param invalid - Whether or not the input is invalid.
|
|
3498
3578
|
*/
|
|
3499
|
-
addStringChipArrayValue(event) {
|
|
3500
|
-
|
|
3501
|
-
|
|
3579
|
+
addStringChipArrayValue(event, invalid) {
|
|
3580
|
+
if (invalid || !event.value) {
|
|
3581
|
+
return;
|
|
3582
|
+
}
|
|
3583
|
+
const value = event.value.trim();
|
|
3584
|
+
this.propertyValue = this.propertyValue ?? [];
|
|
3585
|
+
this.propertyValue.push(value);
|
|
3502
3586
|
event.chipInput?.clear();
|
|
3503
3587
|
this.chipsInput = '';
|
|
3504
3588
|
this.emitChange();
|
|
@@ -3517,53 +3601,56 @@ class ArrayStringChipsInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
3517
3601
|
this.propertyValue = this.propertyValue?.length ? this.propertyValue : undefined;
|
|
3518
3602
|
this.emitChange();
|
|
3519
3603
|
}
|
|
3520
|
-
|
|
3521
|
-
if (
|
|
3522
|
-
|
|
3523
|
-
return;
|
|
3524
|
-
}
|
|
3525
|
-
if (this.metadata.maxLength && value.length > this.metadata.maxLength) {
|
|
3526
|
-
return;
|
|
3527
|
-
}
|
|
3528
|
-
if (this.metadata.regex && !value.match(this.metadata.regex)) {
|
|
3529
|
-
return;
|
|
3530
|
-
}
|
|
3531
|
-
this.propertyValue = this.propertyValue ?? [];
|
|
3532
|
-
this.propertyValue.push(value);
|
|
3604
|
+
setValidationErrors(model, chipsModel) {
|
|
3605
|
+
if (chipsModel.errors) {
|
|
3606
|
+
model.control.setErrors(chipsModel.errors);
|
|
3533
3607
|
}
|
|
3534
3608
|
}
|
|
3535
3609
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayStringChipsInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3536
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayStringChipsInputComponent, selector: "array-string-chips-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n #model=\"ngModel\" [name]=\"name\" [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n >\n <mat-chip-row *ngFor=\"let value of propertyValue\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button type=\"button\" matChipRemove>\n <i [class]=\"metadata.deleteIcon\"></i>\n </button>\n </mat-chip-row>\n <input #chipsModel=\"ngModel\"\n matInput\n [matChipInputFor]=\"chipGrid\"\n [matChipInputAddOnBlur]=\"true\"\n [name]=\"uuid2\"
|
|
3610
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayStringChipsInputComponent, selector: "array-string-chips-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n #model=\"ngModel\" [name]=\"name\" [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"setValidationErrors(model, chipsModel)\"\n >\n <mat-chip-row *ngFor=\"let value of propertyValue\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button type=\"button\" matChipRemove>\n <i [class]=\"metadata.deleteIcon\"></i>\n </button>\n </mat-chip-row>\n <input #chipsModel=\"ngModel\"\n matInput\n [matChipInputFor]=\"chipGrid\"\n [matChipInputAddOnBlur]=\"true\"\n [name]=\"uuid2\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [(ngModel)]=\"chipsInput\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event, !!chipsModel.errors)\"\n />\n </mat-chip-grid>\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: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i6$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6$2.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.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"] }] });
|
|
3537
3611
|
}
|
|
3538
3612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayStringChipsInputComponent, decorators: [{
|
|
3539
3613
|
type: Component,
|
|
3540
|
-
args: [{ selector: 'array-string-chips-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n #model=\"ngModel\" [name]=\"name\" [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n >\n <mat-chip-row *ngFor=\"let value of propertyValue\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button type=\"button\" matChipRemove>\n <i [class]=\"metadata.deleteIcon\"></i>\n </button>\n </mat-chip-row>\n <input #chipsModel=\"ngModel\"\n matInput\n [matChipInputFor]=\"chipGrid\"\n [matChipInputAddOnBlur]=\"true\"\n [name]=\"uuid2\"
|
|
3614
|
+
args: [{ selector: 'array-string-chips-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n #model=\"ngModel\" [name]=\"name\" [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"setValidationErrors(model, chipsModel)\"\n >\n <mat-chip-row *ngFor=\"let value of propertyValue\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button type=\"button\" matChipRemove>\n <i [class]=\"metadata.deleteIcon\"></i>\n </button>\n </mat-chip-row>\n <input #chipsModel=\"ngModel\"\n matInput\n [matChipInputFor]=\"chipGrid\"\n [matChipInputAddOnBlur]=\"true\"\n [name]=\"uuid2\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [(ngModel)]=\"chipsInput\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event, !!chipsModel.errors)\"\n />\n </mat-chip-grid>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
|
|
3541
3615
|
}] });
|
|
3542
3616
|
|
|
3543
3617
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
3544
3618
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
3545
3619
|
class ArrayStringAutocompleteChipsComponent extends ArrayStringChipsInputComponent {
|
|
3620
|
+
injector;
|
|
3546
3621
|
filteredAutocompleteStrings;
|
|
3547
|
-
|
|
3548
|
-
return this.metadata.autocompleteValues;
|
|
3549
|
-
}
|
|
3622
|
+
autocompleteStrings = [];
|
|
3550
3623
|
get autocompleteMetadata() {
|
|
3551
3624
|
return this.metadata;
|
|
3552
3625
|
}
|
|
3553
|
-
|
|
3626
|
+
constructor(injector) {
|
|
3627
|
+
super();
|
|
3628
|
+
this.injector = injector;
|
|
3629
|
+
}
|
|
3630
|
+
async ngOnInit() {
|
|
3554
3631
|
super.ngOnInit();
|
|
3555
|
-
this.
|
|
3632
|
+
await runInInjectionContext(this.injector, async () => {
|
|
3633
|
+
this.autocompleteStrings = await this.autocompleteMetadata.autocompleteValues(this.entity);
|
|
3634
|
+
this.filteredAutocompleteStrings = LodashUtilities.cloneDeep(this.autocompleteStrings);
|
|
3635
|
+
});
|
|
3556
3636
|
}
|
|
3557
3637
|
/**
|
|
3558
3638
|
* Handles adding a string to the array when an autocomplete value has been selected.
|
|
3559
3639
|
* @param event - The autocomplete selected event.
|
|
3560
3640
|
* @param chipsInput - The element where the user typed the value.
|
|
3641
|
+
* @param model - The model of the string array.
|
|
3642
|
+
* @param chipsModel - The model of the single string input.
|
|
3561
3643
|
*/
|
|
3562
|
-
selected(event, chipsInput) {
|
|
3563
|
-
|
|
3564
|
-
this.
|
|
3644
|
+
selected(event, chipsInput, model, chipsModel) {
|
|
3645
|
+
// validation is not needed as selected options are all valid.
|
|
3646
|
+
this.propertyValue = this.propertyValue ?? [];
|
|
3647
|
+
this.propertyValue.push(event.option.value);
|
|
3565
3648
|
chipsInput.value = '';
|
|
3566
|
-
this.
|
|
3649
|
+
this.chipsInput = '';
|
|
3650
|
+
this.filterAutocompleteStrings(this.chipsInput);
|
|
3651
|
+
chipsModel.control.updateValueAndValidity();
|
|
3652
|
+
model.control.updateValueAndValidity();
|
|
3653
|
+
this.setValidationErrors(model, chipsModel);
|
|
3567
3654
|
this.emitChange();
|
|
3568
3655
|
}
|
|
3569
3656
|
/**
|
|
@@ -3574,13 +3661,13 @@ class ArrayStringAutocompleteChipsComponent extends ArrayStringChipsInputCompone
|
|
|
3574
3661
|
const filterValue = input.toLowerCase();
|
|
3575
3662
|
this.filteredAutocompleteStrings = this.autocompleteStrings.filter(s => s.toLowerCase().includes(filterValue));
|
|
3576
3663
|
}
|
|
3577
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayStringAutocompleteChipsComponent, deps:
|
|
3578
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayStringAutocompleteChipsComponent, selector: "array-string-autocomplete-chips", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n
|
|
3664
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayStringAutocompleteChipsComponent, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Component });
|
|
3665
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ArrayStringAutocompleteChipsComponent, selector: "array-string-autocomplete-chips", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n #model=\"ngModel\" [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"setValidationErrors(model, chipsModel)\"\n >\n <mat-chip-row *ngFor=\"let value of propertyValue\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button type=\"button\" matChipRemove>\n <i [class]=\"metadata.deleteIcon\"></i>\n </button>\n </mat-chip-row>\n <input #chipsModel=\"ngModel\"\n #chipsElement\n matInput\n [matChipInputFor]=\"chipGrid\"\n [matAutocomplete]=\"auto\"\n [matChipInputAddOnBlur]=\"true\"\n [name]=\"uuid2\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [includedIn]=\"autocompleteMetadata.restrictToOptions ? autocompleteStrings : undefined\"\n [(ngModel)]=\"chipsInput\"\n (keyup)=\"filterAutocompleteStrings(chipsInput)\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event, !!chipsModel.errors)\"\n />\n </mat-chip-grid>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event, chipsElement, model, chipsModel)\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\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: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IncludedInValidatorDirective, selector: "[includedIn]", inputs: ["includedIn"] }, { kind: "component", type: i4$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i6$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i6$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6$2.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.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"] }] });
|
|
3579
3666
|
}
|
|
3580
3667
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ArrayStringAutocompleteChipsComponent, decorators: [{
|
|
3581
3668
|
type: Component,
|
|
3582
|
-
args: [{ selector: 'array-string-autocomplete-chips', template: "<!-- eslint-disable angular/no-call-expression -->\n
|
|
3583
|
-
}] });
|
|
3669
|
+
args: [{ selector: 'array-string-autocomplete-chips', template: "<!-- eslint-disable angular/no-call-expression -->\n\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-grid #chipGrid\n #model=\"ngModel\" [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"setValidationErrors(model, chipsModel)\"\n >\n <mat-chip-row *ngFor=\"let value of propertyValue\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button type=\"button\" matChipRemove>\n <i [class]=\"metadata.deleteIcon\"></i>\n </button>\n </mat-chip-row>\n <input #chipsModel=\"ngModel\"\n #chipsElement\n matInput\n [matChipInputFor]=\"chipGrid\"\n [matAutocomplete]=\"auto\"\n [matChipInputAddOnBlur]=\"true\"\n [name]=\"uuid2\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [includedIn]=\"autocompleteMetadata.restrictToOptions ? autocompleteStrings : undefined\"\n [(ngModel)]=\"chipsInput\"\n (keyup)=\"filterAutocompleteStrings(chipsInput)\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event, !!chipsModel.errors)\"\n />\n </mat-chip-grid>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event, chipsElement, model, chipsModel)\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
|
|
3670
|
+
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
3584
3671
|
|
|
3585
3672
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
3586
3673
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
@@ -3651,7 +3738,7 @@ class BooleanDropdownInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
3651
3738
|
this.metadata = new DropdownBooleanDecoratorConfigInternal(this.metadata, this.globalConfig);
|
|
3652
3739
|
}
|
|
3653
3740
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: BooleanDropdownInputComponent, deps: [{ token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }], target: i0.ɵɵFactoryTarget.Component });
|
|
3654
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: BooleanDropdownInputComponent, selector: "boolean-dropdown-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select\n #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\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: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type:
|
|
3741
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: BooleanDropdownInputComponent, selector: "boolean-dropdown-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select\n #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\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: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }] });
|
|
3655
3742
|
}
|
|
3656
3743
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: BooleanDropdownInputComponent, decorators: [{
|
|
3657
3744
|
type: Component,
|
|
@@ -3923,7 +4010,7 @@ class DateTimeInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
3923
4010
|
this.emitChange();
|
|
3924
4011
|
}
|
|
3925
4012
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DateTimeInputComponent, deps: [{ token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }], target: i0.ɵɵFactoryTarget.Component });
|
|
3926
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: DateTimeInputComponent, selector: "date-time-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minDate ? metadata.minDate(propertyValue) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(propertyValue) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? defaultDateFilter\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (dateChange)=\"setTime()\"\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 #timeModel=\"ngModel\"\n [name]=\"name + 'time'\"\n [required]=\"metadata.required(entity)\"\n [compareWith]=\"compareTimes\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"time\"\n (selectionChange)=\"setTime()\"\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.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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:
|
|
4013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: DateTimeInputComponent, selector: "date-time-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"date-time\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matDatepicker]=\"picker\"\n [required]=\"metadata.required(entity)\"\n [min]=\"metadata.minDate ? metadata.minDate(propertyValue) : undefined\"\n [max]=\"metadata.maxDate ? metadata.maxDate(propertyValue) : undefined\"\n [matDatepickerFilter]=\"metadata.filterDate ?? defaultDateFilter\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (dateChange)=\"setTime()\"\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 #timeModel=\"ngModel\"\n [name]=\"name + 'time'\"\n [required]=\"metadata.required(entity)\"\n [compareWith]=\"compareTimes\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"time\"\n (selectionChange)=\"setTime()\"\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.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }] });
|
|
3927
4014
|
}
|
|
3928
4015
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DateTimeInputComponent, decorators: [{
|
|
3929
4016
|
type: Component,
|
|
@@ -4099,12 +4186,11 @@ class FileInputComponent {
|
|
|
4099
4186
|
}
|
|
4100
4187
|
async downloadAll() {
|
|
4101
4188
|
if (this.propertyValue.length) {
|
|
4102
|
-
// eslint-disable-next-line max-len
|
|
4103
4189
|
void FileUtilities.downloadMultipleFiles(this.metadata.displayName, LodashUtilities.cloneDeep(this.propertyValue), this.http);
|
|
4104
4190
|
}
|
|
4105
4191
|
}
|
|
4106
4192
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: FileInputComponent, deps: [{ token: i1.MatDialog }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
4107
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: FileInputComponent, selector: "file-input", inputs: { propertyValue: "propertyValue", entity: "entity", key: "key", metadata: "metadata", getValidationErrorMessage: "getValidationErrorMessage", isReadOnly: "isReadOnly" }, outputs: { fileDataChangeEvent: "fileDataChangeEvent" }, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<input #fileInput\n type=\"file\" hidden\n [multiple]=\"metadata.multiple\"\n [accept]=\"acceptString\"\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 #model=\"ngModel\" name=\"file\" [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"filenames\"\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 hidden [matChipInputFor]=\"chipGrid\" [readonly]=\"true\">\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: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$
|
|
4193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: FileInputComponent, selector: "file-input", inputs: { propertyValue: "propertyValue", entity: "entity", key: "key", metadata: "metadata", getValidationErrorMessage: "getValidationErrorMessage", isReadOnly: "isReadOnly" }, outputs: { fileDataChangeEvent: "fileDataChangeEvent" }, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<input #fileInput\n type=\"file\" hidden\n [multiple]=\"metadata.multiple\"\n [accept]=\"acceptString\"\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 #model=\"ngModel\" name=\"file\" [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"filenames\"\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 hidden [matChipInputFor]=\"chipGrid\" [readonly]=\"true\">\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: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i6$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6$2.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: DragDropDirective, selector: "[dragDrop]", outputs: ["files"] }] });
|
|
4108
4194
|
}
|
|
4109
4195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
4110
4196
|
type: Component,
|
|
@@ -4140,7 +4226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
4140
4226
|
args: [{ selector: 'file-default-input', template: "<div [class.file-input]=\"metadata.dragAndDrop\" [class.mat-elevation-z8]=\"metadata.dragAndDrop\">\n <file-input\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n >\n </file-input>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}\n"] }]
|
|
4141
4227
|
}] });
|
|
4142
4228
|
|
|
4143
|
-
// eslint-disable-next-line
|
|
4229
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4144
4230
|
const PLACEHOLDER = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAMgCAMAAAAEPmswAAAANlBMVEXx8/XCy9LFztXu8PPs7/Lp7e/W3OHL0tnZ3+PN1NrS2d7i5urn6u7f5OjI0Nfc4ebP1tzk6excnoRZAAAXh0lEQVR42uzUAQ0AAAzDoN+/6eloAiK4B4gQFpAhLCBDWECGsIAMYQEZwgIyhAVkCAvIEBaQISwgQ1hAhrCADGEBGcICMoQFZAgLyBAWkCEsIENYQIawgAxhARnCAjKEBWQIC8gQFpAhLCBDWECGsIAMYQEZwgIyhAVkCAvIEBaQISwgQ1hAhrCADGEBGcICMoQFZAgLyBAWkCEsIENYQIawgAxhARnCAjKEBWQIC8gQFpAhLGDs1AEJAAAAgKD/r9sR6Ag3hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBbETh2QAAAAAAj6/7odgY6QDWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoRF7NQBCQAAAICg/6/bEegIYUNYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hxc6dJtcKAgEURgREwGn/m32Vd1Op/Ih3cO72fIs4BU0rADEIFgAxCBYAMQgWADEIFgAxCBbwm+3bFOKQ8zSV4r13zvky5a4bYgxjYyuch2ABD7ZJMRdnXnIlDyE1FY5HsADbhmFy5lM+x7GvcCSChXtrQufNCnXpQlvhIAQLt2XHONVmE2VIzLaOQLBwT230ZlsuBy6IeyNYuB+bOmd24TpOWrsiWLiZJhazKz8w09oNwcKd9NGbA9SZg9Y+CBZuw4ZijlMiE63tESzcg02TOZqnWVsjWLiDpqvNKXxkI35LBAv6pWJO5APzrM0QLChnozNnm5jBb4RgQbU2m0uoO3YdtkCwoFjy5jp85Ji1GsGCWpfK1X95rLAKwYJS4XK54pi1HsGCSuH8SfucjkWH5QgWFLpwrr6UVGEZggV10rVz9cVxM1yGYEGZthgJ6oHPdhYgWFClv8jeFcOsfRAsKGIHI8rENumHCBb0iLWRhvn7ZwgWtGgvuXj1kidZHyBY0MF2RiqS9T6CBRWCvNsgyVqAYEGBRsYqA8lajWBBPGlvg38rvBi+gWBBuvb6i+3vmdjLeolgQTYdx6tvme33FwgWRBO6yzBr4BvDpwgWJNN0vHqo+Sz6GYIFuRplx6sHx4PhPIIFsaJRigfDWQQLQvXid6+Yvn+OYEGmUfRq+2uMsv5EsCCSvmk7o6x3ECwIpPo6yCLpEwQL8iTl10G2smYRLIij/zrIvXAOwYIwvcrlq1kT74W/ESzIMmr51Plddazwg2BBlGDux7NH+oNgQRK5/0Fm+L4JgvWPvbvRSRiGAjBaBoqK+PP+L2s0xGSj3QiQ9I57zkN86brblvVItn1l8/2cYLEar1mmGWoOFlm/BIu1yLh9ZZE1IVisRNLtK4usEcFiFYbvwtYiS7BYg7zb7WPfFlmCRXj7bNOiFlkNgkV8j373lZ2siwkW4SX/PTi1+9pkJljEluhyhgsdMy+yBIvQDoWpXeLThYJFYMYZ6vJe4SBYxDWkuAv5Gu9Z78kSLMIajF8ZcBgRLOL6MH5l731MsAhrb/zK3vuEYBFV6ttk7L3XCRZBvRUcLpwSLGLSK3PvFYJFSHrls7BGsIhIr3wWVgkWATnu7G9hnWARj175LGwQLMLRK5+FLYJFNHp1jd1+k4NgEYpeXel5k4JgEYleXe24yUCwCESvXDkzR7CIxPzVTbYJxt4FizD0ynzDPMEiDr3yCtgCwSKMr8Ltnh58I0uwiOG1cA/bxz6oI1iE4L4+E1nLBIsY3IdsIusCgkUI3pu4q/fH3XoXLPob9OqXo4VLBIsAvD944tnCBYJFAN53PjFDukCw6O9Q+GPrfYlg0d2x8M+tfrMEi94+CyOm3tsEi65cKDNl6n2OYNGTA89Vpt5bBIuOHCCs8rOwSbDoaW9gtMbPwhbBohsD7k1+FjYIFv0MBkbb/CysESx6MTA6z8nCCsGiEwNYS7xOcU6w6OWlsMB4ww9794LdJgyEUXgwAsfFL/a/2Z4+T2zjWCMgnl/cbwttbxppNNwjWHgLBrByMN5wj2Ct4HztL+OxS621qTuOp/5a06HnItgw+v0uTRUI1qL2/dDao3b8qO+RRDkGGt5haGpAsJZzPbX2XDvUc/I5ExuwsrE4+QbBWsz+I9kr6VLR/XI5Nsq8SVdBsQjWIg6D5Rn5bxYbGpwYyPqPYC3iMFq+4+aTxSeevdg38xfBWsB5MJ+j/s+5Oc5cEDoxQvoPwZrvozW3SwWHCWX4RM67iX9Oh2DNc+isRFL/QVduNBRg6P0XgjVTv/nJYx9eEAYgXSyCNcNu2PpUjBMXhCEo/7AkWKVm78tM8jc2XqxEDkL4mQ7BKnZot35j48QFYRi6z3QIVqlru/kbGx8uCAORLRbBKvSD808nVoxGorrpnWCVuTIV48TKvlhEL30IVoEl1zlt5xyLlX2xaBaLYJU4J153+bCyLx7J5Q0Ey23hw+Ok+NfGiwP3iBSLRbAKDLaksdkCDtwDSnrLuwmWX29mDB57MOEelF6xCJbTGocx9R9jMeEelNxKP4Ll1tlvHGPl4psTgbVixSJYXr39wS+FuVgpE5lYsQiW0661FcgdJTiwUiY2rd8KCZbTyf7ipjAPO9yjk/o/FsHy2dstBt5fYEVDfErFIlg+g63j2FSLidHwhJ5bECyXs33GaMNLfDRVgk6xCJbLyT7jFOsVJkZFyBSLYHnsbD1C5wgOe4MElWIRLI/e7rFn+ws8eRYiUiyC5dHZelJTIZ4869C4KyRYDnu7x2TDF9gxqkWiWATL4WJrOjW14cmzFoViESyHZGtqm8rw5FmNwCsdgpXvbI8YxXqGJ8+C4heLYOXr7RE7G57gAEtS+I1+BCvfyaYwOzqFAyxR0YtFsPIle8Qh1iQOsGQFLxbByrazCQy7T2ICS1fsb+kQrGwHe4rPQN/iCaGy0MUiWNl6m8Kp+yN2YGmL/E1ogpXtYtMYHb3HDixxgYtFsLIN9gRb/G6xxF1e3AtrgpXtaM/w/vkzlrhXYGiCIljZOntAsKbsOMDSF7VYBCtbsrVV8ofBk5waBD1QreTfyPoIVh6e5NQi5kbJOv6NfAtbX9zLmVw8yanHT/buBDt1GIbCsJwRCOP+N/t62vNaphLbSZEs/98O2gOXyJFkk102BFYkAisGIzmeDMEeAitaK09REl5hJMcVg6MXHr4jb8EZVgRGcpyxl1gOviPv0stzrGv4MdLR4Iu5pZIEViQaR+cxkuOOucu/CKxIjObMYiTHIWsXUxBY0TbynPtevUiM5LhkbKEfgRWJ9TIz6GhwytZ6LAIrEgv8ZtDR4JWpZTMEViRWJM/ZCXyytGyGwIrFJRSvsGTUM0OHqwRWLK75eoUdDa7ZGYQmsOLt5CnO3EOgxd05M59NAisWV9W/MgpcszIITWAl6OUeR1ifaHH37xxMILASnOSBz5NNY/8ZGGBkSIfASjDKDZ8/YelY2lcFG0M6BFaKXh4w+UyLeyU6Cw2kBFaKQW75fHOc7CCogYUhHQIrRSN3aHMPtLjXw0CnIIGV5CT3vN8DN4eCsCb6L4YIrCRHuUYTVgi0uFdFvYGUwEpzkP/cPWxnocW9MkPQRGClGuUKPQ1sca/OOSgisJId5BsnWB/2gqqoNpASWMmaVv6ArTW00biXvkLtMaghsNIN8snXUWYeZp6rpNiORWBl2Mva+lAqZp5rtA9aCKxk36s1aWlg5rlWU1BCYOXYyQcKQmae63UKOgisLAcRoQWLgrBiQ1BBYGVpem8z8BkoCKt2DhoIrDzHztmWoXQUhHXT+dwSWJnGtvoDd2ae66ZSGRBYubbVX/ZMQVg5jXYsAivbueyzSyN/Pwo2hbcjsPJt25qfrygIodDcQGAtMHZlj5EuwFZkqBQIBNYSx16W6Ip9P0hBCJ3mBgJrkeYg+S7F9l9REEKpuYHAWmiobx4nBApCKDU3EFhLjb3k6As+vuKaHGhtbiCwlhvayh6vKAihdZEOgbWCZpI0l2L3i36ZBFD59SWwVjFOKXFVdDUYKAih101IYK0iIbKm0uMqNFyTA615WAJrNcdNL3O6TcGtV18oCKH4qpDAWtP21MnvukOxdw/+oCCE5qtCAmtlx2Hq5FE7DQ6erUKgIITqHDSB9Qea7XCaLvu+a7u+30+nYVtwT/stCkKovioksJCAgvAfe3eU6ygMBFG0GhtCSAxh/5udUWby8Z4COGCgI92ziJLLuBuc+6mQwEI+nozi9KlCAgu5KIQ4/VMhgYVMFEKc/6mQwEIeCiEcTBUSWMhDIYSDBaQEFrJQCOFhASmBhRwUQiwLve2LwEIetozCxb8KCSxk4LcT8DGjQ2BhGYUQTmZ0CCwsoxDCyYwOgYVFFEJ4mdEhsLCEQgg3MzoEFpZQCPGJ0XZDYGERhRCfGWwvBBaWUAjh6OKdwMI8CiE+drF9EFhYQCGEp4t3AgtzKIRwdfFOYGEOhRCuLt4JLMy6CvBz8U5gYU5VC/Dz4p3AwpxBgKNVMwQWJlEI4W3VDIGFGRRC+Fo1Q2BhCoUQ7na8E1iYdBHga8c7gYUJFEL4u3gnsDClFeDs4p3AwjsUQrj8uarsCP21a4Z0G+sYQwiSQoixvo9paJvHpTI4RCFEAVcrSrar/tEMY9SCeL+1zaM3OEIhhMPFDbK9VF07Bn2kTs2V45YPFEJ4XNwg20PfpKgJOallONtdgL/FDbLSqi7V2qpOHUetU1AI8eR0cYOsqKq7BRVybzlpHY5CiH+cvh+VlVN1o8oKt4ar+CNRCPHi8/2orJRrCtpDTA/DISiE2EeyUmRFVG3UfgKZdQAKIX7y+H5UVkA/BP1GZn0vCiGeHP74S7bZJek9Mus7NQL+8vh+VLZRlXSckC6GnfUCnhyOQcu2aYOOVTc80CqOQoj33O0flW3RRR0vJN5nlUUhxAR3Y9Cy9aqb8nHM+g59EPDi7hpLtloXdCKOWYVQCDHP1Ri0LJOf49VL3Rm2ohBiga9rLFkeX8er/yLNcBsKIXI4+o2ObAU//38KA7OGJY0CfvM0Bi1bofd00cHTrLUohDja3TaSfe4R5crIC/gVKIR/2Lvb5NRhGArD54RvCC3sf7N3Op07UyhJ7PQHsvU+W4BxIvlIQbkw2/zkMrFH+em/V6MgRKlIbSy50hDzX82RVYeCEMUitbHkOh9hP/60ozAsRkGIGoHaWHKVQ7D21YORI6sCkVGUC9PGkqcFTV9xZP0RBSGqRWljyb+1/J/myKrAllG8w2bwavKEwGnReXdyWXMoCPF2o1eTi719eLDUlYGdOa1kVdCvo9eSH/RwXkmbI0fWSxSEiOHmleRnTcWvpmz3RoWwYRX0afVuLLnI0FyLg1jWMwpCxHH3OnKJocUn8Ej3/QcKQoRy9Cryt/7OK7rvDygIEcvJa8hf+jyvaGX91HpcBZ1Z18aS7W7PK0kjq9+XnAS8wcUryO75vKIutE1BiJD2rifb7ut+8NmGupCCEBEdXE3dn1eSdtSFFISIZze4lvxf10soqQsnDJH3BaF3V9dSivNK2rKR9KWrgPc5u5LcyfzgogsfBPvtJuB96hcmK08/luY7BSGi2bmOMk2YMazT8Rs02vTpKvKks/pzNPr+hdGam2soWXuDhAOfyUEodSM68oRTr//mTxIOvV0Bo2l3V5BfO/R6XvGS1dAnRZDC3uWU8fro02AJFsI4uJhSfkNlx3UhM88Io2JER0nzz+mvC/vK2KFtV5dSigAWL1nMPCOyswspbzwn80tW3z1KNKd4REeJH75j3ulCIu6IZXQZ+dlHnofvJusKhyTv0GjI0UXU20bkOpeUKVIi7ojn5BJKXixsM6ZIOw+toEllIzpKeEGYPUWa7zdGC64uIJob2XrvaS5V0JizlynLBCGb/Ug0ILbN4EXK23BP2ntP1qREQ+5eJPaNfNmmyb2zowFx7b1ENGO/JSkLcxb9aMXBC5S74Z6uLMxa9KMNOy8Qz95MkSx2NCC2q+cpfcM90zh0n3v60ZObZ4nLox/ufZeFQ/aXaMS3EHgXl0d5ysK8t8Box8VzRPo5zW1h6ltgNGPvGSL9nOW2kAYWmjC7zE80sJIsT+ahhEaMniZqhSR7/f6xdy+4iQNBEEDdQYEA4Xf/y+5ukk2AYAkFKXKX3ztEWe6p6THAoouXGjUYYM1j5YyPEn2saszgX2EWK2cMsGhk/KHCwb/CTYtjJfFRopVDjRj8K8yh9m4pMr0c67bBAGsG/QZXCGlmrPA++FcY9ZwyyJr5Hg462tZNA/GDLK960dCmvhNYMxhk2cNBR7cK7wJrBoOs3QANneobgZU/yLKHg6aWdU1gxQ+ynALT1qquCKz0jTMao/T1WlcE1l121ZbGKI291CWBdZ/XrqN3A3daW9UFgZX90KqBO7091wWBFb0jy8Cd7g51TmAld0g13OlvXWcEVnCHVMOdABe3oAVW8Ojdon4S7OqLwModvdtzRoZjfRJYsaN3K2UIcfZTKLBSR+8OCImxrf8EVmjr3QEhQTb1QWBljt4dEJJk8VTvBFbm6N1DSETZ1juBFblwxpsThNnUG4GVuHBGoYE0Hz+FAivwsNCNZ/Js6x+B9VPbmiqP0pNoWX8JrLjDwpVCA4nefgoFVtph4d5KZDKdqkpgPWCxrslRwCLWskpgPWRyNwufrHAn1mJfAivqsFBekexUAivqZqGCO9GWAutRpwkdFtrYR7bFXmDlPGXvSS/SnQRWTL1BXpHPNY6Uu9AuPDMDatEhd6HlFdCl3iCvgC71BnkFdLkLbd4OdKk3yCugS71BXgFd6g367UCTeoP7zsAPHeoe9l8BU7CrX7WyXxRoUm9Yu6gA/GHvDnMThmEwgNZpF9LQUrj/ZfdvmmBMDEabSu8dIkrsz85O4g3VeQW8ZhjjPv+lAk3pa9whzgA0J8ePxBmABs3xZqP2ILCTVe/2LgI7aRYm04NA1+1iFvog3Q503S6ahZ6DwJe2FycnaQbgLY4p/lnVHQS+abj07noFXGl2TsfsIHCrydS76xVwq8lCViquV8D7fRwU24HdyPGa0aQzsJrpFM8bFa+ANfUlnnS+dADrGmo8oZobBLYwLKf4k1NRagc2M9UUD0rZWxDYVj8/cmalOotdAS2Yyhi/OBcpBqAh/WXJY4or6ZwXhxXQpGE6znMpOZdlmY+TVyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPDJHhwIAAAAAAD5vzaCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwBwcCAAAAAED+r42gqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqirswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cCAAAAAAIMjfepArAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgKcAnTNeiLeG1rEAAAAASUVORK5CYII=';
|
|
4145
4231
|
|
|
4146
4232
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
@@ -4233,6 +4319,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
4233
4319
|
args: [{ selector: 'file-image-input', template: "<!-- eslint-disable angular/prefer-ngsrc -->\n<!-- eslint-disable angular/alt-text -->\n<!-- eslint-disable angular/cyclomatic-complexity -->\n<div *ngIf=\"!metadata.dragAndDrop && !metadata.preview\">\n <file-input\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n >\n </file-input>\n</div>\n\n<div *ngIf=\"metadata.dragAndDrop || metadata.preview\" class=\"file-input mat-elevation-z8\">\n <file-input\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n >\n </file-input>\n\n <div *ngIf=\"metadata.preview && metadata.multiple\" class=\"image-preview\">\n <i class=\"prev-button fa-solid fa-angle-left\" [class.disabled]=\"imageIndex === 0\" (click)=\"prev()\"></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 class=\"next-button fa-solid fa-angle-right\"\n [class.disabled]=\"!multiPreviewImages || !multiPreviewImages.length || imageIndex === (multiPreviewImages.length - 1)\"\n (click)=\"next()\"\n >\n </i>\n </div>\n\n <div *ngIf=\"metadata.preview && metadata.multiple\" class=\"preview-nav\">\n <button *ngIf=\"\n this.multiPreviewImages\n && multiPreviewImages[imageIndex-4]\n && imageIndex === (this.multiPreviewImages.length - 1)\"\n type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex-4)\"\n >\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex - 3}}</div>\n </div>\n </button>\n <!-- eslint-disable-next-line angular/conditional-complexity -->\n <button *ngIf=\"this.multiPreviewImages\n && multiPreviewImages[imageIndex-3]\n && (\n imageIndex === (this.multiPreviewImages.length - 2)\n || imageIndex === (this.multiPreviewImages.length - 1)\n )\" type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex-3)\"\n >\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex - 2}}</div>\n </div>\n </button>\n <button *ngIf=\"multiPreviewImages?.[imageIndex-2]\" type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex-2)\">\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex - 1}}</div>\n </div>\n </button>\n <button *ngIf=\"multiPreviewImages?.[imageIndex-1]\" type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex-1)\">\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex}}</div>\n </div>\n </button>\n <button type=\"button\" mat-icon-button disabled>\n <div class=\"dot selected\">\n <div class=\"image-index\">{{imageIndex + 1}}</div>\n </div>\n </button>\n <button *ngIf=\"multiPreviewImages?.[imageIndex+1]\" type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex+1)\">\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex + 2}}</div>\n </div>\n </button>\n <button *ngIf=\"multiPreviewImages?.[imageIndex+2]\" type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex+2)\">\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex + 3}}</div>\n </div>\n </button>\n <button *ngIf=\"multiPreviewImages?.[imageIndex+3] && imageIndex <= 1\" type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex+3)\">\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex + 4}}</div>\n </div>\n </button>\n <button *ngIf=\"multiPreviewImages?.[imageIndex+4] && imageIndex === 0\" type=\"button\" mat-icon-button (click)=\"setIndex(imageIndex+4)\">\n <div class=\"dot\">\n <div class=\"image-index\">{{imageIndex + 5}}</div>\n </div>\n </button>\n </div>\n\n <div *ngIf=\"metadata.preview && !metadata.multiple\" class=\"image-preview\">\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\n <div *ngIf=\"metadata.preview && !metadata.multiple\" class=\"preview-nav\">\n <button type=\"button\" disabled mat-icon-button>\n <div class=\"dot selected\">\n <div class=\"image-index\">1</div>\n </div>\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{display:flex;align-items:center;justify-content:center;column-gap:5px}.preview-nav button{display:flex;align-items:center;justify-content:center;padding:0;height:auto;width:auto}.preview-nav button .dot{display:flex;align-items:center;justify-content:center;height:25px;width:25px;min-width:25px;background-color:#00000061;border-radius:50%}.preview-nav button .dot .image-index{color:#fff;font-size:20px;font-weight:600}.preview-nav button .dot.selected{background-color:#0000008a}.preview-nav button:hover .dot{background-color:#0000008a;transition:all .3s ease}\n"] }]
|
|
4234
4320
|
}], ctorParameters: function () { return [{ type: i2$1.HttpClient }]; } });
|
|
4235
4321
|
|
|
4322
|
+
/**
|
|
4323
|
+
* The default function to retrieve dynamic style classes.
|
|
4324
|
+
* Returns an empty array.
|
|
4325
|
+
*/
|
|
4326
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
4327
|
+
const defaultDynamicStyleClasses = () => [];
|
|
4328
|
+
|
|
4236
4329
|
/**
|
|
4237
4330
|
* Checks if the given function is async or not.
|
|
4238
4331
|
* @param originalFunction - The function to check.
|
|
@@ -4273,7 +4366,6 @@ class CreateDataBuilder extends BaseBuilder {
|
|
|
4273
4366
|
}
|
|
4274
4367
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4275
4368
|
generateBaseData(data) {
|
|
4276
|
-
// eslint-disable-next-line max-len
|
|
4277
4369
|
const confirmCreateDialogData = new ConfirmDialogDataBuilder(this.globalConfig, data?.confirmCreateDialogData)
|
|
4278
4370
|
.withDefault('confirmButtonLabel', this.globalConfig.createLabel)
|
|
4279
4371
|
.withDefault('text', this.globalConfig.confirmCreateText)
|
|
@@ -4309,7 +4401,6 @@ let EditActionInternal = class EditActionInternal {
|
|
|
4309
4401
|
.withDefault('text', globalConfig.confirmBaseActionText)
|
|
4310
4402
|
.getResult();
|
|
4311
4403
|
}
|
|
4312
|
-
// eslint-disable-next-line max-len
|
|
4313
4404
|
functionToAsync(originalFunction) {
|
|
4314
4405
|
if (isAsyncFunction(originalFunction)) {
|
|
4315
4406
|
return originalFunction;
|
|
@@ -4467,7 +4558,6 @@ let MultiSelectActionInternal = class MultiSelectActionInternal {
|
|
|
4467
4558
|
.withDefault('text', globalConfig.confirmBaseActionText)
|
|
4468
4559
|
.getResult();
|
|
4469
4560
|
}
|
|
4470
|
-
// eslint-disable-next-line max-len
|
|
4471
4561
|
functionToAsync(originalFunction) {
|
|
4472
4562
|
if (isAsyncFunction(originalFunction)) {
|
|
4473
4563
|
return originalFunction;
|
|
@@ -4555,6 +4645,8 @@ let BaseDataInternal = class BaseDataInternal {
|
|
|
4555
4645
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4556
4646
|
importActionData;
|
|
4557
4647
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4648
|
+
dynamicRowStyleClasses;
|
|
4649
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4558
4650
|
EntityClass;
|
|
4559
4651
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4560
4652
|
edit;
|
|
@@ -4573,7 +4665,6 @@ let BaseDataInternal = class BaseDataInternal {
|
|
|
4573
4665
|
this.searchString = data.searchString ?? defaultSearchFunction;
|
|
4574
4666
|
if (data.tableActions) {
|
|
4575
4667
|
this.tableActions = data.tableActions.map(tA => {
|
|
4576
|
-
// eslint-disable-next-line max-len
|
|
4577
4668
|
return tA.type === 'default' ? new BaseTableActionInternal(tA, globalConfig) : new MultiSelectActionInternal(tA, globalConfig);
|
|
4578
4669
|
});
|
|
4579
4670
|
}
|
|
@@ -4584,6 +4675,7 @@ let BaseDataInternal = class BaseDataInternal {
|
|
|
4584
4675
|
this.displayLoadingSpinner = data.displayLoadingSpinner ?? true;
|
|
4585
4676
|
this.allowJsonImport = data.allowJsonImport ?? false;
|
|
4586
4677
|
this.importActionData = this.buildImportActionData(data.importActionData);
|
|
4678
|
+
this.dynamicRowStyleClasses = data.dynamicRowStyleClasses ?? defaultDynamicStyleClasses;
|
|
4587
4679
|
this.edit = data.edit;
|
|
4588
4680
|
this.create = data.create;
|
|
4589
4681
|
this.allowCreate = this.allowDataToFunction(data.allowCreate);
|
|
@@ -4707,7 +4799,6 @@ class HasManyDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
|
4707
4799
|
/* istanbul ignore next */
|
|
4708
4800
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4709
4801
|
function defaultCreateBaseUrl(baseEntity, metadata) {
|
|
4710
|
-
// eslint-disable-next-line max-len
|
|
4711
4802
|
const baseEntityService = inject(metadata.RelatedEntityServiceClass);
|
|
4712
4803
|
const entityService = inject(metadata.tableData.baseData.EntityServiceClass);
|
|
4713
4804
|
const baseUrlSegments = entityService.baseUrl.split('/');
|
|
@@ -4717,7 +4808,6 @@ function defaultCreateBaseUrl(baseEntity, metadata) {
|
|
|
4717
4808
|
/**
|
|
4718
4809
|
* Provider for the default getValidationErrorMessage.
|
|
4719
4810
|
*/
|
|
4720
|
-
// eslint-disable-next-line constCase/uppercase
|
|
4721
4811
|
const NGX_GET_VALIDATION_ERROR_MESSAGE = new InjectionToken('Provider for the default getValidationErrorMessage.', {
|
|
4722
4812
|
providedIn: 'root',
|
|
4723
4813
|
factory: () => getValidationErrorMessage
|
|
@@ -4771,18 +4861,44 @@ function getValidationErrorMessage(model) {
|
|
|
4771
4861
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
4772
4862
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
4773
4863
|
class NumberDropdownInputComponent extends NgxMatEntityBaseInputComponent {
|
|
4864
|
+
injector;
|
|
4774
4865
|
dropdownValues = [];
|
|
4866
|
+
filteredDropdownValues = [];
|
|
4867
|
+
get currentDropdownValue() {
|
|
4868
|
+
return LodashUtilities.cloneDeep(this.dropdownValues ?? [])
|
|
4869
|
+
.find(v => v.value === this.propertyValue);
|
|
4870
|
+
}
|
|
4871
|
+
get shouldDisplayCurrentValue() {
|
|
4872
|
+
return !!this.currentDropdownValue && !(!!this.filteredDropdownValues.find(v => v.value === this.currentDropdownValue?.value));
|
|
4873
|
+
}
|
|
4874
|
+
constructor(injector) {
|
|
4875
|
+
super();
|
|
4876
|
+
this.injector = injector;
|
|
4877
|
+
}
|
|
4775
4878
|
async ngOnInit() {
|
|
4776
4879
|
super.ngOnInit();
|
|
4777
|
-
this.
|
|
4880
|
+
await runInInjectionContext(this.injector, async () => {
|
|
4881
|
+
this.dropdownValues = await this.metadata.dropdownValues(this.entity);
|
|
4882
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues);
|
|
4883
|
+
});
|
|
4778
4884
|
}
|
|
4779
|
-
|
|
4780
|
-
|
|
4885
|
+
/**
|
|
4886
|
+
* Filters the dropdown values.
|
|
4887
|
+
* @param searchInput - The search input to filter for.
|
|
4888
|
+
*/
|
|
4889
|
+
filterDropdownValues(searchInput) {
|
|
4890
|
+
const filter = searchInput.toLowerCase();
|
|
4891
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues).filter(option => {
|
|
4892
|
+
return option.displayName.toLowerCase().includes(filter) || (`${option.value}`).toLowerCase().includes(filter);
|
|
4893
|
+
});
|
|
4894
|
+
}
|
|
4895
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NumberDropdownInputComponent, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Component });
|
|
4896
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: NumberDropdownInputComponent, selector: "number-dropdown-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\n (opened)=\"selectSearchInput.focus()\"\n >\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterDropdownValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentValue\" [value]=\"currentDropdownValue?.value\">{{currentDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredDropdownValues\" [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%}::ng-deep .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:16px}::ng-deep .select-search-input{max-width:100%;margin-top:-8px;margin-bottom:8px}::ng-deep .select-search-input .mat-mdc-form-field-subscript-wrapper{display:none}\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: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }] });
|
|
4781
4897
|
}
|
|
4782
4898
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NumberDropdownInputComponent, decorators: [{
|
|
4783
4899
|
type: Component,
|
|
4784
|
-
args: [{ selector: 'number-dropdown-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\n >\n <mat-option *ngFor=\"let value of
|
|
4785
|
-
}] });
|
|
4900
|
+
args: [{ selector: 'number-dropdown-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\n (opened)=\"selectSearchInput.focus()\"\n >\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterDropdownValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentValue\" [value]=\"currentDropdownValue?.value\">{{currentDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredDropdownValues\" [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%}::ng-deep .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:16px}::ng-deep .select-search-input{max-width:100%;margin-top:-8px;margin-bottom:8px}::ng-deep .select-search-input .mat-mdc-form-field-subscript-wrapper{display:none}\n"] }]
|
|
4901
|
+
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
4786
4902
|
|
|
4787
4903
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
4788
4904
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
@@ -4863,11 +4979,19 @@ class ReferencesManyInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
4863
4979
|
allReferencedEntities = [];
|
|
4864
4980
|
allDropdownValues = [];
|
|
4865
4981
|
dropdownValues = [];
|
|
4982
|
+
filteredDropdownValues = [];
|
|
4866
4983
|
input = '';
|
|
4867
4984
|
referencedEntitiesDataSource = new MatTableDataSource();
|
|
4868
4985
|
displayedColumns;
|
|
4869
4986
|
selection = new SelectionModel(true, []);
|
|
4870
4987
|
SelectionUtilities = SelectionUtilities;
|
|
4988
|
+
get currentDropdownValue() {
|
|
4989
|
+
return LodashUtilities.cloneDeep(this.dropdownValues ?? [])
|
|
4990
|
+
.find(v => v.value === this.input);
|
|
4991
|
+
}
|
|
4992
|
+
get shouldDisplayCurrentValue() {
|
|
4993
|
+
return !!this.currentDropdownValue && !(!!this.filteredDropdownValues.find(v => v.value === this.currentDropdownValue?.value));
|
|
4994
|
+
}
|
|
4871
4995
|
constructor(injector, globalConfig) {
|
|
4872
4996
|
super();
|
|
4873
4997
|
this.injector = injector;
|
|
@@ -4895,6 +5019,17 @@ class ReferencesManyInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
4895
5019
|
this.dropdownValues.splice(this.dropdownValues.indexOf(foundValue), 1);
|
|
4896
5020
|
}
|
|
4897
5021
|
}
|
|
5022
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues);
|
|
5023
|
+
}
|
|
5024
|
+
/**
|
|
5025
|
+
* Filters the dropdown values.
|
|
5026
|
+
* @param searchInput - The search input to filter for.
|
|
5027
|
+
*/
|
|
5028
|
+
filterDropdownValues(searchInput) {
|
|
5029
|
+
const filter = searchInput.toLowerCase();
|
|
5030
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues).filter(option => {
|
|
5031
|
+
return option.displayName.toLowerCase().includes(filter) || option.value.toLowerCase().includes(filter);
|
|
5032
|
+
});
|
|
4898
5033
|
}
|
|
4899
5034
|
/**
|
|
4900
5035
|
* Gets the value to display in the column.
|
|
@@ -4914,6 +5049,7 @@ class ReferencesManyInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
4914
5049
|
this.propertyValue.push(LodashUtilities.cloneDeep(this.input));
|
|
4915
5050
|
const foundDropdownValue = this.dropdownValues.find(v => v.value === this.input);
|
|
4916
5051
|
this.dropdownValues.splice(this.dropdownValues.indexOf(foundDropdownValue), 1);
|
|
5052
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues);
|
|
4917
5053
|
this.referencedEntitiesDataSource.data = this.propertyValue;
|
|
4918
5054
|
this.input = '';
|
|
4919
5055
|
this.emitChange();
|
|
@@ -4924,6 +5060,7 @@ class ReferencesManyInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
4924
5060
|
this.propertyValue = undefined;
|
|
4925
5061
|
}
|
|
4926
5062
|
this.dropdownValues = [];
|
|
5063
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues);
|
|
4927
5064
|
this.referencedEntitiesDataSource.data = this.propertyValue ?? [];
|
|
4928
5065
|
this.input = '';
|
|
4929
5066
|
this.emitChange();
|
|
@@ -4936,19 +5073,21 @@ class ReferencesManyInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
4936
5073
|
this.dropdownValues.push(foundDropdownValue);
|
|
4937
5074
|
}
|
|
4938
5075
|
});
|
|
5076
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues);
|
|
4939
5077
|
if (!this.propertyValue?.length) {
|
|
4940
5078
|
this.propertyValue = undefined;
|
|
4941
5079
|
}
|
|
4942
5080
|
this.referencedEntitiesDataSource.data = this.propertyValue ?? [];
|
|
4943
5081
|
this.selection.clear();
|
|
5082
|
+
this.input = '';
|
|
4944
5083
|
this.emitChange();
|
|
4945
5084
|
}
|
|
4946
5085
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ReferencesManyInputComponent, deps: [{ token: i0.EnvironmentInjector }, { token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }], target: i0.ɵɵFactoryTarget.Component });
|
|
4947
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ReferencesManyInputComponent, selector: "references-many-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n\n <mat-form-field>\n <mat-label>{{metadata.dropdownLabel}}</mat-label>\n <mat-select #inputModel=\"ngModel\" [name]=\"name + 'input'\" [disabled]=\"isReadOnly\" [(ngModel)]=\"input\">\n <mat-option>-</mat-option>\n <mat-option *ngFor=\"let value of
|
|
5086
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ReferencesManyInputComponent, selector: "references-many-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n\n <mat-form-field>\n <mat-label>{{metadata.dropdownLabel}}</mat-label>\n <mat-select #inputModel=\"ngModel\" [name]=\"name + 'input'\" [disabled]=\"isReadOnly\" [(ngModel)]=\"input\" (opened)=\"selectSearchInput.focus()\">\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterDropdownValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option>-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentValue\" [value]=\"currentDropdownValue?.value\">{{currentDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredDropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(inputModel)}}</mat-error>\n </mat-form-field>\n\n <button *ngIf=\"metadata.addAll\" type=\"button\" style=\"margin-left: 20px;\" mat-raised-button [disabled]=\"!dropdownValues.length || isReadOnly\" (click)=\"addAll()\">\n {{metadata.addAllButtonLabel}}\n </button>\n\n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button [disabled]=\"!input\" (click)=\"add()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button [disabled]=\"!selection.selected.length\" (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n\n <mat-table [dataSource]=\"referencedEntitiesDataSource\">\n <!-- select Column -->\n <ng-container *ngIf=\"!isReadOnly\" matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n [disabled]=\"!referencedEntitiesDataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, referencedEntitiesDataSource)\"\n [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, referencedEntitiesDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(selection, referencedEntitiesDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entityId\" class=\"entity\">\n {{getDisplayColumnValue(entityId, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}\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: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }] });
|
|
4948
5087
|
}
|
|
4949
5088
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ReferencesManyInputComponent, decorators: [{
|
|
4950
5089
|
type: Component,
|
|
4951
|
-
args: [{ selector: 'references-many-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n\n <mat-form-field>\n <mat-label>{{metadata.dropdownLabel}}</mat-label>\n <mat-select #inputModel=\"ngModel\" [name]=\"name + 'input'\" [disabled]=\"isReadOnly\" [(ngModel)]=\"input\">\n <mat-option>-</mat-option>\n <mat-option *ngFor=\"let value of
|
|
5090
|
+
args: [{ selector: 'references-many-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadata.displayName}}</b>\n </div>\n\n <mat-form-field>\n <mat-label>{{metadata.dropdownLabel}}</mat-label>\n <mat-select #inputModel=\"ngModel\" [name]=\"name + 'input'\" [disabled]=\"isReadOnly\" [(ngModel)]=\"input\" (opened)=\"selectSearchInput.focus()\">\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterDropdownValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option>-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentValue\" [value]=\"currentDropdownValue?.value\">{{currentDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredDropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(inputModel)}}</mat-error>\n </mat-form-field>\n\n <button *ngIf=\"metadata.addAll\" type=\"button\" style=\"margin-left: 20px;\" mat-raised-button [disabled]=\"!dropdownValues.length || isReadOnly\" (click)=\"addAll()\">\n {{metadata.addAllButtonLabel}}\n </button>\n\n <div class=\"buttons\">\n <button type=\"button\" mat-raised-button [disabled]=\"!input\" (click)=\"add()\">\n {{metadata.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button [disabled]=\"!selection.selected.length\" (click)=\"remove()\">\n {{metadata.removeButtonLabel}}\n </button>\n </div>\n\n <mat-table [dataSource]=\"referencedEntitiesDataSource\">\n <!-- select Column -->\n <ng-container *ngIf=\"!isReadOnly\" matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n [disabled]=\"!referencedEntitiesDataSource.data.length\" [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, referencedEntitiesDataSource)\"\n [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, referencedEntitiesDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(selection, referencedEntitiesDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entityId\" class=\"entity\">\n {{getDisplayColumnValue(entityId, dCol)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}.elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.array-headline{padding-bottom:10px}.buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.mat-column-select{flex:0 0 75px}\n"] }]
|
|
4952
5091
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }, { type: undefined, decorators: [{
|
|
4953
5092
|
type: Inject,
|
|
4954
5093
|
args: [NGX_INTERNAL_GLOBAL_DEFAULT_VALUES]
|
|
@@ -4957,12 +5096,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
4957
5096
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
4958
5097
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
4959
5098
|
class StringAutocompleteInputComponent extends NgxMatEntityBaseInputComponent {
|
|
4960
|
-
|
|
5099
|
+
injector;
|
|
5100
|
+
autocompleteStrings = [];
|
|
4961
5101
|
filteredAutocompleteStrings;
|
|
4962
|
-
|
|
5102
|
+
constructor(injector) {
|
|
5103
|
+
super();
|
|
5104
|
+
this.injector = injector;
|
|
5105
|
+
}
|
|
5106
|
+
async ngOnInit() {
|
|
4963
5107
|
super.ngOnInit();
|
|
4964
|
-
this.
|
|
4965
|
-
|
|
5108
|
+
await runInInjectionContext(this.injector, async () => {
|
|
5109
|
+
this.autocompleteStrings = await this.metadata.autocompleteValues(this.entity);
|
|
5110
|
+
this.filteredAutocompleteStrings = LodashUtilities.cloneDeep(this.autocompleteStrings);
|
|
5111
|
+
});
|
|
4966
5112
|
}
|
|
4967
5113
|
/**
|
|
4968
5114
|
* Dynamically filters the Autocomplete options when the user inputs something.
|
|
@@ -4975,29 +5121,55 @@ class StringAutocompleteInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
4975
5121
|
this.filteredAutocompleteStrings = LodashUtilities.cloneDeep(this.autocompleteStrings);
|
|
4976
5122
|
}
|
|
4977
5123
|
}
|
|
4978
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringAutocompleteInputComponent, deps:
|
|
4979
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: StringAutocompleteInputComponent, selector: "string-autocomplete-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matAutocomplete]=\"auto\"\n [required]=\"metadata.required(entity)\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [disabled]=\"isReadOnly\"\n [includedIn]=\"metadata.restrictToOptions ? autocompleteStrings : undefined\"\n [(ngModel)]=\"propertyValue\"\n (keyup)=\"filterAutocompleteStrings(propertyValue)\"\n (ngModelChange)=\"emitChange()\"\n >\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\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: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IncludedInValidatorDirective, selector: "[includedIn]", inputs: ["includedIn"] }, { kind: "component", type: i4$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.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"] }] });
|
|
5124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringAutocompleteInputComponent, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Component });
|
|
5125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: StringAutocompleteInputComponent, selector: "string-autocomplete-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field *ngIf=\"autocompleteStrings.length\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matAutocomplete]=\"auto\"\n [required]=\"metadata.required(entity)\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [disabled]=\"isReadOnly\"\n [includedIn]=\"metadata.restrictToOptions ? autocompleteStrings : undefined\"\n [(ngModel)]=\"propertyValue\"\n (keyup)=\"filterAutocompleteStrings(propertyValue)\"\n (ngModelChange)=\"emitChange()\"\n >\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\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: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IncludedInValidatorDirective, selector: "[includedIn]", inputs: ["includedIn"] }, { kind: "component", type: i4$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.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"] }] });
|
|
4980
5126
|
}
|
|
4981
5127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringAutocompleteInputComponent, decorators: [{
|
|
4982
5128
|
type: Component,
|
|
4983
|
-
args: [{ selector: 'string-autocomplete-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matAutocomplete]=\"auto\"\n [required]=\"metadata.required(entity)\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [disabled]=\"isReadOnly\"\n [includedIn]=\"metadata.restrictToOptions ? autocompleteStrings : undefined\"\n [(ngModel)]=\"propertyValue\"\n (keyup)=\"filterAutocompleteStrings(propertyValue)\"\n (ngModelChange)=\"emitChange()\"\n >\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
|
|
4984
|
-
}] });
|
|
5129
|
+
args: [{ selector: 'string-autocomplete-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field *ngIf=\"autocompleteStrings.length\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [name]=\"name\"\n [matAutocomplete]=\"auto\"\n [required]=\"metadata.required(entity)\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [disabled]=\"isReadOnly\"\n [includedIn]=\"metadata.restrictToOptions ? autocompleteStrings : undefined\"\n [(ngModel)]=\"propertyValue\"\n (keyup)=\"filterAutocompleteStrings(propertyValue)\"\n (ngModelChange)=\"emitChange()\"\n >\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"] }]
|
|
5130
|
+
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
4985
5131
|
|
|
4986
5132
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
4987
5133
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
4988
5134
|
class StringDropdownInputComponent extends NgxMatEntityBaseInputComponent {
|
|
5135
|
+
injector;
|
|
4989
5136
|
dropdownValues = [];
|
|
5137
|
+
filteredDropdownValues = [];
|
|
5138
|
+
get currentDropdownValue() {
|
|
5139
|
+
return LodashUtilities.cloneDeep(this.dropdownValues ?? [])
|
|
5140
|
+
.find(v => v.value === this.propertyValue);
|
|
5141
|
+
}
|
|
5142
|
+
get shouldDisplayCurrentValue() {
|
|
5143
|
+
return !!this.currentDropdownValue && !(!!this.filteredDropdownValues.find(v => v.value === this.currentDropdownValue?.value));
|
|
5144
|
+
}
|
|
5145
|
+
constructor(injector) {
|
|
5146
|
+
super();
|
|
5147
|
+
this.injector = injector;
|
|
5148
|
+
}
|
|
4990
5149
|
async ngOnInit() {
|
|
4991
5150
|
super.ngOnInit();
|
|
4992
|
-
this.
|
|
5151
|
+
await runInInjectionContext(this.injector, async () => {
|
|
5152
|
+
this.dropdownValues = await this.metadata.dropdownValues(this.entity);
|
|
5153
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues);
|
|
5154
|
+
});
|
|
5155
|
+
}
|
|
5156
|
+
/**
|
|
5157
|
+
* Filters the dropdown values.
|
|
5158
|
+
* @param searchInput - The search input to filter for.
|
|
5159
|
+
*/
|
|
5160
|
+
filterDropdownValues(searchInput) {
|
|
5161
|
+
const filter = searchInput.toLowerCase();
|
|
5162
|
+
this.filteredDropdownValues = LodashUtilities.cloneDeep(this.dropdownValues).filter(option => {
|
|
5163
|
+
return option.displayName.toLowerCase().includes(filter) || option.value?.toLowerCase().includes(filter);
|
|
5164
|
+
});
|
|
4993
5165
|
}
|
|
4994
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringDropdownInputComponent, deps:
|
|
4995
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: StringDropdownInputComponent, selector: "string-dropdown-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\n >\n <mat-option *ngFor=\"let value of
|
|
5166
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringDropdownInputComponent, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Component });
|
|
5167
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: StringDropdownInputComponent, selector: "string-dropdown-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\n (opened)=\"selectSearchInput.focus()\"\n >\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterDropdownValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentValue\" [value]=\"currentDropdownValue?.value\">{{currentDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredDropdownValues\" [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: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }] });
|
|
4996
5168
|
}
|
|
4997
5169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringDropdownInputComponent, decorators: [{
|
|
4998
5170
|
type: Component,
|
|
4999
|
-
args: [{ selector: 'string-dropdown-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\n >\n <mat-option *ngFor=\"let value of
|
|
5000
|
-
}] });
|
|
5171
|
+
args: [{ selector: 'string-dropdown-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #model=\"ngModel\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (selectionChange)=\"emitChange()\"\n (opened)=\"selectSearchInput.focus()\"\n >\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterDropdownValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentValue\" [value]=\"currentDropdownValue?.value\">{{currentDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredDropdownValues\" [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"] }]
|
|
5172
|
+
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
5001
5173
|
|
|
5002
5174
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
5003
5175
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
@@ -5011,11 +5183,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
5011
5183
|
}] });
|
|
5012
5184
|
|
|
5013
5185
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
5186
|
+
var PasswordStrength;
|
|
5187
|
+
(function (PasswordStrength) {
|
|
5188
|
+
PasswordStrength["WEAK"] = "weak";
|
|
5189
|
+
PasswordStrength["MEDIUM"] = "medium";
|
|
5190
|
+
PasswordStrength["STRONG"] = "strong";
|
|
5191
|
+
})(PasswordStrength || (PasswordStrength = {}));
|
|
5014
5192
|
// eslint-disable-next-line angular/prefer-standalone-component
|
|
5015
5193
|
class StringPasswordInputComponent extends NgxMatEntityBaseInputComponent {
|
|
5016
5194
|
hide = true;
|
|
5017
5195
|
hideConfirm = true;
|
|
5018
5196
|
confirmRequired = false;
|
|
5197
|
+
passwordStrength;
|
|
5198
|
+
PasswordStrength = PasswordStrength;
|
|
5019
5199
|
get confirmPassword() {
|
|
5020
5200
|
return ReflectUtilities.getMetadata(EntityUtilities.CONFIRM_PASSWORD_KEY, this.entity, this.key);
|
|
5021
5201
|
}
|
|
@@ -5029,14 +5209,60 @@ class StringPasswordInputComponent extends NgxMatEntityBaseInputComponent {
|
|
|
5029
5209
|
}
|
|
5030
5210
|
passwordInput() {
|
|
5031
5211
|
this.confirmRequired = Boolean(this.propertyValue);
|
|
5212
|
+
this.setPasswordStrength();
|
|
5032
5213
|
this.emitChange();
|
|
5033
5214
|
}
|
|
5215
|
+
setPasswordStrength() {
|
|
5216
|
+
if (this.isPasswordStrong()) {
|
|
5217
|
+
this.passwordStrength = PasswordStrength.STRONG;
|
|
5218
|
+
return;
|
|
5219
|
+
}
|
|
5220
|
+
if (this.isPasswordMedium()) {
|
|
5221
|
+
this.passwordStrength = PasswordStrength.MEDIUM;
|
|
5222
|
+
return;
|
|
5223
|
+
}
|
|
5224
|
+
if (this.isPasswordWeak()) {
|
|
5225
|
+
this.passwordStrength = PasswordStrength.WEAK;
|
|
5226
|
+
return;
|
|
5227
|
+
}
|
|
5228
|
+
this.passwordStrength = undefined;
|
|
5229
|
+
}
|
|
5230
|
+
// long AND complex
|
|
5231
|
+
isPasswordStrong() {
|
|
5232
|
+
if (!this.propertyValue) {
|
|
5233
|
+
return false;
|
|
5234
|
+
}
|
|
5235
|
+
return this.propertyValue?.length >= 15 && this.isPasswordComplex();
|
|
5236
|
+
}
|
|
5237
|
+
// long OR complex
|
|
5238
|
+
isPasswordMedium() {
|
|
5239
|
+
if (!this.propertyValue) {
|
|
5240
|
+
return false;
|
|
5241
|
+
}
|
|
5242
|
+
return this.propertyValue?.length >= 15 || this.isPasswordComplex();
|
|
5243
|
+
}
|
|
5244
|
+
// exists
|
|
5245
|
+
isPasswordWeak() {
|
|
5246
|
+
if (!this.propertyValue) {
|
|
5247
|
+
return false;
|
|
5248
|
+
}
|
|
5249
|
+
return true;
|
|
5250
|
+
}
|
|
5251
|
+
isPasswordComplex() {
|
|
5252
|
+
if (!this.propertyValue) {
|
|
5253
|
+
return false;
|
|
5254
|
+
}
|
|
5255
|
+
return /[A-Z]/g.test(this.propertyValue)
|
|
5256
|
+
&& /[a-z]/g.test(this.propertyValue)
|
|
5257
|
+
&& /[0-9]/g.test(this.propertyValue)
|
|
5258
|
+
&& /[!@#$%^&*(),.?":{}|<>]/.test(this.propertyValue);
|
|
5259
|
+
}
|
|
5034
5260
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringPasswordInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5035
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: StringPasswordInputComponent, selector: "string-password-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"password-row\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [type]=\"hide ? 'password' : 'text'\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hide = !hide\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hide\" class=\"fas fa-eye-slash\"></i>\n <i *ngIf=\"!hide\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n <mat-form-field *ngIf=\"metadata.needsConfirmation\">\n <mat-label>{{metadata.confirmationDisplayName}}</mat-label>\n <input\n #confirmModel=\"ngModel\"\n matInput\n [type]=\"hideConfirm ? 'password' : 'text'\"\n [name]=\"name + 'confirmPassword'\"\n [required]=\"confirmRequired\"\n [disabled]=\"isReadOnly\"\n [passwordMatch]=\"propertyValue\"\n [(ngModel)]=\"confirmPassword\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hideConfirm = !hideConfirm\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hideConfirm\" class=\"fas fa-eye-slash\"></i>\n <i *ngIf=\"!hideConfirm\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(confirmModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: [".password-row{display:flex;justify-content:space-evenly;column-gap:24px}.password-row mat-form-field{flex:1 1 0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: "directive", type: PasswordMatchValidatorDirective, selector: "[passwordMatch]", inputs: ["passwordMatch"] }] });
|
|
5261
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: StringPasswordInputComponent, selector: "string-password-input", usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"password-row\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [type]=\"hide ? 'password' : 'text'\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hide = !hide\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hide\" class=\"fas fa-eye-slash\"></i>\n <i *ngIf=\"!hide\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n <div *ngIf=\"passwordStrength\" class=\"password-strength-indicator\"\n [class.green]=\"passwordStrength === PasswordStrength.STRONG\"\n [class.yellow]=\"passwordStrength === PasswordStrength.MEDIUM\"\n [class.red]=\"passwordStrength === PasswordStrength.WEAK\"\n >\n </div>\n </mat-form-field>\n <mat-form-field *ngIf=\"metadata.needsConfirmation\">\n <mat-label>{{metadata.confirmationDisplayName}}</mat-label>\n <input\n #confirmModel=\"ngModel\"\n matInput\n [type]=\"hideConfirm ? 'password' : 'text'\"\n [name]=\"name + 'confirmPassword'\"\n [required]=\"confirmRequired\"\n [disabled]=\"isReadOnly\"\n [passwordMatch]=\"propertyValue\"\n [(ngModel)]=\"confirmPassword\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hideConfirm = !hideConfirm\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hideConfirm\" class=\"fas fa-eye-slash\"></i>\n <!-- eslint-disable-next-line angular/cyclomatic-complexity -->\n <i *ngIf=\"!hideConfirm\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(confirmModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: [".password-row{display:flex;justify-content:space-evenly;column-gap:24px}.password-row mat-form-field{flex:1 1 0}.password-strength-indicator{height:5px;width:100%}.green{background-color:green}.yellow{background-color:#b3b30f}.red{background-color:red}@media (max-width: 767px){.password-row{flex-wrap:wrap}.password-row mat-form-field{min-width:100%}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: "directive", type: PasswordMatchValidatorDirective, selector: "[passwordMatch]", inputs: ["passwordMatch"] }] });
|
|
5036
5262
|
}
|
|
5037
5263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: StringPasswordInputComponent, decorators: [{
|
|
5038
5264
|
type: Component,
|
|
5039
|
-
args: [{ selector: 'string-password-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"password-row\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [type]=\"hide ? 'password' : 'text'\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hide = !hide\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hide\" class=\"fas fa-eye-slash\"></i>\n <i *ngIf=\"!hide\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n <mat-form-field *ngIf=\"metadata.needsConfirmation\">\n <mat-label>{{metadata.confirmationDisplayName}}</mat-label>\n <input\n #confirmModel=\"ngModel\"\n matInput\n [type]=\"hideConfirm ? 'password' : 'text'\"\n [name]=\"name + 'confirmPassword'\"\n [required]=\"confirmRequired\"\n [disabled]=\"isReadOnly\"\n [passwordMatch]=\"propertyValue\"\n [(ngModel)]=\"confirmPassword\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hideConfirm = !hideConfirm\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hideConfirm\" class=\"fas fa-eye-slash\"></i>\n <i *ngIf=\"!hideConfirm\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(confirmModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: [".password-row{display:flex;justify-content:space-evenly;column-gap:24px}.password-row mat-form-field{flex:1 1 0}\n"] }]
|
|
5265
|
+
args: [{ selector: 'string-password-input', template: "<!-- eslint-disable angular/no-call-expression -->\n<div class=\"password-row\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n #model=\"ngModel\"\n matInput\n [type]=\"hide ? 'password' : 'text'\"\n [name]=\"name\"\n [required]=\"metadata.required(entity)\"\n [pattern]=\"metadata.regex ?? '[\\\\s\\\\S]*'\"\n [minlength]=\"metadata.minLength ?? null\"\n [maxlength]=\"metadata.maxLength ?? null\"\n [disabled]=\"isReadOnly\"\n [(ngModel)]=\"propertyValue\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hide = !hide\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hide\" class=\"fas fa-eye-slash\"></i>\n <i *ngIf=\"!hide\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n <div *ngIf=\"passwordStrength\" class=\"password-strength-indicator\"\n [class.green]=\"passwordStrength === PasswordStrength.STRONG\"\n [class.yellow]=\"passwordStrength === PasswordStrength.MEDIUM\"\n [class.red]=\"passwordStrength === PasswordStrength.WEAK\"\n >\n </div>\n </mat-form-field>\n <mat-form-field *ngIf=\"metadata.needsConfirmation\">\n <mat-label>{{metadata.confirmationDisplayName}}</mat-label>\n <input\n #confirmModel=\"ngModel\"\n matInput\n [type]=\"hideConfirm ? 'password' : 'text'\"\n [name]=\"name + 'confirmPassword'\"\n [required]=\"confirmRequired\"\n [disabled]=\"isReadOnly\"\n [passwordMatch]=\"propertyValue\"\n [(ngModel)]=\"confirmPassword\"\n (ngModelChange)=\"passwordInput()\"\n >\n <button type=\"button\" mat-icon-button matSuffix (click)=\"hideConfirm = !hideConfirm\">\n <div class=\"d-flex justify-content-center align-items-center\">\n <i *ngIf=\"hideConfirm\" class=\"fas fa-eye-slash\"></i>\n <!-- eslint-disable-next-line angular/cyclomatic-complexity -->\n <i *ngIf=\"!hideConfirm\" class=\"fas fa-eye\"></i>\n </div>\n </button>\n <mat-error>{{getValidationErrorMessage(confirmModel)}}</mat-error>\n </mat-form-field>\n</div>", styles: [".password-row{display:flex;justify-content:space-evenly;column-gap:24px}.password-row mat-form-field{flex:1 1 0}.password-strength-indicator{height:5px;width:100%}.green{background-color:green}.yellow{background-color:#b3b30f}.red{background-color:red}@media (max-width: 767px){.password-row{flex-wrap:wrap}.password-row mat-form-field{min-width:100%}}\n"] }]
|
|
5040
5266
|
}] });
|
|
5041
5267
|
|
|
5042
5268
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
@@ -5310,6 +5536,10 @@ class NgxMatEntityInputComponent {
|
|
|
5310
5536
|
* The possible references one dropdown values.
|
|
5311
5537
|
*/
|
|
5312
5538
|
referencesOneDropdownValues;
|
|
5539
|
+
/**
|
|
5540
|
+
* The filtered dropdown values that get displayed in the references one dropdown input.
|
|
5541
|
+
*/
|
|
5542
|
+
filteredReferencesOneDropdownValues;
|
|
5313
5543
|
/**
|
|
5314
5544
|
* A unique input name for the references one property.
|
|
5315
5545
|
*/
|
|
@@ -5330,6 +5560,25 @@ class NgxMatEntityInputComponent {
|
|
|
5330
5560
|
* Provides functionality around material selections inside of tables.
|
|
5331
5561
|
*/
|
|
5332
5562
|
SelectionUtilities = SelectionUtilities;
|
|
5563
|
+
// eslint-disable-next-line jsdoc/require-returns
|
|
5564
|
+
/**
|
|
5565
|
+
* Gets the currently selected dropdown value for references one.
|
|
5566
|
+
* Is needed so that the dropdown value will still be displayed,
|
|
5567
|
+
* even when the filter method removes the value from the selectable dropdown values.
|
|
5568
|
+
*/
|
|
5569
|
+
get currentReferencesOneDropdownValue() {
|
|
5570
|
+
return LodashUtilities.cloneDeep(this.referencesOneDropdownValues ?? [])
|
|
5571
|
+
.find(v => v.value === this.internalEntity[this.internalPropertyKey]);
|
|
5572
|
+
}
|
|
5573
|
+
// eslint-disable-next-line jsdoc/require-returns
|
|
5574
|
+
/**
|
|
5575
|
+
* Whether or not the currently selected references one value should be shown,
|
|
5576
|
+
* although it would have been filtered out by the search.
|
|
5577
|
+
*/
|
|
5578
|
+
get shouldDisplayCurrentReferencesOneDropdownValue() {
|
|
5579
|
+
return !!this.currentReferencesOneDropdownValue
|
|
5580
|
+
&& !(!!this.filteredReferencesOneDropdownValues.find(v => v.value === this.currentReferencesOneDropdownValue?.value));
|
|
5581
|
+
}
|
|
5333
5582
|
constructor(dialog, injector, router, defaultGetValidationErrorMessage, globalConfig, http) {
|
|
5334
5583
|
this.dialog = dialog;
|
|
5335
5584
|
this.injector = injector;
|
|
@@ -5350,6 +5599,9 @@ class NgxMatEntityInputComponent {
|
|
|
5350
5599
|
return true;
|
|
5351
5600
|
}
|
|
5352
5601
|
const metadata = EntityUtilities.getPropertyMetadata(property, key);
|
|
5602
|
+
if (!metadata) {
|
|
5603
|
+
throw new Error(`No metadata was found for the key "${String(key)}"`);
|
|
5604
|
+
}
|
|
5353
5605
|
return metadata.isReadOnly(property);
|
|
5354
5606
|
});
|
|
5355
5607
|
}
|
|
@@ -5382,14 +5634,20 @@ class NgxMatEntityInputComponent {
|
|
|
5382
5634
|
this.internalPropertyKey = this.propertyKey;
|
|
5383
5635
|
this.internalGetValidationErrorMessage = this.getValidationErrorMessage ?? this.defaultGetValidationErrorMessage;
|
|
5384
5636
|
this.internalIsReadOnly = this.isReadOnly ?? false;
|
|
5385
|
-
|
|
5637
|
+
const foundType = EntityUtilities.getPropertyType(this.internalEntity, this.internalPropertyKey);
|
|
5638
|
+
if (foundType == null) {
|
|
5639
|
+
throw new Error(`No type was found for the key "${String(this.internalPropertyKey)}"`);
|
|
5640
|
+
}
|
|
5641
|
+
this.type = foundType;
|
|
5386
5642
|
if (this.validEmpty === true) {
|
|
5387
|
-
// eslint-disable-next-line max-len
|
|
5388
5643
|
const currentMetadata = ReflectUtilities.getMetadata('metadata', this.internalEntity, this.internalPropertyKey);
|
|
5389
|
-
// eslint-disable-next-line max-len
|
|
5390
5644
|
ReflectUtilities.defineMetadata('metadata', { ...currentMetadata, required: defaultFalse }, this.internalEntity, this.internalPropertyKey);
|
|
5391
5645
|
}
|
|
5392
|
-
|
|
5646
|
+
const foundMetadata = EntityUtilities.getPropertyMetadata(this.internalEntity, this.internalPropertyKey, this.type);
|
|
5647
|
+
if (!foundMetadata) {
|
|
5648
|
+
throw new Error(`No metadata was found for the key "${String(this.internalPropertyKey)}"`);
|
|
5649
|
+
}
|
|
5650
|
+
this.metadata = foundMetadata;
|
|
5393
5651
|
switch (this.type) {
|
|
5394
5652
|
case DecoratorTypes.OBJECT:
|
|
5395
5653
|
this.initObjectInput();
|
|
@@ -5412,11 +5670,21 @@ class NgxMatEntityInputComponent {
|
|
|
5412
5670
|
this.referencesOneName = this.internalPropertyKey.toString() + 'input' + UUIDUtilities.create();
|
|
5413
5671
|
void runInInjectionContext(this.injector, (async () => {
|
|
5414
5672
|
this.referencesOneAllReferencedEntities = await this.metadataReferencesOne.getReferencedEntities();
|
|
5415
|
-
// eslint-disable-next-line max-len
|
|
5416
5673
|
this.referencesOneDropdownValues = this.metadataReferencesOne.getDropdownValues(LodashUtilities.cloneDeep(this.referencesOneAllReferencedEntities));
|
|
5674
|
+
this.filteredReferencesOneDropdownValues = LodashUtilities.cloneDeep(this.referencesOneDropdownValues);
|
|
5417
5675
|
this.setReferencesOneObject();
|
|
5418
5676
|
}));
|
|
5419
5677
|
}
|
|
5678
|
+
/**
|
|
5679
|
+
* Filters the references one dropdown values.
|
|
5680
|
+
* @param searchInput - The search input to filter for.
|
|
5681
|
+
*/
|
|
5682
|
+
filterReferencesOneValues(searchInput) {
|
|
5683
|
+
const filter = searchInput.toLowerCase();
|
|
5684
|
+
this.filteredReferencesOneDropdownValues = LodashUtilities.cloneDeep(this.referencesOneDropdownValues).filter(option => {
|
|
5685
|
+
return option.displayName.toLowerCase().includes(filter) || option.value.toLowerCase().includes(filter);
|
|
5686
|
+
});
|
|
5687
|
+
}
|
|
5420
5688
|
initHasMany() {
|
|
5421
5689
|
this.metadata = new HasManyDecoratorConfigInternal(this.metadata, this.globalConfig);
|
|
5422
5690
|
ReflectUtilities.defineMetadata('metadata', this.metadata, this.internalEntity, this.internalPropertyKey);
|
|
@@ -5439,7 +5707,6 @@ class NgxMatEntityInputComponent {
|
|
|
5439
5707
|
}
|
|
5440
5708
|
this.hasManyDataSource.sortingDataAccessor = (entity, header) => {
|
|
5441
5709
|
return runInInjectionContext(this.injector, () => {
|
|
5442
|
-
// eslint-disable-next-line max-len
|
|
5443
5710
|
return this.metadataHasMany.tableData.baseData.displayColumns.find((dp) => dp.displayName === header)?.value(entity);
|
|
5444
5711
|
});
|
|
5445
5712
|
};
|
|
@@ -5510,7 +5777,6 @@ class NgxMatEntityInputComponent {
|
|
|
5510
5777
|
input.click();
|
|
5511
5778
|
}
|
|
5512
5779
|
importJson(file) {
|
|
5513
|
-
// eslint-disable-next-line max-len
|
|
5514
5780
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.hasManyImportAction.confirmDialogData)
|
|
5515
5781
|
.withDefault('text', this.metadataHasMany.tableData.baseData.importActionData.confirmDialogData?.text)
|
|
5516
5782
|
.withDefault('title', this.hasManyImportAction.displayName)
|
|
@@ -5530,7 +5796,6 @@ class NgxMatEntityInputComponent {
|
|
|
5530
5796
|
* Sets the references one object using the input id.
|
|
5531
5797
|
*/
|
|
5532
5798
|
setReferencesOneObject() {
|
|
5533
|
-
// eslint-disable-next-line max-len
|
|
5534
5799
|
const foundEntity = this.metadataReferencesOne.getEntityForId(this.internalEntity[this.internalPropertyKey], this.referencesOneAllReferencedEntities);
|
|
5535
5800
|
this.referencesOneObject = new this.metadataReferencesOne.EntityClass(foundEntity);
|
|
5536
5801
|
this.referencesOnePropertyTabs = EntityUtilities.getEntityTabs(this.referencesOneObject, this.injector);
|
|
@@ -5644,7 +5909,6 @@ class NgxMatEntityInputComponent {
|
|
|
5644
5909
|
const res = await firstValueFrom(this.editHasManyDialogRef.afterClosed());
|
|
5645
5910
|
if (res === 0) {
|
|
5646
5911
|
const data = this.hasManyDataSource.data;
|
|
5647
|
-
// eslint-disable-next-line max-len
|
|
5648
5912
|
data[this.hasManyDataSource.data.findIndex((e) => e[this.hasManyEntityService.idKey] === entity[this.hasManyEntityService.idKey])] = entity;
|
|
5649
5913
|
this.hasManyDataSource.data = data;
|
|
5650
5914
|
this.hasManySelection.clear();
|
|
@@ -5662,7 +5926,6 @@ class NgxMatEntityInputComponent {
|
|
|
5662
5926
|
this.dialogConfirmEditHasMany();
|
|
5663
5927
|
return;
|
|
5664
5928
|
}
|
|
5665
|
-
// eslint-disable-next-line max-len
|
|
5666
5929
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.metadataHasMany.tableData.editData.confirmEditDialogData)
|
|
5667
5930
|
.withDefault('text', this.globalConfig.confirmSaveText)
|
|
5668
5931
|
.withDefault('confirmButtonLabel', this.globalConfig.saveLabel)
|
|
@@ -5695,7 +5958,6 @@ class NgxMatEntityInputComponent {
|
|
|
5695
5958
|
this.confirmDeleteHasManyEntity();
|
|
5696
5959
|
return;
|
|
5697
5960
|
}
|
|
5698
|
-
// eslint-disable-next-line max-len
|
|
5699
5961
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.metadataHasMany.tableData.editData.confirmDeleteDialogData)
|
|
5700
5962
|
.withDefault('text', this.globalConfig.confirmDeleteText)
|
|
5701
5963
|
.withDefault('type', 'delete')
|
|
@@ -5731,7 +5993,7 @@ class NgxMatEntityInputComponent {
|
|
|
5731
5993
|
* @throws When no EntityClass was provided, as a new call is needed to initialize metadata.
|
|
5732
5994
|
*/
|
|
5733
5995
|
createHasManyEntity() {
|
|
5734
|
-
runInInjectionContext(this.injector, () => {
|
|
5996
|
+
void runInInjectionContext(this.injector, async () => {
|
|
5735
5997
|
if (this.metadataHasMany.tableData.baseData.allowCreate()) {
|
|
5736
5998
|
if (!this.metadataHasMany.tableData.baseData.EntityClass) {
|
|
5737
5999
|
throw new Error('No "EntityClass" specified for this table');
|
|
@@ -5746,17 +6008,17 @@ class NgxMatEntityInputComponent {
|
|
|
5746
6008
|
this.createHasManyDefaultPage();
|
|
5747
6009
|
return;
|
|
5748
6010
|
}
|
|
5749
|
-
this.createHasManyDefaultDialog(entity);
|
|
6011
|
+
await this.createHasManyDefaultDialog(entity);
|
|
5750
6012
|
}
|
|
5751
6013
|
});
|
|
5752
6014
|
}
|
|
5753
6015
|
createHasManyDefaultPage() {
|
|
5754
6016
|
void this.router.navigateByUrl(this.hasManyEntityService.createBaseRoute);
|
|
5755
6017
|
}
|
|
5756
|
-
createHasManyDefaultDialog(entity) {
|
|
6018
|
+
async createHasManyDefaultDialog(entity) {
|
|
5757
6019
|
this.hasManyEntity = entity;
|
|
5758
6020
|
this.hasManyCreateTabs = EntityUtilities.getEntityTabs(this.hasManyEntity, this.injector, true);
|
|
5759
|
-
this.checkIsHasManyEntityValid('create');
|
|
6021
|
+
await this.checkIsHasManyEntityValid('create');
|
|
5760
6022
|
this.createHasManyDialogRef = this.dialog.open(this.createHasManyDialog, {
|
|
5761
6023
|
minWidth: '60%',
|
|
5762
6024
|
autoFocus: false,
|
|
@@ -5774,7 +6036,6 @@ class NgxMatEntityInputComponent {
|
|
|
5774
6036
|
this.dialogConfirmCreateHasMany();
|
|
5775
6037
|
return;
|
|
5776
6038
|
}
|
|
5777
|
-
// eslint-disable-next-line max-len
|
|
5778
6039
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.metadataHasMany.tableData.createData.confirmCreateDialogData)
|
|
5779
6040
|
.withDefault('text', this.globalConfig.confirmCreateText)
|
|
5780
6041
|
.withDefault('confirmButtonLabel', this.globalConfig.createLabel)
|
|
@@ -5814,7 +6075,6 @@ class NgxMatEntityInputComponent {
|
|
|
5814
6075
|
this.confirmRunHasManyTableAction(action);
|
|
5815
6076
|
return;
|
|
5816
6077
|
}
|
|
5817
|
-
// eslint-disable-next-line max-len
|
|
5818
6078
|
const defaultText = action.type === 'multi-select' ? this.globalConfig.confirmMultiSelectActionText(this.hasManySelection.selected) : this.globalConfig.confirmBaseActionText;
|
|
5819
6079
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, action.confirmDialogData)
|
|
5820
6080
|
.withDefault('text', defaultText)
|
|
@@ -5859,24 +6119,23 @@ class NgxMatEntityInputComponent {
|
|
|
5859
6119
|
* Checks if the entity is valid for updating and if it is dirty.
|
|
5860
6120
|
*/
|
|
5861
6121
|
async checkHasManyEntity() {
|
|
5862
|
-
this.checkIsHasManyEntityValid('update');
|
|
6122
|
+
await this.checkIsHasManyEntityValid('update');
|
|
5863
6123
|
this.isHasManyEntityDirty = await EntityUtilities.isDirty(this.hasManyEntity, this.hasManyEntityPriorChanges, this.http);
|
|
5864
6124
|
}
|
|
5865
6125
|
/**
|
|
5866
6126
|
* Checks if the entity is valid.
|
|
5867
6127
|
* @param omit - Whether values omitted for create or update should be left out.
|
|
5868
6128
|
*/
|
|
5869
|
-
checkIsHasManyEntityValid(omit) {
|
|
5870
|
-
this.hasManyValidationErrors = ValidationUtilities.getEntityValidationErrors(this.hasManyEntity, omit);
|
|
5871
|
-
// eslint-disable-next-line max-len
|
|
6129
|
+
async checkIsHasManyEntityValid(omit) {
|
|
6130
|
+
this.hasManyValidationErrors = await ValidationUtilities.getEntityValidationErrors(this.hasManyEntity, this.injector, omit);
|
|
5872
6131
|
this.hasManyTooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.hasManyValidationErrors));
|
|
5873
6132
|
this.isHasManyEntityValid = this.hasManyValidationErrors.length === 0;
|
|
5874
6133
|
}
|
|
5875
6134
|
/**
|
|
5876
6135
|
* Checks whether the array item is valid and if the array item is dirty.
|
|
5877
6136
|
*/
|
|
5878
|
-
checkArrayItem() {
|
|
5879
|
-
this.checkIsArrayItemValid();
|
|
6137
|
+
async checkArrayItem() {
|
|
6138
|
+
await this.checkIsArrayItemValid();
|
|
5880
6139
|
void this.checkIsArrayItemDirty();
|
|
5881
6140
|
}
|
|
5882
6141
|
/**
|
|
@@ -5888,9 +6147,8 @@ class NgxMatEntityInputComponent {
|
|
|
5888
6147
|
/**
|
|
5889
6148
|
* Checks if the arrayItem is valid.
|
|
5890
6149
|
*/
|
|
5891
|
-
checkIsArrayItemValid() {
|
|
5892
|
-
this.arrayItemValidationErrors = ValidationUtilities.getEntityValidationErrors(this.arrayItem, 'create');
|
|
5893
|
-
// eslint-disable-next-line max-len
|
|
6150
|
+
async checkIsArrayItemValid() {
|
|
6151
|
+
this.arrayItemValidationErrors = await ValidationUtilities.getEntityValidationErrors(this.arrayItem, this.injector, 'create');
|
|
5894
6152
|
this.arrayItemTooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.arrayItemValidationErrors));
|
|
5895
6153
|
this.isArrayItemValid = this.arrayItemValidationErrors.length === 0;
|
|
5896
6154
|
}
|
|
@@ -5906,6 +6164,7 @@ class NgxMatEntityInputComponent {
|
|
|
5906
6164
|
* or in a separate dialog if it is set to false.
|
|
5907
6165
|
*/
|
|
5908
6166
|
async addEntity() {
|
|
6167
|
+
await this.checkIsArrayItemValid();
|
|
5909
6168
|
if (this.metadataEntityArray.createInline) {
|
|
5910
6169
|
if (!this.metadataEntityArray.allowDuplicates) {
|
|
5911
6170
|
for (const v of this.entityArrayValues) {
|
|
@@ -5923,7 +6182,7 @@ class NgxMatEntityInputComponent {
|
|
|
5923
6182
|
this.entityArrayDataSource.data = this.entityArrayValues;
|
|
5924
6183
|
EntityUtilities.resetChangesOnEntity(this.arrayItem, this.arrayItemPriorChanges);
|
|
5925
6184
|
EntityUtilities.setDefaultValues(this.arrayItem);
|
|
5926
|
-
this.checkIsArrayItemValid();
|
|
6185
|
+
await this.checkIsArrayItemValid();
|
|
5927
6186
|
this.emitChange();
|
|
5928
6187
|
}
|
|
5929
6188
|
else {
|
|
@@ -5932,27 +6191,26 @@ class NgxMatEntityInputComponent {
|
|
|
5932
6191
|
autoFocus: false,
|
|
5933
6192
|
restoreFocus: false
|
|
5934
6193
|
});
|
|
5935
|
-
this.checkIsArrayItemValid();
|
|
5936
6194
|
}
|
|
5937
6195
|
}
|
|
5938
6196
|
/**
|
|
5939
6197
|
* Adds the array item defined in the dialog.
|
|
5940
6198
|
*/
|
|
5941
|
-
addArrayItem() {
|
|
6199
|
+
async addArrayItem() {
|
|
5942
6200
|
if (!this.isArrayItemValid) {
|
|
5943
6201
|
return;
|
|
5944
6202
|
}
|
|
5945
6203
|
this.entityArrayValues.push(LodashUtilities.cloneDeep(this.arrayItem));
|
|
5946
6204
|
this.entityArrayDataSource.data = this.entityArrayValues;
|
|
5947
|
-
this.closeAddArrayItemDialog();
|
|
6205
|
+
await this.closeAddArrayItemDialog();
|
|
5948
6206
|
}
|
|
5949
6207
|
/**
|
|
5950
6208
|
* Cancels adding the array item defined in the dialog.
|
|
5951
6209
|
*/
|
|
5952
|
-
closeAddArrayItemDialog() {
|
|
6210
|
+
async closeAddArrayItemDialog() {
|
|
5953
6211
|
this.addArrayItemDialogRef.close();
|
|
5954
6212
|
EntityUtilities.resetChangesOnEntity(this.arrayItem, this.arrayItemPriorChanges);
|
|
5955
|
-
this.checkIsArrayItemValid();
|
|
6213
|
+
await this.checkIsArrayItemValid();
|
|
5956
6214
|
this.emitChange();
|
|
5957
6215
|
}
|
|
5958
6216
|
/**
|
|
@@ -5960,14 +6218,14 @@ class NgxMatEntityInputComponent {
|
|
|
5960
6218
|
* @param entity - The entity that has been clicked.
|
|
5961
6219
|
* @param dCol - The display column that was clicked on.
|
|
5962
6220
|
*/
|
|
5963
|
-
editArrayItem(entity, dCol) {
|
|
6221
|
+
async editArrayItem(entity, dCol) {
|
|
5964
6222
|
if (dCol.disableClick === true) {
|
|
5965
6223
|
return;
|
|
5966
6224
|
}
|
|
5967
6225
|
this.indexOfEditedArrayItem = this.entityArrayValues.indexOf(entity);
|
|
5968
6226
|
this.arrayItem = new this.metadataEntityArray.EntityClass(entity);
|
|
5969
6227
|
this.arrayItemPriorChanges = LodashUtilities.cloneDeep(this.arrayItem);
|
|
5970
|
-
this.checkArrayItem();
|
|
6228
|
+
await this.checkArrayItem();
|
|
5971
6229
|
this.editArrayItemDialogRef = this.dialog.open(this.editArrayItemDialog, {
|
|
5972
6230
|
minWidth: '60%',
|
|
5973
6231
|
autoFocus: false,
|
|
@@ -5980,16 +6238,16 @@ class NgxMatEntityInputComponent {
|
|
|
5980
6238
|
saveArrayItem() {
|
|
5981
6239
|
this.entityArrayValues[this.indexOfEditedArrayItem] = LodashUtilities.cloneDeep(this.arrayItem);
|
|
5982
6240
|
this.entityArrayDataSource.data = this.entityArrayValues;
|
|
5983
|
-
this.closeEditArrayItemDialog();
|
|
6241
|
+
void this.closeEditArrayItemDialog();
|
|
5984
6242
|
}
|
|
5985
6243
|
/**
|
|
5986
6244
|
* Closes the edit array item dialog and resets changes.
|
|
5987
6245
|
*/
|
|
5988
|
-
closeEditArrayItemDialog() {
|
|
6246
|
+
async closeEditArrayItemDialog() {
|
|
5989
6247
|
this.editArrayItemDialogRef.close();
|
|
5990
6248
|
this.arrayItem = new this.metadataEntityArray.EntityClass();
|
|
5991
6249
|
this.arrayItemPriorChanges = LodashUtilities.cloneDeep(this.arrayItem);
|
|
5992
|
-
this.checkArrayItem();
|
|
6250
|
+
await this.checkArrayItem();
|
|
5993
6251
|
this.emitChange();
|
|
5994
6252
|
}
|
|
5995
6253
|
/**
|
|
@@ -6000,11 +6258,11 @@ class NgxMatEntityInputComponent {
|
|
|
6000
6258
|
this.emitChange();
|
|
6001
6259
|
}
|
|
6002
6260
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxMatEntityInputComponent, deps: [{ token: i1.MatDialog }, { token: i0.EnvironmentInjector }, { token: i2$2.Router }, { token: NGX_GET_VALIDATION_ERROR_MESSAGE }, { token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
6003
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: NgxMatEntityInputComponent, selector: "ngx-mat-entity-input", inputs: { entity: "entity", propertyKey: "propertyKey", getValidationErrorMessage: "getValidationErrorMessage", hideOmitForCreate: "hideOmitForCreate", hideOmitForEdit: "hideOmitForEdit", validEmpty: "validEmpty", isReadOnly: "isReadOnly" }, outputs: { inputChangeEvent: "inputChangeEvent" }, viewQueries: [{ propertyName: "addArrayItemDialog", first: true, predicate: ["addArrayItemDialog"], descendants: true }, { propertyName: "editArrayItemDialog", first: true, predicate: ["editArrayItemDialog"], descendants: true }, { propertyName: "hasManyPaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "hasManySort", first: true, predicate: MatSort, descendants: true }, { propertyName: "hasManyFilter", first: true, predicate: ["filter"], descendants: true, static: true }, { propertyName: "createHasManyDialog", first: true, predicate: ["createHasManyDialog"], descendants: true }, { propertyName: "editHasManyDialog", first: true, predicate: ["editHasManyDialog"], descendants: true }], ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n \n<!-- eslint-disable angular/cyclomatic-complexity -->\n<div *ngIf=\"!(hideOmitForCreate && metadata.omitForCreate) && !(hideOmitForEdit && metadata.omitForUpdate)\" [ngSwitch]=\"type\">\n <!-------------------------------------------->\n <!-----------------Strings-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.STRING\">\n <string-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_TEXTBOX\">\n <string-textbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-textbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_AUTOCOMPLETE\">\n <string-autocomplete-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-autocomplete-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_DROPDOWN\">\n <string-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_PASSWORD\">\n <string-password-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-password-input>\n </div>\n\n <!-------------------------------------------->\n <!-----------------Booleans------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_CHECKBOX\">\n <boolean-checkbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-checkbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_TOGGLE\">\n <boolean-toggle-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-toggle-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_DROPDOWN\">\n <boolean-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-dropdown-input>\n </div>\n\n <!-------------------------------------------->\n <!------------------Numbers------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER\">\n <number-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_DROPDOWN\">\n <number-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_SLIDER\">\n <number-slider-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-slider-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE\">\n <array-date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_TIME\">\n <array-date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-time-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_RANGE\">\n <array-date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_CHIPS\">\n <array-string-chips-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-chips-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS\">\n <array-string-autocomplete-chips\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-autocomplete-chips>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Dates-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.DATE\">\n <date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_RANGE\">\n <date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_TIME\">\n <date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-time-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Files-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.FILE_DEFAULT\">\n <file-default-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-default-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.FILE_IMAGE\">\n <file-image-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-image-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references many ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_MANY\">\n <references-many-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </references-many-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Custom------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.CUSTOM\">\n <custom-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </custom-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Object------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.OBJECT\">\n <b>{{metadataDefaultObject.displayName}}</b>\n <!-- iterates over the object properties -->\n <mat-tab-group *ngIf=\"objectPropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of objectPropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"objectPropertyTabs.length <= 1\">\n <div *ngFor=\"let row of objectPropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references one ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_ONE\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #inputModel=\"ngModel\"\n [name]=\"referencesOneName\"\n [disabled]=\"internalIsReadOnly\"\n [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"internalEntity[internalPropertyKey]\"\n (ngModelChange)=\"setReferencesOneObject()\"\n >\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngFor=\"let value of referencesOneDropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{internalGetValidationErrorMessage(inputModel)}}</mat-error>\n </mat-form-field>\n <!-- iterates over the references one properties -->\n <mat-tab-group *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of referencesOnePropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length <= 1\">\n <div *ngFor=\"let row of referencesOnePropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY\" class=\"entityArray\">\n <div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadataEntityArray.displayName}}</b>\n </div>\n <div *ngIf=\"metadataEntityArray.createInline && !internalIsReadOnly\">\n <mat-tab-group *ngIf=\"arrayItemInlineTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemInlineTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"arrayItemInlineTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemInlineTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!internalIsReadOnly\" class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"metadataEntityArray.createInline && !isArrayItemValid\"\n (click)=\"addEntity()\">\n {{metadataEntityArray.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!entityArraySelection.selected.length\"\n (click)=\"removeFromEntityArray()\">\n {{metadataEntityArray.removeButtonLabel}}\n </button>\n </div>\n \n <mat-table [dataSource]=\"entityArrayDataSource\">\n <!-- select Column -->\n <ng-container *ngIf=\"!internalIsReadOnly\" matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n [disabled]=\"!entityArrayDataSource.data.length\" [checked]=\"entityArraySelection.hasValue() && SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n [indeterminate]=\"entityArraySelection.hasValue() && !SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(entityArraySelection, entityArrayDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"entityArraySelection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? entityArraySelection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadataEntityArray.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" [class.enabled]=\"!dCol.disableClick\" (click)=\"editArrayItem(entity, dCol)\">\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"entityArrayDisplayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: entityArrayDisplayedColumns\"></mat-row>\n </mat-table>\n \n <div *ngIf=\"metadataEntityArray.required(entity) && !entityArrayDataSource.data.length\" class=\"array-error\">\n {{metadataEntityArray.missingErrorMessage}}\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!------------------ has many ---------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.HAS_MANY\" class=\"hasMany\">\n <h2 class=\"title\">{{metadataHasMany.tableData.baseData.title}}</h2>\n\n <div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{metadataHasMany.tableData.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyHasManyFilter($event)\">\n </mat-form-field>\n <div\n *ngIf=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-2]=\"hasManyAllowCreate\"\n [class.col-lg-4]=\"!hasManyAllowCreate\"\n [class.col-md-3]=\"hasManyAllowCreate\"\n [class.col-md-6]=\"!hasManyAllowCreate\"\n [class.col-sm-6]=\"hasManyAllowCreate\"\n [class.col-sm-12]=\"!hasManyAllowCreate\"\n >\n <button type=\"button\" class=\"actions-button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.baseData.tableActionsLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngIf=\"metadataHasMany.tableData.baseData.allowJsonImport\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(hasManyImportAction)\" (click)=\"runHasManyTableAction(hasManyImportAction)\">\n {{hasManyImportAction.displayName}}\n </button>\n <button *ngFor=\"let action of metadataHasMany.tableData.baseData.tableActions\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(action)\" (click)=\"runHasManyTableAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"hasManyAllowCreate\"\n [class.col-lg-2]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-4]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-3]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-6]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-6]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-12]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n >\n <button type=\"button\" class=\"create-button\" mat-raised-button (click)=\"createHasManyEntity()\">\n {{metadataHasMany.tableData.baseData.createButtonLabel}}\n </button>\n </div>\n </div>\n\n <div class=\"mat-elevation-z8 elevation-container\">\n <mat-table matSort [dataSource]=\"hasManyDataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [checked]=\"hasManySelection.hasValue() && SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n [indeterminate]=\"hasManySelection.hasValue() && !SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(hasManySelection, hasManyDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"enabled\">\n <mat-checkbox [checked]=\"hasManySelection.isSelected(entity)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? hasManySelection.toggle(entity) : null\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of metadataHasMany.tableData.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\"\n [class.enabled]=\"!dCol.disableClick && (hasManyAllowUpdate(entity) || hasManyAllowRead(entity))\"\n (click)=\"editHasManyEntity(entity, dCol)\"\n >\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedHasManyColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedHasManyColumns\"></mat-row>\n </mat-table>\n\n <mat-spinner *ngIf=\"hasManyIsLoading && metadataHasMany.tableData.baseData.displayLoadingSpinner\">\n </mat-spinner>\n\n <mat-paginator [length]=\"hasManyDataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"></mat-paginator>\n </div>\n </div>\n\n <div *ngSwitchDefault>ERROR: The type {{type}} is not known.</div>\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<!--------------------------------------------------------->\n<!--------------------Add Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #addArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{addArrayItemDialogData.title}}</div>\n </div>\n\n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isArrayItemValid\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"addArrayItem()\"\n >\n {{addArrayItemDialogData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeAddArrayItemDialog()\">\n {{addArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #editArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{editArrayItemDialogData.title(arrayItemPriorChanges)}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isArrayItemValid || !isArrayItemDirty\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"saveArrayItem()\"\n >\n {{editArrayItemDialogData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeEditArrayItemDialog()\">\n {{editArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Create Has Many Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #createHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.createData.title}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyCreateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyCreateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyCreateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyCreateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isHasManyEntityValid\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogCreateHasMany()\"\n >\n {{metadataHasMany.tableData.createData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelCreateHasMany()\">\n {{metadataHasMany.tableData.createData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n \n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Has Many Dialog----------------->\n<!--------------------------------------------------------->\n<ng-template #editHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.editData.title(hasManyEntityPriorChanges)}}</div>\n\n <div class=\"actions-container\">\n <button *ngIf=\"metadataHasMany.tableData.editData.actions.length\" type=\"button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.editData.actionsLabel}}\n </button>\n <mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let action of metadataHasMany.tableData.editData.actions\" type=\"button\" mat-menu-item [disabled]=\"hasManyEditActionDisabled(action)\" (click)=\"hasManyRunEditAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n \n <button *ngIf=\"hasManyAllowDelete(hasManyEntity)\" type=\"button\" mat-raised-button color=\"warn\" class=\"delete-button\" tabindex=\"-1\" (click)=\"deleteHasManyEntity()\">\n {{metadataHasMany.tableData.editData.deleteButtonLabel}}\n </button>\n </div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyUpdateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyUpdateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyUpdateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyUpdateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isHasManyEntityValid || !isHasManyEntityDirty\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogEditHasMany()\"\n >\n {{metadataHasMany.tableData.editData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelEditHasMany()\">\n {{metadataHasMany.tableData.editData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}.mat-dialog-title{padding:12px 20px;display:flex;justify-content:space-between;align-items:center}.mat-dialog-title div{font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500)}.actions-container{display:flex;gap:10px}::ng-deep .mdc-dialog .mdc-dialog__content{padding:6px 20px!important}mat-dialog-actions{justify-content:space-between;align-items:center;padding-left:20px;padding-right:20px}mat-spinner{margin:10px auto}::ng-deep .mat-mdc-tab-body-wrapper{margin-left:-12px;margin-right:-12px}::ng-deep mat-tab-body{padding-top:10px;padding-left:12px;padding-right:12px}::ng-deep mat-tab-body .mat-mdc-tab-body-content{overflow:initial}::ng-deep .mat-mdc-form-field.mat-form-field-disabled label{color:#0009}::ng-deep .mat-mdc-form-field.mat-form-field-disabled input,::ng-deep .mat-mdc-form-field.mat-form-field-disabled textarea,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-disabled,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-value{color:#000!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:#707070}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{background-color:#000}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled button{opacity:.2}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle:after,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle:after{opacity:1;background:black}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__track,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__track{opacity:.3}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-date-range-input-inner:disabled{color:#000}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled{opacity:1}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled .mdc-slider__input{cursor:default}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mat-mdc-slider,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb:hover,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb-knob{background-color:#000;border-color:#000}::ng-deep .mat-mdc-form-field .mat-mdc-slide-toggle{opacity:1}.entityArray .elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.entityArray .array-headline{padding-bottom:10px}.entityArray .buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.entityArray mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.entityArray .mat-column-select{flex:0 0 75px}.entityArray .enabled:hover{cursor:pointer}.entityArray .array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.hasMany button{width:100%;height:56px;line-height:24px;font-size:16px}.hasMany .title{text-align:center}.hasMany .elevation-container{border-radius:5px;padding:5px;margin-bottom:15px}.hasMany .mat-column-select{flex:0 0 75px}.hasMany .enabled:hover{cursor:pointer}\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: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: DisplayColumnValueComponent, selector: "display-column-value", inputs: ["entity", "ComponentClass"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i8.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.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: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i15.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i7$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i17.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i17.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i10.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i10.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i5$1.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i5$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: TooltipComponent, selector: "ngx-mat-entity-tooltip", inputs: ["tooltipContent"] }, { kind: "component", type: ArrayDateInputComponent, selector: "array-date-input" }, { kind: "component", type: ArrayDateRangeInputComponent, selector: "array-date-range-input" }, { kind: "component", type: ArrayDateTimeInputComponent, selector: "array-date-time-input" }, { kind: "component", type: ArrayStringAutocompleteChipsComponent, selector: "array-string-autocomplete-chips" }, { kind: "component", type: ArrayStringChipsInputComponent, selector: "array-string-chips-input" }, { kind: "component", type: BooleanCheckboxInputComponent, selector: "boolean-checkbox-input" }, { kind: "component", type: BooleanDropdownInputComponent, selector: "boolean-dropdown-input" }, { kind: "component", type: BooleanToggleInputComponent, selector: "boolean-toggle-input" }, { kind: "component", type: CustomInputComponent, selector: "custom-input" }, { kind: "component", type: DateInputComponent, selector: "date-input" }, { kind: "component", type: DateRangeInputComponent, selector: "date-range-input" }, { kind: "component", type: DateTimeInputComponent, selector: "date-time-input" }, { kind: "component", type: FileDefaultInputComponent, selector: "file-default-input" }, { kind: "component", type: FileImageInputComponent, selector: "file-image-input" }, { kind: "component", type: NgxMatEntityInputComponent, selector: "ngx-mat-entity-input", inputs: ["entity", "propertyKey", "getValidationErrorMessage", "hideOmitForCreate", "hideOmitForEdit", "validEmpty", "isReadOnly"], outputs: ["inputChangeEvent"] }, { kind: "component", type: NumberDropdownInputComponent, selector: "number-dropdown-input" }, { kind: "component", type: NumberInputComponent, selector: "number-input" }, { kind: "component", type: NumberSliderInputComponent, selector: "number-slider-input" }, { kind: "component", type: ReferencesManyInputComponent, selector: "references-many-input" }, { kind: "component", type: StringAutocompleteInputComponent, selector: "string-autocomplete-input" }, { kind: "component", type: StringDropdownInputComponent, selector: "string-dropdown-input" }, { kind: "component", type: StringInputComponent, selector: "string-input" }, { kind: "component", type: StringPasswordInputComponent, selector: "string-password-input" }, { kind: "component", type: StringTextboxInputComponent, selector: "string-textbox-input" }] });
|
|
6261
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: NgxMatEntityInputComponent, selector: "ngx-mat-entity-input", inputs: { entity: "entity", propertyKey: "propertyKey", getValidationErrorMessage: "getValidationErrorMessage", hideOmitForCreate: "hideOmitForCreate", hideOmitForEdit: "hideOmitForEdit", validEmpty: "validEmpty", isReadOnly: "isReadOnly" }, outputs: { inputChangeEvent: "inputChangeEvent" }, viewQueries: [{ propertyName: "addArrayItemDialog", first: true, predicate: ["addArrayItemDialog"], descendants: true }, { propertyName: "editArrayItemDialog", first: true, predicate: ["editArrayItemDialog"], descendants: true }, { propertyName: "hasManyPaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "hasManySort", first: true, predicate: MatSort, descendants: true }, { propertyName: "hasManyFilter", first: true, predicate: ["filter"], descendants: true, static: true }, { propertyName: "createHasManyDialog", first: true, predicate: ["createHasManyDialog"], descendants: true }, { propertyName: "editHasManyDialog", first: true, predicate: ["editHasManyDialog"], descendants: true }], ngImport: i0, template: "<!-- eslint-disable angular/no-call-expression -->\n \n<!-- eslint-disable angular/cyclomatic-complexity -->\n<div *ngIf=\"!(hideOmitForCreate && metadata.omitForCreate) && !(hideOmitForEdit && metadata.omitForUpdate)\" [ngSwitch]=\"type\">\n <!-------------------------------------------->\n <!-----------------Strings-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.STRING\">\n <string-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_TEXTBOX\">\n <string-textbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-textbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_AUTOCOMPLETE\">\n <string-autocomplete-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-autocomplete-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_DROPDOWN\">\n <string-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_PASSWORD\">\n <string-password-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-password-input>\n </div>\n\n <!-------------------------------------------->\n <!-----------------Booleans------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_CHECKBOX\">\n <boolean-checkbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-checkbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_TOGGLE\">\n <boolean-toggle-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-toggle-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_DROPDOWN\">\n <boolean-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-dropdown-input>\n </div>\n\n <!-------------------------------------------->\n <!------------------Numbers------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER\">\n <number-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_DROPDOWN\">\n <number-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_SLIDER\">\n <number-slider-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-slider-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE\">\n <array-date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_TIME\">\n <array-date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-time-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_RANGE\">\n <array-date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_CHIPS\">\n <array-string-chips-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-chips-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS\">\n <array-string-autocomplete-chips\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-autocomplete-chips>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Dates-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.DATE\">\n <date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_RANGE\">\n <date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_TIME\">\n <date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-time-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Files-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.FILE_DEFAULT\">\n <file-default-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-default-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.FILE_IMAGE\">\n <file-image-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-image-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references many ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_MANY\">\n <references-many-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </references-many-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Custom------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.CUSTOM\">\n <custom-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </custom-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Object------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.OBJECT\">\n <b>{{metadataDefaultObject.displayName}}</b>\n <!-- iterates over the object properties -->\n <mat-tab-group *ngIf=\"objectPropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of objectPropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"objectPropertyTabs.length <= 1\">\n <div *ngFor=\"let row of objectPropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references one ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_ONE\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #inputModel=\"ngModel\"\n [name]=\"referencesOneName\"\n [disabled]=\"internalIsReadOnly\"\n [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"internalEntity[internalPropertyKey]\"\n (selectionChange)=\"setReferencesOneObject()\"\n (opened)=\"selectSearchInput.focus()\"\n >\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterReferencesOneValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentReferencesOneDropdownValue\" [value]=\"currentReferencesOneDropdownValue?.value\">{{currentReferencesOneDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredReferencesOneDropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{internalGetValidationErrorMessage(inputModel)}}</mat-error>\n </mat-form-field>\n <!-- iterates over the references one properties -->\n <mat-tab-group *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of referencesOnePropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length <= 1\">\n <div *ngFor=\"let row of referencesOnePropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY\" class=\"entityArray\">\n <div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadataEntityArray.displayName}}</b>\n </div>\n <div *ngIf=\"metadataEntityArray.createInline && !internalIsReadOnly\">\n <mat-tab-group *ngIf=\"arrayItemInlineTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemInlineTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"arrayItemInlineTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemInlineTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!internalIsReadOnly\" class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"metadataEntityArray.createInline && !isArrayItemValid\"\n (click)=\"addEntity()\">\n {{metadataEntityArray.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!entityArraySelection.selected.length\"\n (click)=\"removeFromEntityArray()\">\n {{metadataEntityArray.removeButtonLabel}}\n </button>\n </div>\n \n <mat-table [dataSource]=\"entityArrayDataSource\">\n <!-- select Column -->\n <ng-container *ngIf=\"!internalIsReadOnly\" matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n [disabled]=\"!entityArrayDataSource.data.length\" [checked]=\"entityArraySelection.hasValue() && SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n [indeterminate]=\"entityArraySelection.hasValue() && !SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(entityArraySelection, entityArrayDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"entityArraySelection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? entityArraySelection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadataEntityArray.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" [class.enabled]=\"!dCol.disableClick\" (click)=\"editArrayItem(entity, dCol)\">\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"entityArrayDisplayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: entityArrayDisplayedColumns\"></mat-row>\n </mat-table>\n \n <div *ngIf=\"metadataEntityArray.required(entity) && !entityArrayDataSource.data.length\" class=\"array-error\">\n {{metadataEntityArray.missingErrorMessage}}\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!------------------ has many ---------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.HAS_MANY\" class=\"hasMany\">\n <h2 class=\"title\">{{metadataHasMany.tableData.baseData.title}}</h2>\n\n <div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{metadataHasMany.tableData.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyHasManyFilter($event)\">\n </mat-form-field>\n <div\n *ngIf=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-2]=\"hasManyAllowCreate\"\n [class.col-lg-4]=\"!hasManyAllowCreate\"\n [class.col-md-3]=\"hasManyAllowCreate\"\n [class.col-md-6]=\"!hasManyAllowCreate\"\n [class.col-sm-6]=\"hasManyAllowCreate\"\n [class.col-sm-12]=\"!hasManyAllowCreate\"\n >\n <button type=\"button\" class=\"actions-button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.baseData.tableActionsLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngIf=\"metadataHasMany.tableData.baseData.allowJsonImport\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(hasManyImportAction)\" (click)=\"runHasManyTableAction(hasManyImportAction)\">\n {{hasManyImportAction.displayName}}\n </button>\n <button *ngFor=\"let action of metadataHasMany.tableData.baseData.tableActions\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(action)\" (click)=\"runHasManyTableAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"hasManyAllowCreate\"\n [class.col-lg-2]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-4]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-3]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-6]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-6]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-12]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n >\n <button type=\"button\" class=\"create-button\" mat-raised-button (click)=\"createHasManyEntity()\">\n {{metadataHasMany.tableData.baseData.createButtonLabel}}\n </button>\n </div>\n </div>\n\n <div class=\"mat-elevation-z8 elevation-container\">\n <mat-table matSort [dataSource]=\"hasManyDataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [checked]=\"hasManySelection.hasValue() && SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n [indeterminate]=\"hasManySelection.hasValue() && !SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(hasManySelection, hasManyDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"enabled\">\n <mat-checkbox [checked]=\"hasManySelection.isSelected(entity)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? hasManySelection.toggle(entity) : null\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of metadataHasMany.tableData.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\"\n [class.enabled]=\"!dCol.disableClick && (hasManyAllowUpdate(entity) || hasManyAllowRead(entity))\"\n (click)=\"editHasManyEntity(entity, dCol)\"\n >\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedHasManyColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedHasManyColumns\"></mat-row>\n </mat-table>\n\n <mat-spinner *ngIf=\"hasManyIsLoading && metadataHasMany.tableData.baseData.displayLoadingSpinner\">\n </mat-spinner>\n\n <mat-paginator [length]=\"hasManyDataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"></mat-paginator>\n </div>\n </div>\n\n <div *ngSwitchDefault>ERROR: The type {{type}} is not known.</div>\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<!--------------------------------------------------------->\n<!--------------------Add Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #addArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{addArrayItemDialogData.title}}</div>\n </div>\n\n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isArrayItemValid\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"addArrayItem()\"\n >\n {{addArrayItemDialogData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeAddArrayItemDialog()\">\n {{addArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #editArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{editArrayItemDialogData.title(arrayItemPriorChanges)}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isArrayItemValid || !isArrayItemDirty\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"saveArrayItem()\"\n >\n {{editArrayItemDialogData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeEditArrayItemDialog()\">\n {{editArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Create Has Many Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #createHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.createData.title}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyCreateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyCreateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyCreateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyCreateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isHasManyEntityValid\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogCreateHasMany()\"\n >\n {{metadataHasMany.tableData.createData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelCreateHasMany()\">\n {{metadataHasMany.tableData.createData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n \n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Has Many Dialog----------------->\n<!--------------------------------------------------------->\n<ng-template #editHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.editData.title(hasManyEntityPriorChanges)}}</div>\n\n <div class=\"actions-container\">\n <button *ngIf=\"metadataHasMany.tableData.editData.actions.length\" type=\"button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.editData.actionsLabel}}\n </button>\n <mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let action of metadataHasMany.tableData.editData.actions\" type=\"button\" mat-menu-item [disabled]=\"hasManyEditActionDisabled(action)\" (click)=\"hasManyRunEditAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n \n <button *ngIf=\"hasManyAllowDelete(hasManyEntity)\" type=\"button\" mat-raised-button color=\"warn\" class=\"delete-button\" tabindex=\"-1\" (click)=\"deleteHasManyEntity()\">\n {{metadataHasMany.tableData.editData.deleteButtonLabel}}\n </button>\n </div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyUpdateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyUpdateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyUpdateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyUpdateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isHasManyEntityValid || !isHasManyEntityDirty\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogEditHasMany()\"\n >\n {{metadataHasMany.tableData.editData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelEditHasMany()\">\n {{metadataHasMany.tableData.editData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}.mat-dialog-title{padding:12px 20px;display:flex;justify-content:space-between;align-items:center}.mat-dialog-title div{font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500)}.actions-container{display:flex;gap:10px}::ng-deep .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:16px}::ng-deep .select-search-input{max-width:100%;margin-top:-8px;margin-bottom:8px}::ng-deep .select-search-input .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .mdc-dialog .mdc-dialog__content{padding:6px 20px!important}mat-dialog-actions{justify-content:space-between;align-items:center;padding-left:20px;padding-right:20px}mat-spinner{margin:10px auto}::ng-deep .mat-mdc-tab-body-wrapper{margin-left:-12px;margin-right:-12px}::ng-deep mat-tab-body{padding-top:10px;padding-left:12px;padding-right:12px}::ng-deep mat-tab-body .mat-mdc-tab-body-content{overflow:initial}::ng-deep .mat-mdc-form-field.mat-form-field-disabled label{color:#0009}::ng-deep .mat-mdc-form-field.mat-form-field-disabled input,::ng-deep .mat-mdc-form-field.mat-form-field-disabled textarea,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-disabled,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-value{color:#000!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:#707070}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{background-color:#000}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled button{opacity:.2}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle:after,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle:after{opacity:1;background:black}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__track,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__track{opacity:.3}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-date-range-input-inner:disabled{color:#000}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled{opacity:1}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled .mdc-slider__input{cursor:default}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mat-mdc-slider,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb:hover,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb-knob{background-color:#000;border-color:#000}::ng-deep .mat-mdc-form-field .mat-mdc-slide-toggle{opacity:1}.entityArray .elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.entityArray .array-headline{padding-bottom:10px}.entityArray .buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.entityArray mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.entityArray .mat-column-select{flex:0 0 75px}.entityArray .enabled:hover{cursor:pointer}.entityArray .array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.hasMany button{width:100%;height:56px;line-height:24px;font-size:16px}.hasMany .title{text-align:center}.hasMany .elevation-container{border-radius:5px;padding:5px;margin-bottom:15px}.hasMany .mat-column-select{flex:0 0 75px}.hasMany .enabled:hover{cursor:pointer}\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: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: DisplayColumnValueComponent, selector: "display-column-value", inputs: ["entity", "ComponentClass"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i8.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i15.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i17.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i17.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i5$1.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i5$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: TooltipComponent, selector: "ngx-mat-entity-tooltip", inputs: ["tooltipContent"] }, { kind: "component", type: ArrayDateInputComponent, selector: "array-date-input" }, { kind: "component", type: ArrayDateRangeInputComponent, selector: "array-date-range-input" }, { kind: "component", type: ArrayDateTimeInputComponent, selector: "array-date-time-input" }, { kind: "component", type: ArrayStringAutocompleteChipsComponent, selector: "array-string-autocomplete-chips" }, { kind: "component", type: ArrayStringChipsInputComponent, selector: "array-string-chips-input" }, { kind: "component", type: BooleanCheckboxInputComponent, selector: "boolean-checkbox-input" }, { kind: "component", type: BooleanDropdownInputComponent, selector: "boolean-dropdown-input" }, { kind: "component", type: BooleanToggleInputComponent, selector: "boolean-toggle-input" }, { kind: "component", type: CustomInputComponent, selector: "custom-input" }, { kind: "component", type: DateInputComponent, selector: "date-input" }, { kind: "component", type: DateRangeInputComponent, selector: "date-range-input" }, { kind: "component", type: DateTimeInputComponent, selector: "date-time-input" }, { kind: "component", type: FileDefaultInputComponent, selector: "file-default-input" }, { kind: "component", type: FileImageInputComponent, selector: "file-image-input" }, { kind: "component", type: NgxMatEntityInputComponent, selector: "ngx-mat-entity-input", inputs: ["entity", "propertyKey", "getValidationErrorMessage", "hideOmitForCreate", "hideOmitForEdit", "validEmpty", "isReadOnly"], outputs: ["inputChangeEvent"] }, { kind: "component", type: NumberDropdownInputComponent, selector: "number-dropdown-input" }, { kind: "component", type: NumberInputComponent, selector: "number-input" }, { kind: "component", type: NumberSliderInputComponent, selector: "number-slider-input" }, { kind: "component", type: ReferencesManyInputComponent, selector: "references-many-input" }, { kind: "component", type: StringAutocompleteInputComponent, selector: "string-autocomplete-input" }, { kind: "component", type: StringDropdownInputComponent, selector: "string-dropdown-input" }, { kind: "component", type: StringInputComponent, selector: "string-input" }, { kind: "component", type: StringPasswordInputComponent, selector: "string-password-input" }, { kind: "component", type: StringTextboxInputComponent, selector: "string-textbox-input" }] });
|
|
6004
6262
|
}
|
|
6005
6263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxMatEntityInputComponent, decorators: [{
|
|
6006
6264
|
type: Component,
|
|
6007
|
-
args: [{ selector: 'ngx-mat-entity-input', template: "<!-- eslint-disable angular/no-call-expression -->\n \n<!-- eslint-disable angular/cyclomatic-complexity -->\n<div *ngIf=\"!(hideOmitForCreate && metadata.omitForCreate) && !(hideOmitForEdit && metadata.omitForUpdate)\" [ngSwitch]=\"type\">\n <!-------------------------------------------->\n <!-----------------Strings-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.STRING\">\n <string-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_TEXTBOX\">\n <string-textbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-textbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_AUTOCOMPLETE\">\n <string-autocomplete-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-autocomplete-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_DROPDOWN\">\n <string-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_PASSWORD\">\n <string-password-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-password-input>\n </div>\n\n <!-------------------------------------------->\n <!-----------------Booleans------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_CHECKBOX\">\n <boolean-checkbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-checkbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_TOGGLE\">\n <boolean-toggle-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-toggle-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_DROPDOWN\">\n <boolean-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-dropdown-input>\n </div>\n\n <!-------------------------------------------->\n <!------------------Numbers------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER\">\n <number-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_DROPDOWN\">\n <number-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_SLIDER\">\n <number-slider-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-slider-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE\">\n <array-date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_TIME\">\n <array-date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-time-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_RANGE\">\n <array-date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_CHIPS\">\n <array-string-chips-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-chips-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS\">\n <array-string-autocomplete-chips\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-autocomplete-chips>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Dates-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.DATE\">\n <date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_RANGE\">\n <date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_TIME\">\n <date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-time-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Files-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.FILE_DEFAULT\">\n <file-default-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-default-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.FILE_IMAGE\">\n <file-image-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-image-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references many ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_MANY\">\n <references-many-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </references-many-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Custom------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.CUSTOM\">\n <custom-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </custom-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Object------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.OBJECT\">\n <b>{{metadataDefaultObject.displayName}}</b>\n <!-- iterates over the object properties -->\n <mat-tab-group *ngIf=\"objectPropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of objectPropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"objectPropertyTabs.length <= 1\">\n <div *ngFor=\"let row of objectPropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references one ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_ONE\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #inputModel=\"ngModel\"\n [name]=\"referencesOneName\"\n [disabled]=\"internalIsReadOnly\"\n [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"internalEntity[internalPropertyKey]\"\n (ngModelChange)=\"setReferencesOneObject()\"\n >\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngFor=\"let value of referencesOneDropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{internalGetValidationErrorMessage(inputModel)}}</mat-error>\n </mat-form-field>\n <!-- iterates over the references one properties -->\n <mat-tab-group *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of referencesOnePropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length <= 1\">\n <div *ngFor=\"let row of referencesOnePropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY\" class=\"entityArray\">\n <div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadataEntityArray.displayName}}</b>\n </div>\n <div *ngIf=\"metadataEntityArray.createInline && !internalIsReadOnly\">\n <mat-tab-group *ngIf=\"arrayItemInlineTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemInlineTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"arrayItemInlineTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemInlineTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!internalIsReadOnly\" class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"metadataEntityArray.createInline && !isArrayItemValid\"\n (click)=\"addEntity()\">\n {{metadataEntityArray.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!entityArraySelection.selected.length\"\n (click)=\"removeFromEntityArray()\">\n {{metadataEntityArray.removeButtonLabel}}\n </button>\n </div>\n \n <mat-table [dataSource]=\"entityArrayDataSource\">\n <!-- select Column -->\n <ng-container *ngIf=\"!internalIsReadOnly\" matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n [disabled]=\"!entityArrayDataSource.data.length\" [checked]=\"entityArraySelection.hasValue() && SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n [indeterminate]=\"entityArraySelection.hasValue() && !SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(entityArraySelection, entityArrayDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"entityArraySelection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? entityArraySelection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadataEntityArray.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" [class.enabled]=\"!dCol.disableClick\" (click)=\"editArrayItem(entity, dCol)\">\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"entityArrayDisplayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: entityArrayDisplayedColumns\"></mat-row>\n </mat-table>\n \n <div *ngIf=\"metadataEntityArray.required(entity) && !entityArrayDataSource.data.length\" class=\"array-error\">\n {{metadataEntityArray.missingErrorMessage}}\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!------------------ has many ---------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.HAS_MANY\" class=\"hasMany\">\n <h2 class=\"title\">{{metadataHasMany.tableData.baseData.title}}</h2>\n\n <div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{metadataHasMany.tableData.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyHasManyFilter($event)\">\n </mat-form-field>\n <div\n *ngIf=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-2]=\"hasManyAllowCreate\"\n [class.col-lg-4]=\"!hasManyAllowCreate\"\n [class.col-md-3]=\"hasManyAllowCreate\"\n [class.col-md-6]=\"!hasManyAllowCreate\"\n [class.col-sm-6]=\"hasManyAllowCreate\"\n [class.col-sm-12]=\"!hasManyAllowCreate\"\n >\n <button type=\"button\" class=\"actions-button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.baseData.tableActionsLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngIf=\"metadataHasMany.tableData.baseData.allowJsonImport\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(hasManyImportAction)\" (click)=\"runHasManyTableAction(hasManyImportAction)\">\n {{hasManyImportAction.displayName}}\n </button>\n <button *ngFor=\"let action of metadataHasMany.tableData.baseData.tableActions\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(action)\" (click)=\"runHasManyTableAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"hasManyAllowCreate\"\n [class.col-lg-2]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-4]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-3]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-6]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-6]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-12]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n >\n <button type=\"button\" class=\"create-button\" mat-raised-button (click)=\"createHasManyEntity()\">\n {{metadataHasMany.tableData.baseData.createButtonLabel}}\n </button>\n </div>\n </div>\n\n <div class=\"mat-elevation-z8 elevation-container\">\n <mat-table matSort [dataSource]=\"hasManyDataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [checked]=\"hasManySelection.hasValue() && SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n [indeterminate]=\"hasManySelection.hasValue() && !SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(hasManySelection, hasManyDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"enabled\">\n <mat-checkbox [checked]=\"hasManySelection.isSelected(entity)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? hasManySelection.toggle(entity) : null\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of metadataHasMany.tableData.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\"\n [class.enabled]=\"!dCol.disableClick && (hasManyAllowUpdate(entity) || hasManyAllowRead(entity))\"\n (click)=\"editHasManyEntity(entity, dCol)\"\n >\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedHasManyColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedHasManyColumns\"></mat-row>\n </mat-table>\n\n <mat-spinner *ngIf=\"hasManyIsLoading && metadataHasMany.tableData.baseData.displayLoadingSpinner\">\n </mat-spinner>\n\n <mat-paginator [length]=\"hasManyDataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"></mat-paginator>\n </div>\n </div>\n\n <div *ngSwitchDefault>ERROR: The type {{type}} is not known.</div>\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<!--------------------------------------------------------->\n<!--------------------Add Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #addArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{addArrayItemDialogData.title}}</div>\n </div>\n\n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isArrayItemValid\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"addArrayItem()\"\n >\n {{addArrayItemDialogData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeAddArrayItemDialog()\">\n {{addArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #editArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{editArrayItemDialogData.title(arrayItemPriorChanges)}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isArrayItemValid || !isArrayItemDirty\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"saveArrayItem()\"\n >\n {{editArrayItemDialogData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeEditArrayItemDialog()\">\n {{editArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Create Has Many Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #createHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.createData.title}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyCreateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyCreateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyCreateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyCreateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isHasManyEntityValid\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogCreateHasMany()\"\n >\n {{metadataHasMany.tableData.createData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelCreateHasMany()\">\n {{metadataHasMany.tableData.createData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n \n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Has Many Dialog----------------->\n<!--------------------------------------------------------->\n<ng-template #editHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.editData.title(hasManyEntityPriorChanges)}}</div>\n\n <div class=\"actions-container\">\n <button *ngIf=\"metadataHasMany.tableData.editData.actions.length\" type=\"button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.editData.actionsLabel}}\n </button>\n <mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let action of metadataHasMany.tableData.editData.actions\" type=\"button\" mat-menu-item [disabled]=\"hasManyEditActionDisabled(action)\" (click)=\"hasManyRunEditAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n \n <button *ngIf=\"hasManyAllowDelete(hasManyEntity)\" type=\"button\" mat-raised-button color=\"warn\" class=\"delete-button\" tabindex=\"-1\" (click)=\"deleteHasManyEntity()\">\n {{metadataHasMany.tableData.editData.deleteButtonLabel}}\n </button>\n </div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyUpdateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyUpdateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyUpdateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyUpdateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isHasManyEntityValid || !isHasManyEntityDirty\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogEditHasMany()\"\n >\n {{metadataHasMany.tableData.editData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelEditHasMany()\">\n {{metadataHasMany.tableData.editData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}.mat-dialog-title{padding:12px 20px;display:flex;justify-content:space-between;align-items:center}.mat-dialog-title div{font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500)}.actions-container{display:flex;gap:10px}::ng-deep .mdc-dialog .mdc-dialog__content{padding:6px 20px!important}mat-dialog-actions{justify-content:space-between;align-items:center;padding-left:20px;padding-right:20px}mat-spinner{margin:10px auto}::ng-deep .mat-mdc-tab-body-wrapper{margin-left:-12px;margin-right:-12px}::ng-deep mat-tab-body{padding-top:10px;padding-left:12px;padding-right:12px}::ng-deep mat-tab-body .mat-mdc-tab-body-content{overflow:initial}::ng-deep .mat-mdc-form-field.mat-form-field-disabled label{color:#0009}::ng-deep .mat-mdc-form-field.mat-form-field-disabled input,::ng-deep .mat-mdc-form-field.mat-form-field-disabled textarea,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-disabled,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-value{color:#000!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:#707070}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{background-color:#000}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled button{opacity:.2}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle:after,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle:after{opacity:1;background:black}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__track,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__track{opacity:.3}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-date-range-input-inner:disabled{color:#000}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled{opacity:1}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled .mdc-slider__input{cursor:default}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mat-mdc-slider,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb:hover,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb-knob{background-color:#000;border-color:#000}::ng-deep .mat-mdc-form-field .mat-mdc-slide-toggle{opacity:1}.entityArray .elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.entityArray .array-headline{padding-bottom:10px}.entityArray .buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.entityArray mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.entityArray .mat-column-select{flex:0 0 75px}.entityArray .enabled:hover{cursor:pointer}.entityArray .array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.hasMany button{width:100%;height:56px;line-height:24px;font-size:16px}.hasMany .title{text-align:center}.hasMany .elevation-container{border-radius:5px;padding:5px;margin-bottom:15px}.hasMany .mat-column-select{flex:0 0 75px}.hasMany .enabled:hover{cursor:pointer}\n"] }]
|
|
6265
|
+
args: [{ selector: 'ngx-mat-entity-input', template: "<!-- eslint-disable angular/no-call-expression -->\n \n<!-- eslint-disable angular/cyclomatic-complexity -->\n<div *ngIf=\"!(hideOmitForCreate && metadata.omitForCreate) && !(hideOmitForEdit && metadata.omitForUpdate)\" [ngSwitch]=\"type\">\n <!-------------------------------------------->\n <!-----------------Strings-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.STRING\">\n <string-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_TEXTBOX\">\n <string-textbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-textbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_AUTOCOMPLETE\">\n <string-autocomplete-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-autocomplete-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_DROPDOWN\">\n <string-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.STRING_PASSWORD\">\n <string-password-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </string-password-input>\n </div>\n\n <!-------------------------------------------->\n <!-----------------Booleans------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_CHECKBOX\">\n <boolean-checkbox-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-checkbox-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_TOGGLE\">\n <boolean-toggle-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-toggle-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_DROPDOWN\">\n <boolean-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </boolean-dropdown-input>\n </div>\n\n <!-------------------------------------------->\n <!------------------Numbers------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER\">\n <number-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_DROPDOWN\">\n <number-dropdown-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-dropdown-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_SLIDER\">\n <number-slider-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </number-slider-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE\">\n <array-date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_TIME\">\n <array-date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-time-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_DATE_RANGE\">\n <array-date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_CHIPS\">\n <array-string-chips-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-chips-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS\">\n <array-string-autocomplete-chips\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </array-string-autocomplete-chips>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Dates-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.DATE\">\n <date-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_RANGE\">\n <date-range-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-range-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.DATE_TIME\">\n <date-time-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </date-time-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Files-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.FILE_DEFAULT\">\n <file-default-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-default-input>\n </div>\n <div *ngSwitchCase=\"DecoratorTypes.FILE_IMAGE\">\n <file-image-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </file-image-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references many ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_MANY\">\n <references-many-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </references-many-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Custom------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.CUSTOM\">\n <custom-input\n [entity]=\"internalEntity\"\n [key]=\"internalPropertyKey\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [isReadOnly]=\"internalIsReadOnly\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </custom-input>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Object------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.OBJECT\">\n <b>{{metadataDefaultObject.displayName}}</b>\n <!-- iterates over the object properties -->\n <mat-tab-group *ngIf=\"objectPropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of objectPropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"objectPropertyTabs.length <= 1\">\n <div *ngFor=\"let row of objectPropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"isPropertyReadOnly(objectProperty, key)\"\n [class]=\"EntityUtilities.getWidthClasses(objectProperty, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------- references one ------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.REFERENCES_ONE\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select #inputModel=\"ngModel\"\n [name]=\"referencesOneName\"\n [disabled]=\"internalIsReadOnly\"\n [required]=\"metadata.required(entity)\"\n [(ngModel)]=\"internalEntity[internalPropertyKey]\"\n (selectionChange)=\"setReferencesOneObject()\"\n (opened)=\"selectSearchInput.focus()\"\n >\n <mat-form-field class=\"select-search-input\">\n <!-- eslint-disable-next-line angular/no-any -->\n <input #selectSearchInput matInput (keyup)=\"filterReferencesOneValues($any($event.target).value)\">\n <i matSuffix class=\"fas fa-search\"></i>\n </mat-form-field>\n <mat-option *ngIf=\"!metadata.required(entity)\">-</mat-option>\n <mat-option *ngIf=\"shouldDisplayCurrentReferencesOneDropdownValue\" [value]=\"currentReferencesOneDropdownValue?.value\">{{currentReferencesOneDropdownValue?.displayName}}</mat-option>\n <mat-option *ngFor=\"let value of filteredReferencesOneDropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{internalGetValidationErrorMessage(inputModel)}}</mat-error>\n </mat-form-field>\n <!-- iterates over the references one properties -->\n <mat-tab-group *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of referencesOnePropertyTabs; let tI = index; trackBy: trackByFn\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows;\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let rI = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"referencesOnePropertyTabs && referencesOnePropertyTabs.length <= 1\">\n <div *ngFor=\"let row of referencesOnePropertyTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"referencesOneObject\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n [validEmpty]=\"!metadata.required(entity)\"\n [isReadOnly]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(referencesOneObject, key)\"\n (inputChangeEvent)=\"emitChange()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY\" class=\"entityArray\">\n <div class=\"mat-elevation-z8 elevation-container\">\n <div class=\"array-headline\">\n <b>{{metadataEntityArray.displayName}}</b>\n </div>\n <div *ngIf=\"metadataEntityArray.createInline && !internalIsReadOnly\">\n <mat-tab-group *ngIf=\"arrayItemInlineTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemInlineTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"arrayItemInlineTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemInlineTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!internalIsReadOnly\" class=\"buttons\">\n <button type=\"button\" mat-raised-button\n [disabled]=\"metadataEntityArray.createInline && !isArrayItemValid\"\n (click)=\"addEntity()\">\n {{metadataEntityArray.addButtonLabel}}\n </button>\n <button type=\"button\" mat-raised-button\n [disabled]=\"!entityArraySelection.selected.length\"\n (click)=\"removeFromEntityArray()\">\n {{metadataEntityArray.removeButtonLabel}}\n </button>\n </div>\n \n <mat-table [dataSource]=\"entityArrayDataSource\">\n <!-- select Column -->\n <ng-container *ngIf=\"!internalIsReadOnly\" matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n [disabled]=\"!entityArrayDataSource.data.length\" [checked]=\"entityArraySelection.hasValue() && SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n [indeterminate]=\"entityArraySelection.hasValue() && !SelectionUtilities.isAllSelected(entityArraySelection, entityArrayDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(entityArraySelection, entityArrayDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\">\n <mat-checkbox [checked]=\"entityArraySelection.isSelected(entity)\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? entityArraySelection.toggle(entity) : null\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadataEntityArray.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" [class.enabled]=\"!dCol.disableClick\" (click)=\"editArrayItem(entity, dCol)\">\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"entityArrayDisplayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: entityArrayDisplayedColumns\"></mat-row>\n </mat-table>\n \n <div *ngIf=\"metadataEntityArray.required(entity) && !entityArrayDataSource.data.length\" class=\"array-error\">\n {{metadataEntityArray.missingErrorMessage}}\n </div>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!------------------ has many ---------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.HAS_MANY\" class=\"hasMany\">\n <h2 class=\"title\">{{metadataHasMany.tableData.baseData.title}}</h2>\n\n <div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{metadataHasMany.tableData.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyHasManyFilter($event)\">\n </mat-form-field>\n <div\n *ngIf=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-2]=\"hasManyAllowCreate\"\n [class.col-lg-4]=\"!hasManyAllowCreate\"\n [class.col-md-3]=\"hasManyAllowCreate\"\n [class.col-md-6]=\"!hasManyAllowCreate\"\n [class.col-sm-6]=\"hasManyAllowCreate\"\n [class.col-sm-12]=\"!hasManyAllowCreate\"\n >\n <button type=\"button\" class=\"actions-button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.baseData.tableActionsLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngIf=\"metadataHasMany.tableData.baseData.allowJsonImport\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(hasManyImportAction)\" (click)=\"runHasManyTableAction(hasManyImportAction)\">\n {{hasManyImportAction.displayName}}\n </button>\n <button *ngFor=\"let action of metadataHasMany.tableData.baseData.tableActions\" type=\"button\" mat-menu-item [disabled]=\"hasManyTableActionDisabled(action)\" (click)=\"runHasManyTableAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"hasManyAllowCreate\"\n [class.col-lg-2]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-lg-4]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-3]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-md-6]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-6]=\"metadataHasMany.tableData.baseData.tableActions.length\"\n [class.col-sm-12]=\"!metadataHasMany.tableData.baseData.tableActions.length\"\n >\n <button type=\"button\" class=\"create-button\" mat-raised-button (click)=\"createHasManyEntity()\">\n {{metadataHasMany.tableData.baseData.createButtonLabel}}\n </button>\n </div>\n </div>\n\n <div class=\"mat-elevation-z8 elevation-container\">\n <mat-table matSort [dataSource]=\"hasManyDataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [checked]=\"hasManySelection.hasValue() && SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n [indeterminate]=\"hasManySelection.hasValue() && !SelectionUtilities.isAllSelected(hasManySelection, hasManyDataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(hasManySelection, hasManyDataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"enabled\">\n <mat-checkbox [checked]=\"hasManySelection.isSelected(entity)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? hasManySelection.toggle(entity) : null\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of metadataHasMany.tableData.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\"\n [class.enabled]=\"!dCol.disableClick && (hasManyAllowUpdate(entity) || hasManyAllowRead(entity))\"\n (click)=\"editHasManyEntity(entity, dCol)\"\n >\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedHasManyColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedHasManyColumns\"></mat-row>\n </mat-table>\n\n <mat-spinner *ngIf=\"hasManyIsLoading && metadataHasMany.tableData.baseData.displayLoadingSpinner\">\n </mat-spinner>\n\n <mat-paginator [length]=\"hasManyDataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"></mat-paginator>\n </div>\n </div>\n\n <div *ngSwitchDefault>ERROR: The type {{type}} is not known.</div>\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<!--------------------------------------------------------->\n<!--------------------Add Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #addArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{addArrayItemDialogData.title}}</div>\n </div>\n\n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"internalGetValidationErrorMessage\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n (inputChangeEvent)=\"checkIsArrayItemValid()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isArrayItemValid\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"addArrayItem()\"\n >\n {{addArrayItemDialogData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeAddArrayItemDialog()\">\n {{addArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #editArrayItemDialog>\n <div class=\"mat-dialog-title\">\n <div>{{editArrayItemDialogData.title(arrayItemPriorChanges)}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"arrayItemDialogTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of arrayItemDialogTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"arrayItemDialogTabs.length <= 1\">\n <div *ngFor=\"let row of arrayItemDialogTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(arrayItem, key)\"\n [isReadOnly]=\"isPropertyReadOnly(arrayItem, key)\"\n (inputChangeEvent)=\"checkArrayItem()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isArrayItemValid || !isArrayItemDirty\"\n [matBadge]=\"arrayItemValidationErrors.length\"\n [matBadgeHidden]=\"!arrayItemValidationErrors.length\"\n (click)=\"saveArrayItem()\"\n >\n {{editArrayItemDialogData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"arrayItemValidationErrors.length\" [tooltipContent]=\"arrayItemTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"closeEditArrayItemDialog()\">\n {{editArrayItemDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Create Has Many Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #createHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.createData.title}}</div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyCreateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyCreateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyCreateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyCreateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkIsHasManyEntityValid('create')\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"!isHasManyEntityValid\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogCreateHasMany()\"\n >\n {{metadataHasMany.tableData.createData.createButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelCreateHasMany()\">\n {{metadataHasMany.tableData.createData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n \n</ng-template>\n\n<!--------------------------------------------------------->\n<!--------------------Edit Has Many Dialog----------------->\n<!--------------------------------------------------------->\n<ng-template #editHasManyDialog>\n <div class=\"mat-dialog-title\">\n <div>{{metadataHasMany.tableData.editData.title(hasManyEntityPriorChanges)}}</div>\n\n <div class=\"actions-container\">\n <button *ngIf=\"metadataHasMany.tableData.editData.actions.length\" type=\"button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{metadataHasMany.tableData.editData.actionsLabel}}\n </button>\n <mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let action of metadataHasMany.tableData.editData.actions\" type=\"button\" mat-menu-item [disabled]=\"hasManyEditActionDisabled(action)\" (click)=\"hasManyRunEditAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n \n <button *ngIf=\"hasManyAllowDelete(hasManyEntity)\" type=\"button\" mat-raised-button color=\"warn\" class=\"delete-button\" tabindex=\"-1\" (click)=\"deleteHasManyEntity()\">\n {{metadataHasMany.tableData.editData.deleteButtonLabel}}\n </button>\n </div>\n </div>\n \n <form>\n <mat-dialog-content>\n <mat-tab-group *ngIf=\"hasManyUpdateTabs.length > 1\" preserveContent>\n <mat-tab *ngFor=\"let tab of hasManyUpdateTabs\" [label]=\"tab.tabName\">\n <div *ngFor=\"let row of tab.rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </mat-tab>\n </mat-tab-group>\n \n <div *ngIf=\"hasManyUpdateTabs.length <= 1\">\n <div *ngFor=\"let row of hasManyUpdateTabs[0].rows\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"hasManyEntity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n [class]=\"EntityUtilities.getWidthClasses(hasManyEntity, key)\"\n [isReadOnly]=\"isPropertyReadOnly(hasManyEntity, key)\"\n (inputChangeEvent)=\"checkHasManyEntity()\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n </mat-dialog-content>\n \n <mat-dialog-actions>\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-top: 10px;\">\n <button type=\"submit\" mat-raised-button matBadgeColor=\"warn\"\n [disabled]=\"internalIsReadOnly || !isHasManyEntityValid || !isHasManyEntityDirty\"\n [matBadge]=\"hasManyValidationErrors.length\"\n [matBadgeHidden]=\"!hasManyValidationErrors.length\"\n (click)=\"dialogEditHasMany()\"\n >\n {{metadataHasMany.tableData.editData.confirmButtonLabel}}\n </button>\n <ngx-mat-entity-tooltip *ngIf=\"hasManyValidationErrors.length\" [tooltipContent]=\"hasManyTooltipContent\"></ngx-mat-entity-tooltip>\n </div>\n <button type=\"button\" mat-raised-button class=\"cancel-button\" (click)=\"dialogCancelEditHasMany()\">\n {{metadataHasMany.tableData.editData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n </form>\n</ng-template>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}.mat-dialog-title{padding:12px 20px;display:flex;justify-content:space-between;align-items:center}.mat-dialog-title div{font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500)}.actions-container{display:flex;gap:10px}::ng-deep .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:16px}::ng-deep .select-search-input{max-width:100%;margin-top:-8px;margin-bottom:8px}::ng-deep .select-search-input .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .mdc-dialog .mdc-dialog__content{padding:6px 20px!important}mat-dialog-actions{justify-content:space-between;align-items:center;padding-left:20px;padding-right:20px}mat-spinner{margin:10px auto}::ng-deep .mat-mdc-tab-body-wrapper{margin-left:-12px;margin-right:-12px}::ng-deep mat-tab-body{padding-top:10px;padding-left:12px;padding-right:12px}::ng-deep mat-tab-body .mat-mdc-tab-body-content{overflow:initial}::ng-deep .mat-mdc-form-field.mat-form-field-disabled label{color:#0009}::ng-deep .mat-mdc-form-field.mat-form-field-disabled input,::ng-deep .mat-mdc-form-field.mat-form-field-disabled textarea,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-disabled,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-select-value{color:#000!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:#707070}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{background-color:#000}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-mdc-chip.mat-mdc-standard-chip.mat-mdc-chip-disabled button{opacity:.2}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle:after,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle:after{opacity:1;background:black}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--selected:disabled .mdc-switch__track,::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__track{opacity:.3}::ng-deep .mat-mdc-form-field.mat-form-field-disabled .mat-date-range-input-inner:disabled{color:#000}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled{opacity:1}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled .mdc-slider__input{cursor:default}::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mat-mdc-slider,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb:hover,::ng-deep #slider.mat-mdc-slider.mdc-slider--disabled mat-slider-visual-thumb .mdc-slider__thumb-knob{background-color:#000;border-color:#000}::ng-deep .mat-mdc-form-field .mat-mdc-slide-toggle{opacity:1}.entityArray .elevation-container{border-radius:5px;padding:15px;margin-bottom:15px;margin-top:15px}.entityArray .array-headline{padding-bottom:10px}.entityArray .buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:5px}.entityArray mat-table{border:1px solid #E0E0E0;border-radius:5px;padding-top:5px;padding-bottom:25px}.entityArray .mat-column-select{flex:0 0 75px}.entityArray .enabled:hover{cursor:pointer}.entityArray .array-error{display:flex;align-items:center;justify-content:center;margin-top:-25.8px;border:1px solid #E0E0E0;background-color:#f8d3d7;color:#721c24;height:25.8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.hasMany button{width:100%;height:56px;line-height:24px;font-size:16px}.hasMany .title{text-align:center}.hasMany .elevation-container{border-radius:5px;padding:5px;margin-bottom:15px}.hasMany .mat-column-select{flex:0 0 75px}.hasMany .enabled:hover{cursor:pointer}\n"] }]
|
|
6008
6266
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i0.EnvironmentInjector }, { type: i2$2.Router }, { type: undefined, decorators: [{
|
|
6009
6267
|
type: Inject,
|
|
6010
6268
|
args: [NGX_GET_VALIDATION_ERROR_MESSAGE]
|
|
@@ -6198,7 +6456,6 @@ class PageCreateDataBuilder extends BaseBuilder {
|
|
|
6198
6456
|
const createData = new CreateDataBuilder(this.globalConfig, data.createData)
|
|
6199
6457
|
.withDefault('cancelButtonLabel', this.globalConfig.backLabel)
|
|
6200
6458
|
.getResult();
|
|
6201
|
-
// eslint-disable-next-line max-len
|
|
6202
6459
|
const confirmUnsavedChangesDialogData = new ConfirmDialogDataBuilder(this.globalConfig, data.createData?.confirmUnsavedChangesDialogData)
|
|
6203
6460
|
.withDefault('title', this.globalConfig.confirmUnsavedChangesTitle)
|
|
6204
6461
|
.withDefault('text', this.globalConfig.confirmUnsavedChangesText)
|
|
@@ -6218,17 +6475,17 @@ class PageCreateDataBuilder extends BaseBuilder {
|
|
|
6218
6475
|
/**
|
|
6219
6476
|
* The entity service that needs to be provided in the providers array of the create page route.
|
|
6220
6477
|
*/
|
|
6221
|
-
// eslint-disable-next-line
|
|
6478
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6222
6479
|
const NGX_CREATE_DATA_ENTITY_SERVICE = new InjectionToken('NGX_CREATE_DATA_ENTITY_SERVICE');
|
|
6223
6480
|
/**
|
|
6224
6481
|
* The entity class that needs to be provided in the providers array of the create page route.
|
|
6225
6482
|
*/
|
|
6226
|
-
// eslint-disable-next-line
|
|
6483
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6227
6484
|
const NGX_CREATE_DATA_ENTITY = new InjectionToken('NGX_CREATE_DATA_ENTITY');
|
|
6228
6485
|
/**
|
|
6229
6486
|
* The configuration that needs to be provided in the providers array of the create page route.
|
|
6230
6487
|
*/
|
|
6231
|
-
// eslint-disable-next-line typescript/no-explicit-any
|
|
6488
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6232
6489
|
const NGX_CREATE_DATA = new InjectionToken('NGX_CREATE_DATA');
|
|
6233
6490
|
/**
|
|
6234
6491
|
* A generic page that allows you to create a specific entity.
|
|
@@ -6303,13 +6560,12 @@ class NgxMatEntityCreatePageComponent {
|
|
|
6303
6560
|
this.data = new PageCreateDataBuilder(this.inputData, this.globalConfig).getResult();
|
|
6304
6561
|
if (this.data == null) {
|
|
6305
6562
|
this.confirmNavigateBack();
|
|
6306
|
-
// eslint-disable-next-line max-len
|
|
6307
6563
|
throw new Error('No create data was provided for "NGX_CREATE_DATA". You need to provide a value in your routes providers array.');
|
|
6308
6564
|
}
|
|
6309
6565
|
this.entity = new this.EntityClass();
|
|
6310
6566
|
EntityUtilities.setDefaultValues(this.entity);
|
|
6311
6567
|
this.entityPriorChanges = LodashUtilities.cloneDeep(this.entity);
|
|
6312
|
-
this.checkIsEntityValid();
|
|
6568
|
+
void this.checkIsEntityValid();
|
|
6313
6569
|
this.entityTabs = EntityUtilities.getEntityTabs(this.entity, this.injector, true, false);
|
|
6314
6570
|
setTimeout(() => this.checkOffset(), 1);
|
|
6315
6571
|
// setTimeout(() => this.checkEntity(), 1);
|
|
@@ -6343,11 +6599,11 @@ class NgxMatEntityCreatePageComponent {
|
|
|
6343
6599
|
* Checks if the entity has become invalid or dirty.
|
|
6344
6600
|
*/
|
|
6345
6601
|
async checkEntity() {
|
|
6346
|
-
this.checkIsEntityValid();
|
|
6602
|
+
await this.checkIsEntityValid();
|
|
6347
6603
|
this.isEntityDirty = await EntityUtilities.isDirty(this.entity, this.entityPriorChanges, this.http);
|
|
6348
6604
|
}
|
|
6349
|
-
checkIsEntityValid() {
|
|
6350
|
-
this.validationErrors = ValidationUtilities.getEntityValidationErrors(this.entity, 'create');
|
|
6605
|
+
async checkIsEntityValid() {
|
|
6606
|
+
this.validationErrors = await ValidationUtilities.getEntityValidationErrors(this.entity, this.injector, 'create');
|
|
6351
6607
|
this.tooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.validationErrors));
|
|
6352
6608
|
this.isEntityValid = this.validationErrors.length === 0;
|
|
6353
6609
|
}
|
|
@@ -6363,7 +6619,6 @@ class NgxMatEntityCreatePageComponent {
|
|
|
6363
6619
|
this.confirmCreate();
|
|
6364
6620
|
return;
|
|
6365
6621
|
}
|
|
6366
|
-
// eslint-disable-next-line max-len
|
|
6367
6622
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.createData.confirmCreateDialogData)
|
|
6368
6623
|
.withDefault('text', this.globalConfig.confirmCreateText)
|
|
6369
6624
|
.withDefault('confirmButtonLabel', this.globalConfig.createLabel)
|
|
@@ -6422,6 +6677,9 @@ class NgxMatEntityCreatePageComponent {
|
|
|
6422
6677
|
isReadOnly(key) {
|
|
6423
6678
|
return runInInjectionContext(this.injector, () => {
|
|
6424
6679
|
const metadata = EntityUtilities.getPropertyMetadata(this.entity, key);
|
|
6680
|
+
if (!metadata) {
|
|
6681
|
+
throw new Error(`No metadata was found for the key "${String(key)}"`);
|
|
6682
|
+
}
|
|
6425
6683
|
return metadata.isReadOnly(this.entity);
|
|
6426
6684
|
});
|
|
6427
6685
|
}
|
|
@@ -6488,7 +6746,6 @@ class PageEditDataBuilder extends BaseBuilder {
|
|
|
6488
6746
|
const editData = new EditDataBuilder(this.globalConfig, data.editData)
|
|
6489
6747
|
.withDefault('cancelButtonLabel', this.globalConfig.backLabel)
|
|
6490
6748
|
.getResult();
|
|
6491
|
-
// eslint-disable-next-line max-len
|
|
6492
6749
|
const confirmUnsavedChangesDialogData = new ConfirmDialogDataBuilder(this.globalConfig, data.editData?.confirmUnsavedChangesDialogData)
|
|
6493
6750
|
.withDefault('title', this.globalConfig.confirmUnsavedChangesTitle)
|
|
6494
6751
|
.withDefault('text', this.globalConfig.confirmUnsavedChangesText)
|
|
@@ -6510,17 +6767,17 @@ class PageEditDataBuilder extends BaseBuilder {
|
|
|
6510
6767
|
/**
|
|
6511
6768
|
* The entity service that needs to be provided in the providers array of the edit page route.
|
|
6512
6769
|
*/
|
|
6513
|
-
// eslint-disable-next-line
|
|
6770
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6514
6771
|
const NGX_EDIT_DATA_ENTITY_SERVICE = new InjectionToken('NGX_EDIT_DATA_ENTITY_SERVICE');
|
|
6515
6772
|
/**
|
|
6516
6773
|
* The entity class that needs to be provided in the providers array of the edit page route.
|
|
6517
6774
|
*/
|
|
6518
|
-
// eslint-disable-next-line
|
|
6775
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6519
6776
|
const NGX_EDIT_DATA_ENTITY = new InjectionToken('NGX_EDIT_DATA_ENTITY');
|
|
6520
6777
|
/**
|
|
6521
6778
|
* The configuration that needs to be provided in the providers array of the edit page route.
|
|
6522
6779
|
*/
|
|
6523
|
-
// eslint-disable-next-line typescript/no-explicit-any
|
|
6780
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6524
6781
|
const NGX_EDIT_DATA = new InjectionToken('NGX_EDIT_DATA');
|
|
6525
6782
|
/**
|
|
6526
6783
|
* A generic page that allows you to edit a specific entity.
|
|
@@ -6608,6 +6865,9 @@ class NgxMatEntityEditPageComponent {
|
|
|
6608
6865
|
isReadOnly(key) {
|
|
6609
6866
|
return runInInjectionContext(this.injector, () => {
|
|
6610
6867
|
const metadata = EntityUtilities.getPropertyMetadata(this.entity, key);
|
|
6868
|
+
if (!metadata) {
|
|
6869
|
+
throw new Error(`No metadata was found for the key "${String(key)}"`);
|
|
6870
|
+
}
|
|
6611
6871
|
return this.isEntityReadOnly || metadata.isReadOnly(this.entity);
|
|
6612
6872
|
});
|
|
6613
6873
|
}
|
|
@@ -6631,7 +6891,7 @@ class NgxMatEntityEditPageComponent {
|
|
|
6631
6891
|
});
|
|
6632
6892
|
this.entityTabs = EntityUtilities.getEntityTabs(this.entity, this.injector, false, true);
|
|
6633
6893
|
setTimeout(() => this.checkOffset(), 1);
|
|
6634
|
-
setTimeout(() => this.checkIsEntityValid(), 1);
|
|
6894
|
+
setTimeout(() => void this.checkIsEntityValid(), 1);
|
|
6635
6895
|
}
|
|
6636
6896
|
/**
|
|
6637
6897
|
* Checks if the bottom row should be displayed as fixed.
|
|
@@ -6662,11 +6922,11 @@ class NgxMatEntityEditPageComponent {
|
|
|
6662
6922
|
* Checks if the entity has become invalid or dirty.
|
|
6663
6923
|
*/
|
|
6664
6924
|
async checkEntity() {
|
|
6665
|
-
this.checkIsEntityValid();
|
|
6925
|
+
await this.checkIsEntityValid();
|
|
6666
6926
|
this.isEntityDirty = await EntityUtilities.isDirty(this.entity, this.entityPriorChanges, this.http);
|
|
6667
6927
|
}
|
|
6668
|
-
checkIsEntityValid() {
|
|
6669
|
-
this.validationErrors = ValidationUtilities.getEntityValidationErrors(this.entity, 'update');
|
|
6928
|
+
async checkIsEntityValid() {
|
|
6929
|
+
this.validationErrors = await ValidationUtilities.getEntityValidationErrors(this.entity, this.injector, 'update');
|
|
6670
6930
|
this.tooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.validationErrors));
|
|
6671
6931
|
this.isEntityValid = this.validationErrors.length === 0;
|
|
6672
6932
|
}
|
|
@@ -6682,7 +6942,6 @@ class NgxMatEntityEditPageComponent {
|
|
|
6682
6942
|
this.confirmEdit();
|
|
6683
6943
|
return;
|
|
6684
6944
|
}
|
|
6685
|
-
// eslint-disable-next-line max-len
|
|
6686
6945
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmEditDialogData)
|
|
6687
6946
|
.withDefault('text', this.globalConfig.confirmSaveText)
|
|
6688
6947
|
.withDefault('confirmButtonLabel', this.globalConfig.saveLabel)
|
|
@@ -6711,7 +6970,6 @@ class NgxMatEntityEditPageComponent {
|
|
|
6711
6970
|
this.confirmDelete();
|
|
6712
6971
|
return;
|
|
6713
6972
|
}
|
|
6714
|
-
// eslint-disable-next-line max-len
|
|
6715
6973
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmDeleteDialogData)
|
|
6716
6974
|
.withDefault('text', this.globalConfig.confirmDeleteText)
|
|
6717
6975
|
.withDefault('type', 'delete')
|
|
@@ -6929,13 +7187,13 @@ class NgxMatEntityCreateDialogComponent {
|
|
|
6929
7187
|
this.dialogRef.disableClose = true;
|
|
6930
7188
|
this.entityTabs = EntityUtilities.getEntityTabs(this.data.entity, this.injector, true);
|
|
6931
7189
|
this.entityService = this.injector.get(this.data.EntityServiceClass);
|
|
6932
|
-
setTimeout(() => this.checkIsEntityValid(), 1);
|
|
7190
|
+
setTimeout(() => void this.checkIsEntityValid(), 1);
|
|
6933
7191
|
}
|
|
6934
7192
|
/**
|
|
6935
7193
|
* Checks if the entity is valid.
|
|
6936
7194
|
*/
|
|
6937
|
-
checkIsEntityValid() {
|
|
6938
|
-
this.validationErrors = ValidationUtilities.getEntityValidationErrors(this.data.entity, 'create');
|
|
7195
|
+
async checkIsEntityValid() {
|
|
7196
|
+
this.validationErrors = await ValidationUtilities.getEntityValidationErrors(this.data.entity, this.injector, 'create');
|
|
6939
7197
|
this.tooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.validationErrors));
|
|
6940
7198
|
this.isEntityValid = this.validationErrors.length === 0;
|
|
6941
7199
|
}
|
|
@@ -7234,7 +7492,7 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7234
7492
|
this.dialogRef.disableClose = true;
|
|
7235
7493
|
this.entityTabs = EntityUtilities.getEntityTabs(this.data.entity, this.injector, false, true);
|
|
7236
7494
|
this.entityService = this.injector.get(this.data.EntityServiceClass);
|
|
7237
|
-
setTimeout(() => this.checkIsEntityValid(), 1);
|
|
7495
|
+
setTimeout(() => void this.checkIsEntityValid(), 1);
|
|
7238
7496
|
}
|
|
7239
7497
|
/**
|
|
7240
7498
|
* Checks if the input with the given key is readonly.
|
|
@@ -7244,6 +7502,9 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7244
7502
|
isReadOnly(key) {
|
|
7245
7503
|
return runInInjectionContext(this.injector, () => {
|
|
7246
7504
|
const metadata = EntityUtilities.getPropertyMetadata(this.data.entity, key);
|
|
7505
|
+
if (!metadata) {
|
|
7506
|
+
throw new Error(`No metadata was found for the key "${String(key)}"`);
|
|
7507
|
+
}
|
|
7247
7508
|
return this.isEntityReadOnly || metadata.isReadOnly(this.data.entity);
|
|
7248
7509
|
});
|
|
7249
7510
|
}
|
|
@@ -7251,11 +7512,11 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7251
7512
|
* Checks if the entity has become invalid or dirty.
|
|
7252
7513
|
*/
|
|
7253
7514
|
async checkEntity() {
|
|
7254
|
-
this.checkIsEntityValid();
|
|
7515
|
+
await this.checkIsEntityValid();
|
|
7255
7516
|
this.isEntityDirty = await EntityUtilities.isDirty(this.data.entity, this.entityPriorChanges, this.http);
|
|
7256
7517
|
}
|
|
7257
|
-
checkIsEntityValid() {
|
|
7258
|
-
this.validationErrors = ValidationUtilities.getEntityValidationErrors(this.data.entity, 'update');
|
|
7518
|
+
async checkIsEntityValid() {
|
|
7519
|
+
this.validationErrors = await ValidationUtilities.getEntityValidationErrors(this.data.entity, this.injector, 'update');
|
|
7259
7520
|
this.tooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.validationErrors));
|
|
7260
7521
|
this.isEntityValid = this.validationErrors.length === 0;
|
|
7261
7522
|
}
|
|
@@ -7271,7 +7532,6 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7271
7532
|
this.confirmEdit();
|
|
7272
7533
|
return;
|
|
7273
7534
|
}
|
|
7274
|
-
// eslint-disable-next-line max-len
|
|
7275
7535
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmEditDialogData)
|
|
7276
7536
|
.withDefault('text', this.globalConfig.confirmSaveText)
|
|
7277
7537
|
.withDefault('confirmButtonLabel', this.globalConfig.saveLabel)
|
|
@@ -7300,7 +7560,6 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7300
7560
|
this.confirmDelete();
|
|
7301
7561
|
return;
|
|
7302
7562
|
}
|
|
7303
|
-
// eslint-disable-next-line max-len
|
|
7304
7563
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmDeleteDialogData)
|
|
7305
7564
|
.withDefault('text', this.globalConfig.confirmDeleteText)
|
|
7306
7565
|
.withDefault('type', 'delete')
|
|
@@ -7391,6 +7650,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
7391
7650
|
args: [NGX_INTERNAL_GLOBAL_DEFAULT_VALUES]
|
|
7392
7651
|
}] }]; } });
|
|
7393
7652
|
|
|
7653
|
+
/**
|
|
7654
|
+
* Dynamically applies css classes based on a provided function.
|
|
7655
|
+
*/
|
|
7656
|
+
class DynamicStyleClassDirective {
|
|
7657
|
+
element;
|
|
7658
|
+
renderer;
|
|
7659
|
+
styleClassesApplied = [];
|
|
7660
|
+
/**
|
|
7661
|
+
* The function that gets the css classes to dynamically apply.
|
|
7662
|
+
*/
|
|
7663
|
+
dynamicStyleClasses;
|
|
7664
|
+
/**
|
|
7665
|
+
* The input for the dynamic style classes function.
|
|
7666
|
+
*/
|
|
7667
|
+
entity;
|
|
7668
|
+
constructor(element, renderer) {
|
|
7669
|
+
this.element = element;
|
|
7670
|
+
this.renderer = renderer;
|
|
7671
|
+
}
|
|
7672
|
+
ngOnChanges() {
|
|
7673
|
+
this.applyDynamicClasses();
|
|
7674
|
+
}
|
|
7675
|
+
applyDynamicClasses() {
|
|
7676
|
+
const classes = this.dynamicStyleClasses(this.entity);
|
|
7677
|
+
for (const styleClass of this.styleClassesApplied) {
|
|
7678
|
+
this.renderer.removeClass(this.element.nativeElement, styleClass);
|
|
7679
|
+
}
|
|
7680
|
+
this.styleClassesApplied = [];
|
|
7681
|
+
if (classes?.length) {
|
|
7682
|
+
for (const styleClass of classes) {
|
|
7683
|
+
this.renderer.addClass(this.element.nativeElement, styleClass);
|
|
7684
|
+
this.styleClassesApplied.push(styleClass);
|
|
7685
|
+
}
|
|
7686
|
+
}
|
|
7687
|
+
}
|
|
7688
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicStyleClassDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
7689
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0", type: DynamicStyleClassDirective, isStandalone: true, selector: "[dynamicStyleClasses]", inputs: { dynamicStyleClasses: "dynamicStyleClasses", entity: "entity" }, usesOnChanges: true, ngImport: i0 });
|
|
7690
|
+
}
|
|
7691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicStyleClassDirective, decorators: [{
|
|
7692
|
+
type: Directive,
|
|
7693
|
+
args: [{ selector: '[dynamicStyleClasses]', standalone: true }]
|
|
7694
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { dynamicStyleClasses: [{
|
|
7695
|
+
type: Input,
|
|
7696
|
+
args: [{ required: true }]
|
|
7697
|
+
}], entity: [{
|
|
7698
|
+
type: Input,
|
|
7699
|
+
args: [{ required: true }]
|
|
7700
|
+
}] } });
|
|
7701
|
+
|
|
7394
7702
|
/**
|
|
7395
7703
|
* Generates a fully functional table for displaying, creating, updating and deleting entities
|
|
7396
7704
|
* based on the configuration passed in the @Input "tableData".
|
|
@@ -7702,7 +8010,7 @@ class NgxMatEntityTableComponent {
|
|
|
7702
8010
|
this.dataSource.filter = filterValue.trim().toLowerCase();
|
|
7703
8011
|
}
|
|
7704
8012
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxMatEntityTableComponent, deps: [{ token: i1.MatDialog }, { token: i0.EnvironmentInjector }, { token: i2$2.Router }, { token: NGX_INTERNAL_GLOBAL_DEFAULT_VALUES }], target: i0.ɵɵFactoryTarget.Component });
|
|
7705
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: NgxMatEntityTableComponent, isStandalone: true, selector: "ngx-mat-entity-table", inputs: { tableData: "tableData" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "filter", first: true, predicate: ["filter"], descendants: true, static: true }], ngImport: i0, template: "<!-- eslint-disable angular/cyclomatic-complexity -->\n<!-- eslint-disable angular/no-call-expression -->\n<h1 class=\"title\">{{data.baseData.title}}</h1>\n\n<div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{data.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\">\n </mat-form-field>\n <div\n *ngIf=\"data.baseData.tableActions.length\"\n [class.col-lg-2]=\"allowCreate\"\n [class.col-lg-4]=\"!allowCreate\"\n [class.col-md-3]=\"allowCreate\"\n [class.col-md-6]=\"!allowCreate\"\n [class.col-sm-6]=\"allowCreate\"\n [class.col-sm-12]=\"!allowCreate\"\n >\n <button type=\"button\" class=\"actions-button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{data.baseData.tableActionsLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngIf=\"data.baseData.allowJsonImport\" type=\"button\" mat-menu-item [disabled]=\"tableActionDisabled(importAction)\" (click)=\"runTableAction(importAction)\">\n {{importAction.displayName}}\n </button>\n <button *ngFor=\"let action of data.baseData.tableActions\" type=\"button\" mat-menu-item [disabled]=\"tableActionDisabled(action)\" (click)=\"runTableAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"allowCreate\"\n [class.col-lg-2]=\"data.baseData.tableActions.length\"\n [class.col-lg-4]=\"!data.baseData.tableActions.length\"\n [class.col-md-3]=\"data.baseData.tableActions.length\"\n [class.col-md-6]=\"!data.baseData.tableActions.length\"\n [class.col-sm-6]=\"data.baseData.tableActions.length\"\n [class.col-sm-12]=\"!data.baseData.tableActions.length\"\n >\n <button type=\"button\" class=\"create-button\" mat-raised-button (click)=\"createEntity()\">\n {{data.baseData.createButtonLabel}}\n </button>\n </div>\n</div>\n\n<div class=\"mat-elevation-z8\">\n <mat-table matSort [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\"\n [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(entity) : null\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of data.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\"\n [class.enabled]=\"!dCol.disableClick && (allowUpdate(entity) || allowRead(entity))\"\n (click)=\"editEntity(entity, dCol)\"\n >\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <mat-spinner *ngIf=\"isLoading && data.baseData.displayLoadingSpinner\">\n </mat-spinner>\n\n <mat-paginator [length]=\"dataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"></mat-paginator>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}button{width:100%}mat-spinner{margin:10px auto}.title{text-align:center}.actions-button,.create-button{height:56px;line-height:24px;font-size:16px}.mat-column-select{flex:0 0 75px}.enabled:hover{cursor:pointer}@media (max-width: 767px){.actions-button,.create-button{margin-bottom:15px}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type:
|
|
8013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: NgxMatEntityTableComponent, isStandalone: true, selector: "ngx-mat-entity-table", inputs: { tableData: "tableData" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "filter", first: true, predicate: ["filter"], descendants: true, static: true }], ngImport: i0, template: "<!-- eslint-disable angular/cyclomatic-complexity -->\n<!-- eslint-disable angular/no-call-expression -->\n<h1 class=\"title\">{{data.baseData.title}}</h1>\n\n<div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{data.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\">\n </mat-form-field>\n <div\n *ngIf=\"data.baseData.tableActions.length\"\n [class.col-lg-2]=\"allowCreate\"\n [class.col-lg-4]=\"!allowCreate\"\n [class.col-md-3]=\"allowCreate\"\n [class.col-md-6]=\"!allowCreate\"\n [class.col-sm-6]=\"allowCreate\"\n [class.col-sm-12]=\"!allowCreate\"\n >\n <button type=\"button\" class=\"actions-button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{data.baseData.tableActionsLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngIf=\"data.baseData.allowJsonImport\" type=\"button\" mat-menu-item [disabled]=\"tableActionDisabled(importAction)\" (click)=\"runTableAction(importAction)\">\n {{importAction.displayName}}\n </button>\n <button *ngFor=\"let action of data.baseData.tableActions\" type=\"button\" mat-menu-item [disabled]=\"tableActionDisabled(action)\" (click)=\"runTableAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"allowCreate\"\n [class.col-lg-2]=\"data.baseData.tableActions.length\"\n [class.col-lg-4]=\"!data.baseData.tableActions.length\"\n [class.col-md-3]=\"data.baseData.tableActions.length\"\n [class.col-md-6]=\"!data.baseData.tableActions.length\"\n [class.col-sm-6]=\"data.baseData.tableActions.length\"\n [class.col-sm-12]=\"!data.baseData.tableActions.length\"\n >\n <button type=\"button\" class=\"create-button\" mat-raised-button (click)=\"createEntity()\">\n {{data.baseData.createButtonLabel}}\n </button>\n </div>\n</div>\n\n<div class=\"mat-elevation-z8\">\n <mat-table matSort [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\"\n [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\" [dynamicStyleClasses]=\"data.baseData.dynamicRowStyleClasses\" [entity]=\"entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(entity) : null\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of data.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\"\n [class.enabled]=\"!dCol.disableClick && (allowUpdate(entity) || allowRead(entity))\"\n [dynamicStyleClasses]=\"data.baseData.dynamicRowStyleClasses\" [entity]=\"entity\"\n (click)=\"editEntity(entity, dCol)\"\n >\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <mat-spinner *ngIf=\"isLoading && data.baseData.displayLoadingSpinner\">\n </mat-spinner>\n\n <mat-paginator [length]=\"dataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"></mat-paginator>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}button{width:100%}mat-spinner{margin:10px auto}.title{text-align:center}.actions-button,.create-button{height:56px;line-height:24px;font-size:16px}.mat-column-select{flex:0 0 75px}.enabled:hover{cursor:pointer}@media (max-width: 767px){.actions-button,.create-button{margin-bottom:15px}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i14.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i17.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i17.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i15.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: DisplayColumnValueComponent, selector: "display-column-value", inputs: ["entity", "ComponentClass"] }, { kind: "directive", type: DynamicStyleClassDirective, selector: "[dynamicStyleClasses]", inputs: ["dynamicStyleClasses", "entity"] }] });
|
|
7706
8014
|
}
|
|
7707
8015
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxMatEntityTableComponent, decorators: [{
|
|
7708
8016
|
type: Component,
|
|
@@ -7722,8 +8030,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
7722
8030
|
MatProgressSpinnerModule,
|
|
7723
8031
|
NgxMatEntityCreateDialogComponent,
|
|
7724
8032
|
NgxMatEntityEditDialogComponent,
|
|
7725
|
-
DisplayColumnValueComponent
|
|
7726
|
-
|
|
8033
|
+
DisplayColumnValueComponent,
|
|
8034
|
+
DynamicStyleClassDirective
|
|
8035
|
+
], template: "<!-- eslint-disable angular/cyclomatic-complexity -->\n<!-- eslint-disable angular/no-call-expression -->\n<h1 class=\"title\">{{data.baseData.title}}</h1>\n\n<div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{data.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\">\n </mat-form-field>\n <div\n *ngIf=\"data.baseData.tableActions.length\"\n [class.col-lg-2]=\"allowCreate\"\n [class.col-lg-4]=\"!allowCreate\"\n [class.col-md-3]=\"allowCreate\"\n [class.col-md-6]=\"!allowCreate\"\n [class.col-sm-6]=\"allowCreate\"\n [class.col-sm-12]=\"!allowCreate\"\n >\n <button type=\"button\" class=\"actions-button\" mat-raised-button [matMenuTriggerFor]=\"menu\">\n {{data.baseData.tableActionsLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngIf=\"data.baseData.allowJsonImport\" type=\"button\" mat-menu-item [disabled]=\"tableActionDisabled(importAction)\" (click)=\"runTableAction(importAction)\">\n {{importAction.displayName}}\n </button>\n <button *ngFor=\"let action of data.baseData.tableActions\" type=\"button\" mat-menu-item [disabled]=\"tableActionDisabled(action)\" (click)=\"runTableAction(action)\">\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"allowCreate\"\n [class.col-lg-2]=\"data.baseData.tableActions.length\"\n [class.col-lg-4]=\"!data.baseData.tableActions.length\"\n [class.col-md-3]=\"data.baseData.tableActions.length\"\n [class.col-md-6]=\"!data.baseData.tableActions.length\"\n [class.col-sm-6]=\"data.baseData.tableActions.length\"\n [class.col-sm-12]=\"!data.baseData.tableActions.length\"\n >\n <button type=\"button\" class=\"create-button\" mat-raised-button (click)=\"createEntity()\">\n {{data.baseData.createButtonLabel}}\n </button>\n </div>\n</div>\n\n<div class=\"mat-elevation-z8\">\n <mat-table matSort [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [checked]=\"selection.hasValue() && SelectionUtilities.isAllSelected(selection, dataSource)\"\n [indeterminate]=\"selection.hasValue() && !SelectionUtilities.isAllSelected(selection, dataSource)\"\n (change)=\"$event ? SelectionUtilities.masterToggle(selection, dataSource) : null\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\" [dynamicStyleClasses]=\"data.baseData.dynamicRowStyleClasses\" [entity]=\"entity\">\n <mat-checkbox [checked]=\"selection.isSelected(entity)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(entity) : null\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of data.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell *matCellDef=\"let entity\" class=\"entity\"\n [class.enabled]=\"!dCol.disableClick && (allowUpdate(entity) || allowRead(entity))\"\n [dynamicStyleClasses]=\"data.baseData.dynamicRowStyleClasses\" [entity]=\"entity\"\n (click)=\"editEntity(entity, dCol)\"\n >\n <ng-container *ngIf=\"dCol.Component\">\n <display-column-value [entity]=\"entity\" [ComponentClass]=\"dCol.Component\"></display-column-value>\n </ng-container>\n <ng-container *ngIf=\"!dCol.Component\">\n {{getDisplayColumnValue(entity, dCol)}}\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <mat-spinner *ngIf=\"isLoading && data.baseData.displayLoadingSpinner\">\n </mat-spinner>\n\n <mat-paginator [length]=\"dataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"></mat-paginator>\n</div>", styles: [".mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:1px solid rgba(0,0,0,.12)}button{width:100%}mat-spinner{margin:10px auto}.title{text-align:center}.actions-button,.create-button{height:56px;line-height:24px;font-size:16px}.mat-column-select{flex:0 0 75px}.enabled:hover{cursor:pointer}@media (max-width: 767px){.actions-button,.create-button{margin-bottom:15px}}\n"] }]
|
|
7727
8036
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i0.EnvironmentInjector }, { type: i2$2.Router }, { type: undefined, decorators: [{
|
|
7728
8037
|
type: Inject,
|
|
7729
8038
|
args: [NGX_INTERNAL_GLOBAL_DEFAULT_VALUES]
|
|
@@ -7889,7 +8198,7 @@ class CustomDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
|
7889
8198
|
component;
|
|
7890
8199
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
7891
8200
|
isValid;
|
|
7892
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
8201
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
7893
8202
|
isEqual;
|
|
7894
8203
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
7895
8204
|
customMetadata;
|
|
@@ -8091,7 +8400,6 @@ class ImageFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
|
8091
8400
|
function getDefaultMimeTypeErrorDialogData(data) {
|
|
8092
8401
|
return {
|
|
8093
8402
|
type: data.mimeTypeErrorDialog?.type ?? 'info-only',
|
|
8094
|
-
// eslint-disable-next-line max-len
|
|
8095
8403
|
text: data.mimeTypeErrorDialog?.text ?? (data.multiple ? ['One of the uploaded files has the wrong type.'] : ['The uploaded file has the wrong type.']),
|
|
8096
8404
|
title: data.mimeTypeErrorDialog?.title ?? (data.multiple ? 'Error adding files' : 'Error adding file'),
|
|
8097
8405
|
confirmButtonLabel: data.mimeTypeErrorDialog?.confirmButtonLabel,
|
|
@@ -8109,7 +8417,6 @@ function getDefaultMimeTypeErrorDialogData(data) {
|
|
|
8109
8417
|
function getDefaultMaxSizeErrorDialogData(data) {
|
|
8110
8418
|
return {
|
|
8111
8419
|
type: data.mimeTypeErrorDialog?.type ?? 'info-only',
|
|
8112
|
-
// eslint-disable-next-line max-len
|
|
8113
8420
|
text: data.mimeTypeErrorDialog?.text ?? (data.multiple ? ['One of the uploaded files is too big'] : ['The uploaded files is too big']),
|
|
8114
8421
|
title: data.mimeTypeErrorDialog?.title ?? (data.multiple ? 'Error adding files' : 'Error adding file'),
|
|
8115
8422
|
confirmButtonLabel: data.mimeTypeErrorDialog?.confirmButtonLabel,
|
|
@@ -8371,5 +8678,5 @@ class StringDecoratorConfig extends PropertyDecoratorConfig {
|
|
|
8371
8678
|
* Generated bundle index. Do not edit.
|
|
8372
8679
|
*/
|
|
8373
8680
|
|
|
8374
|
-
export { ArrayDecoratorConfig, DateUtilities, DecoratorTypes, Entity, EntityService, EntityUtilities, FileUtilities, NGX_CREATE_DATA, NGX_CREATE_DATA_ENTITY, NGX_CREATE_DATA_ENTITY_SERVICE, NGX_EDIT_DATA, NGX_EDIT_DATA_ENTITY, NGX_EDIT_DATA_ENTITY_SERVICE, NGX_GET_VALIDATION_ERROR_MESSAGE, NGX_GLOBAL_DEFAULT_VALUES, NgxMatEntityBaseDisplayColumnValueComponent, NgxMatEntityBaseInputComponent, NgxMatEntityConfirmDialogComponent, NgxMatEntityCreateDialogComponent, NgxMatEntityCreatePageComponent, NgxMatEntityEditDialogComponent, NgxMatEntityEditPageComponent, NgxMatEntityInputComponent, NgxMatEntityInputModule, NgxMatEntityTableComponent, NgxValidationErrorsTooltipTitle, TooltipComponent, UnsavedChangesGuard, ValidationUtilities, array, boolean, custom, date, defaultCreateDataRoute, defaultEditDataRoute, exportAsCsvMultiAction, exportAsJsonMultiAction, exportAsXmlMultiAction, file, getValidationErrorsTooltipContent, hasMany, importFromJsonMultiAction, number, object, referencesMany, referencesOne, string };
|
|
8681
|
+
export { ArrayDecoratorConfig, DateUtilities, DecoratorTypes, DynamicStyleClassDirective, Entity, EntityService, EntityUtilities, FileUtilities, IncludedInValidatorDirective, NGX_CREATE_DATA, NGX_CREATE_DATA_ENTITY, NGX_CREATE_DATA_ENTITY_SERVICE, NGX_EDIT_DATA, NGX_EDIT_DATA_ENTITY, NGX_EDIT_DATA_ENTITY_SERVICE, NGX_GET_VALIDATION_ERROR_MESSAGE, NGX_GLOBAL_DEFAULT_VALUES, NgxMatEntityBaseDisplayColumnValueComponent, NgxMatEntityBaseInputComponent, NgxMatEntityConfirmDialogComponent, NgxMatEntityCreateDialogComponent, NgxMatEntityCreatePageComponent, NgxMatEntityEditDialogComponent, NgxMatEntityEditPageComponent, NgxMatEntityInputComponent, NgxMatEntityInputModule, NgxMatEntityTableComponent, NgxValidationErrorsTooltipTitle, NumberDirective, TooltipComponent, TooltipDirective, UnsavedChangesGuard, ValidationUtilities, array, boolean, custom, date, defaultCreateDataRoute, defaultEditDataRoute, exportAsCsvMultiAction, exportAsJsonMultiAction, exportAsXmlMultiAction, file, getValidationErrorsTooltipContent, hasMany, importFromJsonMultiAction, number, object, referencesMany, referencesOne, string };
|
|
8375
8682
|
//# sourceMappingURL=ngx-material-entity.mjs.map
|