@mediusinc/mng-commons 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/api/utils/object-serializer.util.mjs +2 -2
- package/esm2020/lib/descriptors/action.descriptor.mjs +18 -8
- package/esm2020/lib/descriptors/editor.descriptor.mjs +5 -5
- package/esm2020/lib/descriptors/field.descriptor.mjs +2 -2
- package/esm2020/lib/descriptors/model.descriptor.mjs +13 -2
- package/esm2020/lib/descriptors/table.descriptor.mjs +3 -3
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +8 -8
- package/esm2020/lib/pipes/i18n-property.pipe.mjs +2 -2
- package/esm2020/lib/types/type.decorator.mjs +11 -1
- package/esm2020/lib/utils/i18n.util.mjs +6 -6
- package/esm2020/lib/utils/model.util.mjs +10 -1
- package/esm2020/lib/utils/type.util.mjs +47 -11
- package/fesm2015/mediusinc-mng-commons.mjs +116 -41
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +115 -40
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/descriptors/action.descriptor.d.ts +4 -2
- package/lib/descriptors/editor.descriptor.d.ts +1 -1
- package/lib/descriptors/model.descriptor.d.ts +4 -1
- package/lib/descriptors/table.descriptor.d.ts +1 -1
- package/lib/descriptors/tableview.descriptor.d.ts +1 -1
- package/lib/types/type.decorator.d.ts +2 -0
- package/lib/utils/type.util.d.ts +27 -3
- package/package.json +1 -1
- package/version-info.json +5 -5
|
@@ -1524,11 +1524,7 @@ class ActionDescriptor {
|
|
|
1524
1524
|
this._parentType = parentType;
|
|
1525
1525
|
this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;
|
|
1526
1526
|
this._parentProperty = parentProperty;
|
|
1527
|
-
|
|
1528
|
-
this._i18nModelActionBaseKey = this._parentTypeName
|
|
1529
|
-
? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`
|
|
1530
|
-
: `${this._model.typeName}.actions.${actionName}`;
|
|
1531
|
-
}
|
|
1527
|
+
this.setI18nModelActionBaseKey();
|
|
1532
1528
|
let displayName = actionName;
|
|
1533
1529
|
if (this._model)
|
|
1534
1530
|
displayName = `${this._model.typeName}.${displayName}`;
|
|
@@ -1636,6 +1632,13 @@ class ActionDescriptor {
|
|
|
1636
1632
|
get positionTableviewCategories() {
|
|
1637
1633
|
return this._positionTableviewCategories;
|
|
1638
1634
|
}
|
|
1635
|
+
setI18nModelActionBaseKey(base) {
|
|
1636
|
+
if (this._parentTypeName || this._model) {
|
|
1637
|
+
this._i18nModelActionBaseKey = this._parentTypeName
|
|
1638
|
+
? `${this._parentTypeName}.actions.${this._parentProperty}_${this._actionName}`
|
|
1639
|
+
: `${base !== null && base !== void 0 ? base : this._model.i18nBaseKey}.actions.${this._actionName}`;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1639
1642
|
withDataProvider(dataProvider) {
|
|
1640
1643
|
this._dataProvider = dataProvider;
|
|
1641
1644
|
return this;
|
|
@@ -1735,10 +1738,17 @@ class ActionDescriptor {
|
|
|
1735
1738
|
this._positionTableviewCategories = positionTableviewCategories;
|
|
1736
1739
|
return this;
|
|
1737
1740
|
}
|
|
1741
|
+
withI18nBase(base) {
|
|
1742
|
+
if (typeof base !== 'string') {
|
|
1743
|
+
base = TypeUtil.findTypeName(base);
|
|
1744
|
+
}
|
|
1745
|
+
this.setI18nModelActionBaseKey(base);
|
|
1746
|
+
return this;
|
|
1747
|
+
}
|
|
1738
1748
|
}
|
|
1739
1749
|
class ActionSimpleDescriptor extends ActionDescriptor {
|
|
1740
|
-
constructor(actionName, modelType, idProperty, titleProperty) {
|
|
1741
|
-
const model = modelType ? new ModelDescriptor(modelType, idProperty, titleProperty) : null;
|
|
1750
|
+
constructor(actionName, modelType, idProperty, titleProperty, i18nBaseKey) {
|
|
1751
|
+
const model = modelType ? new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey) : null;
|
|
1742
1752
|
super(model, actionName);
|
|
1743
1753
|
}
|
|
1744
1754
|
}
|
|
@@ -2867,13 +2877,13 @@ class ColumnDynamicDescriptor extends ColumnDescriptor {
|
|
|
2867
2877
|
}
|
|
2868
2878
|
|
|
2869
2879
|
class EditorDescriptor {
|
|
2870
|
-
constructor(modelType, idProperty, titleProperty, tableviewEditorType = TableviewEditorTypeEnum.None) {
|
|
2880
|
+
constructor(modelType, idProperty, titleProperty, tableviewEditorType = TableviewEditorTypeEnum.None, i18nBaseKey) {
|
|
2871
2881
|
this._tabs = [];
|
|
2872
2882
|
this._groups = [];
|
|
2873
2883
|
this._fields = [];
|
|
2874
2884
|
this._disabled = false;
|
|
2875
2885
|
this._modelType = modelType;
|
|
2876
|
-
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
2886
|
+
this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
|
|
2877
2887
|
this._tableviewEditorType = tableviewEditorType;
|
|
2878
2888
|
}
|
|
2879
2889
|
/**
|
|
@@ -2918,7 +2928,7 @@ class EditorDescriptor {
|
|
|
2918
2928
|
createTabGroup(name, title) {
|
|
2919
2929
|
const tabGroup = new FieldTabGroupDescriptor(this, name);
|
|
2920
2930
|
if (!title) {
|
|
2921
|
-
title = I18nUtils.Type.getTabKey(this.model.
|
|
2931
|
+
title = I18nUtils.Type.getTabKey(this.model.i18nBaseKey, name);
|
|
2922
2932
|
}
|
|
2923
2933
|
tabGroup.withTitle(title);
|
|
2924
2934
|
this.createTabGroupDescriptor(tabGroup);
|
|
@@ -2928,7 +2938,7 @@ class EditorDescriptor {
|
|
|
2928
2938
|
const fieldGroup = new FieldGroupDescriptor(this, name);
|
|
2929
2939
|
if (title !== null) {
|
|
2930
2940
|
if (!title) {
|
|
2931
|
-
title = I18nUtils.Type.getGroupKey(this.model.
|
|
2941
|
+
title = I18nUtils.Type.getGroupKey(this.model.i18nBaseKey, name);
|
|
2932
2942
|
}
|
|
2933
2943
|
fieldGroup.withTitle(title);
|
|
2934
2944
|
}
|
|
@@ -3176,7 +3186,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
3176
3186
|
this._size = FieldSizeEnum.Normal;
|
|
3177
3187
|
this._eventsSubject = new Subject();
|
|
3178
3188
|
this._property = property;
|
|
3179
|
-
this._label = I18nUtils.Type.getPropertyKey(this._editor.model.
|
|
3189
|
+
this._label = I18nUtils.Type.getPropertyKey(this._editor.model.i18nBaseKey, property);
|
|
3180
3190
|
}
|
|
3181
3191
|
get property() {
|
|
3182
3192
|
return this._property;
|
|
@@ -4026,12 +4036,13 @@ class FieldValidationDescriptor {
|
|
|
4026
4036
|
}
|
|
4027
4037
|
|
|
4028
4038
|
class ModelDescriptor {
|
|
4029
|
-
constructor(modelType, idProperty, titleProperty) {
|
|
4030
|
-
var _a, _b;
|
|
4039
|
+
constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
|
|
4040
|
+
var _a, _b, _c;
|
|
4031
4041
|
this._type = modelType;
|
|
4032
4042
|
this._idPropertyName = (_a = idProperty !== null && idProperty !== void 0 ? idProperty : ModelUtil.findIdAttribute(modelType)) !== null && _a !== void 0 ? _a : undefined;
|
|
4033
4043
|
this._titlePropertyName = (_b = titleProperty !== null && titleProperty !== void 0 ? titleProperty : ModelUtil.findTitleAttribute(modelType)) !== null && _b !== void 0 ? _b : undefined;
|
|
4034
4044
|
this._typeName = TypeUtil.findTypeName(this._type);
|
|
4045
|
+
this._i18nBaseKey = (_c = (typeof i18nBaseKey === 'string' || typeof i18nBaseKey === 'undefined' ? i18nBaseKey : TypeUtil.findTypeName(i18nBaseKey))) !== null && _c !== void 0 ? _c : this._typeName;
|
|
4035
4046
|
}
|
|
4036
4047
|
get type() {
|
|
4037
4048
|
return this._type;
|
|
@@ -4039,6 +4050,9 @@ class ModelDescriptor {
|
|
|
4039
4050
|
get typeName() {
|
|
4040
4051
|
return this._typeName;
|
|
4041
4052
|
}
|
|
4053
|
+
get i18nBaseKey() {
|
|
4054
|
+
return this._i18nBaseKey;
|
|
4055
|
+
}
|
|
4042
4056
|
get idPropertyName() {
|
|
4043
4057
|
return this._idPropertyName;
|
|
4044
4058
|
}
|
|
@@ -4053,6 +4067,13 @@ class ModelDescriptor {
|
|
|
4053
4067
|
this._titlePropertyName = titleProperty;
|
|
4054
4068
|
return this;
|
|
4055
4069
|
}
|
|
4070
|
+
withI18nBase(base) {
|
|
4071
|
+
if (typeof base !== 'string') {
|
|
4072
|
+
base = TypeUtil.findTypeName(base);
|
|
4073
|
+
}
|
|
4074
|
+
this._i18nBaseKey = base;
|
|
4075
|
+
return this;
|
|
4076
|
+
}
|
|
4056
4077
|
copy() {
|
|
4057
4078
|
const model = new ModelDescriptor(this._type, this._idPropertyName, this._titlePropertyName);
|
|
4058
4079
|
return model;
|
|
@@ -4060,7 +4081,7 @@ class ModelDescriptor {
|
|
|
4060
4081
|
}
|
|
4061
4082
|
|
|
4062
4083
|
class TableDescriptor {
|
|
4063
|
-
constructor(modelType, idProperty, titleProperty) {
|
|
4084
|
+
constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
|
|
4064
4085
|
var _a;
|
|
4065
4086
|
this._filterDisplay = TableFilterDisplayEnum.Menu;
|
|
4066
4087
|
this._paginationMode = TablePaginationModeEnum.Pagination;
|
|
@@ -4078,7 +4099,7 @@ class TableDescriptor {
|
|
|
4078
4099
|
this._hasGridlines = false;
|
|
4079
4100
|
this._autoGenerated = false;
|
|
4080
4101
|
this._modelType = modelType;
|
|
4081
|
-
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
4102
|
+
this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
|
|
4082
4103
|
this._dataKeyProperty = (_a = idProperty !== null && idProperty !== void 0 ? idProperty : ModelUtil.findIdAttribute(modelType)) !== null && _a !== void 0 ? _a : undefined;
|
|
4083
4104
|
}
|
|
4084
4105
|
/**
|
|
@@ -4521,15 +4542,15 @@ class TableDynamicDescriptor extends TableDescriptor {
|
|
|
4521
4542
|
}
|
|
4522
4543
|
|
|
4523
4544
|
class TableviewDescriptor {
|
|
4524
|
-
constructor(modelType, idProperty, titleProperty) {
|
|
4545
|
+
constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
|
|
4525
4546
|
this._modelType = modelType;
|
|
4526
|
-
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
4527
|
-
this._table = new TableDescriptor(modelType, idProperty, titleProperty);
|
|
4528
|
-
this._detailsEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Details);
|
|
4547
|
+
this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
|
|
4548
|
+
this._table = new TableDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
|
|
4549
|
+
this._detailsEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Details, i18nBaseKey);
|
|
4529
4550
|
this._detailsEditor.withDisabled();
|
|
4530
|
-
this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add);
|
|
4531
|
-
this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit);
|
|
4532
|
-
this._tableTitle = `${this._model.
|
|
4551
|
+
this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add, i18nBaseKey);
|
|
4552
|
+
this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit, i18nBaseKey);
|
|
4553
|
+
this._tableTitle = `${this._model.i18nBaseKey}.name`;
|
|
4533
4554
|
}
|
|
4534
4555
|
/**
|
|
4535
4556
|
* generates descriptor from attribute definition of openaapi model
|
|
@@ -5162,8 +5183,8 @@ class TypeUtil {
|
|
|
5162
5183
|
* @param typeName Name of the type.
|
|
5163
5184
|
*/
|
|
5164
5185
|
static defineReflectTypeName(targetType, typeName) {
|
|
5165
|
-
if (!Reflect.hasOwnMetadata(TypeUtil.
|
|
5166
|
-
Reflect.defineMetadata(TypeUtil.
|
|
5186
|
+
if (!Reflect.hasOwnMetadata(TypeUtil.reflectTypeNameKey, targetType)) {
|
|
5187
|
+
Reflect.defineMetadata(TypeUtil.reflectTypeNameKey, typeName, targetType);
|
|
5167
5188
|
}
|
|
5168
5189
|
}
|
|
5169
5190
|
/**
|
|
@@ -5172,16 +5193,36 @@ class TypeUtil {
|
|
|
5172
5193
|
* @param enumName Name of the enum.
|
|
5173
5194
|
*/
|
|
5174
5195
|
static defineReflectEnumName(targetType, enumName) {
|
|
5175
|
-
if (!Reflect.hasOwnMetadata(TypeUtil.
|
|
5176
|
-
Reflect.defineMetadata(TypeUtil.
|
|
5196
|
+
if (!Reflect.hasOwnMetadata(TypeUtil.reflectEnumNameKey, targetType)) {
|
|
5197
|
+
Reflect.defineMetadata(TypeUtil.reflectEnumNameKey, enumName, targetType);
|
|
5177
5198
|
}
|
|
5178
5199
|
}
|
|
5179
5200
|
/**
|
|
5180
|
-
*
|
|
5201
|
+
* Defines type's id property.
|
|
5202
|
+
* @param targetType class.
|
|
5203
|
+
* @param typeName Name of the type.
|
|
5204
|
+
*/
|
|
5205
|
+
static defineReflectTypeIdProperty(targetType, idProperty) {
|
|
5206
|
+
if (!Reflect.hasOwnMetadata(TypeUtil.reflectTypeIdPropertyKey, targetType)) {
|
|
5207
|
+
Reflect.defineMetadata(TypeUtil.reflectTypeIdPropertyKey, idProperty, targetType);
|
|
5208
|
+
}
|
|
5209
|
+
}
|
|
5210
|
+
/**
|
|
5211
|
+
* Defines type's id property.
|
|
5212
|
+
* @param targetType class.
|
|
5213
|
+
* @param typeName Name of the type.
|
|
5214
|
+
*/
|
|
5215
|
+
static defineReflectTypeTitleProperty(targetType, titleProperty) {
|
|
5216
|
+
if (!Reflect.hasOwnMetadata(TypeUtil.reflectTypeTitlePropertyKey, targetType)) {
|
|
5217
|
+
Reflect.defineMetadata(TypeUtil.reflectTypeTitlePropertyKey, titleProperty, targetType);
|
|
5218
|
+
}
|
|
5219
|
+
}
|
|
5220
|
+
/**
|
|
5221
|
+
* Gets type name from reflect metadata.
|
|
5181
5222
|
* @param type Class.
|
|
5182
5223
|
*/
|
|
5183
5224
|
static findTypeName(type) {
|
|
5184
|
-
const typeName = Reflect.getMetadata(TypeUtil.
|
|
5225
|
+
const typeName = Reflect.getMetadata(TypeUtil.reflectTypeNameKey, type);
|
|
5185
5226
|
if (typeName) {
|
|
5186
5227
|
return typeName;
|
|
5187
5228
|
}
|
|
@@ -5193,23 +5234,39 @@ class TypeUtil {
|
|
|
5193
5234
|
* @param type Class.
|
|
5194
5235
|
*/
|
|
5195
5236
|
static typeNameExists(type) {
|
|
5196
|
-
return Reflect.hasOwnMetadata(TypeUtil.
|
|
5237
|
+
return Reflect.hasOwnMetadata(TypeUtil.reflectTypeNameKey, type);
|
|
5197
5238
|
}
|
|
5198
5239
|
/**
|
|
5199
5240
|
* Gets enum name from either decorator or reflect metadata.
|
|
5200
5241
|
* @param enumType Class.
|
|
5201
5242
|
*/
|
|
5202
5243
|
static findEnumName(enumType) {
|
|
5203
|
-
const enumName = Reflect.getMetadata(TypeUtil.
|
|
5244
|
+
const enumName = Reflect.getMetadata(TypeUtil.reflectEnumNameKey, enumType);
|
|
5204
5245
|
if (enumName) {
|
|
5205
5246
|
return enumName;
|
|
5206
5247
|
}
|
|
5207
5248
|
console.warn('Reflect metadata could not be found for enum, you might experience some issues in production build.', enumType);
|
|
5208
5249
|
throw new Error('Could not fined enum name');
|
|
5209
5250
|
}
|
|
5251
|
+
/**
|
|
5252
|
+
* Gets type's id property from reflect metadata.
|
|
5253
|
+
* @param type Class.
|
|
5254
|
+
*/
|
|
5255
|
+
static findTypeIdProperty(type) {
|
|
5256
|
+
return Reflect.getMetadata(TypeUtil.reflectTypeIdPropertyKey, type);
|
|
5257
|
+
}
|
|
5258
|
+
/**
|
|
5259
|
+
* Gets type's title property from reflect metadata.
|
|
5260
|
+
* @param type Class.
|
|
5261
|
+
*/
|
|
5262
|
+
static findTypeTitleProperty(type) {
|
|
5263
|
+
return Reflect.getMetadata(TypeUtil.reflectTypeTitlePropertyKey, type);
|
|
5264
|
+
}
|
|
5210
5265
|
}
|
|
5211
|
-
TypeUtil.
|
|
5212
|
-
TypeUtil.
|
|
5266
|
+
TypeUtil.reflectTypeNameKey = 'typeName';
|
|
5267
|
+
TypeUtil.reflectTypeIdPropertyKey = 'typeIdProperty';
|
|
5268
|
+
TypeUtil.reflectTypeTitlePropertyKey = 'typeTitleProperty';
|
|
5269
|
+
TypeUtil.reflectEnumNameKey = 'enumName';
|
|
5213
5270
|
|
|
5214
5271
|
var I18nUtils;
|
|
5215
5272
|
(function (I18nUtils) {
|
|
@@ -5322,17 +5379,17 @@ var I18nUtils;
|
|
|
5322
5379
|
return I18nUtils.Common.get(translate, i18nParams, ...keys);
|
|
5323
5380
|
}
|
|
5324
5381
|
static getName(translate, model, singular) {
|
|
5325
|
-
return I18nUtils.Type.getName(translate, model.
|
|
5382
|
+
return I18nUtils.Type.getName(translate, model.i18nBaseKey, singular);
|
|
5326
5383
|
}
|
|
5327
5384
|
static getNameAsync(translate, model, singular) {
|
|
5328
|
-
return I18nUtils.Type.getNameAsync(translate, model.
|
|
5385
|
+
return I18nUtils.Type.getNameAsync(translate, model.i18nBaseKey, singular);
|
|
5329
5386
|
}
|
|
5330
5387
|
static getParams(translate, model, item, params = {}) {
|
|
5331
|
-
const i18nParams = I18nUtils.Type.getParams(translate, model === null || model === void 0 ? void 0 : model.
|
|
5388
|
+
const i18nParams = I18nUtils.Type.getParams(translate, model === null || model === void 0 ? void 0 : model.i18nBaseKey, item, params);
|
|
5332
5389
|
return I18nUtils.Model.populateParams(model === null || model === void 0 ? void 0 : model.idPropertyName, model === null || model === void 0 ? void 0 : model.titlePropertyName, item, i18nParams);
|
|
5333
5390
|
}
|
|
5334
5391
|
static getParamsAsync(translate, model, item, params = {}) {
|
|
5335
|
-
return I18nUtils.Type.getParamsAsync(translate, model === null || model === void 0 ? void 0 : model.
|
|
5392
|
+
return I18nUtils.Type.getParamsAsync(translate, model === null || model === void 0 ? void 0 : model.i18nBaseKey, 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)));
|
|
5336
5393
|
}
|
|
5337
5394
|
static populateParams(idProperty, titleProperty, item, params = {}) {
|
|
5338
5395
|
const paramsRes = Object.assign(Object.assign({}, params), { itemId: '', itemTitle: '' });
|
|
@@ -5351,7 +5408,7 @@ var I18nUtils;
|
|
|
5351
5408
|
if (customKey) {
|
|
5352
5409
|
keys.push(customKey);
|
|
5353
5410
|
}
|
|
5354
|
-
const modelActionKey = I18nUtils.Type.getPath(model.
|
|
5411
|
+
const modelActionKey = I18nUtils.Type.getPath(model.i18nBaseKey, ...keyPath);
|
|
5355
5412
|
keys.push(modelActionKey);
|
|
5356
5413
|
if (fallbackKey) {
|
|
5357
5414
|
keys.push(fallbackKey);
|
|
@@ -5447,6 +5504,10 @@ var I18nUtils;
|
|
|
5447
5504
|
class ModelUtil {
|
|
5448
5505
|
static findIdAttribute(classType) {
|
|
5449
5506
|
var _a;
|
|
5507
|
+
const typeIdProp = TypeUtil.findTypeIdProperty(classType);
|
|
5508
|
+
if (typeIdProp) {
|
|
5509
|
+
return typeIdProp;
|
|
5510
|
+
}
|
|
5450
5511
|
const objSerializer = ObjectSerializer.get();
|
|
5451
5512
|
const attributes = objSerializer.findAttributesDefinitionByClassType(classType);
|
|
5452
5513
|
if (!attributes) {
|
|
@@ -5461,6 +5522,10 @@ class ModelUtil {
|
|
|
5461
5522
|
}
|
|
5462
5523
|
static findTitleAttribute(classType) {
|
|
5463
5524
|
var _a;
|
|
5525
|
+
const typeTitleProp = TypeUtil.findTypeTitleProperty(classType);
|
|
5526
|
+
if (typeTitleProp) {
|
|
5527
|
+
return typeTitleProp;
|
|
5528
|
+
}
|
|
5464
5529
|
const objSerializer = ObjectSerializer.get();
|
|
5465
5530
|
const attributes = objSerializer.findAttributesDefinitionByClassType(classType);
|
|
5466
5531
|
if (!attributes) {
|
|
@@ -5622,7 +5687,7 @@ class ObjectSerializer {
|
|
|
5622
5687
|
}
|
|
5623
5688
|
findAttributesDefinition(typeName) {
|
|
5624
5689
|
const typeDef = this.findType(typeName);
|
|
5625
|
-
if (!typeDef) {
|
|
5690
|
+
if (!typeDef || typeof typeDef.getAttributeTypeMap !== 'function') {
|
|
5626
5691
|
return null;
|
|
5627
5692
|
}
|
|
5628
5693
|
return typeDef.getAttributeTypeMap();
|
|
@@ -6540,7 +6605,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
6540
6605
|
|
|
6541
6606
|
class MngI18nPropertyPipe {
|
|
6542
6607
|
transform(property, model) {
|
|
6543
|
-
return I18nUtils.Type.getPropertyKey(model.
|
|
6608
|
+
return I18nUtils.Type.getPropertyKey(model.i18nBaseKey, property);
|
|
6544
6609
|
}
|
|
6545
6610
|
}
|
|
6546
6611
|
MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MngI18nPropertyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -12841,6 +12906,16 @@ function TypeName(typeName) {
|
|
|
12841
12906
|
TypeUtil.defineReflectTypeName(target, typeName);
|
|
12842
12907
|
};
|
|
12843
12908
|
}
|
|
12909
|
+
function IdProperty() {
|
|
12910
|
+
return function (target, prop) {
|
|
12911
|
+
TypeUtil.defineReflectTypeIdProperty(target, prop);
|
|
12912
|
+
};
|
|
12913
|
+
}
|
|
12914
|
+
function TitleProperty() {
|
|
12915
|
+
return function (target, prop) {
|
|
12916
|
+
TypeUtil.defineReflectTypeTitleProperty(target, prop);
|
|
12917
|
+
};
|
|
12918
|
+
}
|
|
12844
12919
|
function EnumName(typeName) {
|
|
12845
12920
|
return function (target) {
|
|
12846
12921
|
TypeUtil.defineReflectEnumName(target, typeName);
|
|
@@ -12855,5 +12930,5 @@ function EnumName(typeName) {
|
|
|
12855
12930
|
* Generated bundle index. Do not edit.
|
|
12856
12931
|
*/
|
|
12857
12932
|
|
|
12858
|
-
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase };
|
|
12933
|
+
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TitleProperty, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase };
|
|
12859
12934
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|