@mediusinc/mng-commons 0.4.2 → 0.4.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 (30) hide show
  1. package/assets/i18n/en.json +21 -19
  2. package/assets/i18n/sl.json +19 -17
  3. package/esm2020/lib/components/action/action.component.mjs +4 -4
  4. package/esm2020/lib/components/action/editor/action-editor.component.mjs +4 -8
  5. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +1 -1
  6. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +1 -1
  7. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +1 -1
  8. package/esm2020/lib/components/tableview/table/table.component.mjs +7 -3
  9. package/esm2020/lib/components/tableview/tableview.component.mjs +4 -4
  10. package/esm2020/lib/descriptors/action.descriptor.mjs +29 -10
  11. package/esm2020/lib/descriptors/editor.descriptor.mjs +4 -4
  12. package/esm2020/lib/descriptors/field.descriptor.mjs +3 -3
  13. package/esm2020/lib/pipes/i18n-property.pipe.mjs +3 -3
  14. package/esm2020/lib/pipes/link-formatter.pipe.mjs +1 -1
  15. package/esm2020/lib/services/action-executor.service.mjs +13 -14
  16. package/esm2020/lib/services/view-container.component.service.mjs +2 -2
  17. package/esm2020/lib/utils/i18n.util.mjs +213 -144
  18. package/esm2020/lib/utils/notification.util.mjs +16 -17
  19. package/fesm2015/mediusinc-mng-commons.mjs +364 -277
  20. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  21. package/fesm2020/mediusinc-mng-commons.mjs +358 -275
  22. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  23. package/lib/components/tableview/table/table.component.d.ts +4 -1
  24. package/lib/descriptors/action.descriptor.d.ts +13 -6
  25. package/lib/pipes/link-formatter.pipe.d.ts +1 -1
  26. package/lib/services/action-executor.service.d.ts +4 -2
  27. package/lib/services/view-container.component.service.d.ts +1 -1
  28. package/lib/utils/i18n.util.d.ts +52 -21
  29. package/lib/utils/notification.util.d.ts +4 -4
  30. package/package.json +1 -1
@@ -74,7 +74,7 @@ import * as i9 from 'primeng/tooltip';
74
74
  import { TooltipModule } from 'primeng/tooltip';
75
75
  import { throwError, of, Subject, Observable, from, BehaviorSubject, ReplaySubject, switchMap, distinctUntilChanged, combineLatest } from 'rxjs';
76
76
  import 'reflect-metadata';
77
- import { mergeMap, map, first, catchError, filter, finalize, startWith } from 'rxjs/operators';
77
+ import { map, mergeMap, first, catchError, filter, finalize, startWith } from 'rxjs/operators';
78
78
  import * as i4$1 from '@angular/platform-browser';
79
79
  import { trigger, state, style, transition, animate } from '@angular/animations';
80
80
 
@@ -418,9 +418,11 @@ class ActionDescriptor {
418
418
  this._parentType = parentType;
419
419
  this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;
420
420
  this._parentProperty = parentProperty;
421
- this._i18nModelActionBaseKey = this._parentTypeName
422
- ? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`
423
- : `${this._model.typeName}.actions.${actionName}`;
421
+ if (this._parentTypeName || this._model) {
422
+ this._i18nModelActionBaseKey = this._parentTypeName
423
+ ? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`
424
+ : `${this._model.typeName}.actions.${actionName}`;
425
+ }
424
426
  }
425
427
  get model() {
426
428
  return this._model;
@@ -547,6 +549,9 @@ class ActionDescriptor {
547
549
  return this;
548
550
  }
549
551
  withServiceType(serviceType) {
552
+ if (!this._model) {
553
+ throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);
554
+ }
550
555
  this._dataProvider = new DataProvider(this._model.type, serviceType);
551
556
  return this;
552
557
  }
@@ -642,6 +647,12 @@ class ActionDescriptor {
642
647
  SizeEnum[SizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
643
648
  })(SizeEnum = ActionDescriptor.SizeEnum || (ActionDescriptor.SizeEnum = {}));
644
649
  })(ActionDescriptor || (ActionDescriptor = {}));
650
+ class ActionSimpleDescriptor extends ActionDescriptor {
651
+ constructor(actionName, modelType, idProperty, titleProperty) {
652
+ const model = modelType ? new ModelDescriptor(modelType, idProperty, titleProperty) : null;
653
+ super(model, actionName);
654
+ }
655
+ }
645
656
  class ActionEditorDescriptor extends ActionDescriptor {
646
657
  constructor(editorDescriptor, actionName, parentType, parentProperty) {
647
658
  super(editorDescriptor.model, actionName, parentType, parentProperty);
@@ -705,6 +716,9 @@ class ActionEditorDescriptor extends ActionDescriptor {
705
716
  return this;
706
717
  }
707
718
  withServiceType(serviceType) {
719
+ if (!this._model) {
720
+ throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);
721
+ }
708
722
  this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
709
723
  return this;
710
724
  }
@@ -763,7 +777,7 @@ class ActionEditorSubmitDescriptor extends ActionDescriptor {
763
777
  })(ActionEditorSubmitDescriptor || (ActionEditorSubmitDescriptor = {}));
764
778
  class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
765
779
  constructor(editorDescriptor) {
766
- super(editorDescriptor, 'details');
780
+ super(editorDescriptor, ActionEditorDetailsDescriptor.ACTION_NAME);
767
781
  this.withPosition(ActionPositionEnum.RowClick);
768
782
  this.withRouteTrigger(':itemId');
769
783
  this.withFetchFunction(ctx => {
@@ -787,9 +801,10 @@ class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
787
801
  return this;
788
802
  }
789
803
  }
804
+ ActionEditorDetailsDescriptor.ACTION_NAME = 'details';
790
805
  class ActionEditorAddDescriptor extends ActionEditorDescriptor {
791
806
  constructor(editorDescriptor) {
792
- super(editorDescriptor, 'add');
807
+ super(editorDescriptor, ActionEditorAddDescriptor.ACTION_NAME);
793
808
  this.withPosition(ActionPositionEnum.ToolbarLeft);
794
809
  this.withRouteTrigger('add');
795
810
  this.withSubmitFunction(ctx => { var _a, _b; return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.create) ? ctx.dataProvider.create((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)); });
@@ -812,9 +827,10 @@ class ActionEditorAddDescriptor extends ActionEditorDescriptor {
812
827
  return this;
813
828
  }
814
829
  }
830
+ ActionEditorAddDescriptor.ACTION_NAME = 'add';
815
831
  class ActionEditorEditDescriptor extends ActionEditorDescriptor {
816
832
  constructor(editorDescriptor) {
817
- super(editorDescriptor, 'edit');
833
+ super(editorDescriptor, ActionEditorEditDescriptor.ACTION_NAME);
818
834
  this.withPosition(ActionPositionEnum.RowInline);
819
835
  this.withTitle(null);
820
836
  this.withRouteTrigger(':itemId/edit');
@@ -848,9 +864,10 @@ class ActionEditorEditDescriptor extends ActionEditorDescriptor {
848
864
  return this;
849
865
  }
850
866
  }
867
+ ActionEditorEditDescriptor.ACTION_NAME = 'edit';
851
868
  class ActionDeleteDescriptor extends ActionDescriptor {
852
869
  constructor(model) {
853
- super(model, 'delete');
870
+ super(model, ActionDeleteDescriptor.ACTION_NAME);
854
871
  this.withPosition(ActionPositionEnum.RowInline);
855
872
  this.withTitle(null);
856
873
  this.withRunFunction(ctx => {
@@ -876,9 +893,10 @@ class ActionDeleteDescriptor extends ActionDescriptor {
876
893
  return this;
877
894
  }
878
895
  }
896
+ ActionDeleteDescriptor.ACTION_NAME = 'delete';
879
897
  class ActionLinkDescriptor extends ActionDescriptor {
880
- constructor(model) {
881
- super(model, 'link');
898
+ constructor(model = null, actionName = 'link') {
899
+ super(model, actionName);
882
900
  this._url = '';
883
901
  this._pathSegments = [];
884
902
  this._replaceUrl = false;
@@ -1424,7 +1442,7 @@ class EditorDescriptor {
1424
1442
  createTabGroup(name, title) {
1425
1443
  const tabGroup = new FieldTabGroupDescriptor(this, name);
1426
1444
  if (!title) {
1427
- title = I18nUtil.getModelTabKey(this.model, name);
1445
+ title = I18nUtils.Type.getTabKey(this.model.typeName, name);
1428
1446
  }
1429
1447
  tabGroup.withTitle(title);
1430
1448
  this.createTabGroupDescriptor(tabGroup);
@@ -1434,7 +1452,7 @@ class EditorDescriptor {
1434
1452
  const fieldGroup = new FieldGroupDescriptor(this, name);
1435
1453
  if (title !== null) {
1436
1454
  if (!title) {
1437
- title = I18nUtil.getModelGroupKey(this.model, name);
1455
+ title = I18nUtils.Type.getGroupKey(this.model.typeName, name);
1438
1456
  }
1439
1457
  fieldGroup.withTitle(title);
1440
1458
  }
@@ -1616,7 +1634,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1616
1634
  this._size = FieldDescriptor.SizeEnum.Normal;
1617
1635
  this._eventsSubject = new Subject();
1618
1636
  this._property = property;
1619
- this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
1637
+ this._label = I18nUtils.Type.getPropertyKey(this._editor.model.typeName, property);
1620
1638
  }
1621
1639
  get property() {
1622
1640
  return this._property;
@@ -2950,169 +2968,327 @@ class EnumUtil {
2950
2968
  }
2951
2969
  }
2952
2970
 
2953
- class I18nUtil {
2954
- static instantModelTranslation(translate, model, keyPath, customKey, item, fallbackKey, i18nParams) {
2955
- const keys = I18nUtil.getModelKeysByPriority(model, keyPath, customKey, fallbackKey);
2956
- const i18nModelName = I18nUtil.instantModelName(translate, model, true);
2957
- const i18n = translate.instant(keys, I18nUtil.getModelI18nParams(model, item, i18nModelName !== null && i18nModelName !== void 0 ? i18nModelName : undefined, i18nParams));
2958
- return I18nUtil.selectKeyByPriority(keys, i18n);
2959
- }
2960
- static getModelTabKey(model, tab) {
2961
- return I18nUtil.getModelKeyPath(model, `tabs.${tab}`);
2971
+ const typeNameDecoratorPropertyName = 'typeName';
2972
+ function TypeName(typeName) {
2973
+ return function (target) {
2974
+ target[typeNameDecoratorPropertyName] = typeName;
2975
+ };
2976
+ }
2977
+ const enumNameDecoratorPropertyName = 'enumName';
2978
+ function EnumName(typeName) {
2979
+ return function (target) {
2980
+ target[enumNameDecoratorPropertyName] = typeName;
2981
+ };
2982
+ }
2983
+
2984
+ class TypeUtil {
2985
+ /**
2986
+ * Defines type name decorator.
2987
+ * @param targetType class.
2988
+ * @param typeName Name of the type.
2989
+ */
2990
+ static defineReflectTypeName(targetType, typeName) {
2991
+ if (!typeName) {
2992
+ typeName = TypeUtil.getDecoratorTypeName(targetType);
2993
+ if (!typeName) {
2994
+ console.warn(`Type name not provided for target ${targetType}, nor could be retrieved from decorator. Type name was not registered to reflect.`);
2995
+ return;
2996
+ }
2997
+ }
2998
+ if (!Reflect.hasOwnMetadata(typeNameDecoratorPropertyName, targetType)) {
2999
+ Reflect.defineMetadata(typeNameDecoratorPropertyName, typeName, targetType);
3000
+ }
2962
3001
  }
2963
- static getModelGroupKey(model, group) {
2964
- return I18nUtil.getModelKeyPath(model, `groups.${group}`);
3002
+ /**
3003
+ * Defines enum name decorator.
3004
+ * @param targetType enum object.
3005
+ * @param enumName Name of the enum.
3006
+ */
3007
+ static defineReflectEnumName(targetType, enumName) {
3008
+ if (!Reflect.hasOwnMetadata(enumNameDecoratorPropertyName, targetType)) {
3009
+ Reflect.defineMetadata(enumNameDecoratorPropertyName, enumName, targetType);
3010
+ }
2965
3011
  }
2966
- static getModelPropertyKey(model, property) {
2967
- return I18nUtil.getModelKeyPath(model, `properties.${property}`);
3012
+ /**
3013
+ * Gets type name from either decorator or reflect metadata.
3014
+ * @param type Class.
3015
+ */
3016
+ static findTypeName(type) {
3017
+ let decoratorName = TypeUtil.getDecoratorTypeName(type);
3018
+ if (decoratorName) {
3019
+ return decoratorName;
3020
+ }
3021
+ decoratorName = Reflect.getMetadata(typeNameDecoratorPropertyName, type);
3022
+ if (decoratorName) {
3023
+ return decoratorName;
3024
+ }
3025
+ return type.name;
2968
3026
  }
2969
- static instantActionTranslation(translate, action, keyPath, customKey, item, fallbackKey, functionNameKey, i18nParams) {
2970
- const keys = I18nUtil.getActionKeysByPriority(action, keyPath, customKey, fallbackKey);
2971
- const i18nModelName = I18nUtil.instantModelName(translate, action === null || action === void 0 ? void 0 : action.model, true);
2972
- const i18nFunctionTitle = I18nUtil.getFunctionTitle(translate, functionNameKey);
2973
- const i18n = translate.instant(keys, I18nUtil.getActionI18nParams(action, item, i18nModelName !== null && i18nModelName !== void 0 ? i18nModelName : undefined, i18nParams, i18nFunctionTitle));
2974
- return I18nUtil.selectKeyByPriority(keys, i18n);
3027
+ /**
3028
+ * Gets enum name from either decorator or reflect metadata.
3029
+ * @param enumType Class.
3030
+ */
3031
+ static findEnumName(enumType) {
3032
+ let decoratorName = TypeUtil.getDecoratorEnumName(enumType);
3033
+ if (decoratorName) {
3034
+ return decoratorName;
3035
+ }
3036
+ decoratorName = Reflect.getMetadata(enumNameDecoratorPropertyName, enumType);
3037
+ if (decoratorName) {
3038
+ return decoratorName;
3039
+ }
3040
+ throw new Error('Could not fined enum name');
2975
3041
  }
2976
- static streamActionTranslation(translate, action, keyPath, customKey, item, fallbackKey) {
2977
- return I18nUtil.getActionTranslation(translate, action, keyPath, customKey, item, fallbackKey, false);
3042
+ /**
3043
+ * Get value from decorator defined property name
3044
+ * @param type Class.
3045
+ */
3046
+ // eslint-disable-next-line @typescript-eslint/ban-types
3047
+ static getDecoratorTypeName(type) {
3048
+ return type[typeNameDecoratorPropertyName];
2978
3049
  }
2979
- static getActionTranslation(translate, action, keyPath, customKey, item, fallbackKey, oneTime = true) {
2980
- const keys = I18nUtil.getActionKeysByPriority(action, keyPath, customKey, fallbackKey);
2981
- 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)));
3050
+ /**
3051
+ * Get value from decorator defined property name
3052
+ * @param type Enum object.
3053
+ */
3054
+ static getDecoratorEnumName(type) {
3055
+ return type[enumNameDecoratorPropertyName];
2982
3056
  }
2983
- static getModelI18nParams(model, item, i18nModelName, i18nParameters = {}) {
2984
- i18nParameters.itemId = '';
2985
- i18nParameters.itemTitle = '';
2986
- if (i18nModelName) {
2987
- i18nParameters.modelName = i18nModelName;
2988
- }
2989
- if (item) {
2990
- if (model.idPropertyName && item[model.idPropertyName]) {
2991
- i18nParameters.itemId = item[model.idPropertyName];
3057
+ }
3058
+
3059
+ var I18nUtils;
3060
+ (function (I18nUtils) {
3061
+ class Common {
3062
+ static getAsync(translate, params, ...keys) {
3063
+ return translate.stream(keys, params).pipe(map(i18n => I18nUtils.Common.selectI18n(keys, i18n)));
3064
+ }
3065
+ static get(translate, params, ...keys) {
3066
+ const i18n = translate.instant(keys, params);
3067
+ return I18nUtils.Common.selectI18n(keys, i18n);
3068
+ }
3069
+ static populateParams(item, params = {}) {
3070
+ const paramsRes = Object.assign({}, params);
3071
+ if (item) {
3072
+ paramsRes.item = item;
2992
3073
  }
2993
- if (model.titlePropertyName && item[model.titlePropertyName]) {
2994
- i18nParameters.itemTitle = item[model.titlePropertyName];
3074
+ return paramsRes;
3075
+ }
3076
+ static selectI18n(keys, i18n) {
3077
+ for (const key of keys) {
3078
+ if (key !== i18n[key]) {
3079
+ return i18n[key];
3080
+ }
2995
3081
  }
3082
+ return null;
2996
3083
  }
2997
- return i18nParameters;
2998
3084
  }
2999
- static getActionI18nParams(action, item, i18nModelName, i18nParameters = {}, functionTitle) {
3000
- i18nParameters.itemId = '';
3001
- i18nParameters.itemTitle = '';
3002
- if (functionTitle) {
3003
- i18nParameters.functionTitle = functionTitle;
3085
+ I18nUtils.Common = Common;
3086
+ class Type {
3087
+ static getClassNameAsync(translate, classType, singular) {
3088
+ const typeName = TypeUtil.findTypeName(classType);
3089
+ return I18nUtils.Type.getNameAsync(translate, typeName, singular);
3004
3090
  }
3005
- if (i18nModelName) {
3006
- i18nParameters.modelName = i18nModelName;
3091
+ static getClassName(translate, classType, singular) {
3092
+ const typeName = TypeUtil.findTypeName(classType);
3093
+ return I18nUtils.Type.getName(translate, typeName, singular);
3007
3094
  }
3008
- if (item) {
3009
- if (action.model.idPropertyName && item[action.model.idPropertyName]) {
3010
- i18nParameters.itemId = item[action.model.idPropertyName];
3011
- }
3012
- if (action.model.titlePropertyName && item[action.model.titlePropertyName]) {
3013
- i18nParameters.itemTitle = item[action.model.titlePropertyName];
3095
+ static getNameAsync(translate, typeName, singular) {
3096
+ const keys = I18nUtils.Type.getNameKeys(typeName, singular);
3097
+ return I18nUtils.Common.getAsync(translate, undefined, ...keys);
3098
+ }
3099
+ static getName(translate, typeName, singular) {
3100
+ const keys = I18nUtils.Type.getNameKeys(typeName, singular);
3101
+ return I18nUtils.Common.get(translate, undefined, ...keys);
3102
+ }
3103
+ static getClassTabKey(classType, tab) {
3104
+ const typeName = TypeUtil.findTypeName(classType);
3105
+ return I18nUtils.Type.getTabKey(typeName, tab);
3106
+ }
3107
+ static getTabKey(typeName, tab) {
3108
+ return I18nUtils.Type.getPath(typeName, 'tabs', tab);
3109
+ }
3110
+ static getClassGroupKey(classType, group) {
3111
+ const typeName = TypeUtil.findTypeName(classType);
3112
+ return I18nUtils.Type.getGroupKey(typeName, group);
3113
+ }
3114
+ static getGroupKey(typeName, group) {
3115
+ return I18nUtils.Type.getPath(typeName, 'groups', group);
3116
+ }
3117
+ static getClassPropertyKey(classType, property) {
3118
+ const typeName = TypeUtil.findTypeName(classType);
3119
+ return I18nUtils.Type.getPropertyKey(typeName, property);
3120
+ }
3121
+ static getPropertyKey(typeName, property) {
3122
+ return I18nUtils.Type.getPath(typeName, 'properties', property);
3123
+ }
3124
+ static getClassPath(classType, ...path) {
3125
+ const typeName = TypeUtil.findTypeName(classType);
3126
+ return I18nUtils.Type.getPath(typeName, ...path);
3127
+ }
3128
+ static getPath(typeName, ...path) {
3129
+ return `${typeName}.${path.join('.')}`;
3130
+ }
3131
+ static getClassParams(translate, classType, item, params = {}) {
3132
+ const typeName = TypeUtil.findTypeName(classType);
3133
+ return I18nUtils.Type.getParams(translate, typeName, item, params);
3134
+ }
3135
+ static getParams(translate, typeName, item, params = {}) {
3136
+ const i18nTypeName = typeName ? I18nUtils.Type.getName(translate, typeName, true) : null;
3137
+ return I18nUtils.Type.populateParams(i18nTypeName !== null && i18nTypeName !== void 0 ? i18nTypeName : undefined, item, params);
3138
+ }
3139
+ static getClassParamsAsync(translate, classType, item, params = {}) {
3140
+ const typeName = TypeUtil.findTypeName(classType);
3141
+ return I18nUtils.Type.getParamsAsync(translate, typeName, item, params);
3142
+ }
3143
+ static getParamsAsync(translate, typeName, item, params = {}) {
3144
+ return (typeName ? I18nUtils.Type.getNameAsync(translate, typeName, true) : of(null)).pipe(map(i18nTypeName => I18nUtils.Type.populateParams(i18nTypeName !== null && i18nTypeName !== void 0 ? i18nTypeName : undefined, item, params)));
3145
+ }
3146
+ static populateParams(i18nTypeName, item, params = {}) {
3147
+ const paramsRes = Object.assign({}, params);
3148
+ if (i18nTypeName) {
3149
+ paramsRes.typeName = i18nTypeName;
3014
3150
  }
3151
+ return I18nUtils.Common.populateParams(item, paramsRes);
3015
3152
  }
3016
- return i18nParameters;
3017
- }
3018
- static instantErrorI18nTranslation(translate, error, i18nParameters = {}) {
3019
- i18nParameters.errorStatus = '';
3020
- i18nParameters.errorMessage = '';
3021
- if (error.messageCode) {
3022
- const params = I18nUtil.getErrorI18nParams(error);
3023
- const keys = [`errors.${error.messageCode}`, `messages.${error.messageCode}`];
3024
- const i18ns = translate.instant(keys, params);
3025
- const i18n = I18nUtil.selectKeyByPriority(keys, i18ns);
3026
- if (i18n) {
3027
- return i18n;
3153
+ static getNameKeys(typeName, singular) {
3154
+ const keys = [];
3155
+ if (typeof singular !== 'undefined') {
3156
+ keys.push(singular ? `${typeName}.nameSingular` : `${typeName}.namePlural`);
3028
3157
  }
3158
+ keys.push(`${typeName}.name`);
3159
+ return keys;
3029
3160
  }
3030
- return translate.instant(error.message);
3031
3161
  }
3032
- static getErrorI18nParams(error, i18nParameters = {}) {
3033
- i18nParameters.errorStatus = '';
3034
- i18nParameters.errorMessage = '';
3035
- if (error.status) {
3036
- i18nParameters.errorStatus = error.status;
3162
+ I18nUtils.Type = Type;
3163
+ class Model {
3164
+ static get(translate, model, keyPath, customKey, item, fallbackKey, params) {
3165
+ const keys = I18nUtils.Model.getKeysByPriority(model, keyPath, customKey, fallbackKey);
3166
+ const i18nParams = I18nUtils.Model.getParams(translate, model, item, params);
3167
+ return I18nUtils.Common.get(translate, i18nParams, ...keys);
3037
3168
  }
3038
- if (error.message) {
3039
- i18nParameters.errorMessage = error.message;
3169
+ static getName(translate, model, singular) {
3170
+ return I18nUtils.Type.getName(translate, model.typeName, singular);
3040
3171
  }
3041
- if (error.statusDescription) {
3042
- i18nParameters.errorStatusDescription = error.statusDescription;
3172
+ static getNameAsync(translate, model, singular) {
3173
+ return I18nUtils.Type.getNameAsync(translate, model.typeName, singular);
3043
3174
  }
3044
- return i18nParameters;
3045
- }
3046
- static instantModelName(translate, model, singular) {
3047
- const keys = I18nUtil.getModelNameKeys(model, singular);
3048
- const i18n = translate.instant(keys);
3049
- return I18nUtil.selectKeyByPriority(keys, i18n);
3050
- }
3051
- static getModelName(translate, model, oneTime = true, singular) {
3052
- const keys = I18nUtil.getModelNameKeys(model, singular);
3053
- const obs = translate.stream(keys);
3054
- if (oneTime) {
3055
- obs.pipe(first());
3175
+ static getParams(translate, model, item, params = {}) {
3176
+ const i18nParams = I18nUtils.Type.getParams(translate, model === null || model === void 0 ? void 0 : model.typeName, item, params);
3177
+ return I18nUtils.Model.populateParams(model === null || model === void 0 ? void 0 : model.idPropertyName, model === null || model === void 0 ? void 0 : model.titlePropertyName, item, i18nParams);
3056
3178
  }
3057
- return obs.pipe(map(i18n => I18nUtil.selectKeyByPriority(keys, i18n)));
3058
- }
3059
- static getModelNameKeys(model, singular) {
3060
- const keys = [];
3061
- if (singular !== undefined) {
3062
- keys.push(singular ? `${model === null || model === void 0 ? void 0 : model.typeName}.nameSingular` : `${model === null || model === void 0 ? void 0 : model.typeName}.namePlural`);
3179
+ static getParamsAsync(translate, model, item, params = {}) {
3180
+ return I18nUtils.Type.getParamsAsync(translate, model === null || model === void 0 ? void 0 : model.typeName, item, params).pipe(map(i18nParams => I18nUtils.Model.populateParams(model === null || model === void 0 ? void 0 : model.idPropertyName, model === null || model === void 0 ? void 0 : model.titlePropertyName, item, i18nParams)));
3063
3181
  }
3064
- keys.push(`${model === null || model === void 0 ? void 0 : model.typeName}.name`);
3065
- return keys;
3066
- }
3067
- static getModelKeysByPriority(model, keyPath, customKey, fallbackKey) {
3068
- const keys = [];
3069
- if (customKey) {
3070
- keys.push(customKey);
3182
+ static populateParams(idProperty, titleProperty, item, params = {}) {
3183
+ const paramsRes = Object.assign(Object.assign({}, params), { itemId: '', itemTitle: '' });
3184
+ if (item) {
3185
+ if (idProperty && item[idProperty]) {
3186
+ paramsRes.itemId = item[idProperty];
3187
+ }
3188
+ if (titleProperty && item[titleProperty]) {
3189
+ paramsRes.itemTitle = item[titleProperty];
3190
+ }
3191
+ }
3192
+ return paramsRes;
3071
3193
  }
3072
- const modelActionKey = I18nUtil.getModelKeyPath(model, keyPath);
3073
- keys.push(modelActionKey);
3074
- if (fallbackKey) {
3075
- keys.push(fallbackKey);
3194
+ static getKeysByPriority(model, keyPath, customKey, fallbackKey) {
3195
+ const keys = [];
3196
+ if (customKey) {
3197
+ keys.push(customKey);
3198
+ }
3199
+ const modelActionKey = I18nUtils.Type.getPath(model.typeName, ...keyPath);
3200
+ keys.push(modelActionKey);
3201
+ if (fallbackKey) {
3202
+ keys.push(fallbackKey);
3203
+ }
3204
+ return keys;
3076
3205
  }
3077
- return keys;
3078
3206
  }
3079
- static getModelKeyPath(model, keyPath) {
3080
- return `${model.typeName}.${keyPath}`;
3081
- }
3082
- static getActionKeysByPriority(action, keyPath, customKey, fallbackKey) {
3083
- const keys = [];
3084
- if (customKey) {
3085
- keys.push(customKey);
3207
+ I18nUtils.Model = Model;
3208
+ class Action {
3209
+ static get(translate, action, actionPathKeys, customKey, item, fallbackKey, params) {
3210
+ const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);
3211
+ const i18nParams = I18nUtils.Action.getParams(translate, action, item, params);
3212
+ return I18nUtils.Common.get(translate, i18nParams, ...keys);
3213
+ }
3214
+ static getAsync(translate, action, actionPathKeys, customKey, item, fallbackKey, params) {
3215
+ return I18nUtils.Action.getParamsAsync(translate, action, item, params).pipe(mergeMap(i18nParams => {
3216
+ const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);
3217
+ return I18nUtils.Common.getAsync(translate, i18nParams, ...keys);
3218
+ }));
3086
3219
  }
3087
- const modelActionKey = `${action.i18nModelActionBaseKey}.${keyPath}`;
3088
- const actionKey = `${action.actionName}.${keyPath}`;
3089
- keys.push(modelActionKey, actionKey);
3090
- if (fallbackKey) {
3091
- keys.push(fallbackKey);
3220
+ static getTitleAsync(translate, action, item) {
3221
+ return I18nUtils.Action.getAsync(translate, action, 'title', undefined, item);
3092
3222
  }
3093
- return keys;
3094
- }
3095
- static selectKeyByPriority(keys, i18n) {
3096
- for (const key of keys) {
3097
- if (key !== i18n[key]) {
3098
- return i18n[key];
3223
+ static getEditorTitleAsync(translate, action, item) {
3224
+ var _a;
3225
+ return I18nUtils.Action.getAsync(translate, action, ['editor.title', 'title'], (_a = action.editorTitle) !== null && _a !== void 0 ? _a : undefined, item);
3226
+ }
3227
+ static getParams(translate, action, item, params = {}) {
3228
+ var _a;
3229
+ const modelI18nParams = I18nUtils.Model.getParams(translate, (_a = action.model) !== null && _a !== void 0 ? _a : undefined, item, params);
3230
+ return I18nUtils.Action.populateParams(modelI18nParams);
3231
+ }
3232
+ static getParamsAsync(translate, action, item, params = {}) {
3233
+ var _a;
3234
+ let modelI18nParams;
3235
+ return I18nUtils.Model.getParamsAsync(translate, (_a = action.model) !== null && _a !== void 0 ? _a : undefined, item, params).pipe(map(i18nParams => I18nUtils.Action.populateParams(modelI18nParams)));
3236
+ }
3237
+ static populateParams(params = {}) {
3238
+ params = Object.assign({}, params);
3239
+ return params;
3240
+ }
3241
+ static getKeysByPriority(action, actionPathKeys, customKey, fallbackKey) {
3242
+ const keys = [];
3243
+ if (customKey) {
3244
+ keys.push(customKey);
3245
+ }
3246
+ if (!Array.isArray(actionPathKeys)) {
3247
+ actionPathKeys = [actionPathKeys];
3099
3248
  }
3249
+ actionPathKeys.forEach(k => {
3250
+ const modelActionKey = `${action.i18nModelActionBaseKey}.${k}`;
3251
+ const actionKey = `${action.actionName}.${k}`;
3252
+ keys.push(modelActionKey, actionKey);
3253
+ });
3254
+ if (fallbackKey) {
3255
+ keys.push(fallbackKey);
3256
+ }
3257
+ return keys;
3100
3258
  }
3101
- return null;
3102
3259
  }
3103
- static getFunctionTitle(translate, functionTitle) {
3104
- if (functionTitle) {
3105
- const translation = translate.instant(`mngAction.functions.${functionTitle}.title`);
3106
- if (translation === functionTitle) {
3107
- return null;
3260
+ I18nUtils.Action = Action;
3261
+ class Error {
3262
+ static get(translate, error, params = {}) {
3263
+ const i18nParams = I18nUtils.Error.getParams(error, params);
3264
+ if (error.messageCode) {
3265
+ const keys = [`errors.${error.messageCode}`, `messages.${error.messageCode}`];
3266
+ const i18n = I18nUtils.Common.get(translate, i18nParams, ...keys);
3267
+ if (i18n) {
3268
+ return i18n;
3269
+ }
3108
3270
  }
3109
- return translation;
3271
+ return I18nUtils.Common.get(translate, i18nParams, error.message);
3110
3272
  }
3111
- else {
3112
- return null;
3273
+ static getParams(error, params = {}) {
3274
+ const paramsRes = Object.assign({}, params);
3275
+ paramsRes.errorStatus = '';
3276
+ paramsRes.errorMessage = '';
3277
+ if (error.status) {
3278
+ paramsRes.errorStatus = error.status;
3279
+ }
3280
+ if (error.message) {
3281
+ paramsRes.errorMessage = error.message;
3282
+ }
3283
+ if (error.statusDescription) {
3284
+ paramsRes.errorStatusDescription = error.statusDescription;
3285
+ }
3286
+ paramsRes.error = error;
3287
+ return paramsRes;
3113
3288
  }
3114
3289
  }
3115
- }
3290
+ I18nUtils.Error = Error;
3291
+ })(I18nUtils || (I18nUtils = {}));
3116
3292
 
3117
3293
  class ModelUtil {
3118
3294
  static findIdAttribute(classType) {
@@ -3188,7 +3364,7 @@ class NotificationUtil {
3188
3364
  }
3189
3365
  return notification;
3190
3366
  }
3191
- static tableNotificationError(translationService, table, error, viewContainer) {
3367
+ static tableNotificationError(translate, table, error, viewContainer) {
3192
3368
  var _a, _b;
3193
3369
  const params = {};
3194
3370
  if (error === null || error === void 0 ? void 0 : error.message) {
@@ -3197,122 +3373,33 @@ class NotificationUtil {
3197
3373
  else {
3198
3374
  params.errorMessage = '.';
3199
3375
  }
3200
- console.log(params);
3201
- const tableErrorTitle = (_a = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.title', undefined, undefined, 'general.error', params)) !== null && _a !== void 0 ? _a : undefined;
3202
- const tableErrorMessage = (_b = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.message', undefined, undefined, 'general.errorMessage', params)) !== null && _b !== void 0 ? _b : undefined;
3376
+ const tableErrorTitle = (_a = I18nUtils.Model.get(translate, table.model, 'table.error.title', undefined, undefined, 'general.error', params)) !== null && _a !== void 0 ? _a : undefined;
3377
+ const tableErrorMessage = (_b = I18nUtils.Model.get(translate, table.model, 'table.error.message', undefined, undefined, 'general.errorMessage', params)) !== null && _b !== void 0 ? _b : undefined;
3203
3378
  return NotificationUtil.notification(viewContainer, tableErrorTitle, tableErrorMessage, 'error');
3204
3379
  }
3205
- static actionNotificationSuccess(translationService, action, functionName, customTitleKey, customMessageKey, viewContainer, item) {
3380
+ static actionNotificationSuccess(translate, action, functionName, customTitleKey, customMessageKey, viewContainer, item) {
3206
3381
  var _a, _b;
3207
- const actionSuccessTitle = (_a = I18nUtil.instantActionTranslation(translationService, action, 'success.title', customTitleKey, item, 'general.success', functionName)) !== null && _a !== void 0 ? _a : undefined;
3208
- const actionSuccessMessage = (_b = I18nUtil.instantActionTranslation(translationService, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName)) !== null && _b !== void 0 ? _b : undefined;
3382
+ const actionSuccessTitle = (_a = I18nUtils.Action.get(translate, action, 'success.title', customTitleKey, item, 'general.success', functionName)) !== null && _a !== void 0 ? _a : undefined;
3383
+ const actionSuccessMessage = (_b = I18nUtils.Action.get(translate, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName)) !== null && _b !== void 0 ? _b : undefined;
3209
3384
  return NotificationUtil.notification(viewContainer, actionSuccessTitle, actionSuccessMessage);
3210
3385
  }
3211
- static actionNotificationError(translationService, action, error, functionName, viewContainer, item) {
3212
- var _a, _b;
3386
+ static actionNotificationError(translate, action, error, functionName, viewContainer, item, severity = 'error') {
3387
+ var _a, _b, _c;
3213
3388
  const params = {
3214
- errorMessage: I18nUtil.instantErrorI18nTranslation(translationService, error)
3389
+ errorMessage: (_a = I18nUtils.Error.get(translate, error)) !== null && _a !== void 0 ? _a : error.message
3215
3390
  };
3216
- const actionErrorTitle = (_a = I18nUtil.instantActionTranslation(translationService, action, 'error.title', action.runNotificationErrorTitle, item, 'general.error', functionName, params)) !== null && _a !== void 0 ? _a : undefined;
3217
- const actionErrorMessage = (_b = I18nUtil.instantActionTranslation(translationService, action, 'error.message', action.runNotificationErrorMessage, item, 'general.errorMessage', functionName, params)) !== null && _b !== void 0 ? _b : undefined;
3218
- return NotificationUtil.notification(viewContainer, actionErrorTitle, actionErrorMessage, 'error');
3391
+ const actionErrorTitle = (_b = I18nUtils.Action.get(translate, action, [`error.${functionName}.title`, 'error.title'], action.runNotificationErrorTitle, item, 'general.error', params)) !== null && _b !== void 0 ? _b : undefined;
3392
+ const actionErrorMessage = (_c = I18nUtils.Action.get(translate, action, [`error.${functionName}.message`, 'error.message'], action.runNotificationErrorMessage, item, 'general.errorMessage', params)) !== null && _c !== void 0 ? _c : undefined;
3393
+ return NotificationUtil.notification(viewContainer, actionErrorTitle, actionErrorMessage, severity);
3219
3394
  }
3220
- static getFormEditorWarningMessage(translationService, title, message) {
3395
+ static getFormEditorWarningMessage(translate, title, message) {
3221
3396
  var _a, _b;
3222
- const actionErrorTitle = (_a = translationService.instant(title)) !== null && _a !== void 0 ? _a : undefined;
3223
- const actionErrorMessage = (_b = translationService.instant(message)) !== null && _b !== void 0 ? _b : undefined;
3397
+ const actionErrorTitle = (_a = translate.instant(title)) !== null && _a !== void 0 ? _a : undefined;
3398
+ const actionErrorMessage = (_b = translate.instant(message)) !== null && _b !== void 0 ? _b : undefined;
3224
3399
  return { severity: 'warn', summary: actionErrorTitle, detail: actionErrorMessage };
3225
3400
  }
3226
3401
  }
3227
3402
 
3228
- const typeNameDecoratorPropertyName = 'typeName';
3229
- function TypeName(typeName) {
3230
- return function (target) {
3231
- target[typeNameDecoratorPropertyName] = typeName;
3232
- };
3233
- }
3234
- const enumNameDecoratorPropertyName = 'enumName';
3235
- function EnumName(typeName) {
3236
- return function (target) {
3237
- target[enumNameDecoratorPropertyName] = typeName;
3238
- };
3239
- }
3240
-
3241
- class TypeUtil {
3242
- /**
3243
- * Defines type name decorator.
3244
- * @param targetType class.
3245
- * @param typeName Name of the type.
3246
- */
3247
- static defineReflectTypeName(targetType, typeName) {
3248
- if (!typeName) {
3249
- typeName = TypeUtil.getDecoratorTypeName(targetType);
3250
- if (!typeName) {
3251
- console.warn(`Type name not provided for target ${targetType}, nor could be retrieved from decorator. Type name was not registered to reflect.`);
3252
- return;
3253
- }
3254
- }
3255
- if (!Reflect.hasOwnMetadata(typeNameDecoratorPropertyName, targetType)) {
3256
- Reflect.defineMetadata(typeNameDecoratorPropertyName, typeName, targetType);
3257
- }
3258
- }
3259
- /**
3260
- * Defines enum name decorator.
3261
- * @param targetType enum object.
3262
- * @param enumName Name of the enum.
3263
- */
3264
- static defineReflectEnumName(targetType, enumName) {
3265
- if (!Reflect.hasOwnMetadata(enumNameDecoratorPropertyName, targetType)) {
3266
- Reflect.defineMetadata(enumNameDecoratorPropertyName, enumName, targetType);
3267
- }
3268
- }
3269
- /**
3270
- * Gets type name from either decorator or reflect metadata.
3271
- * @param type Class.
3272
- */
3273
- static findTypeName(type) {
3274
- let decoratorName = TypeUtil.getDecoratorTypeName(type);
3275
- if (decoratorName) {
3276
- return decoratorName;
3277
- }
3278
- decoratorName = Reflect.getMetadata(typeNameDecoratorPropertyName, type);
3279
- if (decoratorName) {
3280
- return decoratorName;
3281
- }
3282
- return type.name;
3283
- }
3284
- /**
3285
- * Gets enum name from either decorator or reflect metadata.
3286
- * @param enumType Class.
3287
- */
3288
- static findEnumName(enumType) {
3289
- let decoratorName = TypeUtil.getDecoratorEnumName(enumType);
3290
- if (decoratorName) {
3291
- return decoratorName;
3292
- }
3293
- decoratorName = Reflect.getMetadata(enumNameDecoratorPropertyName, enumType);
3294
- if (decoratorName) {
3295
- return decoratorName;
3296
- }
3297
- throw new Error('Could not fined enum name');
3298
- }
3299
- /**
3300
- * Get value from decorator defined property name
3301
- * @param type Class.
3302
- */
3303
- // eslint-disable-next-line @typescript-eslint/ban-types
3304
- static getDecoratorTypeName(type) {
3305
- return type[typeNameDecoratorPropertyName];
3306
- }
3307
- /**
3308
- * Get value from decorator defined property name
3309
- * @param type Enum object.
3310
- */
3311
- static getDecoratorEnumName(type) {
3312
- return type[enumNameDecoratorPropertyName];
3313
- }
3314
- }
3315
-
3316
3403
  class ObjectSerializer {
3317
3404
  constructor() {
3318
3405
  this._primitives = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any'];
@@ -3854,7 +3941,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
3854
3941
 
3855
3942
  class MngI18nPropertyPipe {
3856
3943
  transform(property, model) {
3857
- return I18nUtil.getModelPropertyKey(model, property);
3944
+ return I18nUtils.Type.getPropertyKey(model.typeName, property);
3858
3945
  }
3859
3946
  }
3860
3947
  MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngI18nPropertyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
@@ -4018,24 +4105,20 @@ class MngActionExecutorService {
4018
4105
  rejectVisible: false
4019
4106
  };
4020
4107
  if (action.runConfirmationTitle !== null) {
4021
- confirmParams.header =
4022
- (_a = I18nUtil.instantActionTranslation(this.translate, action, 'confirm.title', action.runConfirmationTitle, item, 'general.confirmation')) !== null && _a !== void 0 ? _a : undefined;
4108
+ confirmParams.header = (_a = I18nUtils.Action.get(this.translate, action, 'confirm.title', action.runConfirmationTitle, item, 'general.confirmation')) !== null && _a !== void 0 ? _a : undefined;
4023
4109
  }
4024
4110
  if (action.runConfirmationMessage !== null) {
4025
- confirmParams.message =
4026
- (_b = I18nUtil.instantActionTranslation(this.translate, action, 'confirm.message', action.runConfirmationMessage, item, 'general.confirmation')) !== null && _b !== void 0 ? _b : undefined;
4111
+ confirmParams.message = (_b = I18nUtils.Action.get(this.translate, action, 'confirm.message', action.runConfirmationMessage, item, 'general.confirmation')) !== null && _b !== void 0 ? _b : undefined;
4027
4112
  }
4028
4113
  if (action.runConfirmationIcon !== null) {
4029
4114
  confirmParams.icon = action.runConfirmationIcon === undefined ? 'pi pi-exclamation-triangle' : action.runConfirmationIcon;
4030
4115
  }
4031
4116
  if (action.runConfirmationAcceptTitle !== null) {
4032
- confirmParams.acceptLabel =
4033
- (_c = I18nUtil.instantActionTranslation(this.translate, action, 'confirm.accept', action.runConfirmationAcceptTitle, item, 'general.yes')) !== null && _c !== void 0 ? _c : undefined;
4117
+ confirmParams.acceptLabel = (_c = I18nUtils.Action.get(this.translate, action, 'confirm.accept', action.runConfirmationAcceptTitle, item, 'general.yes')) !== null && _c !== void 0 ? _c : undefined;
4034
4118
  confirmParams.acceptVisible = true;
4035
4119
  }
4036
4120
  if (action.runConfirmationRejectTitle !== null) {
4037
- confirmParams.rejectLabel =
4038
- (_d = I18nUtil.instantActionTranslation(this.translate, action, 'confirm.reject', action.runConfirmationRejectTitle, item, 'general.no')) !== null && _d !== void 0 ? _d : undefined;
4121
+ confirmParams.rejectLabel = (_d = I18nUtils.Action.get(this.translate, action, 'confirm.reject', action.runConfirmationRejectTitle, item, 'general.no')) !== null && _d !== void 0 ? _d : undefined;
4039
4122
  confirmParams.rejectVisible = true;
4040
4123
  }
4041
4124
  const observable = new Observable(observer => {
@@ -4229,13 +4312,17 @@ class MngActionExecutorService {
4229
4312
  * @param action Action descriptor.
4230
4313
  * @param event Target table click event.
4231
4314
  * @param route Currently activate route.
4315
+ * @param tableDescriptor Table descriptor.
4316
+ * @param dataKeyProperty Data key property.
4232
4317
  */
4233
- triggerRowClickAction(action, event, route) {
4234
- if (!action.model.idPropertyName) {
4235
- throw new Error(`Row click action ${action.actionName} can not be triggered, because model id property name is not defined.`);
4318
+ triggerRowClickAction(action, event, route, tableDescriptor, dataKeyProperty) {
4319
+ var _a, _b, _c;
4320
+ const idProperty = (_c = (_a = dataKeyProperty !== null && dataKeyProperty !== void 0 ? dataKeyProperty : tableDescriptor === null || tableDescriptor === void 0 ? void 0 : tableDescriptor.dataKeyProperty) !== null && _a !== void 0 ? _a : (_b = action === null || action === void 0 ? void 0 : action.model) === null || _b === void 0 ? void 0 : _b.idPropertyName) !== null && _c !== void 0 ? _c : dataKeyProperty;
4321
+ if (!idProperty) {
4322
+ throw new Error(`Row click action ${action.actionName} can not be triggered, because id property could not be found.`);
4236
4323
  }
4237
4324
  const rowItem = event === null || event === void 0 ? void 0 : event.rowItem;
4238
- return this.triggerAction(action, rowItem[action.model.idPropertyName], event.rowItem, undefined, route);
4325
+ return this.triggerAction(action, rowItem[idProperty], event.rowItem, undefined, route);
4239
4326
  }
4240
4327
  /**
4241
4328
  * Triggers action with optional data (item, itemId, ...) and currently activated route.
@@ -4746,7 +4833,7 @@ class MngViewContainerComponentService {
4746
4833
  set dataProvider(dataProvider) {
4747
4834
  this._dataProvider = dataProvider;
4748
4835
  }
4749
- get reloadTable$() {
4836
+ get reloadTable() {
4750
4837
  return this._reloadTableSubject.asObservable();
4751
4838
  }
4752
4839
  triggerTableReload(event) {
@@ -4797,8 +4884,8 @@ class MngActionComponent {
4797
4884
  const context = this.actionExecutor.prepareActionExecContext(this.action, this.itemId, this.item, this.dataProvider, (_c = this.viewContainer) !== null && _c !== void 0 ? _c : undefined, this, this.actionData);
4798
4885
  this.$isVisible = typeof this.action.isVisibleFunction === 'function' ? this.action.isVisibleFunction(context) : of(true);
4799
4886
  this.$isEnabled = typeof this.action.isEnabledFunction === 'function' ? this.action.isEnabledFunction(context) : of(true);
4800
- this.$label = this.hasNoTitle ? of(null) : I18nUtil.streamActionTranslation(this.translate, this.action, 'title', (_e = (_d = this.action) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : undefined, this.item);
4801
- this.$tooltip = I18nUtil.streamActionTranslation(this.translate, this.action, 'tooltip', (_g = (_f = this.action) === null || _f === void 0 ? void 0 : _f.tooltip) !== null && _g !== void 0 ? _g : undefined, this.item);
4887
+ this.$label = this.hasNoTitle ? of(null) : I18nUtils.Action.getAsync(this.translate, this.action, 'title', (_e = (_d = this.action) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : undefined, this.item);
4888
+ this.$tooltip = I18nUtils.Action.getAsync(this.translate, this.action, 'tooltip', (_g = (_f = this.action) === null || _f === void 0 ? void 0 : _f.tooltip) !== null && _g !== void 0 ? _g : undefined, this.item);
4802
4889
  if (this.action instanceof ActionLinkDescriptor) {
4803
4890
  this.actionLink = this.action;
4804
4891
  }
@@ -5825,11 +5912,7 @@ class MngActionEditorComponent {
5825
5912
  }
5826
5913
  return;
5827
5914
  }
5828
- const subscription = I18nUtil.streamActionTranslation(this.translate, this.action, 'editor.title', this.action.editorTitle, this.item)
5829
- .pipe(mergeMap(i18nDialogTitle => i18nDialogTitle === null
5830
- ? I18nUtil.getActionTranslation(this.translate, this.action, 'title', undefined, this.item)
5831
- : of(i18nDialogTitle)))
5832
- .subscribe(t => {
5915
+ const subscription = I18nUtils.Action.getEditorTitleAsync(this.translate, this.action, this.item).subscribe(t => {
5833
5916
  this.title = t !== null && t !== void 0 ? t : undefined;
5834
5917
  if (this.dialogConfig) {
5835
5918
  requestAnimationFrame(() => {
@@ -6100,6 +6183,8 @@ class MngTableComponent {
6100
6183
  this.subscriptions = [];
6101
6184
  }
6102
6185
  ngOnInit() {
6186
+ var _a, _b;
6187
+ this.viewContainer = (_b = (_a = this.viewContainerInit) !== null && _a !== void 0 ? _a : this.viewContainerService) !== null && _b !== void 0 ? _b : undefined;
6103
6188
  this.filterDescriptors = this.descriptor.columns.filter(c => typeof c.filterDescriptor !== 'undefined').map(c => c.filterDescriptor);
6104
6189
  if (this.descriptor.paginationMode === PaginationModeEnum.InfiniteScroll) {
6105
6190
  this.infiniteScroll = true;
@@ -6246,8 +6331,7 @@ class MngTableComponent {
6246
6331
  this.isSortChanged = false;
6247
6332
  this.dataProviderLoadingSubject.next(false);
6248
6333
  }, err => {
6249
- var _a;
6250
- NotificationUtil.tableNotificationError(this.translate, this.descriptor, err, (_a = this.viewContainerService) !== null && _a !== void 0 ? _a : undefined);
6334
+ NotificationUtil.tableNotificationError(this.translate, this.descriptor, err, this.viewContainer);
6251
6335
  const emptyQueryResult = new MediusQueryResult();
6252
6336
  emptyQueryResult.pageData = [];
6253
6337
  emptyQueryResult.allDataCount = 0;
@@ -6315,7 +6399,7 @@ class MngTableComponent {
6315
6399
  }
6316
6400
  }
6317
6401
  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: i1$1.TranslateService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
6318
- 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", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", isColumnClickable: "isColumnClickable", captionComponent: "captionComponent", columnActionComponent: "columnActionComponent" }, 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 }], 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 [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\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\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\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=\"width: 2.25em\"></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.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=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\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=\"width: 2.25em\"></th>\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 || columnActionComponent\"></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 && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\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 || columnActionComponent ? 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 || columnActionComponent ? 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$5.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$5.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$5.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$5.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6402
+ 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", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent" }, 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 }], 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 [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\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\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\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=\"width: 2.25em\"></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.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=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\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=\"width: 2.25em\"></th>\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 || columnActionComponent\"></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 && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\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 || columnActionComponent ? 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 || columnActionComponent ? 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$5.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$5.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$5.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$5.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6319
6403
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, decorators: [{
6320
6404
  type: Component,
6321
6405
  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 [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\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\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\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=\"width: 2.25em\"></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.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=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\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=\"width: 2.25em\"></th>\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 || columnActionComponent\"></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 && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\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 || columnActionComponent ? 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 || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
@@ -6341,6 +6425,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
6341
6425
  type: Input
6342
6426
  }], isColumnClickable: [{
6343
6427
  type: Input
6428
+ }], viewContainerInit: [{
6429
+ type: Input,
6430
+ args: ['viewContainer']
6344
6431
  }], captionComponent: [{
6345
6432
  type: Input
6346
6433
  }], columnActionComponent: [{
@@ -6393,7 +6480,7 @@ class MngTableviewComponent {
6393
6480
  if (this.dataProvider) {
6394
6481
  this.viewContainerService.dataProvider = this.dataProvider;
6395
6482
  }
6396
- const reloadTableSubscription = this.viewContainerService.reloadTable$.subscribe(() => {
6483
+ const reloadTableSubscription = this.viewContainerService.reloadTable.subscribe(() => {
6397
6484
  this.reloadTable();
6398
6485
  });
6399
6486
  this.subscriptions.push(reloadTableSubscription);
@@ -6431,13 +6518,13 @@ class MngTableviewComponent {
6431
6518
  onTableCellClick(event) {
6432
6519
  if (this.rowClickActions.length) {
6433
6520
  for (const action of this.rowClickActions) {
6434
- this.actionExecutor.triggerRowClickAction(action, event, this.route);
6521
+ this.actionExecutor.triggerRowClickAction(action, event, this.route, this.descriptor.table);
6435
6522
  }
6436
6523
  }
6437
6524
  }
6438
6525
  }
6439
6526
  MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.MessageService }, { token: i1$1.TranslateService }, { token: i3.DialogService }, { token: i2.ConfirmationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService }], target: i0.ɵɵFactoryTarget.Component });
6440
- MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableviewComponent, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowClickActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\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 </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", components: [{ type: i6$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "translate": i1$1.TranslatePipe } });
6527
+ MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableviewComponent, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowClickActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\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 </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", components: [{ type: i6$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "translate": i1$1.TranslatePipe } });
6441
6528
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, decorators: [{
6442
6529
  type: Component,
6443
6530
  args: [{ selector: 'mng-tableview', providers: [MessageService, ConfirmationService, MngViewContainerComponentService], template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowClickActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\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 </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
@@ -6692,7 +6779,7 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
6692
6779
  }
6693
6780
  }
6694
6781
  MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
6695
- MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldLookupDialogComponent, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl?.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: i1$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.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: i10.InputText, selector: "[pInputText]" }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6782
+ MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldLookupDialogComponent, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl?.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: i1$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.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: i10.InputText, selector: "[pInputText]" }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6696
6783
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
6697
6784
  type: Component,
6698
6785
  args: [{ selector: 'mng-formly-field-lookup-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl?.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
@@ -6847,7 +6934,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
6847
6934
  }
6848
6935
  }
6849
6936
  MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: MngActionExecutorService }], target: i0.ɵɵFactoryTarget.Component });
6850
- MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6937
+ MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6851
6938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
6852
6939
  type: Component,
6853
6940
  args: [{ selector: 'mng-formly-table-dialog-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
@@ -6961,7 +7048,7 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
6961
7048
  }
6962
7049
  }
6963
7050
  MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
6964
- MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
7051
+ MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6965
7052
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
6966
7053
  type: Component,
6967
7054
  args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
@@ -8696,5 +8783,5 @@ class RouteDataBuilder {
8696
8783
  * Generated bundle index. Do not edit.
8697
8784
  */
8698
8785
 
8699
- export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionLinkDescriptor, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtil, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngLinkFormatterPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, RouteBuilder, RouteDataBuilder, RoutesBuilder, TableDataProvider, TableDescriptor, TableviewDataProvider, TableviewDescriptor, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
8786
+ export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionLinkDescriptor, ActionPositionEnum, ActionRunResult, ActionSimpleDescriptor, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtils, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngLinkFormatterPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, RouteBuilder, RouteDataBuilder, RoutesBuilder, TableDataProvider, TableDescriptor, TableviewDataProvider, TableviewDescriptor, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
8700
8787
  //# sourceMappingURL=mediusinc-mng-commons.mjs.map