@mediusinc/mng-commons 0.2.8 → 0.2.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.
Files changed (49) hide show
  1. package/README.md +46 -0
  2. package/assets/i18n/en.json +202 -151
  3. package/assets/i18n/sl.json +202 -151
  4. package/esm2020/lib/api/utils/object-serializer.util.mjs +12 -7
  5. package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +2 -2
  6. package/esm2020/lib/components/form/editor/form-editor.component.mjs +1 -1
  7. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  8. package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
  9. package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +1 -1
  10. package/esm2020/lib/components/tableview/table/table.component.mjs +5 -4
  11. package/esm2020/lib/components/tableview/tableview.component.mjs +1 -1
  12. package/esm2020/lib/data-providers/base.data-provider.mjs +1 -8
  13. package/esm2020/lib/descriptors/editor.descriptor.mjs +87 -66
  14. package/esm2020/lib/descriptors/table.descriptor.mjs +51 -42
  15. package/esm2020/lib/descriptors/tableview.descriptor.mjs +6 -6
  16. package/esm2020/lib/mng-commons.module.mjs +5 -2
  17. package/esm2020/lib/models/enum.model.mjs +2 -0
  18. package/esm2020/lib/models/index.mjs +2 -1
  19. package/esm2020/lib/pipes/i18n-property.pipe.mjs +18 -0
  20. package/esm2020/lib/pipes/index.mjs +2 -1
  21. package/esm2020/lib/types/type.decorator.mjs +7 -1
  22. package/esm2020/lib/types/type.model.mjs +1 -1
  23. package/esm2020/lib/utils/editor-formly.util.mjs +4 -1
  24. package/esm2020/lib/utils/enum.util.mjs +61 -0
  25. package/esm2020/lib/utils/i18n.util.mjs +38 -26
  26. package/esm2020/lib/utils/index.mjs +2 -1
  27. package/esm2020/lib/utils/type.util.mjs +39 -2
  28. package/fesm2015/mediusinc-mng-commons.mjs +321 -154
  29. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  30. package/fesm2020/mediusinc-mng-commons.mjs +320 -154
  31. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  32. package/lib/api/utils/object-serializer.util.d.ts +1 -0
  33. package/lib/data-providers/base.data-provider.d.ts +0 -3
  34. package/lib/descriptors/editor.descriptor.d.ts +32 -27
  35. package/lib/descriptors/table.descriptor.d.ts +15 -12
  36. package/lib/descriptors/tableview.descriptor.d.ts +8 -8
  37. package/lib/mng-commons.module.d.ts +68 -67
  38. package/lib/models/enum.model.d.ts +5 -0
  39. package/lib/models/index.d.ts +1 -0
  40. package/lib/pipes/i18n-property.pipe.d.ts +8 -0
  41. package/lib/pipes/index.d.ts +1 -0
  42. package/lib/types/type.decorator.d.ts +2 -0
  43. package/lib/types/type.model.d.ts +2 -2
  44. package/lib/utils/enum.util.d.ts +39 -0
  45. package/lib/utils/i18n.util.d.ts +6 -2
  46. package/lib/utils/index.d.ts +1 -0
  47. package/lib/utils/type.util.d.ts +22 -1
  48. package/package.json +2 -2
  49. package/scss/mng-overrides/_layout_forms.scss +5 -0
@@ -427,17 +427,10 @@ class DataProvider {
427
427
  get modelType() {
428
428
  return this._modelType;
429
429
  }
430
- get enumName() {
431
- return this._enumName;
432
- }
433
430
  withServiceType(type) {
434
431
  this._serviceType = type;
435
432
  return this;
436
433
  }
437
- withEnumName(enumName) {
438
- this._enumName = enumName;
439
- return this;
440
- }
441
434
  }
442
435
 
443
436
  class EditorDataProvider extends DataProvider {
@@ -766,29 +759,33 @@ class EditorDescriptor {
766
759
  this._disabled = false;
767
760
  this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
768
761
  }
762
+ get disabled() {
763
+ return this._disabled;
764
+ }
769
765
  get model() {
770
766
  return this._model;
771
767
  }
772
768
  get tabs() {
773
769
  return this._tabs;
774
770
  }
775
- get disabled() {
776
- return this._disabled;
777
- }
778
771
  get fields() {
779
772
  return this._fields;
780
773
  }
781
774
  createTabGroup(name, title) {
782
775
  const tabGroup = new FieldTabGroupDescriptor(this, name);
783
- if (title) {
784
- tabGroup.withTitle(title);
776
+ if (!title) {
777
+ title = I18nUtil.getModelTabKey(this.model, name);
785
778
  }
779
+ tabGroup.withTitle(title);
786
780
  this.createTabGroupDescriptor(tabGroup);
787
781
  return tabGroup;
788
782
  }
789
783
  createFieldGroup(name, title) {
790
784
  const fieldGroup = new FieldGroupDescriptor(this, name);
791
- if (title) {
785
+ if (title !== null) {
786
+ if (!title) {
787
+ title = I18nUtil.getModelGroupKey(this.model, name);
788
+ }
792
789
  fieldGroup.withTitle(title);
793
790
  }
794
791
  this.createFieldGroupDescriptor(fieldGroup);
@@ -830,16 +827,8 @@ class EditorDescriptor {
830
827
  this.addFieldDescriptor(field);
831
828
  return field;
832
829
  }
833
- addFieldLookupEnum(property, options) {
834
- const propDef = ObjectSerializer.get().findAttributeDefinitionByClassType(this.model.type, property);
835
- if (!propDef) {
836
- throw new Error(`Property (attribute) definition not found for property ${property} on class type ${this._model.typeName}`);
837
- }
838
- const enumDef = ObjectSerializer.get().findEnum(propDef.type);
839
- if (!enumDef) {
840
- throw new Error(`Enum definition ${propDef.type} not found for property ${property} on class type ${this._model.typeName}`);
841
- }
842
- const field = new FieldLookupEnumDescriptor(this, property, propDef.type, options);
830
+ addFieldLookupEnum(property, enumType, options, nameAsValue = false, optionsTitlePath) {
831
+ const field = new FieldLookupEnumDescriptor(this, property, enumType, options, nameAsValue, optionsTitlePath);
843
832
  this.addFieldDescriptor(field);
844
833
  return field;
845
834
  }
@@ -878,11 +867,6 @@ class EditorDescriptor {
878
867
  editor._disabled = this._disabled;
879
868
  return editor;
880
869
  }
881
- createTabGroupDescriptor(tabGroup) {
882
- this._currentTabGroup = tabGroup;
883
- this._tabs.push(tabGroup);
884
- return this;
885
- }
886
870
  createFieldGroupDescriptor(fieldGroup) {
887
871
  var _a;
888
872
  this.createDefaultTabGroup();
@@ -891,16 +875,21 @@ class EditorDescriptor {
891
875
  (_a = this._currentTabGroup) === null || _a === void 0 ? void 0 : _a.addField(fieldGroup);
892
876
  return this;
893
877
  }
878
+ createTabGroupDescriptor(tabGroup) {
879
+ this._currentTabGroup = tabGroup;
880
+ this._tabs.push(tabGroup);
881
+ return this;
882
+ }
894
883
  createDefaultGroup() {
895
884
  var _a;
896
885
  this.createDefaultTabGroup();
897
886
  if (((_a = this._currentTabGroup) === null || _a === void 0 ? void 0 : _a.fields.length) === 0) {
898
- this.createFieldGroup(EditorDescriptor.defaultGroupName);
887
+ this.createFieldGroup(EditorDescriptor.defaultGroupName, null);
899
888
  }
900
889
  }
901
890
  createDefaultTabGroup() {
902
891
  if (this._tabs.length === 0) {
903
- this.createTabGroup(EditorDescriptor.defaultGroupName);
892
+ this.createTabGroup(EditorDescriptor.defaultGroupName, 'general.general');
904
893
  }
905
894
  }
906
895
  }
@@ -921,10 +910,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
921
910
  this._className = '';
922
911
  this._validators = [];
923
912
  this._property = property;
924
- this._label = this._editor.model.typeName + '.properties.' + property;
925
- }
926
- get property() {
927
- return this._property;
913
+ this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
928
914
  }
929
915
  get group() {
930
916
  return this._group;
@@ -941,6 +927,9 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
941
927
  get disabled() {
942
928
  return this._disabled;
943
929
  }
930
+ get defaultValue() {
931
+ return this._defaultValue;
932
+ }
944
933
  get className() {
945
934
  return this._className;
946
935
  }
@@ -956,6 +945,9 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
956
945
  get disabledFunction() {
957
946
  return this._disabledFunction;
958
947
  }
948
+ get property() {
949
+ return this._property;
950
+ }
959
951
  withLabel(label) {
960
952
  this._label = label;
961
953
  return this;
@@ -975,6 +967,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
975
967
  }
976
968
  return this;
977
969
  }
970
+ withDefaultValue(defaultValue) {
971
+ this._defaultValue = defaultValue;
972
+ return this;
973
+ }
978
974
  withClassName(className) {
979
975
  this._className = className;
980
976
  return this;
@@ -996,6 +992,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
996
992
  obj._placeholder = this._placeholder;
997
993
  obj._required = this._required;
998
994
  obj._disabled = this._disabled;
995
+ obj._defaultValue = this._defaultValue;
999
996
  obj._disabledFunction = this._disabledFunction;
1000
997
  obj._className = this._className;
1001
998
  obj._getter = this._getter;
@@ -1014,8 +1011,8 @@ class FieldInputDescriptor extends AFieldDescriptor {
1014
1011
  get fieldType() {
1015
1012
  return this._fieldType;
1016
1013
  }
1017
- get numberStep() {
1018
- return this._numberStep;
1014
+ get rows() {
1015
+ return this._rows;
1019
1016
  }
1020
1017
  get numberMin() {
1021
1018
  return this._numberMin;
@@ -1023,8 +1020,8 @@ class FieldInputDescriptor extends AFieldDescriptor {
1023
1020
  get numberMax() {
1024
1021
  return this._numberMax;
1025
1022
  }
1026
- get rows() {
1027
- return this._rows;
1023
+ get numberStep() {
1024
+ return this._numberStep;
1028
1025
  }
1029
1026
  get numberMinFractionDigits() {
1030
1027
  return this._numberMinFractionDigits;
@@ -1087,9 +1084,19 @@ class FieldInputDescriptor extends AFieldDescriptor {
1087
1084
  this._fieldType = FieldInputDescriptor.TypeEnum.Switch;
1088
1085
  return this;
1089
1086
  }
1090
- asRadio(options) {
1087
+ asRadio(options, optionsTitlePath) {
1088
+ this._fieldType = FieldInputDescriptor.TypeEnum.Radio;
1089
+ this._radioOptions = options.map(o => ({ value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}` }));
1090
+ return this;
1091
+ }
1092
+ asRadioFromEnum(enumType, optionsTitlePath, values, nameAsValue = false) {
1091
1093
  this._fieldType = FieldInputDescriptor.TypeEnum.Radio;
1092
- this._radioOptions = options;
1094
+ if (typeof optionsTitlePath === 'undefined') {
1095
+ optionsTitlePath = TypeUtil.findEnumName(enumType);
1096
+ }
1097
+ this._radioOptions = Array.isArray(values)
1098
+ ? EnumUtil.fromValuesAsEnumValueArray(enumType, values, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
1099
+ : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
1093
1100
  return this;
1094
1101
  }
1095
1102
  asDatePicker(format, min, max, showTime) {
@@ -1110,7 +1117,7 @@ class FieldInputDescriptor extends AFieldDescriptor {
1110
1117
  field._numberStep = this._numberStep;
1111
1118
  field._numberMinFractionDigits = this._numberMinFractionDigits;
1112
1119
  field._numberMaxFractionDigits = this._numberMaxFractionDigits;
1113
- field._radioOptions = this._radioOptions;
1120
+ field._radioOptions = [...this._radioOptions];
1114
1121
  field._datePickerFormat = this._datePickerFormat;
1115
1122
  field._datePickerMin = this._datePickerMin;
1116
1123
  field._datePickerMax = this._datePickerMax;
@@ -1139,9 +1146,6 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1139
1146
  this._modelType = modelType;
1140
1147
  ModelUtil.trySetLookupItemsProperties(this);
1141
1148
  }
1142
- get modelType() {
1143
- return this._modelType;
1144
- }
1145
1149
  get lookupType() {
1146
1150
  return this._lookupType;
1147
1151
  }
@@ -1157,6 +1161,9 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1157
1161
  get dataProvider() {
1158
1162
  return this._dataProvider;
1159
1163
  }
1164
+ get modelType() {
1165
+ return this._modelType;
1166
+ }
1160
1167
  withItemsLabelProperty(itemsLabelProperty) {
1161
1168
  this._itemsLabelProperty = itemsLabelProperty;
1162
1169
  return this;
@@ -1205,17 +1212,25 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1205
1212
  })(LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum || (FieldLookupDescriptor.LookupTypeEnum = {}));
1206
1213
  })(FieldLookupDescriptor || (FieldLookupDescriptor = {}));
1207
1214
  class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
1208
- constructor(editor, property, enumName, options) {
1215
+ constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
1209
1216
  super(editor, property, null);
1210
- this._enumName = enumName;
1211
- const dataProvider = new LookupDataProvider(null).withEnumName(enumName).withLookup(() => of(options));
1217
+ this._enumType = enumType;
1218
+ if (typeof optionsTitlePath === 'undefined') {
1219
+ optionsTitlePath = TypeUtil.findEnumName(enumType);
1220
+ }
1221
+ const optionEnumValues = Array.isArray(options)
1222
+ ? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
1223
+ : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
1224
+ const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
1212
1225
  this.withLookupDataProvider(dataProvider);
1226
+ this.withItemsLabelProperty('title');
1227
+ this.withItemsValueProperty('value');
1213
1228
  }
1214
- get enumName() {
1215
- return this._enumName;
1229
+ get enumType() {
1230
+ return this._enumType;
1216
1231
  }
1217
1232
  copy() {
1218
- const field = new FieldLookupEnumDescriptor(this._editor, this._property, this._enumName, []);
1233
+ const field = new FieldLookupEnumDescriptor(this._editor, this._property, this._enumType, []);
1219
1234
  this.copyFieldsTo(field);
1220
1235
  field._lookupType = this._lookupType;
1221
1236
  field._itemsLabelProperty = this._itemsLabelProperty;
@@ -1239,11 +1254,8 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
1239
1254
  this._lookupTableDescriptor = lookupTableDescriptor;
1240
1255
  this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);
1241
1256
  }
1242
- get mainTableDescriptor() {
1243
- return this._mainTableDescriptor;
1244
- }
1245
- get lookupTableDescriptor() {
1246
- return this._lookupTableDescriptor;
1257
+ get fieldType() {
1258
+ return this._fieldType;
1247
1259
  }
1248
1260
  get lookupTableDataProvider() {
1249
1261
  return this._lookupTableDataProvider;
@@ -1251,9 +1263,6 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
1251
1263
  get actions() {
1252
1264
  return this._actions;
1253
1265
  }
1254
- get fieldType() {
1255
- return this._fieldType;
1256
- }
1257
1266
  get hasLookupExcludeValues() {
1258
1267
  return this._hasLookupExcludeValues;
1259
1268
  }
@@ -1263,6 +1272,12 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
1263
1272
  get excludeValueProperty() {
1264
1273
  return this._excludeValueProperty;
1265
1274
  }
1275
+ get mainTableDescriptor() {
1276
+ return this._mainTableDescriptor;
1277
+ }
1278
+ get lookupTableDescriptor() {
1279
+ return this._lookupTableDescriptor;
1280
+ }
1266
1281
  withLookup(getAll, serviceType) {
1267
1282
  const dataProvider = new TableviewDataProvider(this._model.type);
1268
1283
  if (serviceType) {
@@ -1318,6 +1333,12 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1318
1333
  this._tableviewDescriptor = tableviewDescriptor;
1319
1334
  this._actions.push(FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
1320
1335
  }
1336
+ get fieldType() {
1337
+ return this._fieldType;
1338
+ }
1339
+ get actions() {
1340
+ return this._actions;
1341
+ }
1321
1342
  get tableviewDescriptor() {
1322
1343
  return this._tableviewDescriptor;
1323
1344
  }
@@ -1333,12 +1354,6 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1333
1354
  get editorForUpdate() {
1334
1355
  return this._tableviewDescriptor.editEditor;
1335
1356
  }
1336
- get fieldType() {
1337
- return this._fieldType;
1338
- }
1339
- get actions() {
1340
- return this._actions;
1341
- }
1342
1357
  withActions(actions = []) {
1343
1358
  this.actions.push(...actions);
1344
1359
  return this;
@@ -1371,6 +1386,12 @@ class AFieldGroupDescriptor extends AGenericFieldDescriptor {
1371
1386
  this._name = `${this.baseName}${name}`;
1372
1387
  this._default = name === EditorDescriptor.defaultGroupName;
1373
1388
  }
1389
+ get title() {
1390
+ return this._title;
1391
+ }
1392
+ get validators() {
1393
+ return this._validators;
1394
+ }
1374
1395
  get baseName() {
1375
1396
  return `${this.groupName()}_`;
1376
1397
  }
@@ -1380,12 +1401,6 @@ class AFieldGroupDescriptor extends AGenericFieldDescriptor {
1380
1401
  get default() {
1381
1402
  return this._default;
1382
1403
  }
1383
- get title() {
1384
- return this._title;
1385
- }
1386
- get validators() {
1387
- return this._validators;
1388
- }
1389
1404
  withTitle(title) {
1390
1405
  this._title = title;
1391
1406
  return this;
@@ -1498,6 +1513,7 @@ class TableDescriptor {
1498
1513
  this._filterDisplay = TableDescriptor.FilterDisplayEnum.Menu;
1499
1514
  this._paginationMode = TableDescriptor.PaginationModeEnum.Pagination;
1500
1515
  this._columns = [];
1516
+ this._hideHeader = false;
1501
1517
  this._hasDefaultSort = false;
1502
1518
  this._defaultSortProperty = [];
1503
1519
  this._defaultSortAsc = [];
@@ -1505,9 +1521,6 @@ class TableDescriptor {
1505
1521
  this._tableFullHeightOffset = 315;
1506
1522
  this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
1507
1523
  }
1508
- get model() {
1509
- return this._model;
1510
- }
1511
1524
  get filterDisplay() {
1512
1525
  return this._filterDisplay;
1513
1526
  }
@@ -1520,6 +1533,9 @@ class TableDescriptor {
1520
1533
  get title() {
1521
1534
  return this._title;
1522
1535
  }
1536
+ get hideHeader() {
1537
+ return this._hideHeader;
1538
+ }
1523
1539
  get dataKeyProperty() {
1524
1540
  return this._dataKeyProperty;
1525
1541
  }
@@ -1538,6 +1554,9 @@ class TableDescriptor {
1538
1554
  get tableFullHeightOffset() {
1539
1555
  return this._tableFullHeightOffset;
1540
1556
  }
1557
+ get model() {
1558
+ return this._model;
1559
+ }
1541
1560
  addColumnDescriptor(column) {
1542
1561
  this._columns.push(column);
1543
1562
  this.setDataKeyFromColumn();
@@ -1590,6 +1609,10 @@ class TableDescriptor {
1590
1609
  this._title = title;
1591
1610
  return this;
1592
1611
  }
1612
+ withHideHeader(hideHeader = true) {
1613
+ this._hideHeader = hideHeader;
1614
+ return this;
1615
+ }
1593
1616
  withDataKeyProperty(property) {
1594
1617
  this._dataKeyProperty = property;
1595
1618
  return this;
@@ -1608,21 +1631,22 @@ class TableDescriptor {
1608
1631
  this._tableFullHeightOffset = tableFullHeightOffset;
1609
1632
  return this;
1610
1633
  }
1611
- setDataKeyFromColumn() {
1612
- if (!this._dataKeyProperty && this._columns.length === 1) {
1613
- this._dataKeyProperty = this._columns[0].property;
1614
- }
1615
- }
1616
1634
  copy() {
1617
1635
  const descriptor = new TableDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);
1618
1636
  descriptor._columns = this.columns.map(c => c.copy());
1619
1637
  descriptor._title = this._title;
1638
+ descriptor._hideHeader = this._hideHeader;
1620
1639
  descriptor._dataKeyProperty = this._dataKeyProperty;
1621
1640
  descriptor._defaultSortProperty = this._defaultSortProperty.map(p => p);
1622
1641
  descriptor._defaultSortAsc = this._defaultSortAsc.map(p => p);
1623
1642
  descriptor._filterDisplay = this._filterDisplay;
1624
1643
  return descriptor;
1625
1644
  }
1645
+ setDataKeyFromColumn() {
1646
+ if (!this._dataKeyProperty && this._columns.length === 1) {
1647
+ this._dataKeyProperty = this._columns[0].property;
1648
+ }
1649
+ }
1626
1650
  }
1627
1651
  (function (TableDescriptor) {
1628
1652
  let PaginationModeEnum;
@@ -1644,33 +1668,33 @@ class ColumnDescriptor {
1644
1668
  this._table = table;
1645
1669
  this._property = property;
1646
1670
  }
1647
- get table() {
1648
- return this._table;
1649
- }
1650
- get property() {
1651
- return this._property;
1652
- }
1653
1671
  get modelType() {
1654
1672
  return this._modelType;
1655
1673
  }
1656
- get displayPropertyPath() {
1657
- return this._displayPropertyPath;
1674
+ get columnType() {
1675
+ return this._columnType;
1658
1676
  }
1659
1677
  get title() {
1660
1678
  return this._title;
1661
1679
  }
1680
+ get displayPropertyPath() {
1681
+ return this._displayPropertyPath;
1682
+ }
1662
1683
  get isSortEnabled() {
1663
1684
  return this._isSortEnabled;
1664
1685
  }
1665
- get columnType() {
1666
- return this._columnType;
1667
- }
1668
1686
  get filterDescriptor() {
1669
1687
  return this._filterDescriptor;
1670
1688
  }
1671
1689
  get displayFormat() {
1672
1690
  return this._displayFormat;
1673
1691
  }
1692
+ get table() {
1693
+ return this._table;
1694
+ }
1695
+ get property() {
1696
+ return this._property;
1697
+ }
1674
1698
  asType(type = ColumnDescriptor.TypeEnum.String) {
1675
1699
  this._columnType = type;
1676
1700
  return this;
@@ -1742,9 +1766,6 @@ class FilterDescriptor {
1742
1766
  this._className = '';
1743
1767
  this._property = property;
1744
1768
  }
1745
- get property() {
1746
- return this._property;
1747
- }
1748
1769
  get filterType() {
1749
1770
  return this._filterType;
1750
1771
  }
@@ -1760,6 +1781,9 @@ class FilterDescriptor {
1760
1781
  get className() {
1761
1782
  return this._className;
1762
1783
  }
1784
+ get property() {
1785
+ return this._property;
1786
+ }
1763
1787
  asFilterType(filterType) {
1764
1788
  this._filterType = filterType;
1765
1789
  return this;
@@ -1784,17 +1808,17 @@ class FilterDescriptor {
1784
1808
  this._matchModes = matchModes;
1785
1809
  return this;
1786
1810
  }
1811
+ copy() {
1812
+ const descriptor = new FilterDescriptor(this._property);
1813
+ this.copyFieldsTo(descriptor);
1814
+ return descriptor;
1815
+ }
1787
1816
  copyFieldsTo(descriptor) {
1788
1817
  descriptor._filterType = this._filterType;
1789
1818
  descriptor._filterProperty = this._filterProperty;
1790
1819
  descriptor._placeholder = this._placeholder;
1791
1820
  descriptor._className = this._className;
1792
1821
  }
1793
- copy() {
1794
- const descriptor = new FilterDescriptor(this._property);
1795
- this.copyFieldsTo(descriptor);
1796
- return descriptor;
1797
- }
1798
1822
  }
1799
1823
  (function (FilterDescriptor) {
1800
1824
  let TypeEnum;
@@ -1835,12 +1859,12 @@ class FilterLookupDescriptor extends FilterDescriptor {
1835
1859
  this._filterType = FilterDescriptor.TypeEnum.Lookup;
1836
1860
  ModelUtil.trySetLookupItemsProperties(this);
1837
1861
  }
1838
- get modelType() {
1839
- return this._modelType;
1840
- }
1841
1862
  get lookupType() {
1842
1863
  return this._lookupType;
1843
1864
  }
1865
+ get dataProvider() {
1866
+ return this._dataProvider;
1867
+ }
1844
1868
  get itemsLabelProperty() {
1845
1869
  return this._itemsLabelProperty;
1846
1870
  }
@@ -1850,12 +1874,15 @@ class FilterLookupDescriptor extends FilterDescriptor {
1850
1874
  get dataKeyProperty() {
1851
1875
  return this._dataKeyProperty;
1852
1876
  }
1853
- get dataProvider() {
1854
- return this._dataProvider;
1855
- }
1856
1877
  get multiselect() {
1857
1878
  return this._multiselect;
1858
1879
  }
1880
+ get dropdownClassName() {
1881
+ return this._dropdownClassName;
1882
+ }
1883
+ get modelType() {
1884
+ return this._modelType;
1885
+ }
1859
1886
  withItemsLabelProperty(itemsLabelProperty) {
1860
1887
  this._itemsLabelProperty = itemsLabelProperty;
1861
1888
  return this;
@@ -1868,9 +1895,6 @@ class FilterLookupDescriptor extends FilterDescriptor {
1868
1895
  this._dataKeyProperty = dataKeyProperty;
1869
1896
  return this;
1870
1897
  }
1871
- get dropdownClassName() {
1872
- return this._dropdownClassName;
1873
- }
1874
1898
  withLookup(lookup, serviceType) {
1875
1899
  const dataProvider = new LookupDataProvider(this._modelType);
1876
1900
  if (serviceType) {
@@ -1896,6 +1920,11 @@ class FilterLookupDescriptor extends FilterDescriptor {
1896
1920
  this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;
1897
1921
  return this;
1898
1922
  }
1923
+ copy() {
1924
+ const descriptor = new FilterLookupDescriptor(this._property, this._modelType);
1925
+ this.copyFieldsTo(descriptor);
1926
+ return descriptor;
1927
+ }
1899
1928
  copyFieldsTo(descriptor) {
1900
1929
  super.copyFieldsTo(descriptor);
1901
1930
  descriptor._dataProvider = this._dataProvider;
@@ -1904,11 +1933,6 @@ class FilterLookupDescriptor extends FilterDescriptor {
1904
1933
  descriptor._itemsValueProperty = this._itemsValueProperty;
1905
1934
  descriptor._dataKeyProperty = this._dataKeyProperty;
1906
1935
  }
1907
- copy() {
1908
- const descriptor = new FilterLookupDescriptor(this._property, this._modelType);
1909
- this.copyFieldsTo(descriptor);
1910
- return descriptor;
1911
- }
1912
1936
  }
1913
1937
  (function (FilterLookupDescriptor) {
1914
1938
  let LookupTypeEnum;
@@ -1928,9 +1952,6 @@ class TableviewDescriptor {
1928
1952
  this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty);
1929
1953
  this._tableTitle = `${this._model.typeName}.name`;
1930
1954
  }
1931
- get model() {
1932
- return this._model;
1933
- }
1934
1955
  get table() {
1935
1956
  return this._table;
1936
1957
  }
@@ -1946,6 +1967,9 @@ class TableviewDescriptor {
1946
1967
  get tableTitle() {
1947
1968
  return this._tableTitle;
1948
1969
  }
1970
+ get model() {
1971
+ return this._model;
1972
+ }
1949
1973
  withTableDescriptor(descriptor) {
1950
1974
  this._table = descriptor;
1951
1975
  return this;
@@ -2020,8 +2044,8 @@ class TableviewDescriptor {
2020
2044
  this._editEditor.addFieldDescriptor(field);
2021
2045
  return field;
2022
2046
  }
2023
- addFieldLookupEnum(property, options) {
2024
- const field = this._viewEditor.addFieldLookupEnum(property, options);
2047
+ addFieldLookupEnum(property, enumType, options, nameAsValue = false, optionsTitlePath) {
2048
+ const field = this._viewEditor.addFieldLookupEnum(property, enumType, options, nameAsValue, optionsTitlePath);
2025
2049
  this._addEditor.addFieldDescriptor(field);
2026
2050
  this._editEditor.addFieldDescriptor(field);
2027
2051
  return field;
@@ -2202,6 +2226,9 @@ class EditorFormlyUtil {
2202
2226
  else {
2203
2227
  field.expressionProperties['templateOptions.disabled'] = 'formState.disabled';
2204
2228
  }
2229
+ if (typeof descriptor.defaultValue !== 'undefined') {
2230
+ field.defaultValue = descriptor.defaultValue;
2231
+ }
2205
2232
  for (const validator of descriptor.validators) {
2206
2233
  field.validators[validator.name] = { expression: validator.expression, message: validator.message };
2207
2234
  }
@@ -2209,6 +2236,68 @@ class EditorFormlyUtil {
2209
2236
  }
2210
2237
  }
2211
2238
 
2239
+ class EnumUtil {
2240
+ /**
2241
+ * Returns array of names for constants in enum.
2242
+ * @param enumType Enum object.
2243
+ */
2244
+ static getConstantNames(enumType) {
2245
+ // in number enum, the numbers are also represented in objects and should be filtered out
2246
+ return Object.keys(enumType).filter(v => isNaN(+v));
2247
+ }
2248
+ /**
2249
+ * Returns array of string values for constants in enum.
2250
+ * @param enumType Enum object.
2251
+ */
2252
+ static getConstantValuesAsString(enumType) {
2253
+ return Object.keys(enumType).map(v => enumType[v]);
2254
+ }
2255
+ /**
2256
+ * Returns array of number values for constants in enum.
2257
+ * @param enumType Enum object.
2258
+ */
2259
+ static getConstantValuesAsNumber(enumType) {
2260
+ return Object.keys(enumType)
2261
+ .filter(v => !isNaN(+v))
2262
+ .map(v => +v);
2263
+ }
2264
+ /**
2265
+ * Returns array of type EnumValue for all constants in enum.
2266
+ * @param enumType Enum object.
2267
+ * @param nameAsValue If use name of constant as value (optional, default: false).
2268
+ * @param titlePath Base path for title to use as translation (optional).
2269
+ */
2270
+ static fromConstantsAsEnumValueArray(enumType, nameAsValue = false, titlePath) {
2271
+ return EnumUtil.getConstantNames(enumType).map(n => ({ name: n, title: `${titlePath ? `${titlePath}.` : ''}${n}`, value: nameAsValue ? n : enumType[n] }));
2272
+ }
2273
+ /**
2274
+ * Returns array of type EnumValue for provided values in enum.
2275
+ * @param enumType Enum object.
2276
+ * @param nameAsValue If use name of constant as value (optional, default: false).
2277
+ * @param titlePath Base path for title to use as translation (optional).
2278
+ */
2279
+ static fromValuesAsEnumValueArray(enumType, values, nameAsValue = false, titlePath) {
2280
+ return values.map(v => {
2281
+ const k = EnumUtil.getConstantName(enumType, v);
2282
+ return { name: k, title: `${titlePath ? `${titlePath}.` : ''}${k}`, value: nameAsValue ? k : v };
2283
+ });
2284
+ }
2285
+ /**
2286
+ * Gets constant name for value.
2287
+ * @param enumType Enum object.
2288
+ * @param value Value of enum constant.
2289
+ */
2290
+ static getConstantName(enumType, value) {
2291
+ var _a;
2292
+ if (typeof value === 'string') {
2293
+ return (_a = this.getConstantNames(enumType).find(c => enumType[c] === value)) !== null && _a !== void 0 ? _a : null;
2294
+ }
2295
+ else {
2296
+ return typeof enumType[value] !== 'undefined' ? enumType[value] : null;
2297
+ }
2298
+ }
2299
+ }
2300
+
2212
2301
  class I18nUtil {
2213
2302
  static instantModelTranslation(translate, model, keyPath, customKey, item, fallbackKey, i18nParams) {
2214
2303
  const keys = I18nUtil.getModelKeysByPriority(model, keyPath, customKey, fallbackKey);
@@ -2216,6 +2305,15 @@ class I18nUtil {
2216
2305
  const i18n = translate.instant(keys, I18nUtil.getModelI18nParams(model, item, i18nModelName !== null && i18nModelName !== void 0 ? i18nModelName : undefined, i18nParams));
2217
2306
  return I18nUtil.selectKeyByPriority(keys, i18n);
2218
2307
  }
2308
+ static getModelTabKey(model, tab) {
2309
+ return I18nUtil.getModelKeyPath(model, `tabs.${tab}`);
2310
+ }
2311
+ static getModelGroupKey(model, group) {
2312
+ return I18nUtil.getModelKeyPath(model, `groups.${group}`);
2313
+ }
2314
+ static getModelPropertyKey(model, property) {
2315
+ return I18nUtil.getModelKeyPath(model, `properties.${property}`);
2316
+ }
2219
2317
  static instantActionTranslation(translate, action, keyPath, customKey, item, fallbackKey, functionNameKey, i18nParams) {
2220
2318
  const keys = I18nUtil.getActionKeysByPriority(action, keyPath, customKey, fallbackKey);
2221
2319
  const i18nModelName = I18nUtil.instantModelName(translate, action === null || action === void 0 ? void 0 : action.model, true);
@@ -2230,31 +2328,6 @@ class I18nUtil {
2230
2328
  const keys = I18nUtil.getActionKeysByPriority(action, keyPath, customKey, fallbackKey);
2231
2329
  return I18nUtil.getModelName(translate, action === null || action === void 0 ? void 0 : action.model, oneTime, true).pipe(mergeMap(i18nModelName => translate.get(keys, I18nUtil.getActionI18nParams(action, item, i18nModelName !== null && i18nModelName !== void 0 ? i18nModelName : undefined))), map(i18n => I18nUtil.selectKeyByPriority(keys, i18n)));
2232
2330
  }
2233
- static getModelKeysByPriority(model, keyPath, customKey, fallbackKey) {
2234
- const keys = [];
2235
- if (customKey) {
2236
- keys.push(customKey);
2237
- }
2238
- const modelActionKey = `${model.typeName}.${keyPath}`;
2239
- keys.push(modelActionKey);
2240
- if (fallbackKey) {
2241
- keys.push(fallbackKey);
2242
- }
2243
- return keys;
2244
- }
2245
- static getActionKeysByPriority(action, keyPath, customKey, fallbackKey) {
2246
- const keys = [];
2247
- if (customKey) {
2248
- keys.push(customKey);
2249
- }
2250
- const modelActionKey = `${action.i18nModelActionBaseKey}.${keyPath}`;
2251
- const actionKey = `${action.actionName}.${keyPath}`;
2252
- keys.push(modelActionKey, actionKey);
2253
- if (fallbackKey) {
2254
- keys.push(fallbackKey);
2255
- }
2256
- return keys;
2257
- }
2258
2331
  static getModelI18nParams(model, item, i18nModelName, i18nParameters = {}) {
2259
2332
  i18nParameters.itemId = '';
2260
2333
  i18nParameters.itemTitle = '';
@@ -2311,6 +2384,34 @@ class I18nUtil {
2311
2384
  keys.push(`${model === null || model === void 0 ? void 0 : model.typeName}.name`);
2312
2385
  return keys;
2313
2386
  }
2387
+ static getModelKeysByPriority(model, keyPath, customKey, fallbackKey) {
2388
+ const keys = [];
2389
+ if (customKey) {
2390
+ keys.push(customKey);
2391
+ }
2392
+ const modelActionKey = I18nUtil.getModelKeyPath(model, keyPath);
2393
+ keys.push(modelActionKey);
2394
+ if (fallbackKey) {
2395
+ keys.push(fallbackKey);
2396
+ }
2397
+ return keys;
2398
+ }
2399
+ static getModelKeyPath(model, keyPath) {
2400
+ return `${model.typeName}.${keyPath}`;
2401
+ }
2402
+ static getActionKeysByPriority(action, keyPath, customKey, fallbackKey) {
2403
+ const keys = [];
2404
+ if (customKey) {
2405
+ keys.push(customKey);
2406
+ }
2407
+ const modelActionKey = `${action.i18nModelActionBaseKey}.${keyPath}`;
2408
+ const actionKey = `${action.actionName}.${keyPath}`;
2409
+ keys.push(modelActionKey, actionKey);
2410
+ if (fallbackKey) {
2411
+ keys.push(fallbackKey);
2412
+ }
2413
+ return keys;
2414
+ }
2314
2415
  static selectKeyByPriority(keys, i18n) {
2315
2416
  for (const key of keys) {
2316
2417
  if (key !== i18n[key]) {
@@ -2440,8 +2541,19 @@ function TypeName(typeName) {
2440
2541
  target[typeNameDecoratorPropertyName] = typeName;
2441
2542
  };
2442
2543
  }
2544
+ const enumNameDecoratorPropertyName = 'enumName';
2545
+ function EnumName(typeName) {
2546
+ return function (target) {
2547
+ target[enumNameDecoratorPropertyName] = typeName;
2548
+ };
2549
+ }
2443
2550
 
2444
2551
  class TypeUtil {
2552
+ /**
2553
+ * Defines type name decorator.
2554
+ * @param targetType class.
2555
+ * @param typeName Name of the type.
2556
+ */
2445
2557
  static defineReflectTypeName(targetType, typeName) {
2446
2558
  if (!typeName) {
2447
2559
  typeName = TypeUtil.getDecoratorTypeName(targetType);
@@ -2454,6 +2566,16 @@ class TypeUtil {
2454
2566
  Reflect.defineMetadata(typeNameDecoratorPropertyName, typeName, targetType);
2455
2567
  }
2456
2568
  }
2569
+ /**
2570
+ * Defines enum name decorator.
2571
+ * @param targetType enum object.
2572
+ * @param enumName Name of the enum.
2573
+ */
2574
+ static defineReflectEnumName(targetType, enumName) {
2575
+ if (!Reflect.hasOwnMetadata(enumNameDecoratorPropertyName, targetType)) {
2576
+ Reflect.defineMetadata(enumNameDecoratorPropertyName, enumName, targetType);
2577
+ }
2578
+ }
2457
2579
  /**
2458
2580
  * Gets type name from either decorator or reflect metadata.
2459
2581
  * @param type Class.
@@ -2469,6 +2591,21 @@ class TypeUtil {
2469
2591
  }
2470
2592
  return type.name;
2471
2593
  }
2594
+ /**
2595
+ * Gets enum name from either decorator or reflect metadata.
2596
+ * @param enumType Class.
2597
+ */
2598
+ static findEnumName(enumType) {
2599
+ let decoratorName = TypeUtil.getDecoratorEnumName(enumType);
2600
+ if (decoratorName) {
2601
+ return decoratorName;
2602
+ }
2603
+ decoratorName = Reflect.getMetadata(enumNameDecoratorPropertyName, enumType);
2604
+ if (decoratorName) {
2605
+ return decoratorName;
2606
+ }
2607
+ throw new Error('Could not fined enum name');
2608
+ }
2472
2609
  /**
2473
2610
  * Get value from decorator defined property name
2474
2611
  * @param type Class.
@@ -2477,6 +2614,13 @@ class TypeUtil {
2477
2614
  static getDecoratorTypeName(type) {
2478
2615
  return type[typeNameDecoratorPropertyName];
2479
2616
  }
2617
+ /**
2618
+ * Get value from decorator defined property name
2619
+ * @param type Enum object.
2620
+ */
2621
+ static getDecoratorEnumName(type) {
2622
+ return type[enumNameDecoratorPropertyName];
2623
+ }
2480
2624
  }
2481
2625
 
2482
2626
  class ObjectSerializer {
@@ -2560,12 +2704,17 @@ class ObjectSerializer {
2560
2704
  }
2561
2705
  registerEnums(enums) {
2562
2706
  for (const key in enums) {
2563
- if (typeof this._enumMap[key] !== 'undefined') {
2564
- console.warn(`Registering enum ${key} skipped, because enum already exists.`);
2565
- }
2566
- else {
2567
- this._enumMap[key] = enums[key];
2568
- }
2707
+ this.registerEnum(enums[key], key);
2708
+ }
2709
+ }
2710
+ registerEnum(enumType, enumName) {
2711
+ // try to find name from decorator
2712
+ if (typeof this._enumMap[enumName] !== 'undefined') {
2713
+ console.warn(`Registering enum ${enumName} skipped, because enum already exists.`);
2714
+ }
2715
+ else {
2716
+ TypeUtil.defineReflectEnumName(enumType, enumName);
2717
+ this._enumMap[enumName] = enumType;
2569
2718
  }
2570
2719
  }
2571
2720
  findCorrectType(data, expectedType) {
@@ -4390,10 +4539,10 @@ class MngFormlyFieldInputComponent extends FieldType {
4390
4539
  }
4391
4540
  }
4392
4541
  MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4393
- MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"> </p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let category of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"p-field-radiobutton\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"category\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"category\" class=\"mng-radio-button-label\">{{ category }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\">\n </p-calendar>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$3.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$5.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$3.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i9$1.InputText, selector: "[pInputText]" }], pipes: { "translate": i2$2.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4542
+ MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\">\n </p-calendar>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$3.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$5.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$3.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i9$1.InputText, selector: "[pInputText]" }], pipes: { "translate": i2$2.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4394
4543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
4395
4544
  type: Component,
4396
- args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"> </p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let category of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"p-field-radiobutton\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"category\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"category\" class=\"mng-radio-button-label\">{{ category }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\">\n </p-calendar>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
4545
+ args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\">\n </p-calendar>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
4397
4546
  }] });
4398
4547
 
4399
4548
  class MngFormlyFieldDropdownComponent extends FieldType {
@@ -4574,6 +4723,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4574
4723
  type: Input
4575
4724
  }] } });
4576
4725
 
4726
+ class MngI18nPropertyPipe {
4727
+ transform(property, model) {
4728
+ return I18nUtil.getModelPropertyKey(model, property);
4729
+ }
4730
+ }
4731
+ MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngI18nPropertyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4732
+ MngI18nPropertyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngI18nPropertyPipe, name: "i18nProperty" });
4733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngI18nPropertyPipe, decorators: [{
4734
+ type: Pipe,
4735
+ args: [{
4736
+ name: 'i18nProperty',
4737
+ pure: true
4738
+ }]
4739
+ }] });
4740
+
4577
4741
  var TypeEnum = FilterDescriptor.TypeEnum;
4578
4742
  var PaginationModeEnum = TableDescriptor.PaginationModeEnum;
4579
4743
  class MngTableComponent {
@@ -4827,10 +4991,10 @@ class MngTableComponent {
4827
4991
  }
4828
4992
  }
4829
4993
  MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$2.TranslateService }, { token: TableviewComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
4830
- MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableComponent, selector: "mng-table", inputs: { descriptor: "descriptor", items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionEnabled: "selectionEnabled" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }], ngImport: i0, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else defaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr>\n <th *ngIf=\"selectionEnabled\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ descriptor.model.typeName + '.properties.' + col.property | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ descriptor.model.typeName + '.properties.' + col.property | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate\" class=\"text-right\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", components: [{ type: i4$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i2$2.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4994
+ MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableComponent, selector: "mng-table", inputs: { descriptor: "descriptor", items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionEnabled: "selectionEnabled" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }], ngImport: i0, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else defaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate\" class=\"text-right\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", components: [{ type: i4$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i2$2.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4831
4995
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, decorators: [{
4832
4996
  type: Component,
4833
- args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else defaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr>\n <th *ngIf=\"selectionEnabled\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ descriptor.model.typeName + '.properties.' + col.property | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ descriptor.model.typeName + '.properties.' + col.property | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate\" class=\"text-right\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
4997
+ args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else defaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate\" class=\"text-right\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
4834
4998
  }], ctorParameters: function () {
4835
4999
  return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$2.TranslateService }, { type: TableviewComponentService, decorators: [{
4836
5000
  type: Optional
@@ -5075,10 +5239,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5075
5239
  class MngFormlyFieldTabsComponent extends FieldType {
5076
5240
  }
5077
5241
  MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5078
- MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label!\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$4.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i2$2.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5242
+ MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$4.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i2$2.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5079
5243
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
5080
5244
  type: Component,
5081
- args: [{ selector: 'mng-formly-field-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label!\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n" }]
5245
+ args: [{ selector: 'mng-formly-field-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n" }]
5082
5246
  }] });
5083
5247
 
5084
5248
  class MngFormlyFieldFieldsetComponent extends FieldType {
@@ -5958,6 +6122,7 @@ const declarations = [
5958
6122
  // pipes
5959
6123
  MngPropertyPathPipe,
5960
6124
  MngBooleanPipe,
6125
+ MngI18nPropertyPipe,
5961
6126
  // layout components
5962
6127
  MngBreadcrumbComponent,
5963
6128
  MngFooterComponent,
@@ -6049,6 +6214,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
6049
6214
  // pipes
6050
6215
  MngPropertyPathPipe,
6051
6216
  MngBooleanPipe,
6217
+ MngI18nPropertyPipe,
6052
6218
  // layout components
6053
6219
  MngBreadcrumbComponent,
6054
6220
  MngFooterComponent,
@@ -6160,6 +6326,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
6160
6326
  // pipes
6161
6327
  MngPropertyPathPipe,
6162
6328
  MngBooleanPipe,
6329
+ MngI18nPropertyPipe,
6163
6330
  // layout components
6164
6331
  MngBreadcrumbComponent,
6165
6332
  MngFooterComponent,
@@ -6658,5 +6825,5 @@ class RouteBuilder {
6658
6825
  * Generated bundle index. Do not edit.
6659
6826
  */
6660
6827
 
6661
- export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusQueryResultBase, MediusQueryResultWithObject, MediusRestUtil, MngActionComponent, MngActionDialogComponent, MngActionRouteComponent, MngActionService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngPropertyPathPipe, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, ModelDescriptor, ModelUtil, ObjectSerializer, RouteBuilder, RoutesBuilder, TableDescriptor, TableviewComponentService, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
6828
+ export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusQueryResultBase, MediusQueryResultWithObject, MediusRestUtil, MngActionComponent, MngActionDialogComponent, MngActionRouteComponent, MngActionService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngPropertyPathPipe, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, ModelDescriptor, ModelUtil, ObjectSerializer, RouteBuilder, RoutesBuilder, TableDescriptor, TableviewComponentService, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
6662
6829
  //# sourceMappingURL=mediusinc-mng-commons.mjs.map