@mediusinc/mng-commons 0.3.3 → 0.4.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/assets/i18n/en.json +4 -1
- package/assets/i18n/sl.json +4 -1
- package/esm2020/lib/api/models/builders/query-param.builder.mjs +7 -2
- package/esm2020/lib/api/services/api.abstract.service.mjs +21 -10
- package/esm2020/lib/api/utils/object-serializer.util.mjs +7 -1
- package/esm2020/lib/components/action/action.component.mjs +3 -3
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
- package/esm2020/lib/components/layout/main-layout.component.mjs +1 -1
- package/esm2020/lib/components/layout/topbar.component.mjs +1 -1
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +17 -5
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -10
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +21 -7
- package/esm2020/lib/components/tableview/table/table.component.mjs +3 -3
- package/esm2020/lib/components/tableview/tableview.component.mjs +3 -3
- package/esm2020/lib/descriptors/column.descriptor.mjs +197 -0
- package/esm2020/lib/descriptors/editor.descriptor.mjs +3 -755
- package/esm2020/lib/descriptors/field.descriptor.interface.mjs +2 -0
- package/esm2020/lib/descriptors/field.descriptor.mjs +755 -0
- package/esm2020/lib/descriptors/filter.descriptor.mjs +237 -0
- package/esm2020/lib/descriptors/index.mjs +5 -1
- package/esm2020/lib/descriptors/table.descriptor.mjs +4 -403
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +3 -3
- package/esm2020/lib/directives/component.directive.mjs +18 -2
- package/esm2020/lib/mng-commons.module.mjs +5 -5
- package/esm2020/lib/models/column-value.model.mjs +2 -0
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/pipes/index.mjs +2 -2
- package/esm2020/lib/pipes/json-path.pipe.mjs +80 -0
- package/esm2020/lib/utils/model.util.mjs +16 -15
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/mediusinc-mng-commons.mjs +1418 -1284
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +1413 -1281
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/models/builders/query-param.builder.d.ts +2 -1
- package/lib/api/services/api.abstract.service.d.ts +10 -5
- package/lib/api/utils/object-serializer.util.d.ts +4 -2
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +1 -2
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +5 -1
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +5 -1
- package/lib/descriptors/column.descriptor.d.ts +66 -0
- package/lib/descriptors/editor.descriptor.d.ts +1 -299
- package/lib/descriptors/field.descriptor.d.ts +301 -0
- package/lib/descriptors/{editor.descriptor.interface.d.ts → field.descriptor.interface.d.ts} +0 -0
- package/lib/descriptors/filter.descriptor.d.ts +108 -0
- package/lib/descriptors/index.d.ts +4 -0
- package/lib/descriptors/table.descriptor.d.ts +5 -164
- package/lib/descriptors/tableview.descriptor.d.ts +4 -2
- package/lib/directives/component.directive.d.ts +5 -1
- package/lib/mng-commons.module.d.ts +2 -2
- package/lib/models/column-value.model.d.ts +4 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/pipes/index.d.ts +1 -1
- package/lib/pipes/json-path.pipe.d.ts +13 -0
- package/lib/utils/model.util.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/scss/mng-overrides/_layout_action.scss +7 -0
- package/scss/mng-overrides/_layout_dialog.scss +17 -6
- package/scss/mng-overrides/_mixins.scss +60 -0
- package/scss/theme/default/_mng-variables-theme-dark.scss +2 -3
- package/scss/theme/default/_mng-variables-theme-light.scss +2 -3
- package/scss/theme/default/_mng-variables.scss +12 -0
- package/esm2020/lib/descriptors/editor.descriptor.interface.mjs +0 -2
- package/esm2020/lib/pipes/property-path.pipe.mjs +0 -36
- package/lib/pipes/property-path.pipe.d.ts +0 -7
|
@@ -314,6 +314,7 @@ class MediusQueryParamBuilder {
|
|
|
314
314
|
const queryParam = new MediusQueryParam();
|
|
315
315
|
queryParam.itemsPerPage = itemsPerPage;
|
|
316
316
|
queryParam.itemsOffset = itemsOffset;
|
|
317
|
+
queryParam.queryMode = MediusQueryMode.All;
|
|
317
318
|
return new MediusQueryParamBuilder(queryParam);
|
|
318
319
|
}
|
|
319
320
|
withItemsPerPage(itemsPerPage) {
|
|
@@ -324,6 +325,10 @@ class MediusQueryParamBuilder {
|
|
|
324
325
|
this.queryParam.itemsOffset = itemsOffset;
|
|
325
326
|
return this;
|
|
326
327
|
}
|
|
328
|
+
withQueryMode(queryMode) {
|
|
329
|
+
this.queryParam.queryMode = queryMode;
|
|
330
|
+
return this;
|
|
331
|
+
}
|
|
327
332
|
withSort(property, asc = true) {
|
|
328
333
|
if (!this.queryParam.sortProperty || !this.queryParam.sortAsc) {
|
|
329
334
|
this.queryParam.sortProperty = [];
|
|
@@ -960,1556 +965,1591 @@ var ActionLevelEnum;
|
|
|
960
965
|
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
961
966
|
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
962
967
|
|
|
963
|
-
class
|
|
964
|
-
constructor(
|
|
965
|
-
this.
|
|
966
|
-
this.
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
var MngFormFieldEventTypeEnum;
|
|
970
|
-
(function (MngFormFieldEventTypeEnum) {
|
|
971
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
|
|
972
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
|
|
973
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
|
|
974
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
|
|
975
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
|
|
976
|
-
})(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
|
|
977
|
-
class MngFormFieldEventComponentSubtype {
|
|
978
|
-
}
|
|
979
|
-
MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
|
|
980
|
-
MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
|
|
981
|
-
MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
|
|
982
|
-
MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
|
|
983
|
-
class MngFormFieldEventDialogSubtype {
|
|
984
|
-
}
|
|
985
|
-
MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
|
|
986
|
-
MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
|
|
987
|
-
MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
|
|
988
|
-
class MngFormFieldEvent {
|
|
989
|
-
constructor(type, componentType, componentInstance, data = {}) {
|
|
990
|
-
this.type = type;
|
|
991
|
-
this.componentType = componentType;
|
|
992
|
-
this.componentInstance = componentInstance;
|
|
993
|
-
this.data = data;
|
|
968
|
+
class FilterDescriptor {
|
|
969
|
+
constructor(property) {
|
|
970
|
+
this._filterType = FilterDescriptor.TypeEnum.String;
|
|
971
|
+
this._matchModes = null;
|
|
972
|
+
this._className = '';
|
|
973
|
+
this._property = property;
|
|
994
974
|
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
class EditorDescriptor {
|
|
998
|
-
constructor(modelType, idProperty, titleProperty, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {
|
|
999
|
-
this._tabs = [];
|
|
1000
|
-
this._groups = [];
|
|
1001
|
-
this._fields = [];
|
|
1002
|
-
this._disabled = false;
|
|
1003
|
-
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
1004
|
-
this._tableviewEditorType = tableviewEditorType;
|
|
975
|
+
get filterType() {
|
|
976
|
+
return this._filterType;
|
|
1005
977
|
}
|
|
1006
|
-
get
|
|
1007
|
-
return this.
|
|
978
|
+
get filterProperty() {
|
|
979
|
+
return this._filterProperty;
|
|
1008
980
|
}
|
|
1009
|
-
get
|
|
1010
|
-
return this.
|
|
981
|
+
get matchModes() {
|
|
982
|
+
return this._matchModes;
|
|
1011
983
|
}
|
|
1012
|
-
get
|
|
1013
|
-
return this.
|
|
984
|
+
get placeholder() {
|
|
985
|
+
return this._placeholder;
|
|
1014
986
|
}
|
|
1015
|
-
get
|
|
1016
|
-
return this.
|
|
987
|
+
get className() {
|
|
988
|
+
return this._className;
|
|
1017
989
|
}
|
|
1018
|
-
get
|
|
1019
|
-
return this.
|
|
990
|
+
get property() {
|
|
991
|
+
return this._property;
|
|
1020
992
|
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
title = I18nUtil.getModelTabKey(this.model, name);
|
|
1025
|
-
}
|
|
1026
|
-
tabGroup.withTitle(title);
|
|
1027
|
-
this.createTabGroupDescriptor(tabGroup);
|
|
1028
|
-
return tabGroup;
|
|
993
|
+
asFilterType(filterType) {
|
|
994
|
+
this._filterType = filterType;
|
|
995
|
+
return this;
|
|
1029
996
|
}
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
}
|
|
1038
|
-
this.createFieldGroupDescriptor(fieldGroup);
|
|
1039
|
-
return fieldGroup;
|
|
997
|
+
/**
|
|
998
|
+
* Sets different filter property name instead of default property. Use this if API requires different property provided to perform correct filter.
|
|
999
|
+
* @param filterProperty
|
|
1000
|
+
*/
|
|
1001
|
+
withFilterProperty(filterProperty) {
|
|
1002
|
+
this._filterProperty = filterProperty;
|
|
1003
|
+
return this;
|
|
1040
1004
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
this.createDefaultGroup();
|
|
1044
|
-
this._fields.push(field);
|
|
1045
|
-
(_a = this._currentGroup) === null || _a === void 0 ? void 0 : _a.addField(field);
|
|
1005
|
+
withPlaceholder(placeholder) {
|
|
1006
|
+
this._placeholder = placeholder;
|
|
1046
1007
|
return this;
|
|
1047
1008
|
}
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
this
|
|
1051
|
-
return field;
|
|
1009
|
+
withClassName(className) {
|
|
1010
|
+
this._className = className;
|
|
1011
|
+
return this;
|
|
1052
1012
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
if (fieldIdx < 0) {
|
|
1056
|
-
throw new Error(`Field ${property} does not exist.`);
|
|
1057
|
-
}
|
|
1058
|
-
const field = this._fields[fieldIdx];
|
|
1059
|
-
if (field.group) {
|
|
1060
|
-
const groupFieldIdx = field.group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);
|
|
1061
|
-
if (groupFieldIdx >= 0) {
|
|
1062
|
-
field.group.fields.splice(groupFieldIdx, 1);
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
this._fields.splice(fieldIdx, 1);
|
|
1013
|
+
withMatchModes(matchModes) {
|
|
1014
|
+
this._matchModes = matchModes;
|
|
1066
1015
|
return this;
|
|
1067
1016
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1017
|
+
copy() {
|
|
1018
|
+
const descriptor = new FilterDescriptor(this._property);
|
|
1019
|
+
this.copyFieldsTo(descriptor);
|
|
1020
|
+
return descriptor;
|
|
1071
1021
|
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
this.
|
|
1075
|
-
|
|
1022
|
+
copyFieldsTo(descriptor) {
|
|
1023
|
+
descriptor._filterType = this._filterType;
|
|
1024
|
+
descriptor._filterProperty = this._filterProperty;
|
|
1025
|
+
descriptor._placeholder = this._placeholder;
|
|
1026
|
+
descriptor._className = this._className;
|
|
1076
1027
|
}
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1028
|
+
}
|
|
1029
|
+
(function (FilterDescriptor) {
|
|
1030
|
+
let TypeEnum;
|
|
1031
|
+
(function (TypeEnum) {
|
|
1032
|
+
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1033
|
+
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1034
|
+
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1035
|
+
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1036
|
+
TypeEnum[TypeEnum["Lookup"] = 4] = "Lookup";
|
|
1037
|
+
TypeEnum[TypeEnum["LookupEnum"] = 5] = "LookupEnum";
|
|
1038
|
+
})(TypeEnum = FilterDescriptor.TypeEnum || (FilterDescriptor.TypeEnum = {}));
|
|
1039
|
+
let MatchModeEnum;
|
|
1040
|
+
(function (MatchModeEnum) {
|
|
1041
|
+
MatchModeEnum["StartsWith"] = "startsWith";
|
|
1042
|
+
MatchModeEnum["Contains"] = "contains";
|
|
1043
|
+
MatchModeEnum["EndsWith"] = "endsWith";
|
|
1044
|
+
MatchModeEnum["Equals"] = "equals";
|
|
1045
|
+
MatchModeEnum["NotEquals"] = "notEquals";
|
|
1046
|
+
MatchModeEnum["In"] = "in";
|
|
1047
|
+
MatchModeEnum["LessThan"] = "lt";
|
|
1048
|
+
MatchModeEnum["LessThanOrEqualTo"] = "lte";
|
|
1049
|
+
MatchModeEnum["GreaterThan"] = "gt";
|
|
1050
|
+
MatchModeEnum["GreaterThanOrEqualTo"] = "gte";
|
|
1051
|
+
MatchModeEnum["Between"] = "between";
|
|
1052
|
+
MatchModeEnum["DateIs"] = "dateIs";
|
|
1053
|
+
MatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
1054
|
+
MatchModeEnum["DateBefore"] = "dateBefore";
|
|
1055
|
+
MatchModeEnum["DateAfter"] = "dateAfter";
|
|
1056
|
+
})(MatchModeEnum = FilterDescriptor.MatchModeEnum || (FilterDescriptor.MatchModeEnum = {}));
|
|
1057
|
+
})(FilterDescriptor || (FilterDescriptor = {}));
|
|
1058
|
+
class FilterLookupDescriptor extends FilterDescriptor {
|
|
1059
|
+
constructor(property, modelType) {
|
|
1060
|
+
super(property);
|
|
1061
|
+
this._modelType = null;
|
|
1062
|
+
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
1063
|
+
this._itemsLabelTranslate = false;
|
|
1064
|
+
this._multiselect = false;
|
|
1065
|
+
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
1066
|
+
this._autocompleteOpenOnFocus = false;
|
|
1067
|
+
this._autocompleteInlineSearch = false;
|
|
1068
|
+
this._modelType = modelType;
|
|
1069
|
+
this._filterType = FilterDescriptor.TypeEnum.Lookup;
|
|
1070
|
+
ModelUtil.trySetLookupItemsProperties(this);
|
|
1081
1071
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
this.addFieldDescriptor(field);
|
|
1085
|
-
return field;
|
|
1072
|
+
get lookupType() {
|
|
1073
|
+
return this._lookupType;
|
|
1086
1074
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
this.addFieldDescriptor(field);
|
|
1090
|
-
return field;
|
|
1075
|
+
get dataProvider() {
|
|
1076
|
+
return this._dataProvider;
|
|
1091
1077
|
}
|
|
1092
|
-
|
|
1093
|
-
this.
|
|
1094
|
-
return this;
|
|
1078
|
+
get itemsLabelProperty() {
|
|
1079
|
+
return this._itemsLabelProperty;
|
|
1095
1080
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
this._currentGroup.withValidator(name, expression);
|
|
1099
|
-
}
|
|
1081
|
+
get itemsLabelTranslate() {
|
|
1082
|
+
return this._itemsLabelTranslate;
|
|
1100
1083
|
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
for (const tabGroup of this._tabs) {
|
|
1104
|
-
editor.createTabGroupDescriptor(tabGroup.copy());
|
|
1105
|
-
}
|
|
1106
|
-
for (const tabGroup of editor._tabs) {
|
|
1107
|
-
for (const fieldGroup of tabGroup.fields) {
|
|
1108
|
-
editor._fields.push(...fieldGroup.fields);
|
|
1109
|
-
}
|
|
1110
|
-
editor._groups.push(...tabGroup.fields);
|
|
1111
|
-
}
|
|
1112
|
-
editor._currentTabGroup = editor._tabs[editor._tabs.length - 1];
|
|
1113
|
-
editor._currentGroup = editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1];
|
|
1114
|
-
editor._disabled = this._disabled;
|
|
1115
|
-
return editor;
|
|
1084
|
+
get itemsValueProperty() {
|
|
1085
|
+
return this._itemsValueProperty;
|
|
1116
1086
|
}
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
this.createDefaultTabGroup();
|
|
1120
|
-
this._currentGroup = fieldGroup;
|
|
1121
|
-
this._groups.push(fieldGroup);
|
|
1122
|
-
(_a = this._currentTabGroup) === null || _a === void 0 ? void 0 : _a.addField(fieldGroup);
|
|
1123
|
-
return this;
|
|
1087
|
+
get dataKeyProperty() {
|
|
1088
|
+
return this._dataKeyProperty;
|
|
1124
1089
|
}
|
|
1125
|
-
|
|
1126
|
-
this.
|
|
1127
|
-
this._tabs.push(tabGroup);
|
|
1128
|
-
return this;
|
|
1090
|
+
get multiselect() {
|
|
1091
|
+
return this._multiselect;
|
|
1129
1092
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
this.createDefaultTabGroup();
|
|
1133
|
-
if (((_a = this._currentTabGroup) === null || _a === void 0 ? void 0 : _a.fields.length) === 0) {
|
|
1134
|
-
this.createFieldGroup(EditorDescriptor.defaultGroupName, null);
|
|
1135
|
-
}
|
|
1093
|
+
get autocompleteOpenOnFocus() {
|
|
1094
|
+
return this._autocompleteOpenOnFocus;
|
|
1136
1095
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1096
|
+
get autocompleteInlineSearch() {
|
|
1097
|
+
return this._autocompleteInlineSearch;
|
|
1098
|
+
}
|
|
1099
|
+
get dropdownClassName() {
|
|
1100
|
+
return this._dropdownClassName;
|
|
1101
|
+
}
|
|
1102
|
+
get modelType() {
|
|
1103
|
+
return this._modelType;
|
|
1104
|
+
}
|
|
1105
|
+
withItemsLabelProperty(itemsLabelProperty, translate = false) {
|
|
1106
|
+
this._itemsLabelProperty = itemsLabelProperty;
|
|
1107
|
+
this._itemsLabelTranslate = translate;
|
|
1108
|
+
return this;
|
|
1109
|
+
}
|
|
1110
|
+
withItemsValueProperty(itemsValueProperty) {
|
|
1111
|
+
this._itemsValueProperty = itemsValueProperty;
|
|
1112
|
+
this._dataKeyProperty = itemsValueProperty;
|
|
1113
|
+
return this;
|
|
1114
|
+
}
|
|
1115
|
+
withDataKeyProperty(dataKeyProperty) {
|
|
1116
|
+
this._dataKeyProperty = dataKeyProperty;
|
|
1117
|
+
this._itemsValueProperty = dataKeyProperty;
|
|
1118
|
+
return this;
|
|
1119
|
+
}
|
|
1120
|
+
withLookup(lookup, serviceType) {
|
|
1121
|
+
const dataProvider = new LookupDataProvider(this._modelType);
|
|
1122
|
+
if (serviceType) {
|
|
1123
|
+
dataProvider.withServiceType(serviceType);
|
|
1140
1124
|
}
|
|
1125
|
+
dataProvider.withLookup(lookup);
|
|
1126
|
+
this._dataProvider = dataProvider;
|
|
1127
|
+
return this;
|
|
1141
1128
|
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
let TableviewEditorTypeEnum;
|
|
1146
|
-
(function (TableviewEditorTypeEnum) {
|
|
1147
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
|
|
1148
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
|
|
1149
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
|
|
1150
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
|
|
1151
|
-
})(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
|
|
1152
|
-
})(EditorDescriptor || (EditorDescriptor = {}));
|
|
1153
|
-
class AGenericFieldDescriptor {
|
|
1154
|
-
constructor(editor) {
|
|
1155
|
-
this._config = {};
|
|
1156
|
-
this._editor = editor;
|
|
1129
|
+
withLookupDataProvider(dataProvider) {
|
|
1130
|
+
this._dataProvider = dataProvider;
|
|
1131
|
+
return this;
|
|
1157
1132
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1133
|
+
withMultiselect(multiselect = true) {
|
|
1134
|
+
this._multiselect = multiselect;
|
|
1135
|
+
return this;
|
|
1160
1136
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1137
|
+
withDropdownClassName(dropdownClassName) {
|
|
1138
|
+
this._dropdownClassName = dropdownClassName;
|
|
1139
|
+
return this;
|
|
1163
1140
|
}
|
|
1164
|
-
|
|
1165
|
-
this.
|
|
1141
|
+
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
1142
|
+
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;
|
|
1143
|
+
this._autocompleteOpenOnFocus = openOnFocus;
|
|
1144
|
+
this._autocompleteInlineSearch = inlineSearch;
|
|
1166
1145
|
return this;
|
|
1167
1146
|
}
|
|
1147
|
+
copy() {
|
|
1148
|
+
const descriptor = new FilterLookupDescriptor(this._property, this._modelType);
|
|
1149
|
+
this.copyFieldsTo(descriptor);
|
|
1150
|
+
return descriptor;
|
|
1151
|
+
}
|
|
1152
|
+
copyFieldsTo(filter) {
|
|
1153
|
+
super.copyFieldsTo(filter);
|
|
1154
|
+
filter._dataProvider = this._dataProvider;
|
|
1155
|
+
filter._lookupType = this._lookupType;
|
|
1156
|
+
filter._itemsLabelProperty = this._itemsLabelProperty;
|
|
1157
|
+
filter._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
1158
|
+
filter._itemsValueProperty = this._itemsValueProperty;
|
|
1159
|
+
filter._dataKeyProperty = this._dataKeyProperty;
|
|
1160
|
+
filter._multiselect = this._multiselect;
|
|
1161
|
+
filter._dropdownClassName = this._dropdownClassName;
|
|
1162
|
+
filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;
|
|
1163
|
+
filter._autocompleteInlineSearch = this._autocompleteInlineSearch;
|
|
1164
|
+
}
|
|
1168
1165
|
}
|
|
1169
|
-
class
|
|
1170
|
-
constructor(
|
|
1171
|
-
super(
|
|
1172
|
-
this.
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
this.
|
|
1181
|
-
this.
|
|
1166
|
+
class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
1167
|
+
constructor(property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
1168
|
+
super(property, null);
|
|
1169
|
+
this._enumType = enumType;
|
|
1170
|
+
if (typeof optionsTitlePath === 'undefined') {
|
|
1171
|
+
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1172
|
+
}
|
|
1173
|
+
const optionEnumValues = Array.isArray(options)
|
|
1174
|
+
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
|
|
1175
|
+
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
|
|
1176
|
+
const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
|
|
1177
|
+
this.withLookupDataProvider(dataProvider);
|
|
1178
|
+
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
1179
|
+
this.withItemsValueProperty('value');
|
|
1182
1180
|
}
|
|
1183
|
-
get
|
|
1184
|
-
return this.
|
|
1181
|
+
get enumType() {
|
|
1182
|
+
return this._enumType;
|
|
1185
1183
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1184
|
+
asAutocomplete(openOnFocus = true) {
|
|
1185
|
+
super.asAutocomplete(openOnFocus, true);
|
|
1186
|
+
return this;
|
|
1188
1187
|
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1188
|
+
copy() {
|
|
1189
|
+
const field = new FilterLookupEnumDescriptor(this._property, this._enumType, []);
|
|
1190
|
+
this.copyFieldsTo(field);
|
|
1191
|
+
return field;
|
|
1191
1192
|
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1193
|
+
}
|
|
1194
|
+
(function (FilterLookupDescriptor) {
|
|
1195
|
+
let LookupTypeEnum;
|
|
1196
|
+
(function (LookupTypeEnum) {
|
|
1197
|
+
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
1198
|
+
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
1199
|
+
})(LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum || (FilterLookupDescriptor.LookupTypeEnum = {}));
|
|
1200
|
+
})(FilterLookupDescriptor || (FilterLookupDescriptor = {}));
|
|
1201
|
+
|
|
1202
|
+
class ColumnDescriptor {
|
|
1203
|
+
constructor(table, property) {
|
|
1204
|
+
this._columnType = ColumnDescriptor.TypeEnum.String;
|
|
1205
|
+
this._isSortEnabled = false;
|
|
1206
|
+
this._enumNameAsValue = false;
|
|
1207
|
+
// boolean specifics
|
|
1208
|
+
this._booleanAsIcon = false;
|
|
1209
|
+
this._table = table;
|
|
1210
|
+
this._property = property;
|
|
1194
1211
|
}
|
|
1195
|
-
get
|
|
1196
|
-
return this.
|
|
1212
|
+
get columnType() {
|
|
1213
|
+
return this._columnType;
|
|
1197
1214
|
}
|
|
1198
|
-
get
|
|
1199
|
-
return this.
|
|
1215
|
+
get title() {
|
|
1216
|
+
return this._title;
|
|
1200
1217
|
}
|
|
1201
|
-
get
|
|
1202
|
-
return this.
|
|
1218
|
+
get jsonPath() {
|
|
1219
|
+
return this._jsonPath;
|
|
1203
1220
|
}
|
|
1204
|
-
get
|
|
1205
|
-
return this.
|
|
1221
|
+
get isSortEnabled() {
|
|
1222
|
+
return this._isSortEnabled;
|
|
1206
1223
|
}
|
|
1207
|
-
get
|
|
1208
|
-
return this.
|
|
1224
|
+
get filterDescriptor() {
|
|
1225
|
+
return this._filterDescriptor;
|
|
1209
1226
|
}
|
|
1210
|
-
get
|
|
1211
|
-
return this.
|
|
1227
|
+
get displayFormat() {
|
|
1228
|
+
return this._displayFormat;
|
|
1212
1229
|
}
|
|
1213
|
-
get
|
|
1214
|
-
return this.
|
|
1230
|
+
get table() {
|
|
1231
|
+
return this._table;
|
|
1215
1232
|
}
|
|
1216
|
-
get
|
|
1217
|
-
return this.
|
|
1233
|
+
get property() {
|
|
1234
|
+
return this._property;
|
|
1218
1235
|
}
|
|
1219
|
-
get
|
|
1220
|
-
return this.
|
|
1236
|
+
get enumType() {
|
|
1237
|
+
return this._enumType;
|
|
1221
1238
|
}
|
|
1222
|
-
get
|
|
1223
|
-
return this.
|
|
1239
|
+
get enumTitlePath() {
|
|
1240
|
+
return this._enumTitlePath;
|
|
1224
1241
|
}
|
|
1225
|
-
get
|
|
1226
|
-
return this.
|
|
1242
|
+
get enumNameAsValue() {
|
|
1243
|
+
return this._enumNameAsValue;
|
|
1227
1244
|
}
|
|
1228
|
-
get
|
|
1229
|
-
return this.
|
|
1245
|
+
get booleanAsIcon() {
|
|
1246
|
+
return this._booleanAsIcon;
|
|
1230
1247
|
}
|
|
1231
|
-
get
|
|
1232
|
-
return this.
|
|
1248
|
+
get booleanYes() {
|
|
1249
|
+
return this._booleanYes;
|
|
1233
1250
|
}
|
|
1234
|
-
get
|
|
1235
|
-
return this.
|
|
1251
|
+
get booleanNo() {
|
|
1252
|
+
return this._booleanNo;
|
|
1236
1253
|
}
|
|
1237
|
-
get
|
|
1238
|
-
return this.
|
|
1254
|
+
get objectModelType() {
|
|
1255
|
+
return this._objectModelType;
|
|
1239
1256
|
}
|
|
1240
|
-
get
|
|
1241
|
-
return this.
|
|
1257
|
+
get objectTitleProperty() {
|
|
1258
|
+
return this._objectTitleProperty;
|
|
1242
1259
|
}
|
|
1243
|
-
|
|
1244
|
-
this.
|
|
1260
|
+
get customComponentType() {
|
|
1261
|
+
return this._customComponentType;
|
|
1262
|
+
}
|
|
1263
|
+
asType(type = ColumnDescriptor.TypeEnum.String) {
|
|
1264
|
+
this._columnType = type;
|
|
1245
1265
|
return this;
|
|
1246
1266
|
}
|
|
1247
|
-
|
|
1248
|
-
this.
|
|
1267
|
+
asNumber(displayFormat = '1.0-0') {
|
|
1268
|
+
this._columnType = ColumnDescriptor.TypeEnum.Number;
|
|
1269
|
+
this._displayFormat = displayFormat;
|
|
1249
1270
|
return this;
|
|
1250
1271
|
}
|
|
1251
|
-
|
|
1252
|
-
this.
|
|
1272
|
+
asDate(displayFormat = 'dd.MM.yyyy') {
|
|
1273
|
+
this._columnType = ColumnDescriptor.TypeEnum.Date;
|
|
1274
|
+
this._displayFormat = displayFormat;
|
|
1253
1275
|
return this;
|
|
1254
1276
|
}
|
|
1255
|
-
|
|
1256
|
-
this.
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1277
|
+
asBoolean(yes, no, asIcon = false) {
|
|
1278
|
+
this._columnType = ColumnDescriptor.TypeEnum.Boolean;
|
|
1279
|
+
this._booleanAsIcon = asIcon;
|
|
1280
|
+
this._booleanYes = yes;
|
|
1281
|
+
this._booleanNo = no;
|
|
1260
1282
|
return this;
|
|
1261
1283
|
}
|
|
1262
|
-
|
|
1263
|
-
this.
|
|
1264
|
-
|
|
1265
|
-
|
|
1284
|
+
asEnum(enumType, nameAsValue = false, titlePath) {
|
|
1285
|
+
this._columnType = ColumnDescriptor.TypeEnum.Enum;
|
|
1286
|
+
this._enumType = enumType;
|
|
1287
|
+
this._enumNameAsValue = nameAsValue;
|
|
1288
|
+
if (typeof titlePath === 'undefined') {
|
|
1289
|
+
titlePath = TypeUtil.findEnumName(enumType);
|
|
1266
1290
|
}
|
|
1291
|
+
this._enumTitlePath = titlePath;
|
|
1267
1292
|
return this;
|
|
1268
1293
|
}
|
|
1269
|
-
|
|
1270
|
-
this.
|
|
1294
|
+
asCustomComponent(customComponentType) {
|
|
1295
|
+
this._columnType = ColumnDescriptor.TypeEnum.Custom;
|
|
1296
|
+
this._customComponentType = customComponentType;
|
|
1271
1297
|
return this;
|
|
1272
1298
|
}
|
|
1273
|
-
|
|
1274
|
-
|
|
1299
|
+
withObjectProperty(modelType, titleProperty) {
|
|
1300
|
+
var _a;
|
|
1301
|
+
this._objectModelType = modelType;
|
|
1302
|
+
if (!titleProperty) {
|
|
1303
|
+
this._objectTitleProperty = (_a = ModelUtil.findTitleAttribute(modelType)) !== null && _a !== void 0 ? _a : undefined;
|
|
1304
|
+
}
|
|
1305
|
+
else {
|
|
1306
|
+
this._objectTitleProperty = titleProperty;
|
|
1307
|
+
}
|
|
1275
1308
|
return this;
|
|
1276
1309
|
}
|
|
1277
|
-
|
|
1278
|
-
this.
|
|
1310
|
+
withTitle(title) {
|
|
1311
|
+
this._title = title;
|
|
1279
1312
|
return this;
|
|
1280
1313
|
}
|
|
1281
|
-
|
|
1282
|
-
this.
|
|
1314
|
+
withJsonPath(path) {
|
|
1315
|
+
this._jsonPath = path;
|
|
1283
1316
|
return this;
|
|
1284
1317
|
}
|
|
1285
|
-
|
|
1286
|
-
this.
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
this.
|
|
1292
|
-
|
|
1293
|
-
|
|
1318
|
+
withFilter(forceSimple = false) {
|
|
1319
|
+
this._filterDescriptor = new FilterDescriptor(this._property);
|
|
1320
|
+
let filterType;
|
|
1321
|
+
if (!forceSimple && this._objectModelType) {
|
|
1322
|
+
return this.withFilterLookup();
|
|
1323
|
+
}
|
|
1324
|
+
switch (this._columnType) {
|
|
1325
|
+
case ColumnDescriptor.TypeEnum.Number:
|
|
1326
|
+
filterType = FilterDescriptor.TypeEnum.Number;
|
|
1327
|
+
break;
|
|
1328
|
+
case ColumnDescriptor.TypeEnum.Boolean:
|
|
1329
|
+
filterType = FilterDescriptor.TypeEnum.Boolean;
|
|
1330
|
+
break;
|
|
1331
|
+
case ColumnDescriptor.TypeEnum.Date:
|
|
1332
|
+
filterType = FilterDescriptor.TypeEnum.Date;
|
|
1333
|
+
break;
|
|
1334
|
+
case ColumnDescriptor.TypeEnum.Enum:
|
|
1335
|
+
if (!forceSimple) {
|
|
1336
|
+
return this.withFilterLookupEnum();
|
|
1337
|
+
}
|
|
1338
|
+
else {
|
|
1339
|
+
filterType = FilterDescriptor.TypeEnum.String;
|
|
1340
|
+
break;
|
|
1341
|
+
}
|
|
1342
|
+
case ColumnDescriptor.TypeEnum.String:
|
|
1343
|
+
case ColumnDescriptor.TypeEnum.Custom:
|
|
1344
|
+
default:
|
|
1345
|
+
filterType = FilterDescriptor.TypeEnum.String;
|
|
1346
|
+
break;
|
|
1347
|
+
}
|
|
1348
|
+
this._filterDescriptor.asFilterType(filterType);
|
|
1349
|
+
return this._filterDescriptor;
|
|
1294
1350
|
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1351
|
+
withFilterLookup() {
|
|
1352
|
+
var _a;
|
|
1353
|
+
const filterDescriptor = new FilterLookupDescriptor(this._property, (_a = this._objectModelType) !== null && _a !== void 0 ? _a : null);
|
|
1354
|
+
this._filterDescriptor = filterDescriptor;
|
|
1355
|
+
return filterDescriptor;
|
|
1298
1356
|
}
|
|
1299
|
-
|
|
1300
|
-
this.
|
|
1357
|
+
withFilterLookupEnum(options) {
|
|
1358
|
+
if (this._columnType !== ColumnDescriptor.TypeEnum.Enum || !this._enumType) {
|
|
1359
|
+
throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
|
|
1360
|
+
}
|
|
1361
|
+
const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
|
|
1362
|
+
this._filterDescriptor = filterDescriptor;
|
|
1363
|
+
return filterDescriptor;
|
|
1301
1364
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1365
|
+
withSort(isEnabled = true) {
|
|
1366
|
+
this._isSortEnabled = isEnabled;
|
|
1367
|
+
return this;
|
|
1304
1368
|
}
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1369
|
+
copy() {
|
|
1370
|
+
var _a;
|
|
1371
|
+
const descriptor = new ColumnDescriptor(this._table, this._property);
|
|
1372
|
+
descriptor._jsonPath = this._jsonPath;
|
|
1373
|
+
descriptor._title = this._title;
|
|
1374
|
+
descriptor._isSortEnabled = this._isSortEnabled;
|
|
1375
|
+
descriptor._columnType = this._columnType;
|
|
1376
|
+
descriptor._filterDescriptor = (_a = this._filterDescriptor) === null || _a === void 0 ? void 0 : _a.copy();
|
|
1377
|
+
descriptor._enumType = this._enumType;
|
|
1378
|
+
descriptor._enumTitlePath = this._enumTitlePath;
|
|
1379
|
+
descriptor._enumNameAsValue = this._enumNameAsValue;
|
|
1380
|
+
descriptor._booleanAsIcon = this._booleanAsIcon;
|
|
1381
|
+
descriptor._booleanYes = this._booleanYes;
|
|
1382
|
+
descriptor._booleanNo = this._booleanNo;
|
|
1383
|
+
descriptor._objectModelType = this._objectModelType;
|
|
1384
|
+
descriptor._objectTitleProperty = this._objectTitleProperty;
|
|
1385
|
+
return descriptor;
|
|
1320
1386
|
}
|
|
1321
1387
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
this.
|
|
1338
|
-
this.
|
|
1388
|
+
(function (ColumnDescriptor) {
|
|
1389
|
+
let TypeEnum;
|
|
1390
|
+
(function (TypeEnum) {
|
|
1391
|
+
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1392
|
+
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1393
|
+
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1394
|
+
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1395
|
+
TypeEnum[TypeEnum["Enum"] = 4] = "Enum";
|
|
1396
|
+
TypeEnum[TypeEnum["Custom"] = 5] = "Custom";
|
|
1397
|
+
})(TypeEnum = ColumnDescriptor.TypeEnum || (ColumnDescriptor.TypeEnum = {}));
|
|
1398
|
+
})(ColumnDescriptor || (ColumnDescriptor = {}));
|
|
1399
|
+
|
|
1400
|
+
class EditorDescriptor {
|
|
1401
|
+
constructor(modelType, idProperty, titleProperty, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {
|
|
1402
|
+
this._tabs = [];
|
|
1403
|
+
this._groups = [];
|
|
1404
|
+
this._fields = [];
|
|
1405
|
+
this._disabled = false;
|
|
1406
|
+
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
1407
|
+
this._tableviewEditorType = tableviewEditorType;
|
|
1339
1408
|
}
|
|
1340
|
-
get
|
|
1341
|
-
return this.
|
|
1409
|
+
get model() {
|
|
1410
|
+
return this._model;
|
|
1342
1411
|
}
|
|
1343
|
-
get
|
|
1344
|
-
return this.
|
|
1412
|
+
get tabs() {
|
|
1413
|
+
return this._tabs;
|
|
1345
1414
|
}
|
|
1346
|
-
get
|
|
1347
|
-
return this.
|
|
1415
|
+
get fields() {
|
|
1416
|
+
return this._fields;
|
|
1348
1417
|
}
|
|
1349
|
-
get
|
|
1350
|
-
return this.
|
|
1418
|
+
get tableviewEditorType() {
|
|
1419
|
+
return this._disabled;
|
|
1351
1420
|
}
|
|
1352
|
-
get
|
|
1353
|
-
return this.
|
|
1421
|
+
get disabled() {
|
|
1422
|
+
return this._disabled;
|
|
1354
1423
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1424
|
+
createTabGroup(name, title) {
|
|
1425
|
+
const tabGroup = new FieldTabGroupDescriptor(this, name);
|
|
1426
|
+
if (!title) {
|
|
1427
|
+
title = I18nUtil.getModelTabKey(this.model, name);
|
|
1428
|
+
}
|
|
1429
|
+
tabGroup.withTitle(title);
|
|
1430
|
+
this.createTabGroupDescriptor(tabGroup);
|
|
1431
|
+
return tabGroup;
|
|
1357
1432
|
}
|
|
1358
|
-
|
|
1359
|
-
|
|
1433
|
+
createFieldGroup(name, title) {
|
|
1434
|
+
const fieldGroup = new FieldGroupDescriptor(this, name);
|
|
1435
|
+
if (title !== null) {
|
|
1436
|
+
if (!title) {
|
|
1437
|
+
title = I18nUtil.getModelGroupKey(this.model, name);
|
|
1438
|
+
}
|
|
1439
|
+
fieldGroup.withTitle(title);
|
|
1440
|
+
}
|
|
1441
|
+
this.createFieldGroupDescriptor(fieldGroup);
|
|
1442
|
+
return fieldGroup;
|
|
1360
1443
|
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1444
|
+
addFieldDescriptor(field) {
|
|
1445
|
+
var _a;
|
|
1446
|
+
this.createDefaultGroup();
|
|
1447
|
+
this._fields.push(field);
|
|
1448
|
+
(_a = this._currentGroup) === null || _a === void 0 ? void 0 : _a.addField(field);
|
|
1449
|
+
return this;
|
|
1363
1450
|
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1451
|
+
addField(property) {
|
|
1452
|
+
const field = new FieldInputDescriptor(this, property);
|
|
1453
|
+
this.addFieldDescriptor(field);
|
|
1454
|
+
return field;
|
|
1366
1455
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1456
|
+
removeField(property) {
|
|
1457
|
+
const fieldIdx = this._fields.findIndex(f => f.property === property);
|
|
1458
|
+
if (fieldIdx < 0) {
|
|
1459
|
+
throw new Error(`Field ${property} does not exist.`);
|
|
1460
|
+
}
|
|
1461
|
+
const field = this._fields[fieldIdx];
|
|
1462
|
+
if (field.group) {
|
|
1463
|
+
const groupFieldIdx = field.group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);
|
|
1464
|
+
if (groupFieldIdx >= 0) {
|
|
1465
|
+
field.group.fields.splice(groupFieldIdx, 1);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
this._fields.splice(fieldIdx, 1);
|
|
1469
|
+
return this;
|
|
1369
1470
|
}
|
|
1370
|
-
|
|
1371
|
-
|
|
1471
|
+
getField(property) {
|
|
1472
|
+
var _a;
|
|
1473
|
+
return (_a = this._fields.find(f => f.property === property)) !== null && _a !== void 0 ? _a : null;
|
|
1372
1474
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1475
|
+
addFieldLookup(property, modelType) {
|
|
1476
|
+
const field = new FieldLookupDescriptor(this, property, modelType);
|
|
1477
|
+
this.addFieldDescriptor(field);
|
|
1478
|
+
return field;
|
|
1375
1479
|
}
|
|
1376
|
-
|
|
1377
|
-
|
|
1480
|
+
addFieldLookupEnum(property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
1481
|
+
const field = new FieldLookupEnumDescriptor(this, property, enumType, options, nameAsValue, optionsTitlePath);
|
|
1482
|
+
this.addFieldDescriptor(field);
|
|
1483
|
+
return field;
|
|
1378
1484
|
}
|
|
1379
|
-
|
|
1380
|
-
|
|
1485
|
+
addFieldManyEditor(property, tableviewDescriptor) {
|
|
1486
|
+
const field = new FieldManyEditorDescriptor(this, property, tableviewDescriptor);
|
|
1487
|
+
this.addFieldDescriptor(field);
|
|
1488
|
+
return field;
|
|
1381
1489
|
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1490
|
+
addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor) {
|
|
1491
|
+
const field = new FieldManyToManyEditorDescriptor(this, property, mainTableDescriptor, lookupTableDescriptor);
|
|
1492
|
+
this.addFieldDescriptor(field);
|
|
1493
|
+
return field;
|
|
1384
1494
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1495
|
+
withDisabled(disabled = true) {
|
|
1496
|
+
this._disabled = disabled;
|
|
1497
|
+
return this;
|
|
1387
1498
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1499
|
+
addValidator(name, expression) {
|
|
1500
|
+
if (this._currentGroup) {
|
|
1501
|
+
this._currentGroup.withValidator(name, expression);
|
|
1502
|
+
}
|
|
1390
1503
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1504
|
+
copy() {
|
|
1505
|
+
const editor = new EditorDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);
|
|
1506
|
+
for (const tabGroup of this._tabs) {
|
|
1507
|
+
editor.createTabGroupDescriptor(tabGroup.copy());
|
|
1508
|
+
}
|
|
1509
|
+
for (const tabGroup of editor._tabs) {
|
|
1510
|
+
for (const fieldGroup of tabGroup.fields) {
|
|
1511
|
+
editor._fields.push(...fieldGroup.fields);
|
|
1512
|
+
}
|
|
1513
|
+
editor._groups.push(...tabGroup.fields);
|
|
1514
|
+
}
|
|
1515
|
+
editor._currentTabGroup = editor._tabs[editor._tabs.length - 1];
|
|
1516
|
+
editor._currentGroup = editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1];
|
|
1517
|
+
editor._disabled = this._disabled;
|
|
1518
|
+
return editor;
|
|
1393
1519
|
}
|
|
1394
|
-
|
|
1395
|
-
|
|
1520
|
+
createFieldGroupDescriptor(fieldGroup) {
|
|
1521
|
+
var _a;
|
|
1522
|
+
this.createDefaultTabGroup();
|
|
1523
|
+
this._currentGroup = fieldGroup;
|
|
1524
|
+
this._groups.push(fieldGroup);
|
|
1525
|
+
(_a = this._currentTabGroup) === null || _a === void 0 ? void 0 : _a.addField(fieldGroup);
|
|
1526
|
+
return this;
|
|
1396
1527
|
}
|
|
1397
|
-
|
|
1398
|
-
this.
|
|
1528
|
+
createTabGroupDescriptor(tabGroup) {
|
|
1529
|
+
this._currentTabGroup = tabGroup;
|
|
1530
|
+
this._tabs.push(tabGroup);
|
|
1399
1531
|
return this;
|
|
1400
1532
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
this.
|
|
1404
|
-
this.
|
|
1405
|
-
|
|
1406
|
-
if (isEmail) {
|
|
1407
|
-
this.withValidator('email', control => !Validators.email(control));
|
|
1533
|
+
createDefaultGroup() {
|
|
1534
|
+
var _a;
|
|
1535
|
+
this.createDefaultTabGroup();
|
|
1536
|
+
if (((_a = this._currentTabGroup) === null || _a === void 0 ? void 0 : _a.fields.length) === 0) {
|
|
1537
|
+
this.createFieldGroup(EditorDescriptor.defaultGroupName, null);
|
|
1408
1538
|
}
|
|
1409
|
-
return this;
|
|
1410
1539
|
}
|
|
1411
|
-
|
|
1412
|
-
this.
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
this._maxLength = maxLength;
|
|
1416
|
-
this._pattern = pattern;
|
|
1417
|
-
return this;
|
|
1540
|
+
createDefaultTabGroup() {
|
|
1541
|
+
if (this._tabs.length === 0) {
|
|
1542
|
+
this.createTabGroup(EditorDescriptor.defaultGroupName, 'general.general');
|
|
1543
|
+
}
|
|
1418
1544
|
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1545
|
+
}
|
|
1546
|
+
EditorDescriptor.defaultGroupName = '_default';
|
|
1547
|
+
(function (EditorDescriptor) {
|
|
1548
|
+
let TableviewEditorTypeEnum;
|
|
1549
|
+
(function (TableviewEditorTypeEnum) {
|
|
1550
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
|
|
1551
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
|
|
1552
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
|
|
1553
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
|
|
1554
|
+
})(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
|
|
1555
|
+
})(EditorDescriptor || (EditorDescriptor = {}));
|
|
1556
|
+
|
|
1557
|
+
class MngFormEditorSubmitEvent {
|
|
1558
|
+
constructor(formItem) {
|
|
1559
|
+
this.formItem = formItem;
|
|
1560
|
+
this.success = true;
|
|
1428
1561
|
}
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1562
|
+
}
|
|
1563
|
+
var MngFormFieldEventTypeEnum;
|
|
1564
|
+
(function (MngFormFieldEventTypeEnum) {
|
|
1565
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
|
|
1566
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
|
|
1567
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
|
|
1568
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
|
|
1569
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
|
|
1570
|
+
})(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
|
|
1571
|
+
class MngFormFieldEventComponentSubtype {
|
|
1572
|
+
}
|
|
1573
|
+
MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
|
|
1574
|
+
MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
|
|
1575
|
+
MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
|
|
1576
|
+
MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
|
|
1577
|
+
class MngFormFieldEventDialogSubtype {
|
|
1578
|
+
}
|
|
1579
|
+
MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
|
|
1580
|
+
MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
|
|
1581
|
+
MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
|
|
1582
|
+
class MngFormFieldEvent {
|
|
1583
|
+
constructor(type, componentType, componentInstance, data = {}) {
|
|
1584
|
+
this.type = type;
|
|
1585
|
+
this.componentType = componentType;
|
|
1586
|
+
this.componentInstance = componentInstance;
|
|
1587
|
+
this.data = data;
|
|
1432
1588
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
class AGenericFieldDescriptor {
|
|
1592
|
+
constructor(editor) {
|
|
1593
|
+
this._config = {};
|
|
1594
|
+
this._editor = editor;
|
|
1437
1595
|
}
|
|
1438
|
-
|
|
1439
|
-
this.
|
|
1440
|
-
if (typeof optionsTitlePath === 'undefined') {
|
|
1441
|
-
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1442
|
-
}
|
|
1443
|
-
this._radioOptions = Array.isArray(values)
|
|
1444
|
-
? EnumUtil.fromValuesAsEnumValueArray(enumType, values, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
|
|
1445
|
-
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
|
|
1446
|
-
return this;
|
|
1596
|
+
get editor() {
|
|
1597
|
+
return this._editor;
|
|
1447
1598
|
}
|
|
1448
|
-
|
|
1449
|
-
this.
|
|
1450
|
-
this._datePickerFormat = format ? format : 'dd.mm.yy';
|
|
1451
|
-
this._datePickerMin = min;
|
|
1452
|
-
this._datePickerMax = max;
|
|
1453
|
-
this._datePickerShowTime = showTime !== null && showTime !== void 0 ? showTime : false;
|
|
1454
|
-
return this;
|
|
1599
|
+
get config() {
|
|
1600
|
+
return this._config;
|
|
1455
1601
|
}
|
|
1456
|
-
|
|
1457
|
-
this.
|
|
1458
|
-
this._mask = mask;
|
|
1459
|
-
this._slotChar = slotChar;
|
|
1602
|
+
withConfig(config) {
|
|
1603
|
+
this._config = config;
|
|
1460
1604
|
return this;
|
|
1461
1605
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1606
|
+
}
|
|
1607
|
+
class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
1608
|
+
constructor(editor, property) {
|
|
1609
|
+
super(editor);
|
|
1610
|
+
this._required = false;
|
|
1611
|
+
this._disabled = false;
|
|
1612
|
+
this._validators = [];
|
|
1613
|
+
this._className = '';
|
|
1614
|
+
this._labelClassName = '';
|
|
1615
|
+
this._inputClassName = '';
|
|
1616
|
+
this._size = FieldDescriptor.SizeEnum.Normal;
|
|
1617
|
+
this._eventsSubject = new Subject();
|
|
1618
|
+
this._property = property;
|
|
1619
|
+
this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
|
|
1466
1620
|
}
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
this.copyFieldsTo(field);
|
|
1470
|
-
field._fieldType = this._fieldType;
|
|
1471
|
-
field._rows = this._rows;
|
|
1472
|
-
field._numberMin = this._numberMin;
|
|
1473
|
-
field._numberMax = this._numberMax;
|
|
1474
|
-
field._numberStep = this._numberStep;
|
|
1475
|
-
field._numberMinFractionDigits = this._numberMinFractionDigits;
|
|
1476
|
-
field._numberMaxFractionDigits = this._numberMaxFractionDigits;
|
|
1477
|
-
field._numberUseGrouping = this._numberUseGrouping;
|
|
1478
|
-
field._radioOptions = [...this._radioOptions];
|
|
1479
|
-
field._datePickerFormat = this._datePickerFormat;
|
|
1480
|
-
field._datePickerMin = this._datePickerMin;
|
|
1481
|
-
field._datePickerMax = this._datePickerMax;
|
|
1482
|
-
field._datePickerShowTime = this._datePickerShowTime;
|
|
1483
|
-
field._maxLength = this._maxLength;
|
|
1484
|
-
field._minLength = this._minLength;
|
|
1485
|
-
field._pattern = this._pattern;
|
|
1486
|
-
field._mask = this._mask;
|
|
1487
|
-
field._slotChar = this._slotChar;
|
|
1488
|
-
field._customComponentName = this._customComponentName;
|
|
1489
|
-
return field;
|
|
1621
|
+
get property() {
|
|
1622
|
+
return this._property;
|
|
1490
1623
|
}
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
TypeEnum[TypeEnum["Text"] = 1] = "Text";
|
|
1497
|
-
TypeEnum[TypeEnum["Textarea"] = 2] = "Textarea";
|
|
1498
|
-
TypeEnum[TypeEnum["Number"] = 3] = "Number";
|
|
1499
|
-
TypeEnum[TypeEnum["Switch"] = 4] = "Switch";
|
|
1500
|
-
TypeEnum[TypeEnum["Radio"] = 5] = "Radio";
|
|
1501
|
-
TypeEnum[TypeEnum["Datepicker"] = 6] = "Datepicker";
|
|
1502
|
-
TypeEnum[TypeEnum["Mask"] = 7] = "Mask";
|
|
1503
|
-
TypeEnum[TypeEnum["Custom"] = 8] = "Custom";
|
|
1504
|
-
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
1505
|
-
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
1506
|
-
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
1507
|
-
constructor(editor, property, modelType) {
|
|
1508
|
-
super(editor, property);
|
|
1509
|
-
this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
1510
|
-
this._itemsLabelTranslate = false;
|
|
1511
|
-
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
1512
|
-
this._autocompleteOpenOnFocus = false;
|
|
1513
|
-
this._autocompleteInlineSearch = false;
|
|
1514
|
-
this._modelType = modelType;
|
|
1515
|
-
ModelUtil.trySetLookupItemsProperties(this);
|
|
1624
|
+
get group() {
|
|
1625
|
+
return this._group;
|
|
1626
|
+
}
|
|
1627
|
+
get label() {
|
|
1628
|
+
return this._label;
|
|
1516
1629
|
}
|
|
1517
|
-
get
|
|
1518
|
-
return this.
|
|
1630
|
+
get placeholder() {
|
|
1631
|
+
return this._placeholder;
|
|
1519
1632
|
}
|
|
1520
|
-
get
|
|
1521
|
-
return this.
|
|
1633
|
+
get helpText() {
|
|
1634
|
+
return this._helpText;
|
|
1522
1635
|
}
|
|
1523
|
-
get
|
|
1524
|
-
return this.
|
|
1636
|
+
get required() {
|
|
1637
|
+
return this._required;
|
|
1525
1638
|
}
|
|
1526
|
-
get
|
|
1527
|
-
return this.
|
|
1639
|
+
get disabled() {
|
|
1640
|
+
return this._disabled;
|
|
1528
1641
|
}
|
|
1529
|
-
get
|
|
1530
|
-
return this.
|
|
1642
|
+
get defaultValue() {
|
|
1643
|
+
return this._defaultValue;
|
|
1531
1644
|
}
|
|
1532
|
-
get
|
|
1533
|
-
return this.
|
|
1645
|
+
get getter() {
|
|
1646
|
+
return this._getter;
|
|
1534
1647
|
}
|
|
1535
|
-
get
|
|
1536
|
-
return this.
|
|
1648
|
+
get setter() {
|
|
1649
|
+
return this._setter;
|
|
1537
1650
|
}
|
|
1538
|
-
get
|
|
1539
|
-
return this.
|
|
1651
|
+
get validators() {
|
|
1652
|
+
return this._validators;
|
|
1540
1653
|
}
|
|
1541
|
-
get
|
|
1542
|
-
return this.
|
|
1654
|
+
get requiredExpression() {
|
|
1655
|
+
return this._requiredExpression;
|
|
1543
1656
|
}
|
|
1544
|
-
get
|
|
1545
|
-
return this.
|
|
1657
|
+
get disabledExpression() {
|
|
1658
|
+
return this._disabledExpression;
|
|
1546
1659
|
}
|
|
1547
|
-
get
|
|
1548
|
-
return this.
|
|
1660
|
+
get hiddenExpression() {
|
|
1661
|
+
return this._hiddenExpression;
|
|
1549
1662
|
}
|
|
1550
|
-
get
|
|
1551
|
-
return this.
|
|
1663
|
+
get className() {
|
|
1664
|
+
return this._className;
|
|
1552
1665
|
}
|
|
1553
|
-
get
|
|
1554
|
-
return this.
|
|
1666
|
+
get labelClassName() {
|
|
1667
|
+
return this._labelClassName;
|
|
1555
1668
|
}
|
|
1556
|
-
|
|
1557
|
-
this.
|
|
1558
|
-
this._itemsLabelTranslate = translate;
|
|
1559
|
-
return this;
|
|
1669
|
+
get inputClassName() {
|
|
1670
|
+
return this._inputClassName;
|
|
1560
1671
|
}
|
|
1561
|
-
|
|
1562
|
-
this.
|
|
1563
|
-
|
|
1672
|
+
get size() {
|
|
1673
|
+
return this._size;
|
|
1674
|
+
}
|
|
1675
|
+
get isSizeSmall() {
|
|
1676
|
+
return this._size === FieldDescriptor.SizeEnum.Small;
|
|
1677
|
+
}
|
|
1678
|
+
get isSizeLarge() {
|
|
1679
|
+
return this._size === FieldDescriptor.SizeEnum.Large;
|
|
1680
|
+
}
|
|
1681
|
+
withLabel(label) {
|
|
1682
|
+
this._label = label;
|
|
1564
1683
|
return this;
|
|
1565
1684
|
}
|
|
1566
|
-
|
|
1567
|
-
this.
|
|
1685
|
+
withPlaceholder(placeholder) {
|
|
1686
|
+
this._placeholder = placeholder;
|
|
1568
1687
|
return this;
|
|
1569
1688
|
}
|
|
1570
|
-
|
|
1571
|
-
this.
|
|
1572
|
-
this._itemsValueProperty = undefined;
|
|
1689
|
+
withHelpText(helpText) {
|
|
1690
|
+
this._helpText = helpText;
|
|
1573
1691
|
return this;
|
|
1574
1692
|
}
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
if (
|
|
1578
|
-
|
|
1693
|
+
withRequired(required = true, requiredExpression) {
|
|
1694
|
+
this._required = required;
|
|
1695
|
+
if (requiredExpression) {
|
|
1696
|
+
this._requiredExpression = requiredExpression;
|
|
1579
1697
|
}
|
|
1580
|
-
dataProvider.withLookup(lookup);
|
|
1581
|
-
this._dataProvider = dataProvider;
|
|
1582
1698
|
return this;
|
|
1583
1699
|
}
|
|
1584
|
-
|
|
1585
|
-
this.
|
|
1700
|
+
withDisabled(disabled = true, disabledExpression) {
|
|
1701
|
+
this._disabled = disabled;
|
|
1702
|
+
if (disabledExpression) {
|
|
1703
|
+
this._disabledExpression = disabledExpression;
|
|
1704
|
+
}
|
|
1586
1705
|
return this;
|
|
1587
1706
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
}
|
|
1591
|
-
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
1592
|
-
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;
|
|
1593
|
-
this._autocompleteOpenOnFocus = openOnFocus;
|
|
1594
|
-
this._autocompleteInlineSearch = inlineSearch;
|
|
1707
|
+
withHidden(hiddenExpression) {
|
|
1708
|
+
this._hiddenExpression = hiddenExpression;
|
|
1595
1709
|
return this;
|
|
1596
1710
|
}
|
|
1597
|
-
|
|
1598
|
-
this.
|
|
1599
|
-
this._dialogTableDescriptor = lookupTableDescriptor;
|
|
1600
|
-
this._dialogTableDataProvider = tableDataProvider;
|
|
1711
|
+
withDefaultValue(defaultValue) {
|
|
1712
|
+
this._defaultValue = defaultValue;
|
|
1601
1713
|
return this;
|
|
1602
1714
|
}
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
this
|
|
1606
|
-
field._lookupType = this._lookupType;
|
|
1607
|
-
field._itemsLabelProperty = this._itemsLabelProperty;
|
|
1608
|
-
field._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
1609
|
-
field._itemsValueProperty = this._itemsValueProperty;
|
|
1610
|
-
field._itemsDisabledProperty = this._itemsDisabledProperty;
|
|
1611
|
-
field._dataKeyProperty = this._dataKeyProperty;
|
|
1612
|
-
field._dataProvider = this._dataProvider;
|
|
1613
|
-
field._dropdownClassName = this._dropdownClassName;
|
|
1614
|
-
field._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;
|
|
1615
|
-
field._autocompleteInlineSearch = this._autocompleteInlineSearch;
|
|
1616
|
-
field._dialogTableDescriptor = this._dialogTableDescriptor;
|
|
1617
|
-
return field;
|
|
1715
|
+
withGetter(getter) {
|
|
1716
|
+
this._getter = getter;
|
|
1717
|
+
return this;
|
|
1618
1718
|
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
(function (LookupTypeEnum) {
|
|
1623
|
-
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
1624
|
-
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
1625
|
-
LookupTypeEnum[LookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
1626
|
-
})(LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum || (FieldLookupDescriptor.LookupTypeEnum = {}));
|
|
1627
|
-
})(FieldLookupDescriptor || (FieldLookupDescriptor = {}));
|
|
1628
|
-
class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
1629
|
-
constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
1630
|
-
super(editor, property, null);
|
|
1631
|
-
this._nameAsValue = false;
|
|
1632
|
-
this._enumType = enumType;
|
|
1633
|
-
this._nameAsValue = nameAsValue;
|
|
1634
|
-
if (typeof optionsTitlePath === 'undefined') {
|
|
1635
|
-
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1636
|
-
}
|
|
1637
|
-
this._optionEnumValues = Array.isArray(options)
|
|
1638
|
-
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
|
|
1639
|
-
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
|
|
1640
|
-
const dataProvider = new LookupDataProvider(null).withLookup(() => of(this._optionEnumValues));
|
|
1641
|
-
this.withLookupDataProvider(dataProvider);
|
|
1642
|
-
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
1643
|
-
this.withItemsValueProperty('value');
|
|
1644
|
-
this.withItemsDisabledProperty('disabled');
|
|
1719
|
+
withSetter(setter) {
|
|
1720
|
+
this._setter = setter;
|
|
1721
|
+
return this;
|
|
1645
1722
|
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1723
|
+
withValidator(name, expression, message) {
|
|
1724
|
+
this._validators.push(new FieldValidator(name, expression, message));
|
|
1725
|
+
return this;
|
|
1648
1726
|
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);
|
|
1654
|
-
if (option) {
|
|
1655
|
-
option.disabled = true;
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1727
|
+
withClassName(className, labelClassName = '', inputClassName = '') {
|
|
1728
|
+
this._className = className;
|
|
1729
|
+
this._labelClassName = labelClassName;
|
|
1730
|
+
this._inputClassName = inputClassName;
|
|
1659
1731
|
return this;
|
|
1660
1732
|
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1733
|
+
withSize(size = FieldDescriptor.SizeEnum.Normal) {
|
|
1734
|
+
this._size = size;
|
|
1663
1735
|
return this;
|
|
1664
1736
|
}
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1737
|
+
nextEvent(type, cmpType, cmpInstance, data) {
|
|
1738
|
+
this._eventsSubject.next(new MngFormFieldEvent(type, cmpType, cmpInstance, data));
|
|
1739
|
+
}
|
|
1740
|
+
get events$() {
|
|
1741
|
+
return this._eventsSubject.asObservable();
|
|
1742
|
+
}
|
|
1743
|
+
copyFieldsTo(obj) {
|
|
1744
|
+
obj._label = this._label;
|
|
1745
|
+
obj._placeholder = this._placeholder;
|
|
1746
|
+
obj._helpText = this._helpText;
|
|
1747
|
+
obj._required = this._required;
|
|
1748
|
+
obj._disabled = this._disabled;
|
|
1749
|
+
obj._defaultValue = this._defaultValue;
|
|
1750
|
+
obj._requiredExpression = this._requiredExpression;
|
|
1751
|
+
obj._hiddenExpression = this._hiddenExpression;
|
|
1752
|
+
obj._disabledExpression = this._disabledExpression;
|
|
1753
|
+
obj._className = this._className;
|
|
1754
|
+
obj._size = this.size;
|
|
1755
|
+
obj._getter = this._getter;
|
|
1756
|
+
obj._setter = this._setter;
|
|
1757
|
+
obj._validators = this._validators;
|
|
1675
1758
|
}
|
|
1676
1759
|
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1760
|
+
var FieldDescriptor;
|
|
1761
|
+
(function (FieldDescriptor) {
|
|
1762
|
+
let SizeEnum;
|
|
1763
|
+
(function (SizeEnum) {
|
|
1764
|
+
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
1765
|
+
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
1766
|
+
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
1767
|
+
})(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
|
|
1768
|
+
})(FieldDescriptor || (FieldDescriptor = {}));
|
|
1769
|
+
class FieldInputDescriptor extends AFieldDescriptor {
|
|
1770
|
+
constructor(editor, property) {
|
|
1679
1771
|
super(editor, property);
|
|
1680
|
-
this._fieldType =
|
|
1681
|
-
this.
|
|
1682
|
-
|
|
1683
|
-
this.
|
|
1684
|
-
this.
|
|
1685
|
-
this._excludeValueProperty = '';
|
|
1686
|
-
this._mainTableDescriptor = mainTableDescriptor;
|
|
1687
|
-
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
1688
|
-
this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);
|
|
1772
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1773
|
+
this._numberUseGrouping = true;
|
|
1774
|
+
// radio specific properties
|
|
1775
|
+
this._radioOptions = [];
|
|
1776
|
+
this._datePickerShowTime = false;
|
|
1689
1777
|
}
|
|
1690
1778
|
get fieldType() {
|
|
1691
1779
|
return this._fieldType;
|
|
1692
1780
|
}
|
|
1693
|
-
get
|
|
1694
|
-
return this.
|
|
1781
|
+
get rows() {
|
|
1782
|
+
return this._rows;
|
|
1783
|
+
}
|
|
1784
|
+
get numberMin() {
|
|
1785
|
+
return this._numberMin;
|
|
1786
|
+
}
|
|
1787
|
+
get numberMax() {
|
|
1788
|
+
return this._numberMax;
|
|
1789
|
+
}
|
|
1790
|
+
get numberStep() {
|
|
1791
|
+
return this._numberStep;
|
|
1792
|
+
}
|
|
1793
|
+
get numberMinFractionDigits() {
|
|
1794
|
+
return this._numberMinFractionDigits;
|
|
1695
1795
|
}
|
|
1696
|
-
get
|
|
1697
|
-
return this.
|
|
1796
|
+
get numberMaxFractionDigits() {
|
|
1797
|
+
return this._numberMaxFractionDigits;
|
|
1698
1798
|
}
|
|
1699
|
-
get
|
|
1700
|
-
return this.
|
|
1799
|
+
get numberUseGrouping() {
|
|
1800
|
+
return this._numberUseGrouping;
|
|
1701
1801
|
}
|
|
1702
|
-
get
|
|
1703
|
-
return this.
|
|
1802
|
+
get radioOptions() {
|
|
1803
|
+
return this._radioOptions;
|
|
1704
1804
|
}
|
|
1705
|
-
get
|
|
1706
|
-
return this.
|
|
1805
|
+
get datePickerFormat() {
|
|
1806
|
+
return this._datePickerFormat;
|
|
1707
1807
|
}
|
|
1708
|
-
get
|
|
1709
|
-
return this.
|
|
1808
|
+
get datePickerMin() {
|
|
1809
|
+
return this._datePickerMin;
|
|
1710
1810
|
}
|
|
1711
|
-
get
|
|
1712
|
-
return this.
|
|
1811
|
+
get datePickerMax() {
|
|
1812
|
+
return this._datePickerMax;
|
|
1713
1813
|
}
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
if (serviceType) {
|
|
1717
|
-
dataProvider.withServiceType(serviceType);
|
|
1718
|
-
}
|
|
1719
|
-
dataProvider.withGetAll(getAll);
|
|
1720
|
-
this._lookupTableDataProvider = dataProvider;
|
|
1721
|
-
return this;
|
|
1814
|
+
get datePickerShowTime() {
|
|
1815
|
+
return this._datePickerShowTime;
|
|
1722
1816
|
}
|
|
1723
|
-
|
|
1724
|
-
this.
|
|
1725
|
-
return this;
|
|
1817
|
+
get maxLength() {
|
|
1818
|
+
return this._maxLength;
|
|
1726
1819
|
}
|
|
1727
|
-
|
|
1728
|
-
this.
|
|
1729
|
-
return this;
|
|
1820
|
+
get minLength() {
|
|
1821
|
+
return this._minLength;
|
|
1730
1822
|
}
|
|
1731
|
-
|
|
1732
|
-
this.
|
|
1733
|
-
this._excludeFilterProperty = filterProperty;
|
|
1734
|
-
this._excludeValueProperty = valueProperty;
|
|
1735
|
-
return this;
|
|
1823
|
+
get pattern() {
|
|
1824
|
+
return this._pattern;
|
|
1736
1825
|
}
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
this.copyFieldsTo(field);
|
|
1740
|
-
field._fieldType = this._fieldType;
|
|
1741
|
-
field._actions = this._actions.map(a => a);
|
|
1742
|
-
field._lookupTableDataProvider = this._lookupTableDataProvider;
|
|
1743
|
-
field._hasLookupExcludeValues = this._hasLookupExcludeValues;
|
|
1744
|
-
field._excludeFilterProperty = this._excludeFilterProperty;
|
|
1745
|
-
field._excludeValueProperty = this._excludeValueProperty;
|
|
1746
|
-
return field;
|
|
1826
|
+
get mask() {
|
|
1827
|
+
return this._mask;
|
|
1747
1828
|
}
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
let TypeEnum;
|
|
1751
|
-
(function (TypeEnum) {
|
|
1752
|
-
TypeEnum[TypeEnum["DialogTableMultiselect"] = 0] = "DialogTableMultiselect";
|
|
1753
|
-
})(TypeEnum = FieldManyToManyEditorDescriptor.TypeEnum || (FieldManyToManyEditorDescriptor.TypeEnum = {}));
|
|
1754
|
-
let ActionEnum;
|
|
1755
|
-
(function (ActionEnum) {
|
|
1756
|
-
ActionEnum[ActionEnum["Add"] = 0] = "Add";
|
|
1757
|
-
ActionEnum[ActionEnum["Delete"] = 1] = "Delete";
|
|
1758
|
-
})(ActionEnum = FieldManyToManyEditorDescriptor.ActionEnum || (FieldManyToManyEditorDescriptor.ActionEnum = {}));
|
|
1759
|
-
})(FieldManyToManyEditorDescriptor || (FieldManyToManyEditorDescriptor = {}));
|
|
1760
|
-
class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
1761
|
-
constructor(editor, property, tableviewDescriptor) {
|
|
1762
|
-
super(editor, property);
|
|
1763
|
-
this._fieldType = FieldManyEditorDescriptor.TypeEnum.DialogEditor;
|
|
1764
|
-
this._fieldActions = [];
|
|
1765
|
-
this._actions = [];
|
|
1766
|
-
// this._modelType = modelType;
|
|
1767
|
-
this._tableviewDescriptor = tableviewDescriptor;
|
|
1768
|
-
this._fieldActions.push(FieldManyEditorDescriptor.ActionEnum.View, FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
|
|
1829
|
+
get slotChar() {
|
|
1830
|
+
return this._slotChar;
|
|
1769
1831
|
}
|
|
1770
|
-
get
|
|
1771
|
-
return this.
|
|
1832
|
+
get customComponentName() {
|
|
1833
|
+
return this._customComponentName;
|
|
1772
1834
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1835
|
+
asHidden() {
|
|
1836
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Hidden;
|
|
1837
|
+
return this;
|
|
1775
1838
|
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1839
|
+
asText(minLength, maxLength, pattern, isEmail) {
|
|
1840
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1841
|
+
this._minLength = minLength;
|
|
1842
|
+
this._maxLength = maxLength;
|
|
1843
|
+
this._pattern = pattern;
|
|
1844
|
+
if (isEmail) {
|
|
1845
|
+
this.withValidator('email', control => !Validators.email(control));
|
|
1846
|
+
}
|
|
1847
|
+
return this;
|
|
1778
1848
|
}
|
|
1779
|
-
|
|
1780
|
-
|
|
1849
|
+
asTextarea(rows = 3, minLength, maxLength, pattern) {
|
|
1850
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Textarea;
|
|
1851
|
+
this._rows = rows;
|
|
1852
|
+
this._minLength = minLength;
|
|
1853
|
+
this._maxLength = maxLength;
|
|
1854
|
+
this._pattern = pattern;
|
|
1855
|
+
return this;
|
|
1781
1856
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1857
|
+
asNumber(step, min, max, minFractionDigits, maxFractionDigits, numberUseGrouping = true) {
|
|
1858
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Number;
|
|
1859
|
+
this._numberStep = step;
|
|
1860
|
+
this._numberMinFractionDigits = minFractionDigits;
|
|
1861
|
+
this._numberMaxFractionDigits = maxFractionDigits;
|
|
1862
|
+
this._numberMin = min !== null && min !== void 0 ? min : Number.MIN_SAFE_INTEGER;
|
|
1863
|
+
this._numberMax = max !== null && max !== void 0 ? max : Number.MAX_SAFE_INTEGER;
|
|
1864
|
+
this._numberUseGrouping = numberUseGrouping;
|
|
1865
|
+
return this;
|
|
1784
1866
|
}
|
|
1785
|
-
|
|
1786
|
-
|
|
1867
|
+
asSwitch() {
|
|
1868
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Switch;
|
|
1869
|
+
return this;
|
|
1787
1870
|
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1871
|
+
asRadio(options, optionsTitlePath) {
|
|
1872
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Radio;
|
|
1873
|
+
this._radioOptions = options.map(o => ({ value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}` }));
|
|
1874
|
+
return this;
|
|
1790
1875
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1876
|
+
asRadioFromEnum(enumType, optionsTitlePath, values, nameAsValue = false) {
|
|
1877
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Radio;
|
|
1878
|
+
if (typeof optionsTitlePath === 'undefined') {
|
|
1879
|
+
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1880
|
+
}
|
|
1881
|
+
this._radioOptions = Array.isArray(values)
|
|
1882
|
+
? EnumUtil.fromValuesAsEnumValueArray(enumType, values, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
|
|
1883
|
+
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
|
|
1884
|
+
return this;
|
|
1793
1885
|
}
|
|
1794
|
-
|
|
1795
|
-
this.
|
|
1886
|
+
asDatePicker(format, min, max, showTime) {
|
|
1887
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Datepicker;
|
|
1888
|
+
this._datePickerFormat = format ? format : 'dd.mm.yy';
|
|
1889
|
+
this._datePickerMin = min;
|
|
1890
|
+
this._datePickerMax = max;
|
|
1891
|
+
this._datePickerShowTime = showTime !== null && showTime !== void 0 ? showTime : false;
|
|
1796
1892
|
return this;
|
|
1797
1893
|
}
|
|
1798
|
-
|
|
1799
|
-
this.
|
|
1894
|
+
asMask(mask, slotChar) {
|
|
1895
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Mask;
|
|
1896
|
+
this._mask = mask;
|
|
1897
|
+
this._slotChar = slotChar;
|
|
1800
1898
|
return this;
|
|
1801
1899
|
}
|
|
1802
|
-
|
|
1803
|
-
this.
|
|
1900
|
+
asCustomComponent(customComponentName) {
|
|
1901
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Custom;
|
|
1902
|
+
this._customComponentName = customComponentName;
|
|
1804
1903
|
return this;
|
|
1805
1904
|
}
|
|
1806
1905
|
copy() {
|
|
1807
|
-
const field = new
|
|
1906
|
+
const field = new FieldInputDescriptor(this._editor, this._property);
|
|
1808
1907
|
this.copyFieldsTo(field);
|
|
1809
1908
|
field._fieldType = this._fieldType;
|
|
1810
|
-
field.
|
|
1909
|
+
field._rows = this._rows;
|
|
1910
|
+
field._numberMin = this._numberMin;
|
|
1911
|
+
field._numberMax = this._numberMax;
|
|
1912
|
+
field._numberStep = this._numberStep;
|
|
1913
|
+
field._numberMinFractionDigits = this._numberMinFractionDigits;
|
|
1914
|
+
field._numberMaxFractionDigits = this._numberMaxFractionDigits;
|
|
1915
|
+
field._numberUseGrouping = this._numberUseGrouping;
|
|
1916
|
+
field._radioOptions = [...this._radioOptions];
|
|
1917
|
+
field._datePickerFormat = this._datePickerFormat;
|
|
1918
|
+
field._datePickerMin = this._datePickerMin;
|
|
1919
|
+
field._datePickerMax = this._datePickerMax;
|
|
1920
|
+
field._datePickerShowTime = this._datePickerShowTime;
|
|
1921
|
+
field._maxLength = this._maxLength;
|
|
1922
|
+
field._minLength = this._minLength;
|
|
1923
|
+
field._pattern = this._pattern;
|
|
1924
|
+
field._mask = this._mask;
|
|
1925
|
+
field._slotChar = this._slotChar;
|
|
1926
|
+
field._customComponentName = this._customComponentName;
|
|
1811
1927
|
return field;
|
|
1812
1928
|
}
|
|
1813
1929
|
}
|
|
1814
|
-
(function (
|
|
1930
|
+
(function (FieldInputDescriptor) {
|
|
1815
1931
|
let TypeEnum;
|
|
1816
1932
|
(function (TypeEnum) {
|
|
1817
|
-
TypeEnum[TypeEnum["
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
})(
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
this.
|
|
1832
|
-
this.
|
|
1833
|
-
this.
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
get validators() {
|
|
1839
|
-
return this._validators;
|
|
1840
|
-
}
|
|
1841
|
-
get baseName() {
|
|
1842
|
-
return `${this.groupName()}_`;
|
|
1843
|
-
}
|
|
1844
|
-
get name() {
|
|
1845
|
-
return this._name;
|
|
1846
|
-
}
|
|
1847
|
-
get default() {
|
|
1848
|
-
return this._default;
|
|
1849
|
-
}
|
|
1850
|
-
withTitle(title) {
|
|
1851
|
-
this._title = title;
|
|
1852
|
-
return this;
|
|
1853
|
-
}
|
|
1854
|
-
withValidator(name, expression) {
|
|
1855
|
-
this._validators.push(new FieldValidator(name, expression, undefined));
|
|
1856
|
-
return this;
|
|
1857
|
-
}
|
|
1858
|
-
}
|
|
1859
|
-
class FieldTabGroupDescriptor extends AFieldGroupDescriptor {
|
|
1860
|
-
constructor(editor, name) {
|
|
1861
|
-
super(editor, name);
|
|
1933
|
+
TypeEnum[TypeEnum["Hidden"] = 0] = "Hidden";
|
|
1934
|
+
TypeEnum[TypeEnum["Text"] = 1] = "Text";
|
|
1935
|
+
TypeEnum[TypeEnum["Textarea"] = 2] = "Textarea";
|
|
1936
|
+
TypeEnum[TypeEnum["Number"] = 3] = "Number";
|
|
1937
|
+
TypeEnum[TypeEnum["Switch"] = 4] = "Switch";
|
|
1938
|
+
TypeEnum[TypeEnum["Radio"] = 5] = "Radio";
|
|
1939
|
+
TypeEnum[TypeEnum["Datepicker"] = 6] = "Datepicker";
|
|
1940
|
+
TypeEnum[TypeEnum["Mask"] = 7] = "Mask";
|
|
1941
|
+
TypeEnum[TypeEnum["Custom"] = 8] = "Custom";
|
|
1942
|
+
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
1943
|
+
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
1944
|
+
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
1945
|
+
constructor(editor, property, modelType) {
|
|
1946
|
+
super(editor, property);
|
|
1947
|
+
this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
1948
|
+
this._itemsLabelTranslate = false;
|
|
1949
|
+
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
1950
|
+
this._autocompleteOpenOnFocus = false;
|
|
1951
|
+
this._autocompleteInlineSearch = false;
|
|
1952
|
+
this._modelType = modelType;
|
|
1953
|
+
ModelUtil.trySetLookupItemsProperties(this);
|
|
1862
1954
|
}
|
|
1863
|
-
get
|
|
1864
|
-
return this.
|
|
1955
|
+
get lookupType() {
|
|
1956
|
+
return this._lookupType;
|
|
1865
1957
|
}
|
|
1866
|
-
|
|
1867
|
-
return
|
|
1958
|
+
get itemsLabelProperty() {
|
|
1959
|
+
return this._itemsLabelProperty;
|
|
1868
1960
|
}
|
|
1869
|
-
|
|
1870
|
-
this.
|
|
1871
|
-
return this;
|
|
1961
|
+
get itemsLabelTranslate() {
|
|
1962
|
+
return this._itemsLabelTranslate;
|
|
1872
1963
|
}
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
tab._title = this._title;
|
|
1876
|
-
tab._fields = this.fields.map(f => f.copy());
|
|
1877
|
-
return tab;
|
|
1964
|
+
get itemsValueProperty() {
|
|
1965
|
+
return this._itemsValueProperty;
|
|
1878
1966
|
}
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
constructor(editor, name) {
|
|
1882
|
-
super(editor, name);
|
|
1967
|
+
get itemsDisabledProperty() {
|
|
1968
|
+
return this._itemsDisabledProperty;
|
|
1883
1969
|
}
|
|
1884
|
-
get
|
|
1885
|
-
return this.
|
|
1970
|
+
get dataKeyProperty() {
|
|
1971
|
+
return this._dataKeyProperty;
|
|
1886
1972
|
}
|
|
1887
|
-
|
|
1888
|
-
return
|
|
1973
|
+
get dataProvider() {
|
|
1974
|
+
return this._dataProvider;
|
|
1889
1975
|
}
|
|
1890
|
-
|
|
1891
|
-
this.
|
|
1892
|
-
return this;
|
|
1976
|
+
get autocompleteOpenOnFocus() {
|
|
1977
|
+
return this._autocompleteOpenOnFocus;
|
|
1893
1978
|
}
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
group._title = this._title;
|
|
1897
|
-
group._fields = this.fields.map(f => f.copy());
|
|
1898
|
-
return group;
|
|
1979
|
+
get autocompleteInlineSearch() {
|
|
1980
|
+
return this._autocompleteInlineSearch;
|
|
1899
1981
|
}
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
class FieldValidator {
|
|
1903
|
-
constructor(name, expression, message, options) {
|
|
1904
|
-
this._name = name;
|
|
1905
|
-
this._expression = expression;
|
|
1906
|
-
this._message = message;
|
|
1907
|
-
this._options = options;
|
|
1982
|
+
get dropdownClassName() {
|
|
1983
|
+
return this._dropdownClassName;
|
|
1908
1984
|
}
|
|
1909
|
-
get
|
|
1910
|
-
return this.
|
|
1985
|
+
get modelType() {
|
|
1986
|
+
return this._modelType;
|
|
1911
1987
|
}
|
|
1912
|
-
get
|
|
1913
|
-
return this.
|
|
1988
|
+
get dialogTableDescriptor() {
|
|
1989
|
+
return this._dialogTableDescriptor;
|
|
1914
1990
|
}
|
|
1915
|
-
get
|
|
1916
|
-
return this.
|
|
1991
|
+
get dialogTableDataProvider() {
|
|
1992
|
+
return this._dialogTableDataProvider;
|
|
1917
1993
|
}
|
|
1918
|
-
|
|
1919
|
-
|
|
1994
|
+
withItemsLabelProperty(itemsLabelProperty, translate = false) {
|
|
1995
|
+
this._itemsLabelProperty = itemsLabelProperty;
|
|
1996
|
+
this._itemsLabelTranslate = translate;
|
|
1997
|
+
return this;
|
|
1920
1998
|
}
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
var _a, _b;
|
|
1926
|
-
this._type = modelType;
|
|
1927
|
-
this._idPropertyName = (_a = idProperty !== null && idProperty !== void 0 ? idProperty : ModelUtil.findIdAttribute(modelType)) !== null && _a !== void 0 ? _a : undefined;
|
|
1928
|
-
this._titlePropertyName = (_b = titleProperty !== null && titleProperty !== void 0 ? titleProperty : ModelUtil.findTitleAttribute(modelType)) !== null && _b !== void 0 ? _b : undefined;
|
|
1929
|
-
this._typeName = TypeUtil.findTypeName(this._type);
|
|
1999
|
+
withItemsValueProperty(itemsValueProperty) {
|
|
2000
|
+
this._itemsValueProperty = itemsValueProperty;
|
|
2001
|
+
this._dataKeyProperty = undefined;
|
|
2002
|
+
return this;
|
|
1930
2003
|
}
|
|
1931
|
-
|
|
1932
|
-
|
|
2004
|
+
withItemsDisabledProperty(itemsDisabledProperty) {
|
|
2005
|
+
this._itemsDisabledProperty = itemsDisabledProperty;
|
|
2006
|
+
return this;
|
|
1933
2007
|
}
|
|
1934
|
-
|
|
1935
|
-
|
|
2008
|
+
withDataKeyProperty(property) {
|
|
2009
|
+
this._dataKeyProperty = property;
|
|
2010
|
+
this._itemsValueProperty = undefined;
|
|
2011
|
+
return this;
|
|
1936
2012
|
}
|
|
1937
|
-
|
|
1938
|
-
|
|
2013
|
+
withLookup(lookup, serviceType) {
|
|
2014
|
+
const dataProvider = new LookupDataProvider(this._modelType);
|
|
2015
|
+
if (serviceType) {
|
|
2016
|
+
dataProvider.withServiceType(serviceType);
|
|
2017
|
+
}
|
|
2018
|
+
dataProvider.withLookup(lookup);
|
|
2019
|
+
this._dataProvider = dataProvider;
|
|
2020
|
+
return this;
|
|
1939
2021
|
}
|
|
1940
|
-
|
|
1941
|
-
|
|
2022
|
+
withLookupDataProvider(dataProvider) {
|
|
2023
|
+
this._dataProvider = dataProvider;
|
|
2024
|
+
return this;
|
|
1942
2025
|
}
|
|
1943
|
-
|
|
1944
|
-
|
|
2026
|
+
withConfig(config) {
|
|
2027
|
+
return super.withConfig(config);
|
|
2028
|
+
}
|
|
2029
|
+
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
2030
|
+
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;
|
|
2031
|
+
this._autocompleteOpenOnFocus = openOnFocus;
|
|
2032
|
+
this._autocompleteInlineSearch = inlineSearch;
|
|
1945
2033
|
return this;
|
|
1946
2034
|
}
|
|
1947
|
-
|
|
1948
|
-
this.
|
|
2035
|
+
asDialog(lookupTableDescriptor, tableDataProvider) {
|
|
2036
|
+
this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dialog;
|
|
2037
|
+
this._dialogTableDescriptor = lookupTableDescriptor;
|
|
2038
|
+
this._dialogTableDataProvider = tableDataProvider;
|
|
1949
2039
|
return this;
|
|
1950
2040
|
}
|
|
1951
2041
|
copy() {
|
|
1952
|
-
const
|
|
1953
|
-
|
|
2042
|
+
const field = new FieldLookupDescriptor(this._editor, this._property, this._modelType);
|
|
2043
|
+
this.copyFieldsTo(field);
|
|
2044
|
+
field._lookupType = this._lookupType;
|
|
2045
|
+
field._itemsLabelProperty = this._itemsLabelProperty;
|
|
2046
|
+
field._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
2047
|
+
field._itemsValueProperty = this._itemsValueProperty;
|
|
2048
|
+
field._itemsDisabledProperty = this._itemsDisabledProperty;
|
|
2049
|
+
field._dataKeyProperty = this._dataKeyProperty;
|
|
2050
|
+
field._dataProvider = this._dataProvider;
|
|
2051
|
+
field._dropdownClassName = this._dropdownClassName;
|
|
2052
|
+
field._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;
|
|
2053
|
+
field._autocompleteInlineSearch = this._autocompleteInlineSearch;
|
|
2054
|
+
field._dialogTableDescriptor = this._dialogTableDescriptor;
|
|
2055
|
+
return field;
|
|
1954
2056
|
}
|
|
1955
2057
|
}
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
this.
|
|
1968
|
-
this.
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
}
|
|
1982
|
-
get hideHeader() {
|
|
1983
|
-
return this._hideHeader;
|
|
1984
|
-
}
|
|
1985
|
-
get dataKeyProperty() {
|
|
1986
|
-
return this._dataKeyProperty;
|
|
1987
|
-
}
|
|
1988
|
-
get hasDefaultSort() {
|
|
1989
|
-
return this._hasDefaultSort;
|
|
1990
|
-
}
|
|
1991
|
-
get defaultSortProperty() {
|
|
1992
|
-
return this._defaultSortProperty;
|
|
1993
|
-
}
|
|
1994
|
-
get defaultSortAsc() {
|
|
1995
|
-
return this._defaultSortAsc;
|
|
1996
|
-
}
|
|
1997
|
-
get rowHeight() {
|
|
1998
|
-
return this._rowHeight;
|
|
2058
|
+
(function (FieldLookupDescriptor) {
|
|
2059
|
+
let LookupTypeEnum;
|
|
2060
|
+
(function (LookupTypeEnum) {
|
|
2061
|
+
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
2062
|
+
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
2063
|
+
LookupTypeEnum[LookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
2064
|
+
})(LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum || (FieldLookupDescriptor.LookupTypeEnum = {}));
|
|
2065
|
+
})(FieldLookupDescriptor || (FieldLookupDescriptor = {}));
|
|
2066
|
+
class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
2067
|
+
constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
2068
|
+
super(editor, property, null);
|
|
2069
|
+
this._nameAsValue = false;
|
|
2070
|
+
this._enumType = enumType;
|
|
2071
|
+
this._nameAsValue = nameAsValue;
|
|
2072
|
+
if (typeof optionsTitlePath === 'undefined') {
|
|
2073
|
+
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
2074
|
+
}
|
|
2075
|
+
this._optionEnumValues = Array.isArray(options)
|
|
2076
|
+
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
|
|
2077
|
+
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
|
|
2078
|
+
const dataProvider = new LookupDataProvider(null).withLookup(() => of(this._optionEnumValues));
|
|
2079
|
+
this.withLookupDataProvider(dataProvider);
|
|
2080
|
+
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
2081
|
+
this.withItemsValueProperty('value');
|
|
2082
|
+
this.withItemsDisabledProperty('disabled');
|
|
1999
2083
|
}
|
|
2000
|
-
get
|
|
2001
|
-
return this.
|
|
2084
|
+
get enumType() {
|
|
2085
|
+
return this._enumType;
|
|
2002
2086
|
}
|
|
2003
|
-
|
|
2004
|
-
|
|
2087
|
+
withDisabledOptions(...disabledOptions) {
|
|
2088
|
+
for (const disabledOption of disabledOptions) {
|
|
2089
|
+
const disabledOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, disabledOption) : disabledOption;
|
|
2090
|
+
if (disabledOptionValue) {
|
|
2091
|
+
const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);
|
|
2092
|
+
if (option) {
|
|
2093
|
+
option.disabled = true;
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
return this;
|
|
2005
2098
|
}
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
this.setDataKeyFromColumn();
|
|
2099
|
+
asAutocomplete(openOnFocus = true) {
|
|
2100
|
+
super.asAutocomplete(openOnFocus, true);
|
|
2009
2101
|
return this;
|
|
2010
2102
|
}
|
|
2011
|
-
|
|
2012
|
-
const
|
|
2013
|
-
this.
|
|
2014
|
-
this.
|
|
2015
|
-
|
|
2103
|
+
copy() {
|
|
2104
|
+
const field = new FieldLookupEnumDescriptor(this._editor, this._property, this._enumType, []);
|
|
2105
|
+
this.copyFieldsTo(field);
|
|
2106
|
+
field._lookupType = this._lookupType;
|
|
2107
|
+
field._itemsLabelProperty = this._itemsLabelProperty;
|
|
2108
|
+
field._itemsValueProperty = this._itemsValueProperty;
|
|
2109
|
+
field._itemsDisabledProperty = this._itemsDisabledProperty;
|
|
2110
|
+
field._dataKeyProperty = this._dataKeyProperty;
|
|
2111
|
+
field._dataProvider = this._dataProvider;
|
|
2112
|
+
return field;
|
|
2016
2113
|
}
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
this.
|
|
2022
|
-
|
|
2114
|
+
}
|
|
2115
|
+
class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
2116
|
+
constructor(editor, property, mainTableDescriptor, lookupTableDescriptor) {
|
|
2117
|
+
super(editor, property);
|
|
2118
|
+
this._fieldType = FieldManyToManyEditorDescriptor.TypeEnum.DialogTableMultiselect;
|
|
2119
|
+
this._lookupTableDataProvider = null;
|
|
2120
|
+
this._actions = [];
|
|
2121
|
+
this._hasLookupExcludeValues = false;
|
|
2122
|
+
this._excludeFilterProperty = '';
|
|
2123
|
+
this._excludeValueProperty = '';
|
|
2124
|
+
this._mainTableDescriptor = mainTableDescriptor;
|
|
2125
|
+
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
2126
|
+
this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);
|
|
2023
2127
|
}
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
column.asDate(displayFormat);
|
|
2027
|
-
this._columns.push(column);
|
|
2028
|
-
this.setDataKeyFromColumn();
|
|
2029
|
-
return column;
|
|
2128
|
+
get fieldType() {
|
|
2129
|
+
return this._fieldType;
|
|
2030
2130
|
}
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
column.asBoolean(yes, no, asIcon);
|
|
2034
|
-
this._columns.push(column);
|
|
2035
|
-
this.setDataKeyFromColumn();
|
|
2036
|
-
return column;
|
|
2131
|
+
get lookupTableDataProvider() {
|
|
2132
|
+
return this._lookupTableDataProvider;
|
|
2037
2133
|
}
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
column.asEnum(enumType, nameAsValue, titlePath);
|
|
2041
|
-
this._columns.push(column);
|
|
2042
|
-
this.setDataKeyFromColumn();
|
|
2043
|
-
return column;
|
|
2134
|
+
get actions() {
|
|
2135
|
+
return this._actions;
|
|
2044
2136
|
}
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
column.withModelType(modelType);
|
|
2048
|
-
column.withDisplayPropertyPath(displayProperty);
|
|
2049
|
-
this._columns.push(column);
|
|
2050
|
-
this.setDataKeyFromColumn();
|
|
2051
|
-
return column;
|
|
2137
|
+
get hasLookupExcludeValues() {
|
|
2138
|
+
return this._hasLookupExcludeValues;
|
|
2052
2139
|
}
|
|
2053
|
-
|
|
2054
|
-
this.
|
|
2055
|
-
return this;
|
|
2140
|
+
get excludeFilterProperty() {
|
|
2141
|
+
return this._excludeFilterProperty;
|
|
2056
2142
|
}
|
|
2057
|
-
|
|
2058
|
-
this.
|
|
2059
|
-
return this;
|
|
2143
|
+
get excludeValueProperty() {
|
|
2144
|
+
return this._excludeValueProperty;
|
|
2060
2145
|
}
|
|
2061
|
-
|
|
2062
|
-
this.
|
|
2063
|
-
return this;
|
|
2146
|
+
get mainTableDescriptor() {
|
|
2147
|
+
return this._mainTableDescriptor;
|
|
2064
2148
|
}
|
|
2065
|
-
|
|
2066
|
-
this.
|
|
2067
|
-
return this;
|
|
2149
|
+
get lookupTableDescriptor() {
|
|
2150
|
+
return this._lookupTableDescriptor;
|
|
2068
2151
|
}
|
|
2069
|
-
|
|
2070
|
-
|
|
2152
|
+
withLookup(getAll, serviceType) {
|
|
2153
|
+
const dataProvider = new TableviewDataProvider(this._mainTableDescriptor.model.type);
|
|
2154
|
+
if (serviceType) {
|
|
2155
|
+
dataProvider.withServiceType(serviceType);
|
|
2156
|
+
}
|
|
2157
|
+
dataProvider.withGetAll(getAll);
|
|
2158
|
+
this._lookupTableDataProvider = dataProvider;
|
|
2071
2159
|
return this;
|
|
2072
2160
|
}
|
|
2073
|
-
|
|
2074
|
-
this.
|
|
2075
|
-
this._defaultSortProperty.push(property);
|
|
2076
|
-
this._defaultSortAsc.push(asc);
|
|
2161
|
+
withLookupDataProvider(dataProvider) {
|
|
2162
|
+
this._lookupTableDataProvider = dataProvider;
|
|
2077
2163
|
return this;
|
|
2078
2164
|
}
|
|
2079
|
-
|
|
2080
|
-
this.
|
|
2165
|
+
withActions(actions = []) {
|
|
2166
|
+
this.actions.push(...actions);
|
|
2081
2167
|
return this;
|
|
2082
2168
|
}
|
|
2083
|
-
|
|
2084
|
-
this.
|
|
2169
|
+
withLookupExclude(filterProperty, valueProperty, hasLookupExclude = true) {
|
|
2170
|
+
this._hasLookupExcludeValues = hasLookupExclude;
|
|
2171
|
+
this._excludeFilterProperty = filterProperty;
|
|
2172
|
+
this._excludeValueProperty = valueProperty;
|
|
2085
2173
|
return this;
|
|
2086
2174
|
}
|
|
2087
2175
|
copy() {
|
|
2088
|
-
const
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
return
|
|
2097
|
-
}
|
|
2098
|
-
setDataKeyFromColumn() {
|
|
2099
|
-
if (!this._dataKeyProperty && this._columns.length === 1) {
|
|
2100
|
-
this._dataKeyProperty = this._columns[0].property;
|
|
2101
|
-
}
|
|
2176
|
+
const field = new FieldManyToManyEditorDescriptor(this._editor, this._property, this._mainTableDescriptor.copy(), this._lookupTableDescriptor.copy());
|
|
2177
|
+
this.copyFieldsTo(field);
|
|
2178
|
+
field._fieldType = this._fieldType;
|
|
2179
|
+
field._actions = this._actions.map(a => a);
|
|
2180
|
+
field._lookupTableDataProvider = this._lookupTableDataProvider;
|
|
2181
|
+
field._hasLookupExcludeValues = this._hasLookupExcludeValues;
|
|
2182
|
+
field._excludeFilterProperty = this._excludeFilterProperty;
|
|
2183
|
+
field._excludeValueProperty = this._excludeValueProperty;
|
|
2184
|
+
return field;
|
|
2102
2185
|
}
|
|
2103
2186
|
}
|
|
2104
|
-
(function (
|
|
2105
|
-
let
|
|
2106
|
-
(function (
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
this.
|
|
2119
|
-
this.
|
|
2120
|
-
this.
|
|
2121
|
-
this.
|
|
2122
|
-
|
|
2123
|
-
this.
|
|
2124
|
-
this._table = table;
|
|
2125
|
-
this._property = property;
|
|
2187
|
+
(function (FieldManyToManyEditorDescriptor) {
|
|
2188
|
+
let TypeEnum;
|
|
2189
|
+
(function (TypeEnum) {
|
|
2190
|
+
TypeEnum[TypeEnum["DialogTableMultiselect"] = 0] = "DialogTableMultiselect";
|
|
2191
|
+
})(TypeEnum = FieldManyToManyEditorDescriptor.TypeEnum || (FieldManyToManyEditorDescriptor.TypeEnum = {}));
|
|
2192
|
+
let ActionEnum;
|
|
2193
|
+
(function (ActionEnum) {
|
|
2194
|
+
ActionEnum[ActionEnum["Add"] = 0] = "Add";
|
|
2195
|
+
ActionEnum[ActionEnum["Delete"] = 1] = "Delete";
|
|
2196
|
+
})(ActionEnum = FieldManyToManyEditorDescriptor.ActionEnum || (FieldManyToManyEditorDescriptor.ActionEnum = {}));
|
|
2197
|
+
})(FieldManyToManyEditorDescriptor || (FieldManyToManyEditorDescriptor = {}));
|
|
2198
|
+
class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
2199
|
+
constructor(editor, property, tableviewDescriptor) {
|
|
2200
|
+
super(editor, property);
|
|
2201
|
+
this._fieldType = FieldManyEditorDescriptor.TypeEnum.DialogEditor;
|
|
2202
|
+
this._fieldActions = [];
|
|
2203
|
+
this._actions = [];
|
|
2204
|
+
// this._modelType = modelType;
|
|
2205
|
+
this._tableviewDescriptor = tableviewDescriptor;
|
|
2206
|
+
this._fieldActions.push(FieldManyEditorDescriptor.ActionEnum.View, FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
|
|
2126
2207
|
}
|
|
2127
|
-
get
|
|
2128
|
-
return this.
|
|
2208
|
+
get fieldType() {
|
|
2209
|
+
return this._fieldType;
|
|
2129
2210
|
}
|
|
2130
|
-
get
|
|
2131
|
-
return this.
|
|
2211
|
+
get fieldActions() {
|
|
2212
|
+
return this._fieldActions;
|
|
2132
2213
|
}
|
|
2133
|
-
get
|
|
2134
|
-
return this.
|
|
2214
|
+
get actions() {
|
|
2215
|
+
return this._actions;
|
|
2135
2216
|
}
|
|
2136
|
-
get
|
|
2137
|
-
return this.
|
|
2217
|
+
get tableviewDescriptor() {
|
|
2218
|
+
return this._tableviewDescriptor;
|
|
2138
2219
|
}
|
|
2139
|
-
get
|
|
2140
|
-
return this.
|
|
2220
|
+
get tableDescriptor() {
|
|
2221
|
+
return this._tableviewDescriptor.table;
|
|
2141
2222
|
}
|
|
2142
|
-
get
|
|
2143
|
-
return this.
|
|
2223
|
+
get editorForCreate() {
|
|
2224
|
+
return this._tableviewDescriptor.addEditor;
|
|
2144
2225
|
}
|
|
2145
|
-
get
|
|
2146
|
-
return this.
|
|
2226
|
+
get editorForRead() {
|
|
2227
|
+
return this._tableviewDescriptor.viewEditor;
|
|
2147
2228
|
}
|
|
2148
|
-
get
|
|
2149
|
-
return this.
|
|
2229
|
+
get editorForUpdate() {
|
|
2230
|
+
return this._tableviewDescriptor.editEditor;
|
|
2150
2231
|
}
|
|
2151
|
-
|
|
2152
|
-
|
|
2232
|
+
withFieldAction(action) {
|
|
2233
|
+
this._fieldActions.push(action);
|
|
2234
|
+
return this;
|
|
2153
2235
|
}
|
|
2154
|
-
|
|
2155
|
-
|
|
2236
|
+
withFieldActions(actions) {
|
|
2237
|
+
this._fieldActions = actions;
|
|
2238
|
+
return this;
|
|
2156
2239
|
}
|
|
2157
|
-
|
|
2158
|
-
|
|
2240
|
+
withAction(action) {
|
|
2241
|
+
this._actions.push(action);
|
|
2242
|
+
return this;
|
|
2159
2243
|
}
|
|
2160
|
-
|
|
2161
|
-
|
|
2244
|
+
copy() {
|
|
2245
|
+
const field = new FieldManyEditorDescriptor(this._editor, this._property, this._tableviewDescriptor.copy());
|
|
2246
|
+
this.copyFieldsTo(field);
|
|
2247
|
+
field._fieldType = this._fieldType;
|
|
2248
|
+
field._fieldActions = this._fieldActions.map(a => a);
|
|
2249
|
+
return field;
|
|
2162
2250
|
}
|
|
2163
|
-
|
|
2164
|
-
|
|
2251
|
+
}
|
|
2252
|
+
(function (FieldManyEditorDescriptor) {
|
|
2253
|
+
let TypeEnum;
|
|
2254
|
+
(function (TypeEnum) {
|
|
2255
|
+
TypeEnum[TypeEnum["DialogEditor"] = 0] = "DialogEditor";
|
|
2256
|
+
})(TypeEnum = FieldManyEditorDescriptor.TypeEnum || (FieldManyEditorDescriptor.TypeEnum = {}));
|
|
2257
|
+
let ActionEnum;
|
|
2258
|
+
(function (ActionEnum) {
|
|
2259
|
+
ActionEnum[ActionEnum["View"] = 0] = "View";
|
|
2260
|
+
ActionEnum[ActionEnum["Add"] = 1] = "Add";
|
|
2261
|
+
ActionEnum[ActionEnum["Edit"] = 2] = "Edit";
|
|
2262
|
+
ActionEnum[ActionEnum["Delete"] = 3] = "Delete";
|
|
2263
|
+
})(ActionEnum = FieldManyEditorDescriptor.ActionEnum || (FieldManyEditorDescriptor.ActionEnum = {}));
|
|
2264
|
+
})(FieldManyEditorDescriptor || (FieldManyEditorDescriptor = {}));
|
|
2265
|
+
class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
2266
|
+
constructor(editor, name) {
|
|
2267
|
+
super(editor);
|
|
2268
|
+
this._fields = [];
|
|
2269
|
+
this._validators = [];
|
|
2270
|
+
this._name = `${this.baseName}${name}`;
|
|
2271
|
+
this._default = name === EditorDescriptor.defaultGroupName;
|
|
2165
2272
|
}
|
|
2166
|
-
get
|
|
2167
|
-
return this.
|
|
2273
|
+
get title() {
|
|
2274
|
+
return this._title;
|
|
2168
2275
|
}
|
|
2169
|
-
get
|
|
2170
|
-
return this.
|
|
2276
|
+
get validators() {
|
|
2277
|
+
return this._validators;
|
|
2171
2278
|
}
|
|
2172
|
-
|
|
2173
|
-
this.
|
|
2174
|
-
return this;
|
|
2279
|
+
get baseName() {
|
|
2280
|
+
return `${this.groupName()}_`;
|
|
2175
2281
|
}
|
|
2176
|
-
|
|
2177
|
-
this.
|
|
2178
|
-
this._displayFormat = displayFormat;
|
|
2179
|
-
return this;
|
|
2282
|
+
get name() {
|
|
2283
|
+
return this._name;
|
|
2180
2284
|
}
|
|
2181
|
-
|
|
2182
|
-
this.
|
|
2183
|
-
|
|
2285
|
+
get default() {
|
|
2286
|
+
return this._default;
|
|
2287
|
+
}
|
|
2288
|
+
withTitle(title) {
|
|
2289
|
+
this._title = title;
|
|
2184
2290
|
return this;
|
|
2185
2291
|
}
|
|
2186
|
-
|
|
2187
|
-
this.
|
|
2188
|
-
this._booleanAsIcon = asIcon;
|
|
2189
|
-
this._booleanYes = yes;
|
|
2190
|
-
this._booleanNo = no;
|
|
2292
|
+
withValidator(name, expression) {
|
|
2293
|
+
this._validators.push(new FieldValidator(name, expression, undefined));
|
|
2191
2294
|
return this;
|
|
2192
2295
|
}
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
if (typeof titlePath === 'undefined') {
|
|
2198
|
-
titlePath = TypeUtil.findEnumName(enumType);
|
|
2199
|
-
}
|
|
2200
|
-
this._enumTitlePath = titlePath;
|
|
2201
|
-
return this;
|
|
2296
|
+
}
|
|
2297
|
+
class FieldTabGroupDescriptor extends AFieldGroupDescriptor {
|
|
2298
|
+
constructor(editor, name) {
|
|
2299
|
+
super(editor, name);
|
|
2202
2300
|
}
|
|
2203
|
-
|
|
2204
|
-
this.
|
|
2205
|
-
return this;
|
|
2301
|
+
get fields() {
|
|
2302
|
+
return this._fields;
|
|
2206
2303
|
}
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
return this;
|
|
2304
|
+
groupName() {
|
|
2305
|
+
return 'tab';
|
|
2210
2306
|
}
|
|
2211
|
-
|
|
2212
|
-
this.
|
|
2307
|
+
addField(field) {
|
|
2308
|
+
this._fields.push(field);
|
|
2213
2309
|
return this;
|
|
2214
2310
|
}
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
filterType = FilterDescriptor.TypeEnum.Number;
|
|
2221
|
-
break;
|
|
2222
|
-
case ColumnDescriptor.TypeEnum.Boolean:
|
|
2223
|
-
filterType = FilterDescriptor.TypeEnum.Boolean;
|
|
2224
|
-
break;
|
|
2225
|
-
case ColumnDescriptor.TypeEnum.Date:
|
|
2226
|
-
filterType = FilterDescriptor.TypeEnum.Date;
|
|
2227
|
-
break;
|
|
2228
|
-
case ColumnDescriptor.TypeEnum.String:
|
|
2229
|
-
default:
|
|
2230
|
-
filterType = FilterDescriptor.TypeEnum.String;
|
|
2231
|
-
break;
|
|
2232
|
-
}
|
|
2233
|
-
this._filterDescriptor.asFilterType(filterType);
|
|
2234
|
-
return this._filterDescriptor;
|
|
2311
|
+
copy() {
|
|
2312
|
+
const tab = new FieldTabGroupDescriptor(this._editor, this.name.substring(this.baseName.length));
|
|
2313
|
+
tab._title = this._title;
|
|
2314
|
+
tab._fields = this.fields.map(f => f.copy());
|
|
2315
|
+
return tab;
|
|
2235
2316
|
}
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2317
|
+
}
|
|
2318
|
+
class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
2319
|
+
constructor(editor, name) {
|
|
2320
|
+
super(editor, name);
|
|
2240
2321
|
}
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
|
|
2244
|
-
}
|
|
2245
|
-
const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
|
|
2246
|
-
this._filterDescriptor = filterDescriptor;
|
|
2247
|
-
return filterDescriptor;
|
|
2322
|
+
get fields() {
|
|
2323
|
+
return this._fields;
|
|
2248
2324
|
}
|
|
2249
|
-
|
|
2250
|
-
|
|
2325
|
+
groupName() {
|
|
2326
|
+
return 'group';
|
|
2327
|
+
}
|
|
2328
|
+
addField(field) {
|
|
2329
|
+
this._fields.push(field);
|
|
2251
2330
|
return this;
|
|
2252
2331
|
}
|
|
2253
2332
|
copy() {
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
descriptor._isSortEnabled = this._isSortEnabled;
|
|
2259
|
-
descriptor._columnType = this._columnType;
|
|
2260
|
-
descriptor._filterDescriptor = (_a = this._filterDescriptor) === null || _a === void 0 ? void 0 : _a.copy();
|
|
2261
|
-
descriptor._enumType = this._enumType;
|
|
2262
|
-
descriptor._enumTitlePath = this._enumTitlePath;
|
|
2263
|
-
descriptor._enumNameAsValue = this._enumNameAsValue;
|
|
2264
|
-
descriptor._booleanAsIcon = this._booleanAsIcon;
|
|
2265
|
-
descriptor._booleanYes = this._booleanYes;
|
|
2266
|
-
descriptor._booleanNo = this._booleanNo;
|
|
2267
|
-
return descriptor;
|
|
2333
|
+
const group = new FieldGroupDescriptor(this._editor, this.name.substring(this.baseName.length));
|
|
2334
|
+
group._title = this._title;
|
|
2335
|
+
group._fields = this.fields.map(f => f.copy());
|
|
2336
|
+
return group;
|
|
2268
2337
|
}
|
|
2269
2338
|
}
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
(
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
TypeEnum[TypeEnum["Enum"] = 4] = "Enum";
|
|
2278
|
-
})(TypeEnum = ColumnDescriptor.TypeEnum || (ColumnDescriptor.TypeEnum = {}));
|
|
2279
|
-
})(ColumnDescriptor || (ColumnDescriptor = {}));
|
|
2280
|
-
class FilterDescriptor {
|
|
2281
|
-
constructor(property) {
|
|
2282
|
-
this._filterType = FilterDescriptor.TypeEnum.String;
|
|
2283
|
-
this._matchModes = null;
|
|
2284
|
-
this._className = '';
|
|
2285
|
-
this._property = property;
|
|
2339
|
+
|
|
2340
|
+
class FieldValidator {
|
|
2341
|
+
constructor(name, expression, message, options) {
|
|
2342
|
+
this._name = name;
|
|
2343
|
+
this._expression = expression;
|
|
2344
|
+
this._message = message;
|
|
2345
|
+
this._options = options;
|
|
2286
2346
|
}
|
|
2287
|
-
get
|
|
2288
|
-
return this.
|
|
2347
|
+
get name() {
|
|
2348
|
+
return this._name;
|
|
2289
2349
|
}
|
|
2290
|
-
get
|
|
2291
|
-
return this.
|
|
2350
|
+
get expression() {
|
|
2351
|
+
return this._expression;
|
|
2292
2352
|
}
|
|
2293
|
-
get
|
|
2294
|
-
return this.
|
|
2353
|
+
get message() {
|
|
2354
|
+
return this._message;
|
|
2295
2355
|
}
|
|
2296
|
-
get
|
|
2297
|
-
return this.
|
|
2356
|
+
get options() {
|
|
2357
|
+
return this._options;
|
|
2298
2358
|
}
|
|
2299
|
-
|
|
2300
|
-
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
class ModelDescriptor {
|
|
2362
|
+
constructor(modelType, idProperty, titleProperty) {
|
|
2363
|
+
var _a, _b;
|
|
2364
|
+
this._type = modelType;
|
|
2365
|
+
this._idPropertyName = (_a = idProperty !== null && idProperty !== void 0 ? idProperty : ModelUtil.findIdAttribute(modelType)) !== null && _a !== void 0 ? _a : undefined;
|
|
2366
|
+
this._titlePropertyName = (_b = titleProperty !== null && titleProperty !== void 0 ? titleProperty : ModelUtil.findTitleAttribute(modelType)) !== null && _b !== void 0 ? _b : undefined;
|
|
2367
|
+
this._typeName = TypeUtil.findTypeName(this._type);
|
|
2301
2368
|
}
|
|
2302
|
-
get
|
|
2303
|
-
return this.
|
|
2369
|
+
get type() {
|
|
2370
|
+
return this._type;
|
|
2304
2371
|
}
|
|
2305
|
-
|
|
2306
|
-
this.
|
|
2307
|
-
return this;
|
|
2372
|
+
get typeName() {
|
|
2373
|
+
return this._typeName;
|
|
2308
2374
|
}
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
* @param filterProperty
|
|
2312
|
-
*/
|
|
2313
|
-
withFilterProperty(filterProperty) {
|
|
2314
|
-
this._filterProperty = filterProperty;
|
|
2315
|
-
return this;
|
|
2375
|
+
get idPropertyName() {
|
|
2376
|
+
return this._idPropertyName;
|
|
2316
2377
|
}
|
|
2317
|
-
|
|
2318
|
-
this.
|
|
2319
|
-
return this;
|
|
2378
|
+
get titlePropertyName() {
|
|
2379
|
+
return this._titlePropertyName;
|
|
2320
2380
|
}
|
|
2321
|
-
|
|
2322
|
-
this.
|
|
2381
|
+
withIdPropertyName(idProperty) {
|
|
2382
|
+
this._idPropertyName = idProperty;
|
|
2323
2383
|
return this;
|
|
2324
2384
|
}
|
|
2325
|
-
|
|
2326
|
-
this.
|
|
2385
|
+
withTitlePropertyName(titleProperty) {
|
|
2386
|
+
this._titlePropertyName = titleProperty;
|
|
2327
2387
|
return this;
|
|
2328
2388
|
}
|
|
2329
2389
|
copy() {
|
|
2330
|
-
const
|
|
2331
|
-
|
|
2332
|
-
return descriptor;
|
|
2333
|
-
}
|
|
2334
|
-
copyFieldsTo(descriptor) {
|
|
2335
|
-
descriptor._filterType = this._filterType;
|
|
2336
|
-
descriptor._filterProperty = this._filterProperty;
|
|
2337
|
-
descriptor._placeholder = this._placeholder;
|
|
2338
|
-
descriptor._className = this._className;
|
|
2390
|
+
const model = new ModelDescriptor(this._type, this._idPropertyName, this._titlePropertyName);
|
|
2391
|
+
return model;
|
|
2339
2392
|
}
|
|
2340
2393
|
}
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
(
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
})(FilterDescriptor || (FilterDescriptor = {}));
|
|
2370
|
-
class FilterLookupDescriptor extends FilterDescriptor {
|
|
2371
|
-
constructor(property, modelType) {
|
|
2372
|
-
super(property);
|
|
2373
|
-
this._modelType = null;
|
|
2374
|
-
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
2375
|
-
this._itemsLabelTranslate = false;
|
|
2376
|
-
this._multiselect = false;
|
|
2377
|
-
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
2378
|
-
this._autocompleteOpenOnFocus = false;
|
|
2379
|
-
this._autocompleteInlineSearch = false;
|
|
2380
|
-
this._modelType = modelType;
|
|
2381
|
-
this._filterType = FilterDescriptor.TypeEnum.Lookup;
|
|
2382
|
-
ModelUtil.trySetLookupItemsProperties(this);
|
|
2394
|
+
|
|
2395
|
+
class TableDescriptor {
|
|
2396
|
+
constructor(modelType, idProperty, titleProperty) {
|
|
2397
|
+
this._filterDisplay = TableDescriptor.FilterDisplayEnum.Menu;
|
|
2398
|
+
this._paginationMode = TableDescriptor.PaginationModeEnum.Pagination;
|
|
2399
|
+
this._columns = [];
|
|
2400
|
+
this._hideHeader = false;
|
|
2401
|
+
this._hasDefaultSort = false;
|
|
2402
|
+
this._defaultSortProperty = [];
|
|
2403
|
+
this._defaultSortAsc = [];
|
|
2404
|
+
this._rowHeight = 45;
|
|
2405
|
+
this._tableFullHeightOffset = 315;
|
|
2406
|
+
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
2407
|
+
}
|
|
2408
|
+
get filterDisplay() {
|
|
2409
|
+
return this._filterDisplay;
|
|
2410
|
+
}
|
|
2411
|
+
get paginationMode() {
|
|
2412
|
+
return this._paginationMode;
|
|
2413
|
+
}
|
|
2414
|
+
get columns() {
|
|
2415
|
+
return this._columns;
|
|
2416
|
+
}
|
|
2417
|
+
get title() {
|
|
2418
|
+
return this._title;
|
|
2419
|
+
}
|
|
2420
|
+
get hideHeader() {
|
|
2421
|
+
return this._hideHeader;
|
|
2383
2422
|
}
|
|
2384
|
-
get
|
|
2385
|
-
return this.
|
|
2423
|
+
get dataKeyProperty() {
|
|
2424
|
+
return this._dataKeyProperty;
|
|
2386
2425
|
}
|
|
2387
|
-
get
|
|
2388
|
-
return this.
|
|
2426
|
+
get hasDefaultSort() {
|
|
2427
|
+
return this._hasDefaultSort;
|
|
2389
2428
|
}
|
|
2390
|
-
get
|
|
2391
|
-
return this.
|
|
2429
|
+
get defaultSortProperty() {
|
|
2430
|
+
return this._defaultSortProperty;
|
|
2392
2431
|
}
|
|
2393
|
-
get
|
|
2394
|
-
return this.
|
|
2432
|
+
get defaultSortAsc() {
|
|
2433
|
+
return this._defaultSortAsc;
|
|
2395
2434
|
}
|
|
2396
|
-
get
|
|
2397
|
-
return this.
|
|
2435
|
+
get rowHeight() {
|
|
2436
|
+
return this._rowHeight;
|
|
2398
2437
|
}
|
|
2399
|
-
get
|
|
2400
|
-
return this.
|
|
2438
|
+
get tableFullHeightOffset() {
|
|
2439
|
+
return this._tableFullHeightOffset;
|
|
2401
2440
|
}
|
|
2402
|
-
get
|
|
2403
|
-
return this.
|
|
2441
|
+
get model() {
|
|
2442
|
+
return this._model;
|
|
2404
2443
|
}
|
|
2405
|
-
|
|
2406
|
-
|
|
2444
|
+
addColumnDescriptor(column) {
|
|
2445
|
+
this._columns.push(column);
|
|
2446
|
+
this.setDataKeyFromColumn();
|
|
2447
|
+
return this;
|
|
2407
2448
|
}
|
|
2408
|
-
|
|
2409
|
-
|
|
2449
|
+
addColumn(property) {
|
|
2450
|
+
const column = new ColumnDescriptor(this, property);
|
|
2451
|
+
this._columns.push(column);
|
|
2452
|
+
this.setDataKeyFromColumn();
|
|
2453
|
+
return column;
|
|
2410
2454
|
}
|
|
2411
|
-
|
|
2412
|
-
|
|
2455
|
+
addColumnNumber(property, displayFormat) {
|
|
2456
|
+
const column = new ColumnDescriptor(this, property);
|
|
2457
|
+
column.asNumber(displayFormat);
|
|
2458
|
+
this._columns.push(column);
|
|
2459
|
+
this.setDataKeyFromColumn();
|
|
2460
|
+
return column;
|
|
2413
2461
|
}
|
|
2414
|
-
|
|
2415
|
-
|
|
2462
|
+
addColumnDate(property, displayFormat) {
|
|
2463
|
+
const column = new ColumnDescriptor(this, property);
|
|
2464
|
+
column.asDate(displayFormat);
|
|
2465
|
+
this._columns.push(column);
|
|
2466
|
+
this.setDataKeyFromColumn();
|
|
2467
|
+
return column;
|
|
2416
2468
|
}
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2469
|
+
addColumnBoolean(property, yes, no, asIcon = false) {
|
|
2470
|
+
const column = new ColumnDescriptor(this, property);
|
|
2471
|
+
column.asBoolean(yes, no, asIcon);
|
|
2472
|
+
this._columns.push(column);
|
|
2473
|
+
this.setDataKeyFromColumn();
|
|
2474
|
+
return column;
|
|
2475
|
+
}
|
|
2476
|
+
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2477
|
+
const column = new ColumnDescriptor(this, property);
|
|
2478
|
+
column.asEnum(enumType, nameAsValue, titlePath);
|
|
2479
|
+
this._columns.push(column);
|
|
2480
|
+
this.setDataKeyFromColumn();
|
|
2481
|
+
return column;
|
|
2482
|
+
}
|
|
2483
|
+
addColumnCustomComponent(property, customComponentType) {
|
|
2484
|
+
const column = new ColumnDescriptor(this, property);
|
|
2485
|
+
column.asCustomComponent(customComponentType);
|
|
2486
|
+
this._columns.push(column);
|
|
2487
|
+
this.setDataKeyFromColumn();
|
|
2488
|
+
return column;
|
|
2489
|
+
}
|
|
2490
|
+
withFilterDisplay(filterDisplayType) {
|
|
2491
|
+
this._filterDisplay = filterDisplayType;
|
|
2420
2492
|
return this;
|
|
2421
2493
|
}
|
|
2422
|
-
|
|
2423
|
-
this.
|
|
2424
|
-
this._dataKeyProperty = itemsValueProperty;
|
|
2494
|
+
withPaginationMode(paginationMode) {
|
|
2495
|
+
this._paginationMode = paginationMode;
|
|
2425
2496
|
return this;
|
|
2426
2497
|
}
|
|
2427
|
-
|
|
2428
|
-
this.
|
|
2429
|
-
this._itemsValueProperty = dataKeyProperty;
|
|
2498
|
+
withTitle(title) {
|
|
2499
|
+
this._title = title;
|
|
2430
2500
|
return this;
|
|
2431
2501
|
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
if (serviceType) {
|
|
2435
|
-
dataProvider.withServiceType(serviceType);
|
|
2436
|
-
}
|
|
2437
|
-
dataProvider.withLookup(lookup);
|
|
2438
|
-
this._dataProvider = dataProvider;
|
|
2502
|
+
withHideHeader(hideHeader = true) {
|
|
2503
|
+
this._hideHeader = hideHeader;
|
|
2439
2504
|
return this;
|
|
2440
2505
|
}
|
|
2441
|
-
|
|
2442
|
-
this.
|
|
2506
|
+
withDataKeyProperty(property) {
|
|
2507
|
+
this._dataKeyProperty = property;
|
|
2443
2508
|
return this;
|
|
2444
2509
|
}
|
|
2445
|
-
|
|
2446
|
-
this.
|
|
2510
|
+
withDefaultSort(property, asc = true) {
|
|
2511
|
+
this._hasDefaultSort = true;
|
|
2512
|
+
this._defaultSortProperty.push(property);
|
|
2513
|
+
this._defaultSortAsc.push(asc);
|
|
2447
2514
|
return this;
|
|
2448
2515
|
}
|
|
2449
|
-
|
|
2450
|
-
this.
|
|
2516
|
+
withRowHeight(rowHeight) {
|
|
2517
|
+
this._rowHeight = rowHeight;
|
|
2451
2518
|
return this;
|
|
2452
2519
|
}
|
|
2453
|
-
|
|
2454
|
-
this.
|
|
2455
|
-
this._autocompleteOpenOnFocus = openOnFocus;
|
|
2456
|
-
this._autocompleteInlineSearch = inlineSearch;
|
|
2520
|
+
withTableFullHeightOffset(tableFullHeightOffset) {
|
|
2521
|
+
this._tableFullHeightOffset = tableFullHeightOffset;
|
|
2457
2522
|
return this;
|
|
2458
2523
|
}
|
|
2459
2524
|
copy() {
|
|
2460
|
-
const descriptor = new
|
|
2461
|
-
this.
|
|
2525
|
+
const descriptor = new TableDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);
|
|
2526
|
+
descriptor._columns = this.columns.map(c => c.copy());
|
|
2527
|
+
descriptor._title = this._title;
|
|
2528
|
+
descriptor._hideHeader = this._hideHeader;
|
|
2529
|
+
descriptor._dataKeyProperty = this._dataKeyProperty;
|
|
2530
|
+
descriptor._defaultSortProperty = this._defaultSortProperty.map(p => p);
|
|
2531
|
+
descriptor._defaultSortAsc = this._defaultSortAsc.map(p => p);
|
|
2532
|
+
descriptor._filterDisplay = this._filterDisplay;
|
|
2462
2533
|
return descriptor;
|
|
2463
2534
|
}
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
filter._lookupType = this._lookupType;
|
|
2468
|
-
filter._itemsLabelProperty = this._itemsLabelProperty;
|
|
2469
|
-
filter._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
2470
|
-
filter._itemsValueProperty = this._itemsValueProperty;
|
|
2471
|
-
filter._dataKeyProperty = this._dataKeyProperty;
|
|
2472
|
-
filter._multiselect = this._multiselect;
|
|
2473
|
-
filter._dropdownClassName = this._dropdownClassName;
|
|
2474
|
-
filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;
|
|
2475
|
-
filter._autocompleteInlineSearch = this._autocompleteInlineSearch;
|
|
2476
|
-
}
|
|
2477
|
-
}
|
|
2478
|
-
class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
2479
|
-
constructor(property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
2480
|
-
super(property, null);
|
|
2481
|
-
this._enumType = enumType;
|
|
2482
|
-
if (typeof optionsTitlePath === 'undefined') {
|
|
2483
|
-
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
2535
|
+
setDataKeyFromColumn() {
|
|
2536
|
+
if (!this._dataKeyProperty && this._columns.length === 1) {
|
|
2537
|
+
this._dataKeyProperty = this._columns[0].property;
|
|
2484
2538
|
}
|
|
2485
|
-
const optionEnumValues = Array.isArray(options)
|
|
2486
|
-
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
|
|
2487
|
-
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
|
|
2488
|
-
const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
|
|
2489
|
-
this.withLookupDataProvider(dataProvider);
|
|
2490
|
-
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
2491
|
-
this.withItemsValueProperty('value');
|
|
2492
|
-
}
|
|
2493
|
-
get enumType() {
|
|
2494
|
-
return this._enumType;
|
|
2495
|
-
}
|
|
2496
|
-
asAutocomplete(openOnFocus = true) {
|
|
2497
|
-
super.asAutocomplete(openOnFocus, true);
|
|
2498
|
-
return this;
|
|
2499
|
-
}
|
|
2500
|
-
copy() {
|
|
2501
|
-
const field = new FilterLookupEnumDescriptor(this._property, this._enumType, []);
|
|
2502
|
-
this.copyFieldsTo(field);
|
|
2503
|
-
return field;
|
|
2504
2539
|
}
|
|
2505
2540
|
}
|
|
2506
|
-
(function (
|
|
2507
|
-
let
|
|
2508
|
-
(function (
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
})(
|
|
2512
|
-
|
|
2541
|
+
(function (TableDescriptor) {
|
|
2542
|
+
let PaginationModeEnum;
|
|
2543
|
+
(function (PaginationModeEnum) {
|
|
2544
|
+
PaginationModeEnum[PaginationModeEnum["Pagination"] = 0] = "Pagination";
|
|
2545
|
+
PaginationModeEnum[PaginationModeEnum["InfiniteScroll"] = 1] = "InfiniteScroll";
|
|
2546
|
+
})(PaginationModeEnum = TableDescriptor.PaginationModeEnum || (TableDescriptor.PaginationModeEnum = {}));
|
|
2547
|
+
let FilterDisplayEnum;
|
|
2548
|
+
(function (FilterDisplayEnum) {
|
|
2549
|
+
FilterDisplayEnum[FilterDisplayEnum["Row"] = 0] = "Row";
|
|
2550
|
+
FilterDisplayEnum[FilterDisplayEnum["Menu"] = 1] = "Menu";
|
|
2551
|
+
})(FilterDisplayEnum = TableDescriptor.FilterDisplayEnum || (TableDescriptor.FilterDisplayEnum = {}));
|
|
2552
|
+
})(TableDescriptor || (TableDescriptor = {}));
|
|
2513
2553
|
|
|
2514
2554
|
var TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;
|
|
2515
2555
|
class TableviewDescriptor {
|
|
@@ -2584,8 +2624,8 @@ class TableviewDescriptor {
|
|
|
2584
2624
|
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2585
2625
|
return this._table.addColumnEnum(property, enumType, nameAsValue, titlePath);
|
|
2586
2626
|
}
|
|
2587
|
-
|
|
2588
|
-
return this._table.
|
|
2627
|
+
addColumnCustomComponent(property, customComponentType) {
|
|
2628
|
+
return this._table.addColumnCustomComponent(property, customComponentType);
|
|
2589
2629
|
}
|
|
2590
2630
|
createTabGroup(name, title) {
|
|
2591
2631
|
this._viewEditor.createTabGroup(name, title);
|
|
@@ -3082,14 +3122,10 @@ class ModelUtil {
|
|
|
3082
3122
|
if (!attributes) {
|
|
3083
3123
|
return null;
|
|
3084
3124
|
}
|
|
3085
|
-
let idAttribute =
|
|
3125
|
+
let idAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'id', 'uuid', 'code', 'sifra');
|
|
3086
3126
|
if (!idAttribute) {
|
|
3087
|
-
// if no id,
|
|
3088
|
-
idAttribute = attributes
|
|
3089
|
-
if (!idAttribute) {
|
|
3090
|
-
// if no id or code, take the first attribute
|
|
3091
|
-
idAttribute = attributes[0];
|
|
3092
|
-
}
|
|
3127
|
+
// if no id or code, take the first attribute
|
|
3128
|
+
idAttribute = attributes[0];
|
|
3093
3129
|
}
|
|
3094
3130
|
return (_a = idAttribute === null || idAttribute === void 0 ? void 0 : idAttribute.name) !== null && _a !== void 0 ? _a : null;
|
|
3095
3131
|
}
|
|
@@ -3100,17 +3136,22 @@ class ModelUtil {
|
|
|
3100
3136
|
if (!attributes) {
|
|
3101
3137
|
return null;
|
|
3102
3138
|
}
|
|
3103
|
-
let titleAttribute =
|
|
3139
|
+
let titleAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'name', 'ime', 'title', 'naziv');
|
|
3104
3140
|
if (!titleAttribute) {
|
|
3105
|
-
// if no name,
|
|
3106
|
-
titleAttribute = attributes
|
|
3107
|
-
if (!titleAttribute) {
|
|
3108
|
-
// if no name or title, take the first attribute
|
|
3109
|
-
titleAttribute = attributes[0];
|
|
3110
|
-
}
|
|
3141
|
+
// if no name or title, take the first attribute
|
|
3142
|
+
titleAttribute = attributes[0];
|
|
3111
3143
|
}
|
|
3112
3144
|
return (_a = titleAttribute === null || titleAttribute === void 0 ? void 0 : titleAttribute.name) !== null && _a !== void 0 ? _a : null;
|
|
3113
3145
|
}
|
|
3146
|
+
static findAttributeByTypeAndName(attributes, type, ...names) {
|
|
3147
|
+
for (const name of names) {
|
|
3148
|
+
const attribute = attributes.find(a => a.type === type && a.name === name);
|
|
3149
|
+
if (attribute) {
|
|
3150
|
+
return attribute;
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
return null;
|
|
3154
|
+
}
|
|
3114
3155
|
static trySetLookupItemsProperties(lookup, idAsDataKey = true) {
|
|
3115
3156
|
var _a;
|
|
3116
3157
|
if (lookup.modelType) {
|
|
@@ -3407,6 +3448,9 @@ class ObjectSerializer {
|
|
|
3407
3448
|
serializeClass(data, type) {
|
|
3408
3449
|
return this.serialize(data, TypeUtil.findTypeName(type));
|
|
3409
3450
|
}
|
|
3451
|
+
serializeClassArray(data, type) {
|
|
3452
|
+
return this.serialize(data, `Array<${TypeUtil.findTypeName(type)}>`);
|
|
3453
|
+
}
|
|
3410
3454
|
serialize(data, type) {
|
|
3411
3455
|
if (data == undefined) {
|
|
3412
3456
|
return data;
|
|
@@ -3458,6 +3502,9 @@ class ObjectSerializer {
|
|
|
3458
3502
|
deserializeClass(data, type) {
|
|
3459
3503
|
return this.deserialize(data, TypeUtil.findTypeName(type));
|
|
3460
3504
|
}
|
|
3505
|
+
deserializeClassArray(data, type) {
|
|
3506
|
+
return this.deserialize(data, `Array<${TypeUtil.findTypeName(type)}>`);
|
|
3507
|
+
}
|
|
3461
3508
|
deserialize(data, type) {
|
|
3462
3509
|
// polymorphism may change the actual type.
|
|
3463
3510
|
type = this.findCorrectType(data, type);
|
|
@@ -3858,8 +3905,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
3858
3905
|
}]
|
|
3859
3906
|
}] });
|
|
3860
3907
|
|
|
3861
|
-
|
|
3908
|
+
/**
|
|
3909
|
+
* Imitation of JSONPath Syntax. Supports:
|
|
3910
|
+
* - Root object notation with '$'
|
|
3911
|
+
* - Dot notation (e.g.: $.foo.bar), no bracket notation for properties
|
|
3912
|
+
* - Array notation (e.g.: [0])
|
|
3913
|
+
*/
|
|
3914
|
+
class JsonPathPipe {
|
|
3862
3915
|
transform(value, path = '') {
|
|
3916
|
+
if (path === '$') {
|
|
3917
|
+
// only return the root
|
|
3918
|
+
return value;
|
|
3919
|
+
}
|
|
3920
|
+
// Check for leading root object notation
|
|
3921
|
+
if (path.startsWith('$')) {
|
|
3922
|
+
path = path.substring(1);
|
|
3923
|
+
}
|
|
3924
|
+
// Check for leading .
|
|
3925
|
+
if (path.startsWith('.')) {
|
|
3926
|
+
path = path.substring(1);
|
|
3927
|
+
}
|
|
3863
3928
|
if (path.indexOf('.') >= 0) {
|
|
3864
3929
|
const pathSplit = path.split('.');
|
|
3865
3930
|
let currValue = value;
|
|
@@ -3867,6 +3932,32 @@ class MngPropertyPathPipe {
|
|
|
3867
3932
|
if (typeof currValue === 'undefined' || currValue === null) {
|
|
3868
3933
|
return currValue;
|
|
3869
3934
|
}
|
|
3935
|
+
if (!p.length) {
|
|
3936
|
+
// empty path, return current value
|
|
3937
|
+
return currValue;
|
|
3938
|
+
}
|
|
3939
|
+
const leftBracketIdx = p.indexOf('[');
|
|
3940
|
+
if (leftBracketIdx >= 0 && p.endsWith(']')) {
|
|
3941
|
+
// should be reference to array
|
|
3942
|
+
const arrayPath = p.substring(0, leftBracketIdx);
|
|
3943
|
+
const arrayIdx = +p.substring(leftBracketIdx + 1, p.length - 1);
|
|
3944
|
+
const array = currValue[arrayPath];
|
|
3945
|
+
console.log(arrayPath, arrayIdx, array);
|
|
3946
|
+
if (Array.isArray(array)) {
|
|
3947
|
+
if (arrayIdx >= 0 && arrayIdx < array.length) {
|
|
3948
|
+
// valid index, continue on the path
|
|
3949
|
+
currValue = array[arrayIdx];
|
|
3950
|
+
continue;
|
|
3951
|
+
}
|
|
3952
|
+
else {
|
|
3953
|
+
console.warn(`Path ${path} array index at ${p} is not within valid array range`, value);
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
else {
|
|
3957
|
+
console.warn(`Path ${path} array at ${p} is not a valid array`, value);
|
|
3958
|
+
}
|
|
3959
|
+
return undefined;
|
|
3960
|
+
}
|
|
3870
3961
|
else if (typeof currValue === 'object') {
|
|
3871
3962
|
currValue = currValue[p];
|
|
3872
3963
|
}
|
|
@@ -3878,16 +3969,16 @@ class MngPropertyPathPipe {
|
|
|
3878
3969
|
return currValue;
|
|
3879
3970
|
}
|
|
3880
3971
|
else {
|
|
3881
|
-
return
|
|
3972
|
+
return value[path];
|
|
3882
3973
|
}
|
|
3883
3974
|
}
|
|
3884
3975
|
}
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type:
|
|
3976
|
+
JsonPathPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JsonPathPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3977
|
+
JsonPathPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JsonPathPipe, name: "jsonPath" });
|
|
3978
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JsonPathPipe, decorators: [{
|
|
3888
3979
|
type: Pipe,
|
|
3889
3980
|
args: [{
|
|
3890
|
-
name: '
|
|
3981
|
+
name: 'jsonPath',
|
|
3891
3982
|
pure: true
|
|
3892
3983
|
}]
|
|
3893
3984
|
}] });
|
|
@@ -4742,10 +4833,10 @@ class MngActionComponent {
|
|
|
4742
4833
|
}
|
|
4743
4834
|
}
|
|
4744
4835
|
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1$1.TranslateService }, { token: MngActionExecutorService }, { token: i2.ConfirmationService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4745
|
-
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionComponent, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataProvider: "dataProvider", inputDisabled: ["disabled", "inputDisabled"], inputLoading: ["loading", "inputLoading"], viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { triggerEventEmitter: "trigger" }, host: { properties: { "class": "this.hostClass" } }, providers: [ConfirmationService], ngImport: i0, template: "<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [href]=\"actionLink.url\"\n [target]=\"actionLink.target\"\n [
|
|
4836
|
+
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionComponent, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataProvider: "dataProvider", inputDisabled: ["disabled", "inputDisabled"], inputLoading: ["loading", "inputLoading"], viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { triggerEventEmitter: "trigger" }, host: { properties: { "class": "this.hostClass" } }, providers: [ConfirmationService], ngImport: i0, template: "<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : actionLink.url\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"\n ($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | linkFormatter: itemId:item:action.model:actionData)\n \"\n [queryParams]=\"actionLink.queryParams\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n </ng-template>\n <ng-template #button>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction($event)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"], components: [{ type: i5.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }], directives: [{ 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: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], pipes: { "async": i4.AsyncPipe, "linkFormatter": MngLinkFormatterPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4746
4837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
4747
4838
|
type: Component,
|
|
4748
|
-
args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfirmationService], template: "<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [href]=\"actionLink.url\"\n [target]=\"actionLink.target\"\n [
|
|
4839
|
+
args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfirmationService], template: "<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : actionLink.url\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"\n ($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | linkFormatter: itemId:item:action.model:actionData)\n \"\n [queryParams]=\"actionLink.queryParams\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n </ng-template>\n <ng-template #button>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction($event)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"] }]
|
|
4749
4840
|
}], ctorParameters: function () {
|
|
4750
4841
|
return [{ type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: MngActionExecutorService }, { type: i2.ConfirmationService }, { type: MngViewContainerComponentService, decorators: [{
|
|
4751
4842
|
type: Optional
|
|
@@ -4910,11 +5001,25 @@ class MngComponentDirective {
|
|
|
4910
5001
|
ngOnInit() {
|
|
4911
5002
|
this.viewContainerRef.clear();
|
|
4912
5003
|
this.componentRef = this.viewContainerRef.createComponent(this.component);
|
|
5004
|
+
if (this.inputs) {
|
|
5005
|
+
if (this.isCmpInstanceOfColumnValue(this.componentRef.instance)) {
|
|
5006
|
+
this.componentRef.instance.setColumnValue(this.inputs['value'], this.inputs['item'], this.inputs['descriptor']);
|
|
5007
|
+
}
|
|
5008
|
+
else {
|
|
5009
|
+
const instanceAny = this.componentRef;
|
|
5010
|
+
for (const input in this.inputs) {
|
|
5011
|
+
instanceAny[input] = this.inputs[input];
|
|
5012
|
+
}
|
|
5013
|
+
}
|
|
5014
|
+
}
|
|
4913
5015
|
this.componentInstanceEventEmitter.next(this.componentRef.instance);
|
|
4914
5016
|
}
|
|
5017
|
+
isCmpInstanceOfColumnValue(cmp) {
|
|
5018
|
+
return typeof cmp.setColumnValue === 'function';
|
|
5019
|
+
}
|
|
4915
5020
|
}
|
|
4916
5021
|
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4917
|
-
MngComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: MngComponentDirective, selector: "[mngComponent]", inputs: { component: ["mngComponent", "component"] }, outputs: { componentInstanceEventEmitter: "instanceCreated" }, ngImport: i0 });
|
|
5022
|
+
MngComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: MngComponentDirective, selector: "[mngComponent]", inputs: { component: ["mngComponent", "component"], inputs: "inputs" }, outputs: { componentInstanceEventEmitter: "instanceCreated" }, ngImport: i0 });
|
|
4918
5023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngComponentDirective, decorators: [{
|
|
4919
5024
|
type: Directive,
|
|
4920
5025
|
args: [{
|
|
@@ -4923,6 +5028,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4923
5028
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { component: [{
|
|
4924
5029
|
type: Input,
|
|
4925
5030
|
args: ['mngComponent']
|
|
5031
|
+
}], inputs: [{
|
|
5032
|
+
type: Input
|
|
4926
5033
|
}], componentInstanceEventEmitter: [{
|
|
4927
5034
|
type: Output,
|
|
4928
5035
|
args: ['instanceCreated']
|
|
@@ -5735,10 +5842,10 @@ class MngActionEditorComponent {
|
|
|
5735
5842
|
}
|
|
5736
5843
|
}
|
|
5737
5844
|
MngActionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, deps: [{ token: i0.Injector }, { token: i1$1.TranslateService }, { token: MngActionExecutorService }, { token: MngCommonsService }, { token: MngNavigationService }, { token: i3.DynamicDialogRef, optional: true }, { token: i3.DynamicDialogConfig, optional: true }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
5738
|
-
MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionEditorComponent, selector: "mng-action-editor", inputs: { action: "action", itemId: "itemId", item: "item", actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], ngImport: i0, template: "<
|
|
5845
|
+
MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionEditorComponent, selector: "mng-action-editor", inputs: { action: "action", itemId: "itemId", item: "item", actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], ngImport: i0, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n", components: [{ 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: i6.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { type: MngFormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isSubmitButtonVisible", "isFormDisabled"], outputs: ["formSubmit"] }], 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"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5739
5846
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, decorators: [{
|
|
5740
5847
|
type: Component,
|
|
5741
|
-
args: [{ selector: 'mng-action-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
5848
|
+
args: [{ selector: 'mng-action-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n" }]
|
|
5742
5849
|
}], ctorParameters: function () {
|
|
5743
5850
|
return [{ type: i0.Injector }, { type: i1$1.TranslateService }, { type: MngActionExecutorService }, { type: MngCommonsService }, { type: MngNavigationService }, { type: i3.DynamicDialogRef, decorators: [{
|
|
5744
5851
|
type: Optional
|
|
@@ -5798,10 +5905,10 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
5798
5905
|
}
|
|
5799
5906
|
}
|
|
5800
5907
|
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5801
|
-
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$4.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }], directives: [{ type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i9$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10.InputText, selector: "[pInputText]" }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5908
|
+
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$4.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }], directives: [{ type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i9$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10.InputText, selector: "[pInputText]" }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5802
5909
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
5803
5910
|
type: Component,
|
|
5804
|
-
args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
5911
|
+
args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
5805
5912
|
}] });
|
|
5806
5913
|
|
|
5807
5914
|
class MngFormlyFieldDropdownComponent extends FieldType {
|
|
@@ -5887,15 +5994,6 @@ class MngTableColumnFilterComponent {
|
|
|
5887
5994
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
5888
5995
|
autocompleteFilter(value, filterCallback) {
|
|
5889
5996
|
filterCallback(value);
|
|
5890
|
-
// if (value) {
|
|
5891
|
-
// let filterValue: any = value;
|
|
5892
|
-
// if (this.lookupDescriptor!.itemsValueProperty) {
|
|
5893
|
-
// filterValue = filterValue[this.lookupDescriptor!.itemsValueProperty];
|
|
5894
|
-
// }
|
|
5895
|
-
// filterCallback(filterValue);
|
|
5896
|
-
// } else {
|
|
5897
|
-
// filterCallback(value);
|
|
5898
|
-
// }
|
|
5899
5997
|
}
|
|
5900
5998
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
5901
5999
|
dropdownFilter(value, filterCallback) {
|
|
@@ -5924,13 +6022,26 @@ class MngTableColumnValueComponent {
|
|
|
5924
6022
|
this.columnTypeBoolean = ColumnDescriptor.TypeEnum.Boolean;
|
|
5925
6023
|
this.columnTypeDate = ColumnDescriptor.TypeEnum.Date;
|
|
5926
6024
|
this.columnTypeEnum = ColumnDescriptor.TypeEnum.Enum;
|
|
6025
|
+
this.columnTypeCustom = ColumnDescriptor.TypeEnum.Custom;
|
|
6026
|
+
this.jsonPath = '$';
|
|
6027
|
+
}
|
|
6028
|
+
ngOnInit() {
|
|
6029
|
+
if (this.descriptor.jsonPath) {
|
|
6030
|
+
this.jsonPath = this.descriptor.jsonPath;
|
|
6031
|
+
}
|
|
6032
|
+
else {
|
|
6033
|
+
this.jsonPath = `$.${this.descriptor.property}`;
|
|
6034
|
+
if (this.descriptor.objectModelType) {
|
|
6035
|
+
this.jsonPath = `$.${this.descriptor.property}.${this.descriptor.objectTitleProperty}`;
|
|
6036
|
+
}
|
|
6037
|
+
}
|
|
5927
6038
|
}
|
|
5928
6039
|
}
|
|
5929
6040
|
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5930
|
-
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{
|
|
6041
|
+
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n", directives: [{ type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }], pipes: { "jsonPath": JsonPathPipe, "number": i4.DecimalPipe, "date": i4.DatePipe, "boolean": MngBooleanPipe, "translate": i1$1.TranslatePipe, "enum": MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5931
6042
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
5932
6043
|
type: Component,
|
|
5933
|
-
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{
|
|
6044
|
+
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n" }]
|
|
5934
6045
|
}], propDecorators: { descriptor: [{
|
|
5935
6046
|
type: Input
|
|
5936
6047
|
}], item: [{
|
|
@@ -6204,10 +6315,10 @@ class MngTableComponent {
|
|
|
6204
6315
|
}
|
|
6205
6316
|
}
|
|
6206
6317
|
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 });
|
|
6207
|
-
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.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || 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"], 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 });
|
|
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 });
|
|
6208
6319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, decorators: [{
|
|
6209
6320
|
type: Component,
|
|
6210
|
-
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.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || 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" }]
|
|
6321
|
+
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" }]
|
|
6211
6322
|
}], ctorParameters: function () {
|
|
6212
6323
|
return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: MngViewContainerComponentService, decorators: [{
|
|
6213
6324
|
type: Optional
|
|
@@ -6326,10 +6437,10 @@ class MngTableviewComponent {
|
|
|
6326
6437
|
}
|
|
6327
6438
|
}
|
|
6328
6439
|
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 });
|
|
6329
|
-
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]=\"
|
|
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 } });
|
|
6330
6441
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
6331
6442
|
type: Component,
|
|
6332
|
-
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]=\"
|
|
6443
|
+
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" }]
|
|
6333
6444
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.MessageService }, { type: i1$1.TranslateService }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
|
|
6334
6445
|
type: Input
|
|
6335
6446
|
}], dataProvider: [{
|
|
@@ -6349,12 +6460,24 @@ class AMngTableviewRouteComponent {
|
|
|
6349
6460
|
}
|
|
6350
6461
|
createActionDescriptors() {
|
|
6351
6462
|
const actions = [];
|
|
6352
|
-
actions.push(
|
|
6353
|
-
actions.push(
|
|
6354
|
-
actions.push(
|
|
6355
|
-
actions.push(
|
|
6463
|
+
actions.push(this.createActionDescriptorForDetails());
|
|
6464
|
+
actions.push(this.createActionDescriptorForAdd());
|
|
6465
|
+
actions.push(this.createActionDescriptorForEdit());
|
|
6466
|
+
actions.push(this.createActionDescriptorForDelete());
|
|
6356
6467
|
return actions;
|
|
6357
6468
|
}
|
|
6469
|
+
createActionDescriptorForDetails(descriptor = this.descriptor.viewEditor) {
|
|
6470
|
+
return new ActionEditorDetailsDescriptor(descriptor);
|
|
6471
|
+
}
|
|
6472
|
+
createActionDescriptorForAdd(descriptor = this.descriptor.addEditor) {
|
|
6473
|
+
return new ActionEditorAddDescriptor(descriptor);
|
|
6474
|
+
}
|
|
6475
|
+
createActionDescriptorForEdit(descriptor = this.descriptor.editEditor) {
|
|
6476
|
+
return new ActionEditorEditDescriptor(descriptor);
|
|
6477
|
+
}
|
|
6478
|
+
createActionDescriptorForDelete(descriptor = this.descriptor.model) {
|
|
6479
|
+
return new ActionDeleteDescriptor(descriptor);
|
|
6480
|
+
}
|
|
6358
6481
|
}
|
|
6359
6482
|
AMngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AMngTableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6360
6483
|
AMngTableviewRouteComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: AMngTableviewRouteComponent, ngImport: i0 });
|
|
@@ -6569,10 +6692,10 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
6569
6692
|
}
|
|
6570
6693
|
}
|
|
6571
6694
|
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
6572
|
-
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\"></i>\n <button
|
|
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 });
|
|
6573
6696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
6574
6697
|
type: Component,
|
|
6575
|
-
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\"></i>\n <button
|
|
6698
|
+
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" }]
|
|
6576
6699
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
|
|
6577
6700
|
type: ViewChild,
|
|
6578
6701
|
args: [MngTableComponent]
|
|
@@ -7349,7 +7472,7 @@ class MngTopbarComponent {
|
|
|
7349
7472
|
}
|
|
7350
7473
|
}
|
|
7351
7474
|
MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7352
|
-
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTopbarComponent, selector: "mng-topbar", viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", components: [{ type: i2$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7475
|
+
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTopbarComponent, selector: "mng-topbar", viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", components: [{ type: i2$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7353
7476
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
7354
7477
|
type: Component,
|
|
7355
7478
|
args: [{ selector: 'mng-topbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n" }]
|
|
@@ -7387,7 +7510,7 @@ class MngMainLayoutComponent {
|
|
|
7387
7510
|
}
|
|
7388
7511
|
}
|
|
7389
7512
|
MngMainLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMainLayoutComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7390
|
-
MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMainLayoutComponent, selector: "mng-main-layout", host: { listeners: { "window:resize": "onWindowResize($event)" } }, providers: [MngMainLayoutComponentService], viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n", directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7513
|
+
MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMainLayoutComponent, selector: "mng-main-layout", host: { listeners: { "window:resize": "onWindowResize($event)" } }, providers: [MngMainLayoutComponentService], viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n", directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7391
7514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMainLayoutComponent, decorators: [{
|
|
7392
7515
|
type: Component,
|
|
7393
7516
|
args: [{ selector: 'mng-main-layout', providers: [MngMainLayoutComponentService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n" }]
|
|
@@ -7657,7 +7780,7 @@ const declarations = [
|
|
|
7657
7780
|
MngComponentDirective,
|
|
7658
7781
|
MngTemplateDirective,
|
|
7659
7782
|
// pipes
|
|
7660
|
-
|
|
7783
|
+
JsonPathPipe,
|
|
7661
7784
|
MngEnumPipe,
|
|
7662
7785
|
MngBooleanPipe,
|
|
7663
7786
|
MngI18nPropertyPipe,
|
|
@@ -7761,7 +7884,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
7761
7884
|
MngComponentDirective,
|
|
7762
7885
|
MngTemplateDirective,
|
|
7763
7886
|
// pipes
|
|
7764
|
-
|
|
7887
|
+
JsonPathPipe,
|
|
7765
7888
|
MngEnumPipe,
|
|
7766
7889
|
MngBooleanPipe,
|
|
7767
7890
|
MngI18nPropertyPipe,
|
|
@@ -7876,7 +7999,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
7876
7999
|
MngComponentDirective,
|
|
7877
8000
|
MngTemplateDirective,
|
|
7878
8001
|
// pipes
|
|
7879
|
-
|
|
8002
|
+
JsonPathPipe,
|
|
7880
8003
|
MngEnumPipe,
|
|
7881
8004
|
MngBooleanPipe,
|
|
7882
8005
|
MngI18nPropertyPipe,
|
|
@@ -7981,9 +8104,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
7981
8104
|
}]
|
|
7982
8105
|
}] });
|
|
7983
8106
|
|
|
7984
|
-
class
|
|
7985
|
-
constructor(
|
|
7986
|
-
this.type = type;
|
|
8107
|
+
class AMngBaseApiService {
|
|
8108
|
+
constructor(http) {
|
|
7987
8109
|
this.http = http;
|
|
7988
8110
|
this.objectSerializer = ObjectSerializer.get();
|
|
7989
8111
|
}
|
|
@@ -7994,12 +8116,6 @@ class AMngApiService {
|
|
|
7994
8116
|
}
|
|
7995
8117
|
return `${this.getBasePath()}${this.getServiceBasePath()}${path}`;
|
|
7996
8118
|
}
|
|
7997
|
-
deserialize(item) {
|
|
7998
|
-
return this.deserializeClass(item, this.type);
|
|
7999
|
-
}
|
|
8000
|
-
serialize(item) {
|
|
8001
|
-
return this.serializeClass(item, this.type);
|
|
8002
|
-
}
|
|
8003
8119
|
serializeQueryParam(queryParam, type = 'QueryParam') {
|
|
8004
8120
|
return this.objectSerializer.serialize(queryParam, type);
|
|
8005
8121
|
}
|
|
@@ -8009,9 +8125,27 @@ class AMngApiService {
|
|
|
8009
8125
|
deserializeClass(item, type) {
|
|
8010
8126
|
return this.objectSerializer.deserializeClass(item, type);
|
|
8011
8127
|
}
|
|
8128
|
+
deserializeClassArray(item, type) {
|
|
8129
|
+
return this.objectSerializer.deserializeClassArray(item, type);
|
|
8130
|
+
}
|
|
8012
8131
|
serializeClass(item, type) {
|
|
8013
8132
|
return this.objectSerializer.serializeClass(item, type);
|
|
8014
8133
|
}
|
|
8134
|
+
serializeClassArray(item, type) {
|
|
8135
|
+
return this.objectSerializer.serializeClassArray(item, type);
|
|
8136
|
+
}
|
|
8137
|
+
}
|
|
8138
|
+
class AMngApiService extends AMngBaseApiService {
|
|
8139
|
+
constructor(type, http) {
|
|
8140
|
+
super(http);
|
|
8141
|
+
this.type = type;
|
|
8142
|
+
}
|
|
8143
|
+
deserialize(item) {
|
|
8144
|
+
return this.deserializeClass(item, this.type);
|
|
8145
|
+
}
|
|
8146
|
+
serialize(item) {
|
|
8147
|
+
return this.serializeClass(item, this.type);
|
|
8148
|
+
}
|
|
8015
8149
|
}
|
|
8016
8150
|
|
|
8017
8151
|
class AMngGetAllApiService extends AMngApiService {
|
|
@@ -8562,5 +8696,5 @@ class RouteDataBuilder {
|
|
|
8562
8696
|
* Generated bundle index. Do not edit.
|
|
8563
8697
|
*/
|
|
8564
8698
|
|
|
8565
|
-
export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, 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, 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,
|
|
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 };
|
|
8566
8700
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|