@mediusinc/mng-commons 0.17.1 → 0.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/esm2020/lib/api/models/query-result.model.mjs +1 -1
  2. package/esm2020/lib/api/utils/object-serializer.util.mjs +2 -2
  3. package/esm2020/lib/components/tableview/table/table.component.mjs +9 -3
  4. package/esm2020/lib/data-providers/table.data-provider.mjs +15 -1
  5. package/esm2020/lib/data-providers/tableview.data-provider.mjs +15 -1
  6. package/esm2020/lib/descriptors/action.descriptor.mjs +18 -8
  7. package/esm2020/lib/descriptors/editor.descriptor.mjs +5 -5
  8. package/esm2020/lib/descriptors/field.descriptor.mjs +2 -2
  9. package/esm2020/lib/descriptors/model.descriptor.mjs +13 -2
  10. package/esm2020/lib/descriptors/table.descriptor.mjs +3 -3
  11. package/esm2020/lib/descriptors/tableview.descriptor.mjs +8 -8
  12. package/esm2020/lib/descriptors/types/table.type.mjs +2 -1
  13. package/esm2020/lib/pipes/i18n-property.pipe.mjs +2 -2
  14. package/esm2020/lib/types/type.decorator.mjs +11 -1
  15. package/esm2020/lib/utils/i18n.util.mjs +6 -6
  16. package/esm2020/lib/utils/model.util.mjs +10 -1
  17. package/esm2020/lib/utils/type.util.mjs +47 -11
  18. package/fesm2015/mediusinc-mng-commons.mjs +154 -46
  19. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  20. package/fesm2020/mediusinc-mng-commons.mjs +150 -42
  21. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  22. package/lib/api/models/query-result.model.d.ts +1 -1
  23. package/lib/components/tableview/table/table.component.d.ts +3 -1
  24. package/lib/data-providers/table.data-provider.d.ts +8 -0
  25. package/lib/data-providers/tableview.data-provider.d.ts +8 -0
  26. package/lib/descriptors/action.descriptor.d.ts +4 -2
  27. package/lib/descriptors/editor.descriptor.d.ts +1 -1
  28. package/lib/descriptors/model.descriptor.d.ts +4 -1
  29. package/lib/descriptors/table.descriptor.d.ts +1 -1
  30. package/lib/descriptors/tableview.descriptor.d.ts +1 -1
  31. package/lib/descriptors/types/table.type.d.ts +2 -1
  32. package/lib/types/type.decorator.d.ts +2 -0
  33. package/lib/utils/type.util.d.ts +27 -3
  34. package/package.json +1 -1
  35. package/version-info.json +5 -5
@@ -897,9 +897,13 @@ class LookupDataProvider extends DataProvider {
897
897
  class TableDataProvider extends DataProvider {
898
898
  constructor(modelType, serviceType) {
899
899
  super(modelType, serviceType);
900
+ this._isLazy = true;
900
901
  this._getAll = () => of(new MediusQueryResult());
901
902
  this._getAllReloadSubject = new Subject();
902
903
  }
904
+ get isLazy() {
905
+ return this._isLazy;
906
+ }
903
907
  get getAll() {
904
908
  return this._getAll;
905
909
  }
@@ -910,6 +914,15 @@ class TableDataProvider extends DataProvider {
910
914
  this._getAll = getAll;
911
915
  return this;
912
916
  }
917
+ /**
918
+ * Use this method to use inline load without lazy loading features on table and use inline pagination, filtering and sorting.
919
+ * @param getAll
920
+ */
921
+ withGetAllEagerly(getAll) {
922
+ this._getAll = (qp, service) => getAll(service).pipe(map(i => MediusQueryResult.fromArray(i)));
923
+ this._isLazy = false;
924
+ return this;
925
+ }
913
926
  getAllReload(queryParam) {
914
927
  this._getAllReloadSubject.next(queryParam);
915
928
  }
@@ -918,9 +931,13 @@ class TableDataProvider extends DataProvider {
918
931
  class TableviewDataProvider extends EditorDataProvider {
919
932
  constructor(modelType, serviceType) {
920
933
  super(modelType, serviceType);
934
+ this._isLazy = true;
921
935
  this._getAll = () => of(new MediusQueryResult());
922
936
  this._getAllReloadSubject = new Subject();
923
937
  }
938
+ get isLazy() {
939
+ return this._isLazy;
940
+ }
924
941
  get getAll() {
925
942
  return this._getAll;
926
943
  }
@@ -931,6 +948,15 @@ class TableviewDataProvider extends EditorDataProvider {
931
948
  this._getAll = getAll;
932
949
  return this;
933
950
  }
951
+ /**
952
+ * Use this method to use inline load without lazy loading features on table and use inline pagination, filtering and sorting.
953
+ * @param getAll
954
+ */
955
+ withGetAllEagerly(getAll) {
956
+ this._getAll = (qp, service) => getAll(service).pipe(map(i => MediusQueryResult.fromArray(i)));
957
+ this._isLazy = false;
958
+ return this;
959
+ }
934
960
  getAllReload(queryParam) {
935
961
  this._getAllReloadSubject.next(queryParam);
936
962
  }
@@ -1110,6 +1136,7 @@ var TablePaginationModeEnum;
1110
1136
  (function (TablePaginationModeEnum) {
1111
1137
  TablePaginationModeEnum[TablePaginationModeEnum["Pagination"] = 0] = "Pagination";
1112
1138
  TablePaginationModeEnum[TablePaginationModeEnum["InfiniteScroll"] = 1] = "InfiniteScroll";
1139
+ TablePaginationModeEnum[TablePaginationModeEnum["None"] = 2] = "None";
1113
1140
  })(TablePaginationModeEnum || (TablePaginationModeEnum = {}));
1114
1141
  var TableFilterDisplayEnum;
1115
1142
  (function (TableFilterDisplayEnum) {
@@ -1511,11 +1538,7 @@ class ActionDescriptor {
1511
1538
  this._parentType = parentType;
1512
1539
  this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;
1513
1540
  this._parentProperty = parentProperty;
1514
- if (this._parentTypeName || this._model) {
1515
- this._i18nModelActionBaseKey = this._parentTypeName
1516
- ? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`
1517
- : `${this._model.typeName}.actions.${actionName}`;
1518
- }
1541
+ this.setI18nModelActionBaseKey();
1519
1542
  let displayName = actionName;
1520
1543
  if (this._model)
1521
1544
  displayName = `${this._model.typeName}.${displayName}`;
@@ -1623,6 +1646,13 @@ class ActionDescriptor {
1623
1646
  get positionTableviewCategories() {
1624
1647
  return this._positionTableviewCategories;
1625
1648
  }
1649
+ setI18nModelActionBaseKey(base) {
1650
+ if (this._parentTypeName || this._model) {
1651
+ this._i18nModelActionBaseKey = this._parentTypeName
1652
+ ? `${this._parentTypeName}.actions.${this._parentProperty}_${this._actionName}`
1653
+ : `${base ?? this._model.i18nBaseKey}.actions.${this._actionName}`;
1654
+ }
1655
+ }
1626
1656
  withDataProvider(dataProvider) {
1627
1657
  this._dataProvider = dataProvider;
1628
1658
  return this;
@@ -1720,10 +1750,17 @@ class ActionDescriptor {
1720
1750
  this._positionTableviewCategories = positionTableviewCategories;
1721
1751
  return this;
1722
1752
  }
1753
+ withI18nBase(base) {
1754
+ if (typeof base !== 'string') {
1755
+ base = TypeUtil.findTypeName(base);
1756
+ }
1757
+ this.setI18nModelActionBaseKey(base);
1758
+ return this;
1759
+ }
1723
1760
  }
1724
1761
  class ActionSimpleDescriptor extends ActionDescriptor {
1725
- constructor(actionName, modelType, idProperty, titleProperty) {
1726
- const model = modelType ? new ModelDescriptor(modelType, idProperty, titleProperty) : null;
1762
+ constructor(actionName, modelType, idProperty, titleProperty, i18nBaseKey) {
1763
+ const model = modelType ? new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey) : null;
1727
1764
  super(model, actionName);
1728
1765
  }
1729
1766
  }
@@ -2847,13 +2884,13 @@ class ColumnDynamicDescriptor extends ColumnDescriptor {
2847
2884
  }
2848
2885
 
2849
2886
  class EditorDescriptor {
2850
- constructor(modelType, idProperty, titleProperty, tableviewEditorType = TableviewEditorTypeEnum.None) {
2887
+ constructor(modelType, idProperty, titleProperty, tableviewEditorType = TableviewEditorTypeEnum.None, i18nBaseKey) {
2851
2888
  this._tabs = [];
2852
2889
  this._groups = [];
2853
2890
  this._fields = [];
2854
2891
  this._disabled = false;
2855
2892
  this._modelType = modelType;
2856
- this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
2893
+ this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
2857
2894
  this._tableviewEditorType = tableviewEditorType;
2858
2895
  }
2859
2896
  /**
@@ -2898,7 +2935,7 @@ class EditorDescriptor {
2898
2935
  createTabGroup(name, title) {
2899
2936
  const tabGroup = new FieldTabGroupDescriptor(this, name);
2900
2937
  if (!title) {
2901
- title = I18nUtils.Type.getTabKey(this.model.typeName, name);
2938
+ title = I18nUtils.Type.getTabKey(this.model.i18nBaseKey, name);
2902
2939
  }
2903
2940
  tabGroup.withTitle(title);
2904
2941
  this.createTabGroupDescriptor(tabGroup);
@@ -2908,7 +2945,7 @@ class EditorDescriptor {
2908
2945
  const fieldGroup = new FieldGroupDescriptor(this, name);
2909
2946
  if (title !== null) {
2910
2947
  if (!title) {
2911
- title = I18nUtils.Type.getGroupKey(this.model.typeName, name);
2948
+ title = I18nUtils.Type.getGroupKey(this.model.i18nBaseKey, name);
2912
2949
  }
2913
2950
  fieldGroup.withTitle(title);
2914
2951
  }
@@ -3151,7 +3188,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
3151
3188
  this._size = FieldSizeEnum.Normal;
3152
3189
  this._eventsSubject = new Subject();
3153
3190
  this._property = property;
3154
- this._label = I18nUtils.Type.getPropertyKey(this._editor.model.typeName, property);
3191
+ this._label = I18nUtils.Type.getPropertyKey(this._editor.model.i18nBaseKey, property);
3155
3192
  }
3156
3193
  get property() {
3157
3194
  return this._property;
@@ -4000,11 +4037,12 @@ class FieldValidationDescriptor {
4000
4037
  }
4001
4038
 
4002
4039
  class ModelDescriptor {
4003
- constructor(modelType, idProperty, titleProperty) {
4040
+ constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
4004
4041
  this._type = modelType;
4005
4042
  this._idPropertyName = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;
4006
4043
  this._titlePropertyName = titleProperty ?? ModelUtil.findTitleAttribute(modelType) ?? undefined;
4007
4044
  this._typeName = TypeUtil.findTypeName(this._type);
4045
+ this._i18nBaseKey = (typeof i18nBaseKey === 'string' || typeof i18nBaseKey === 'undefined' ? i18nBaseKey : TypeUtil.findTypeName(i18nBaseKey)) ?? this._typeName;
4008
4046
  }
4009
4047
  get type() {
4010
4048
  return this._type;
@@ -4012,6 +4050,9 @@ class ModelDescriptor {
4012
4050
  get typeName() {
4013
4051
  return this._typeName;
4014
4052
  }
4053
+ get i18nBaseKey() {
4054
+ return this._i18nBaseKey;
4055
+ }
4015
4056
  get idPropertyName() {
4016
4057
  return this._idPropertyName;
4017
4058
  }
@@ -4026,6 +4067,13 @@ class ModelDescriptor {
4026
4067
  this._titlePropertyName = titleProperty;
4027
4068
  return this;
4028
4069
  }
4070
+ withI18nBase(base) {
4071
+ if (typeof base !== 'string') {
4072
+ base = TypeUtil.findTypeName(base);
4073
+ }
4074
+ this._i18nBaseKey = base;
4075
+ return this;
4076
+ }
4029
4077
  copy() {
4030
4078
  const model = new ModelDescriptor(this._type, this._idPropertyName, this._titlePropertyName);
4031
4079
  return model;
@@ -4033,7 +4081,7 @@ class ModelDescriptor {
4033
4081
  }
4034
4082
 
4035
4083
  class TableDescriptor {
4036
- constructor(modelType, idProperty, titleProperty) {
4084
+ constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
4037
4085
  this._filterDisplay = TableFilterDisplayEnum.Menu;
4038
4086
  this._paginationMode = TablePaginationModeEnum.Pagination;
4039
4087
  this._rowsPerPageOptions = [25, 50, 100];
@@ -4050,7 +4098,7 @@ class TableDescriptor {
4050
4098
  this._hasGridlines = false;
4051
4099
  this._autoGenerated = false;
4052
4100
  this._modelType = modelType;
4053
- this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
4101
+ this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
4054
4102
  this._dataKeyProperty = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;
4055
4103
  }
4056
4104
  /**
@@ -4490,15 +4538,15 @@ class TableDynamicDescriptor extends TableDescriptor {
4490
4538
  }
4491
4539
 
4492
4540
  class TableviewDescriptor {
4493
- constructor(modelType, idProperty, titleProperty) {
4541
+ constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
4494
4542
  this._modelType = modelType;
4495
- this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
4496
- this._table = new TableDescriptor(modelType, idProperty, titleProperty);
4497
- this._detailsEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Details);
4543
+ this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
4544
+ this._table = new TableDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
4545
+ this._detailsEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Details, i18nBaseKey);
4498
4546
  this._detailsEditor.withDisabled();
4499
- this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add);
4500
- this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit);
4501
- this._tableTitle = `${this._model.typeName}.name`;
4547
+ this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add, i18nBaseKey);
4548
+ this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit, i18nBaseKey);
4549
+ this._tableTitle = `${this._model.i18nBaseKey}.name`;
4502
4550
  }
4503
4551
  /**
4504
4552
  * generates descriptor from attribute definition of openaapi model
@@ -5128,8 +5176,8 @@ class TypeUtil {
5128
5176
  * @param typeName Name of the type.
5129
5177
  */
5130
5178
  static defineReflectTypeName(targetType, typeName) {
5131
- if (!Reflect.hasOwnMetadata(TypeUtil.typeNameDecoratorPropertyName, targetType)) {
5132
- Reflect.defineMetadata(TypeUtil.typeNameDecoratorPropertyName, typeName, targetType);
5179
+ if (!Reflect.hasOwnMetadata(TypeUtil.reflectTypeNameKey, targetType)) {
5180
+ Reflect.defineMetadata(TypeUtil.reflectTypeNameKey, typeName, targetType);
5133
5181
  }
5134
5182
  }
5135
5183
  /**
@@ -5138,16 +5186,36 @@ class TypeUtil {
5138
5186
  * @param enumName Name of the enum.
5139
5187
  */
5140
5188
  static defineReflectEnumName(targetType, enumName) {
5141
- if (!Reflect.hasOwnMetadata(TypeUtil.enumNameDecoratorPropertyName, targetType)) {
5142
- Reflect.defineMetadata(TypeUtil.enumNameDecoratorPropertyName, enumName, targetType);
5189
+ if (!Reflect.hasOwnMetadata(TypeUtil.reflectEnumNameKey, targetType)) {
5190
+ Reflect.defineMetadata(TypeUtil.reflectEnumNameKey, enumName, targetType);
5143
5191
  }
5144
5192
  }
5145
5193
  /**
5146
- * Gets type name from either decorator or reflect metadata.
5194
+ * Defines type's id property.
5195
+ * @param targetType class.
5196
+ * @param typeName Name of the type.
5197
+ */
5198
+ static defineReflectTypeIdProperty(targetType, idProperty) {
5199
+ if (!Reflect.hasOwnMetadata(TypeUtil.reflectTypeIdPropertyKey, targetType)) {
5200
+ Reflect.defineMetadata(TypeUtil.reflectTypeIdPropertyKey, idProperty, targetType);
5201
+ }
5202
+ }
5203
+ /**
5204
+ * Defines type's id property.
5205
+ * @param targetType class.
5206
+ * @param typeName Name of the type.
5207
+ */
5208
+ static defineReflectTypeTitleProperty(targetType, titleProperty) {
5209
+ if (!Reflect.hasOwnMetadata(TypeUtil.reflectTypeTitlePropertyKey, targetType)) {
5210
+ Reflect.defineMetadata(TypeUtil.reflectTypeTitlePropertyKey, titleProperty, targetType);
5211
+ }
5212
+ }
5213
+ /**
5214
+ * Gets type name from reflect metadata.
5147
5215
  * @param type Class.
5148
5216
  */
5149
5217
  static findTypeName(type) {
5150
- const typeName = Reflect.getMetadata(TypeUtil.typeNameDecoratorPropertyName, type);
5218
+ const typeName = Reflect.getMetadata(TypeUtil.reflectTypeNameKey, type);
5151
5219
  if (typeName) {
5152
5220
  return typeName;
5153
5221
  }
@@ -5159,23 +5227,39 @@ class TypeUtil {
5159
5227
  * @param type Class.
5160
5228
  */
5161
5229
  static typeNameExists(type) {
5162
- return Reflect.hasOwnMetadata(TypeUtil.typeNameDecoratorPropertyName, type);
5230
+ return Reflect.hasOwnMetadata(TypeUtil.reflectTypeNameKey, type);
5163
5231
  }
5164
5232
  /**
5165
5233
  * Gets enum name from either decorator or reflect metadata.
5166
5234
  * @param enumType Class.
5167
5235
  */
5168
5236
  static findEnumName(enumType) {
5169
- const enumName = Reflect.getMetadata(TypeUtil.enumNameDecoratorPropertyName, enumType);
5237
+ const enumName = Reflect.getMetadata(TypeUtil.reflectEnumNameKey, enumType);
5170
5238
  if (enumName) {
5171
5239
  return enumName;
5172
5240
  }
5173
5241
  console.warn('Reflect metadata could not be found for enum, you might experience some issues in production build.', enumType);
5174
5242
  throw new Error('Could not fined enum name');
5175
5243
  }
5244
+ /**
5245
+ * Gets type's id property from reflect metadata.
5246
+ * @param type Class.
5247
+ */
5248
+ static findTypeIdProperty(type) {
5249
+ return Reflect.getMetadata(TypeUtil.reflectTypeIdPropertyKey, type);
5250
+ }
5251
+ /**
5252
+ * Gets type's title property from reflect metadata.
5253
+ * @param type Class.
5254
+ */
5255
+ static findTypeTitleProperty(type) {
5256
+ return Reflect.getMetadata(TypeUtil.reflectTypeTitlePropertyKey, type);
5257
+ }
5176
5258
  }
5177
- TypeUtil.typeNameDecoratorPropertyName = 'typeName';
5178
- TypeUtil.enumNameDecoratorPropertyName = 'enumName';
5259
+ TypeUtil.reflectTypeNameKey = 'typeName';
5260
+ TypeUtil.reflectTypeIdPropertyKey = 'typeIdProperty';
5261
+ TypeUtil.reflectTypeTitlePropertyKey = 'typeTitleProperty';
5262
+ TypeUtil.reflectEnumNameKey = 'enumName';
5179
5263
 
5180
5264
  var I18nUtils;
5181
5265
  (function (I18nUtils) {
@@ -5288,17 +5372,17 @@ var I18nUtils;
5288
5372
  return I18nUtils.Common.get(translate, i18nParams, ...keys);
5289
5373
  }
5290
5374
  static getName(translate, model, singular) {
5291
- return I18nUtils.Type.getName(translate, model.typeName, singular);
5375
+ return I18nUtils.Type.getName(translate, model.i18nBaseKey, singular);
5292
5376
  }
5293
5377
  static getNameAsync(translate, model, singular) {
5294
- return I18nUtils.Type.getNameAsync(translate, model.typeName, singular);
5378
+ return I18nUtils.Type.getNameAsync(translate, model.i18nBaseKey, singular);
5295
5379
  }
5296
5380
  static getParams(translate, model, item, params = {}) {
5297
- const i18nParams = I18nUtils.Type.getParams(translate, model?.typeName, item, params);
5381
+ const i18nParams = I18nUtils.Type.getParams(translate, model?.i18nBaseKey, item, params);
5298
5382
  return I18nUtils.Model.populateParams(model?.idPropertyName, model?.titlePropertyName, item, i18nParams);
5299
5383
  }
5300
5384
  static getParamsAsync(translate, model, item, params = {}) {
5301
- return I18nUtils.Type.getParamsAsync(translate, model?.typeName, item, params).pipe(map(i18nParams => I18nUtils.Model.populateParams(model?.idPropertyName, model?.titlePropertyName, item, i18nParams)));
5385
+ return I18nUtils.Type.getParamsAsync(translate, model?.i18nBaseKey, item, params).pipe(map(i18nParams => I18nUtils.Model.populateParams(model?.idPropertyName, model?.titlePropertyName, item, i18nParams)));
5302
5386
  }
5303
5387
  static populateParams(idProperty, titleProperty, item, params = {}) {
5304
5388
  const paramsRes = { ...params, itemId: '', itemTitle: '' };
@@ -5317,7 +5401,7 @@ var I18nUtils;
5317
5401
  if (customKey) {
5318
5402
  keys.push(customKey);
5319
5403
  }
5320
- const modelActionKey = I18nUtils.Type.getPath(model.typeName, ...keyPath);
5404
+ const modelActionKey = I18nUtils.Type.getPath(model.i18nBaseKey, ...keyPath);
5321
5405
  keys.push(modelActionKey);
5322
5406
  if (fallbackKey) {
5323
5407
  keys.push(fallbackKey);
@@ -5409,6 +5493,10 @@ var I18nUtils;
5409
5493
 
5410
5494
  class ModelUtil {
5411
5495
  static findIdAttribute(classType) {
5496
+ const typeIdProp = TypeUtil.findTypeIdProperty(classType);
5497
+ if (typeIdProp) {
5498
+ return typeIdProp;
5499
+ }
5412
5500
  const objSerializer = ObjectSerializer.get();
5413
5501
  const attributes = objSerializer.findAttributesDefinitionByClassType(classType);
5414
5502
  if (!attributes) {
@@ -5422,6 +5510,10 @@ class ModelUtil {
5422
5510
  return idAttribute?.name ?? null;
5423
5511
  }
5424
5512
  static findTitleAttribute(classType) {
5513
+ const typeTitleProp = TypeUtil.findTypeTitleProperty(classType);
5514
+ if (typeTitleProp) {
5515
+ return typeTitleProp;
5516
+ }
5425
5517
  const objSerializer = ObjectSerializer.get();
5426
5518
  const attributes = objSerializer.findAttributesDefinitionByClassType(classType);
5427
5519
  if (!attributes) {
@@ -5583,7 +5675,7 @@ class ObjectSerializer {
5583
5675
  }
5584
5676
  findAttributesDefinition(typeName) {
5585
5677
  const typeDef = this.findType(typeName);
5586
- if (!typeDef) {
5678
+ if (!typeDef || typeof typeDef.getAttributeTypeMap !== 'function') {
5587
5679
  return null;
5588
5680
  }
5589
5681
  return typeDef.getAttributeTypeMap();
@@ -6493,7 +6585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
6493
6585
 
6494
6586
  class MngI18nPropertyPipe {
6495
6587
  transform(property, model) {
6496
- return I18nUtils.Type.getPropertyKey(model.typeName, property);
6588
+ return I18nUtils.Type.getPropertyKey(model.i18nBaseKey, property);
6497
6589
  }
6498
6590
  }
6499
6591
  MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MngI18nPropertyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
@@ -9424,6 +9516,8 @@ class MngTableComponent {
9424
9516
  this.captionCmpInstEventEmitter = new EventEmitter();
9425
9517
  this.columnActionCmpInstEventEmitter = new EventEmitter();
9426
9518
  // data provider and items
9519
+ this.isLazy = false;
9520
+ this.isPagination = false;
9427
9521
  this.useDataProvider = false;
9428
9522
  this.useQueryParamsInitializedSubejct = new BehaviorSubject(false);
9429
9523
  this.useQueryParamsInitialized$ = this.useQueryParamsInitializedSubejct.asObservable();
@@ -9506,10 +9600,14 @@ class MngTableComponent {
9506
9600
  this.rowHeight = this.descriptor.rowHeight ?? 45;
9507
9601
  this.useQueryParams = false;
9508
9602
  }
9603
+ else if (this.descriptor?.paginationMode === TablePaginationModeEnum.Pagination) {
9604
+ this.isPagination = true;
9605
+ }
9509
9606
  // check if data provider is supplied, if is, use it primarily
9510
9607
  if (this.dataProvider) {
9511
9608
  // map subjects to observables and initiate data
9512
9609
  this.useDataProvider = true;
9610
+ this.isLazy = this.dataProvider.isLazy;
9513
9611
  this.queryResult$ = this.dataProviderQueryResultSubject.asObservable();
9514
9612
  this.loading$ = this.dataProviderLoadingSubject.asObservable();
9515
9613
  const emptyQueryResult = new MediusQueryResult();
@@ -9865,10 +9963,10 @@ class MngTableComponent {
9865
9963
  }
9866
9964
  }
9867
9965
  MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.TranslateService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
9868
- MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: MngTableComponent, selector: "mng-table", inputs: { initialDescriptor: ["descriptor", "initialDescriptor"], items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", actions: "actions", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + 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$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\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 sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\"></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\" [style.width.%]=\"col.width\" [style.min-width.px]=\"col.minWidth\" [class]=\"col.headerClassName\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (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.title ?? (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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\">\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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"rowHeight\" [class]=\"descriptor?.rowClassName | mngClassMapPipe: descriptor?.rowClassNameMapFn:item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"col.className\"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty: descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 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 ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6$3.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", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "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"] }, { kind: "directive", type: i6$3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i6$3.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "component", type: i6$3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i6$3.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i6$3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i6$3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7$3.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { kind: "component", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { kind: "component", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "pipe", type: MngI18nPropertyPipe, name: "i18nProperty" }, { kind: "pipe", type: MngClassMapPipe, name: "mngClassMapPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9966
+ MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: MngTableComponent, selector: "mng-table", inputs: { initialDescriptor: ["descriptor", "initialDescriptor"], items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", actions: "actions", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + 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$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !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 sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\"></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\" [style.width.%]=\"col.width\" [style.min-width.px]=\"col.minWidth\" [class]=\"col.headerClassName\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (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.title ?? (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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\">\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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"rowHeight\" [class]=\"descriptor?.rowClassName | mngClassMapPipe: descriptor?.rowClassNameMapFn:item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"col.className\"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty: descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 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 ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6$3.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", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "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"] }, { kind: "directive", type: i6$3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i6$3.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "component", type: i6$3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i6$3.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i6$3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i6$3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7$3.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { kind: "component", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { kind: "component", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "pipe", type: MngI18nPropertyPipe, name: "i18nProperty" }, { kind: "pipe", type: MngClassMapPipe, name: "mngClassMapPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9869
9967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MngTableComponent, decorators: [{
9870
9968
  type: Component,
9871
- args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + 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$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\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 sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\"></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\" [style.width.%]=\"col.width\" [style.min-width.px]=\"col.minWidth\" [class]=\"col.headerClassName\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (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.title ?? (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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\">\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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"rowHeight\" [class]=\"descriptor?.rowClassName | mngClassMapPipe: descriptor?.rowClassNameMapFn:item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"col.className\"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty: descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 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 ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n" }]
9969
+ args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + 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$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !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 sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\"></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\" [style.width.%]=\"col.width\" [style.min-width.px]=\"col.minWidth\" [class]=\"col.headerClassName\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (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.title ?? (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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\">\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=\"showInlineActionsColumn\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"rowHeight\" [class]=\"descriptor?.rowClassName | mngClassMapPipe: descriptor?.rowClassNameMapFn:item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 3rem\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"col.className\"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty: descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 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 ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n" }]
9872
9970
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.TranslateService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService, decorators: [{
9873
9971
  type: Optional
9874
9972
  }] }]; }, propDecorators: { initialDescriptor: [{
@@ -12687,6 +12785,16 @@ function TypeName(typeName) {
12687
12785
  TypeUtil.defineReflectTypeName(target, typeName);
12688
12786
  };
12689
12787
  }
12788
+ function IdProperty() {
12789
+ return function (target, prop) {
12790
+ TypeUtil.defineReflectTypeIdProperty(target, prop);
12791
+ };
12792
+ }
12793
+ function TitleProperty() {
12794
+ return function (target, prop) {
12795
+ TypeUtil.defineReflectTypeTitleProperty(target, prop);
12796
+ };
12797
+ }
12690
12798
  function EnumName(typeName) {
12691
12799
  return function (target) {
12692
12800
  TypeUtil.defineReflectEnumName(target, typeName);
@@ -12701,5 +12809,5 @@ function EnumName(typeName) {
12701
12809
  * Generated bundle index. Do not edit.
12702
12810
  */
12703
12811
 
12704
- export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase };
12812
+ export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TitleProperty, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase };
12705
12813
  //# sourceMappingURL=mediusinc-mng-commons.mjs.map