@mediusinc/mng-commons 0.3.2 → 0.4.1
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 +1 -1
- package/assets/i18n/sl.json +1 -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/autocomplete/autocomplete.component.mjs +186 -32
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +1 -1
- 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 +8 -8
- 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 +9 -23
- 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 -734
- 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 -385
- 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/pipes/link-formatter.pipe.mjs +1 -1
- package/esm2020/lib/services/action-executor.service.mjs +1 -1
- package/esm2020/lib/utils/model.util.mjs +16 -15
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/mediusinc-mng-commons.mjs +1671 -1348
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +1648 -1329
- 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/autocomplete/autocomplete.component.d.ts +20 -5
- 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-filter/column-filter.component.d.ts +1 -0
- 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 -292
- 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 -159
- 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/pipes/link-formatter.pipe.d.ts +1 -1
- package/lib/services/action-executor.service.d.ts +1 -1
- 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
|
@@ -3,17 +3,17 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import { HttpErrorResponse, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, Injectable, Pipe, Inject, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, Directive, ContentChildren, ViewChild, forwardRef, ViewChildren, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i4$2 from '@angular/forms';
|
|
7
7
|
import { Validators, FormGroup, FormArray, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import * as i1 from '@angular/router';
|
|
9
9
|
import { NavigationEnd, GuardsCheckEnd, RouterModule } from '@angular/router';
|
|
10
|
-
import * as i3$
|
|
10
|
+
import * as i3$1 from '@ngx-formly/core';
|
|
11
11
|
import { FieldType, FieldWrapper, FORMLY_CONFIG, FormlyModule } from '@ngx-formly/core';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
13
13
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
14
14
|
import * as i2 from 'primeng/api';
|
|
15
15
|
import { ConfirmationService, MessageService, FilterMatchMode } from 'primeng/api';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i2$1 from 'primeng/autocomplete';
|
|
17
17
|
import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
|
|
18
18
|
import * as i2$4 from 'primeng/breadcrumb';
|
|
19
19
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
@@ -46,21 +46,21 @@ import * as i10 from 'primeng/inputtext';
|
|
|
46
46
|
import { InputTextModule } from 'primeng/inputtext';
|
|
47
47
|
import * as i9$1 from 'primeng/inputtextarea';
|
|
48
48
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
49
|
-
import * as i3$
|
|
49
|
+
import * as i3$2 from 'primeng/messages';
|
|
50
50
|
import { MessagesModule } from 'primeng/messages';
|
|
51
|
-
import * as i3$
|
|
51
|
+
import * as i3$3 from 'primeng/multiselect';
|
|
52
52
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
53
53
|
import { PaginatorModule } from 'primeng/paginator';
|
|
54
54
|
import * as i6 from 'primeng/progressspinner';
|
|
55
55
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
56
|
-
import * as i4$
|
|
56
|
+
import * as i4$4 from 'primeng/radiobutton';
|
|
57
57
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
58
58
|
import * as i8 from 'primeng/ripple';
|
|
59
59
|
import { RippleModule } from 'primeng/ripple';
|
|
60
60
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
61
61
|
import * as i7$1 from 'primeng/skeleton';
|
|
62
62
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
63
|
-
import * as i4$
|
|
63
|
+
import * as i4$5 from 'primeng/table';
|
|
64
64
|
import { Table, TableModule } from 'primeng/table';
|
|
65
65
|
import * as i1$4 from 'primeng/tabview';
|
|
66
66
|
import { TabViewModule } from 'primeng/tabview';
|
|
@@ -68,7 +68,7 @@ import { TagModule } from 'primeng/tag';
|
|
|
68
68
|
import * as i6$2 from 'primeng/toast';
|
|
69
69
|
import { ToastModule } from 'primeng/toast';
|
|
70
70
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
71
|
-
import * as i4$
|
|
71
|
+
import * as i4$3 from 'primeng/toolbar';
|
|
72
72
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
73
73
|
import * as i9 from 'primeng/tooltip';
|
|
74
74
|
import { TooltipModule } from 'primeng/tooltip';
|
|
@@ -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 = [];
|
|
@@ -949,1511 +954,1583 @@ var ActionLevelEnum;
|
|
|
949
954
|
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
950
955
|
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
951
956
|
|
|
952
|
-
class
|
|
953
|
-
constructor(
|
|
954
|
-
this.
|
|
955
|
-
this.
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
var MngFormFieldEventTypeEnum;
|
|
959
|
-
(function (MngFormFieldEventTypeEnum) {
|
|
960
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
|
|
961
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
|
|
962
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
|
|
963
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
|
|
964
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
|
|
965
|
-
})(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
|
|
966
|
-
class MngFormFieldEventComponentSubtype {
|
|
967
|
-
}
|
|
968
|
-
MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
|
|
969
|
-
MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
|
|
970
|
-
MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
|
|
971
|
-
MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
|
|
972
|
-
class MngFormFieldEventDialogSubtype {
|
|
973
|
-
}
|
|
974
|
-
MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
|
|
975
|
-
MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
|
|
976
|
-
MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
|
|
977
|
-
class MngFormFieldEvent {
|
|
978
|
-
constructor(type, componentType, componentInstance, data = {}) {
|
|
979
|
-
this.type = type;
|
|
980
|
-
this.componentType = componentType;
|
|
981
|
-
this.componentInstance = componentInstance;
|
|
982
|
-
this.data = data;
|
|
957
|
+
class FilterDescriptor {
|
|
958
|
+
constructor(property) {
|
|
959
|
+
this._filterType = FilterDescriptor.TypeEnum.String;
|
|
960
|
+
this._matchModes = null;
|
|
961
|
+
this._className = '';
|
|
962
|
+
this._property = property;
|
|
983
963
|
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
class EditorDescriptor {
|
|
987
|
-
constructor(modelType, idProperty, titleProperty, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {
|
|
988
|
-
this._tabs = [];
|
|
989
|
-
this._groups = [];
|
|
990
|
-
this._fields = [];
|
|
991
|
-
this._disabled = false;
|
|
992
|
-
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
993
|
-
this._tableviewEditorType = tableviewEditorType;
|
|
964
|
+
get filterType() {
|
|
965
|
+
return this._filterType;
|
|
994
966
|
}
|
|
995
|
-
get
|
|
996
|
-
return this.
|
|
967
|
+
get filterProperty() {
|
|
968
|
+
return this._filterProperty;
|
|
997
969
|
}
|
|
998
|
-
get
|
|
999
|
-
return this.
|
|
970
|
+
get matchModes() {
|
|
971
|
+
return this._matchModes;
|
|
1000
972
|
}
|
|
1001
|
-
get
|
|
1002
|
-
return this.
|
|
973
|
+
get placeholder() {
|
|
974
|
+
return this._placeholder;
|
|
1003
975
|
}
|
|
1004
|
-
get
|
|
1005
|
-
return this.
|
|
976
|
+
get className() {
|
|
977
|
+
return this._className;
|
|
1006
978
|
}
|
|
1007
|
-
get
|
|
1008
|
-
return this.
|
|
979
|
+
get property() {
|
|
980
|
+
return this._property;
|
|
1009
981
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
title = I18nUtil.getModelTabKey(this.model, name);
|
|
1014
|
-
}
|
|
1015
|
-
tabGroup.withTitle(title);
|
|
1016
|
-
this.createTabGroupDescriptor(tabGroup);
|
|
1017
|
-
return tabGroup;
|
|
982
|
+
asFilterType(filterType) {
|
|
983
|
+
this._filterType = filterType;
|
|
984
|
+
return this;
|
|
1018
985
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
}
|
|
1027
|
-
this.createFieldGroupDescriptor(fieldGroup);
|
|
1028
|
-
return fieldGroup;
|
|
986
|
+
/**
|
|
987
|
+
* Sets different filter property name instead of default property. Use this if API requires different property provided to perform correct filter.
|
|
988
|
+
* @param filterProperty
|
|
989
|
+
*/
|
|
990
|
+
withFilterProperty(filterProperty) {
|
|
991
|
+
this._filterProperty = filterProperty;
|
|
992
|
+
return this;
|
|
1029
993
|
}
|
|
1030
|
-
|
|
1031
|
-
this.
|
|
1032
|
-
this._fields.push(field);
|
|
1033
|
-
this._currentGroup?.addField(field);
|
|
994
|
+
withPlaceholder(placeholder) {
|
|
995
|
+
this._placeholder = placeholder;
|
|
1034
996
|
return this;
|
|
1035
997
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
this
|
|
1039
|
-
return field;
|
|
998
|
+
withClassName(className) {
|
|
999
|
+
this._className = className;
|
|
1000
|
+
return this;
|
|
1040
1001
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
if (fieldIdx < 0) {
|
|
1044
|
-
throw new Error(`Field ${property} does not exist.`);
|
|
1045
|
-
}
|
|
1046
|
-
const field = this._fields[fieldIdx];
|
|
1047
|
-
if (field.group) {
|
|
1048
|
-
const groupFieldIdx = field.group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);
|
|
1049
|
-
if (groupFieldIdx >= 0) {
|
|
1050
|
-
field.group.fields.splice(groupFieldIdx, 1);
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
this._fields.splice(fieldIdx, 1);
|
|
1002
|
+
withMatchModes(matchModes) {
|
|
1003
|
+
this._matchModes = matchModes;
|
|
1054
1004
|
return this;
|
|
1055
1005
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1006
|
+
copy() {
|
|
1007
|
+
const descriptor = new FilterDescriptor(this._property);
|
|
1008
|
+
this.copyFieldsTo(descriptor);
|
|
1009
|
+
return descriptor;
|
|
1058
1010
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
this.
|
|
1062
|
-
|
|
1011
|
+
copyFieldsTo(descriptor) {
|
|
1012
|
+
descriptor._filterType = this._filterType;
|
|
1013
|
+
descriptor._filterProperty = this._filterProperty;
|
|
1014
|
+
descriptor._placeholder = this._placeholder;
|
|
1015
|
+
descriptor._className = this._className;
|
|
1063
1016
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1017
|
+
}
|
|
1018
|
+
(function (FilterDescriptor) {
|
|
1019
|
+
let TypeEnum;
|
|
1020
|
+
(function (TypeEnum) {
|
|
1021
|
+
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1022
|
+
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1023
|
+
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1024
|
+
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1025
|
+
TypeEnum[TypeEnum["Lookup"] = 4] = "Lookup";
|
|
1026
|
+
TypeEnum[TypeEnum["LookupEnum"] = 5] = "LookupEnum";
|
|
1027
|
+
})(TypeEnum = FilterDescriptor.TypeEnum || (FilterDescriptor.TypeEnum = {}));
|
|
1028
|
+
let MatchModeEnum;
|
|
1029
|
+
(function (MatchModeEnum) {
|
|
1030
|
+
MatchModeEnum["StartsWith"] = "startsWith";
|
|
1031
|
+
MatchModeEnum["Contains"] = "contains";
|
|
1032
|
+
MatchModeEnum["EndsWith"] = "endsWith";
|
|
1033
|
+
MatchModeEnum["Equals"] = "equals";
|
|
1034
|
+
MatchModeEnum["NotEquals"] = "notEquals";
|
|
1035
|
+
MatchModeEnum["In"] = "in";
|
|
1036
|
+
MatchModeEnum["LessThan"] = "lt";
|
|
1037
|
+
MatchModeEnum["LessThanOrEqualTo"] = "lte";
|
|
1038
|
+
MatchModeEnum["GreaterThan"] = "gt";
|
|
1039
|
+
MatchModeEnum["GreaterThanOrEqualTo"] = "gte";
|
|
1040
|
+
MatchModeEnum["Between"] = "between";
|
|
1041
|
+
MatchModeEnum["DateIs"] = "dateIs";
|
|
1042
|
+
MatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
1043
|
+
MatchModeEnum["DateBefore"] = "dateBefore";
|
|
1044
|
+
MatchModeEnum["DateAfter"] = "dateAfter";
|
|
1045
|
+
})(MatchModeEnum = FilterDescriptor.MatchModeEnum || (FilterDescriptor.MatchModeEnum = {}));
|
|
1046
|
+
})(FilterDescriptor || (FilterDescriptor = {}));
|
|
1047
|
+
class FilterLookupDescriptor extends FilterDescriptor {
|
|
1048
|
+
constructor(property, modelType) {
|
|
1049
|
+
super(property);
|
|
1050
|
+
this._modelType = null;
|
|
1051
|
+
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
1052
|
+
this._itemsLabelTranslate = false;
|
|
1053
|
+
this._multiselect = false;
|
|
1054
|
+
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
1055
|
+
this._autocompleteOpenOnFocus = false;
|
|
1056
|
+
this._autocompleteInlineSearch = false;
|
|
1057
|
+
this._modelType = modelType;
|
|
1058
|
+
this._filterType = FilterDescriptor.TypeEnum.Lookup;
|
|
1059
|
+
ModelUtil.trySetLookupItemsProperties(this);
|
|
1068
1060
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
this.addFieldDescriptor(field);
|
|
1072
|
-
return field;
|
|
1061
|
+
get lookupType() {
|
|
1062
|
+
return this._lookupType;
|
|
1073
1063
|
}
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
this.addFieldDescriptor(field);
|
|
1077
|
-
return field;
|
|
1064
|
+
get dataProvider() {
|
|
1065
|
+
return this._dataProvider;
|
|
1078
1066
|
}
|
|
1079
|
-
|
|
1080
|
-
this.
|
|
1081
|
-
return this;
|
|
1067
|
+
get itemsLabelProperty() {
|
|
1068
|
+
return this._itemsLabelProperty;
|
|
1082
1069
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
this._currentGroup.withValidator(name, expression);
|
|
1086
|
-
}
|
|
1070
|
+
get itemsLabelTranslate() {
|
|
1071
|
+
return this._itemsLabelTranslate;
|
|
1087
1072
|
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
for (const tabGroup of this._tabs) {
|
|
1091
|
-
editor.createTabGroupDescriptor(tabGroup.copy());
|
|
1092
|
-
}
|
|
1093
|
-
for (const tabGroup of editor._tabs) {
|
|
1094
|
-
for (const fieldGroup of tabGroup.fields) {
|
|
1095
|
-
editor._fields.push(...fieldGroup.fields);
|
|
1096
|
-
}
|
|
1097
|
-
editor._groups.push(...tabGroup.fields);
|
|
1098
|
-
}
|
|
1099
|
-
editor._currentTabGroup = editor._tabs[editor._tabs.length - 1];
|
|
1100
|
-
editor._currentGroup = editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1];
|
|
1101
|
-
editor._disabled = this._disabled;
|
|
1102
|
-
return editor;
|
|
1073
|
+
get itemsValueProperty() {
|
|
1074
|
+
return this._itemsValueProperty;
|
|
1103
1075
|
}
|
|
1104
|
-
|
|
1105
|
-
this.
|
|
1106
|
-
this._currentGroup = fieldGroup;
|
|
1107
|
-
this._groups.push(fieldGroup);
|
|
1108
|
-
this._currentTabGroup?.addField(fieldGroup);
|
|
1109
|
-
return this;
|
|
1076
|
+
get dataKeyProperty() {
|
|
1077
|
+
return this._dataKeyProperty;
|
|
1110
1078
|
}
|
|
1111
|
-
|
|
1112
|
-
this.
|
|
1113
|
-
this._tabs.push(tabGroup);
|
|
1114
|
-
return this;
|
|
1079
|
+
get multiselect() {
|
|
1080
|
+
return this._multiselect;
|
|
1115
1081
|
}
|
|
1116
|
-
|
|
1117
|
-
this.
|
|
1118
|
-
if (this._currentTabGroup?.fields.length === 0) {
|
|
1119
|
-
this.createFieldGroup(EditorDescriptor.defaultGroupName, null);
|
|
1120
|
-
}
|
|
1082
|
+
get autocompleteOpenOnFocus() {
|
|
1083
|
+
return this._autocompleteOpenOnFocus;
|
|
1121
1084
|
}
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
this.createTabGroup(EditorDescriptor.defaultGroupName, 'general.general');
|
|
1125
|
-
}
|
|
1085
|
+
get autocompleteInlineSearch() {
|
|
1086
|
+
return this._autocompleteInlineSearch;
|
|
1126
1087
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
(function (EditorDescriptor) {
|
|
1130
|
-
let TableviewEditorTypeEnum;
|
|
1131
|
-
(function (TableviewEditorTypeEnum) {
|
|
1132
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
|
|
1133
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
|
|
1134
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
|
|
1135
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
|
|
1136
|
-
})(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
|
|
1137
|
-
})(EditorDescriptor || (EditorDescriptor = {}));
|
|
1138
|
-
class AGenericFieldDescriptor {
|
|
1139
|
-
constructor(editor) {
|
|
1140
|
-
this._config = {};
|
|
1141
|
-
this._editor = editor;
|
|
1088
|
+
get dropdownClassName() {
|
|
1089
|
+
return this._dropdownClassName;
|
|
1142
1090
|
}
|
|
1143
|
-
get
|
|
1144
|
-
return this.
|
|
1091
|
+
get modelType() {
|
|
1092
|
+
return this._modelType;
|
|
1145
1093
|
}
|
|
1146
|
-
|
|
1147
|
-
|
|
1094
|
+
withItemsLabelProperty(itemsLabelProperty, translate = false) {
|
|
1095
|
+
this._itemsLabelProperty = itemsLabelProperty;
|
|
1096
|
+
this._itemsLabelTranslate = translate;
|
|
1097
|
+
return this;
|
|
1148
1098
|
}
|
|
1149
|
-
|
|
1150
|
-
this.
|
|
1099
|
+
withItemsValueProperty(itemsValueProperty) {
|
|
1100
|
+
this._itemsValueProperty = itemsValueProperty;
|
|
1101
|
+
this._dataKeyProperty = itemsValueProperty;
|
|
1151
1102
|
return this;
|
|
1152
1103
|
}
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
this._required = false;
|
|
1158
|
-
this._disabled = false;
|
|
1159
|
-
this._validators = [];
|
|
1160
|
-
this._className = '';
|
|
1161
|
-
this._labelClassName = '';
|
|
1162
|
-
this._inputClassName = '';
|
|
1163
|
-
this._size = FieldDescriptor.SizeEnum.Normal;
|
|
1164
|
-
this._eventsSubject = new Subject();
|
|
1165
|
-
this._property = property;
|
|
1166
|
-
this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
|
|
1104
|
+
withDataKeyProperty(dataKeyProperty) {
|
|
1105
|
+
this._dataKeyProperty = dataKeyProperty;
|
|
1106
|
+
this._itemsValueProperty = dataKeyProperty;
|
|
1107
|
+
return this;
|
|
1167
1108
|
}
|
|
1168
|
-
|
|
1169
|
-
|
|
1109
|
+
withLookup(lookup, serviceType) {
|
|
1110
|
+
const dataProvider = new LookupDataProvider(this._modelType);
|
|
1111
|
+
if (serviceType) {
|
|
1112
|
+
dataProvider.withServiceType(serviceType);
|
|
1113
|
+
}
|
|
1114
|
+
dataProvider.withLookup(lookup);
|
|
1115
|
+
this._dataProvider = dataProvider;
|
|
1116
|
+
return this;
|
|
1170
1117
|
}
|
|
1171
|
-
|
|
1172
|
-
|
|
1118
|
+
withLookupDataProvider(dataProvider) {
|
|
1119
|
+
this._dataProvider = dataProvider;
|
|
1120
|
+
return this;
|
|
1173
1121
|
}
|
|
1174
|
-
|
|
1175
|
-
|
|
1122
|
+
withMultiselect(multiselect = true) {
|
|
1123
|
+
this._multiselect = multiselect;
|
|
1124
|
+
return this;
|
|
1176
1125
|
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1126
|
+
withDropdownClassName(dropdownClassName) {
|
|
1127
|
+
this._dropdownClassName = dropdownClassName;
|
|
1128
|
+
return this;
|
|
1179
1129
|
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1130
|
+
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
1131
|
+
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;
|
|
1132
|
+
this._autocompleteOpenOnFocus = openOnFocus;
|
|
1133
|
+
this._autocompleteInlineSearch = inlineSearch;
|
|
1134
|
+
return this;
|
|
1182
1135
|
}
|
|
1183
|
-
|
|
1184
|
-
|
|
1136
|
+
copy() {
|
|
1137
|
+
const descriptor = new FilterLookupDescriptor(this._property, this._modelType);
|
|
1138
|
+
this.copyFieldsTo(descriptor);
|
|
1139
|
+
return descriptor;
|
|
1185
1140
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1141
|
+
copyFieldsTo(filter) {
|
|
1142
|
+
super.copyFieldsTo(filter);
|
|
1143
|
+
filter._dataProvider = this._dataProvider;
|
|
1144
|
+
filter._lookupType = this._lookupType;
|
|
1145
|
+
filter._itemsLabelProperty = this._itemsLabelProperty;
|
|
1146
|
+
filter._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
1147
|
+
filter._itemsValueProperty = this._itemsValueProperty;
|
|
1148
|
+
filter._dataKeyProperty = this._dataKeyProperty;
|
|
1149
|
+
filter._multiselect = this._multiselect;
|
|
1150
|
+
filter._dropdownClassName = this._dropdownClassName;
|
|
1151
|
+
filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;
|
|
1152
|
+
filter._autocompleteInlineSearch = this._autocompleteInlineSearch;
|
|
1188
1153
|
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1154
|
+
}
|
|
1155
|
+
class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
1156
|
+
constructor(property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
1157
|
+
super(property, null);
|
|
1158
|
+
this._enumType = enumType;
|
|
1159
|
+
if (typeof optionsTitlePath === 'undefined') {
|
|
1160
|
+
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1161
|
+
}
|
|
1162
|
+
const optionEnumValues = Array.isArray(options)
|
|
1163
|
+
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)
|
|
1164
|
+
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);
|
|
1165
|
+
const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
|
|
1166
|
+
this.withLookupDataProvider(dataProvider);
|
|
1167
|
+
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
1168
|
+
this.withItemsValueProperty('value');
|
|
1191
1169
|
}
|
|
1192
|
-
get
|
|
1193
|
-
return this.
|
|
1170
|
+
get enumType() {
|
|
1171
|
+
return this._enumType;
|
|
1194
1172
|
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1173
|
+
asAutocomplete(openOnFocus = true) {
|
|
1174
|
+
super.asAutocomplete(openOnFocus, true);
|
|
1175
|
+
return this;
|
|
1197
1176
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1177
|
+
copy() {
|
|
1178
|
+
const field = new FilterLookupEnumDescriptor(this._property, this._enumType, []);
|
|
1179
|
+
this.copyFieldsTo(field);
|
|
1180
|
+
return field;
|
|
1200
1181
|
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1182
|
+
}
|
|
1183
|
+
(function (FilterLookupDescriptor) {
|
|
1184
|
+
let LookupTypeEnum;
|
|
1185
|
+
(function (LookupTypeEnum) {
|
|
1186
|
+
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
1187
|
+
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
1188
|
+
})(LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum || (FilterLookupDescriptor.LookupTypeEnum = {}));
|
|
1189
|
+
})(FilterLookupDescriptor || (FilterLookupDescriptor = {}));
|
|
1190
|
+
|
|
1191
|
+
class ColumnDescriptor {
|
|
1192
|
+
constructor(table, property) {
|
|
1193
|
+
this._columnType = ColumnDescriptor.TypeEnum.String;
|
|
1194
|
+
this._isSortEnabled = false;
|
|
1195
|
+
this._enumNameAsValue = false;
|
|
1196
|
+
// boolean specifics
|
|
1197
|
+
this._booleanAsIcon = false;
|
|
1198
|
+
this._table = table;
|
|
1199
|
+
this._property = property;
|
|
1203
1200
|
}
|
|
1204
|
-
get
|
|
1205
|
-
return this.
|
|
1201
|
+
get columnType() {
|
|
1202
|
+
return this._columnType;
|
|
1206
1203
|
}
|
|
1207
|
-
get
|
|
1208
|
-
return this.
|
|
1204
|
+
get title() {
|
|
1205
|
+
return this._title;
|
|
1209
1206
|
}
|
|
1210
|
-
get
|
|
1211
|
-
return this.
|
|
1207
|
+
get jsonPath() {
|
|
1208
|
+
return this._jsonPath;
|
|
1212
1209
|
}
|
|
1213
|
-
get
|
|
1214
|
-
return this.
|
|
1210
|
+
get isSortEnabled() {
|
|
1211
|
+
return this._isSortEnabled;
|
|
1215
1212
|
}
|
|
1216
|
-
get
|
|
1217
|
-
return this.
|
|
1213
|
+
get filterDescriptor() {
|
|
1214
|
+
return this._filterDescriptor;
|
|
1218
1215
|
}
|
|
1219
|
-
get
|
|
1220
|
-
return this.
|
|
1216
|
+
get displayFormat() {
|
|
1217
|
+
return this._displayFormat;
|
|
1221
1218
|
}
|
|
1222
|
-
get
|
|
1223
|
-
return this.
|
|
1219
|
+
get table() {
|
|
1220
|
+
return this._table;
|
|
1224
1221
|
}
|
|
1225
|
-
get
|
|
1226
|
-
return this.
|
|
1222
|
+
get property() {
|
|
1223
|
+
return this._property;
|
|
1227
1224
|
}
|
|
1228
|
-
|
|
1229
|
-
this.
|
|
1230
|
-
return this;
|
|
1225
|
+
get enumType() {
|
|
1226
|
+
return this._enumType;
|
|
1231
1227
|
}
|
|
1232
|
-
|
|
1233
|
-
this.
|
|
1234
|
-
return this;
|
|
1228
|
+
get enumTitlePath() {
|
|
1229
|
+
return this._enumTitlePath;
|
|
1235
1230
|
}
|
|
1236
|
-
|
|
1237
|
-
this.
|
|
1238
|
-
return this;
|
|
1231
|
+
get enumNameAsValue() {
|
|
1232
|
+
return this._enumNameAsValue;
|
|
1239
1233
|
}
|
|
1240
|
-
|
|
1241
|
-
this.
|
|
1242
|
-
if (requiredExpression) {
|
|
1243
|
-
this._requiredExpression = requiredExpression;
|
|
1244
|
-
}
|
|
1245
|
-
return this;
|
|
1234
|
+
get booleanAsIcon() {
|
|
1235
|
+
return this._booleanAsIcon;
|
|
1246
1236
|
}
|
|
1247
|
-
|
|
1248
|
-
this.
|
|
1249
|
-
if (disabledExpression) {
|
|
1250
|
-
this._disabledExpression = disabledExpression;
|
|
1251
|
-
}
|
|
1252
|
-
return this;
|
|
1237
|
+
get booleanYes() {
|
|
1238
|
+
return this._booleanYes;
|
|
1253
1239
|
}
|
|
1254
|
-
|
|
1255
|
-
this.
|
|
1240
|
+
get booleanNo() {
|
|
1241
|
+
return this._booleanNo;
|
|
1242
|
+
}
|
|
1243
|
+
get objectModelType() {
|
|
1244
|
+
return this._objectModelType;
|
|
1245
|
+
}
|
|
1246
|
+
get objectTitleProperty() {
|
|
1247
|
+
return this._objectTitleProperty;
|
|
1248
|
+
}
|
|
1249
|
+
get customComponentType() {
|
|
1250
|
+
return this._customComponentType;
|
|
1251
|
+
}
|
|
1252
|
+
asType(type = ColumnDescriptor.TypeEnum.String) {
|
|
1253
|
+
this._columnType = type;
|
|
1256
1254
|
return this;
|
|
1257
1255
|
}
|
|
1258
|
-
|
|
1259
|
-
this.
|
|
1256
|
+
asNumber(displayFormat = '1.0-0') {
|
|
1257
|
+
this._columnType = ColumnDescriptor.TypeEnum.Number;
|
|
1258
|
+
this._displayFormat = displayFormat;
|
|
1260
1259
|
return this;
|
|
1261
1260
|
}
|
|
1262
|
-
|
|
1263
|
-
this.
|
|
1261
|
+
asDate(displayFormat = 'dd.MM.yyyy') {
|
|
1262
|
+
this._columnType = ColumnDescriptor.TypeEnum.Date;
|
|
1263
|
+
this._displayFormat = displayFormat;
|
|
1264
1264
|
return this;
|
|
1265
1265
|
}
|
|
1266
|
-
|
|
1267
|
-
this.
|
|
1266
|
+
asBoolean(yes, no, asIcon = false) {
|
|
1267
|
+
this._columnType = ColumnDescriptor.TypeEnum.Boolean;
|
|
1268
|
+
this._booleanAsIcon = asIcon;
|
|
1269
|
+
this._booleanYes = yes;
|
|
1270
|
+
this._booleanNo = no;
|
|
1268
1271
|
return this;
|
|
1269
1272
|
}
|
|
1270
|
-
|
|
1271
|
-
this.
|
|
1273
|
+
asEnum(enumType, nameAsValue = false, titlePath) {
|
|
1274
|
+
this._columnType = ColumnDescriptor.TypeEnum.Enum;
|
|
1275
|
+
this._enumType = enumType;
|
|
1276
|
+
this._enumNameAsValue = nameAsValue;
|
|
1277
|
+
if (typeof titlePath === 'undefined') {
|
|
1278
|
+
titlePath = TypeUtil.findEnumName(enumType);
|
|
1279
|
+
}
|
|
1280
|
+
this._enumTitlePath = titlePath;
|
|
1272
1281
|
return this;
|
|
1273
1282
|
}
|
|
1274
|
-
|
|
1275
|
-
this.
|
|
1276
|
-
this.
|
|
1277
|
-
this._inputClassName = inputClassName;
|
|
1283
|
+
asCustomComponent(customComponentType) {
|
|
1284
|
+
this._columnType = ColumnDescriptor.TypeEnum.Custom;
|
|
1285
|
+
this._customComponentType = customComponentType;
|
|
1278
1286
|
return this;
|
|
1279
1287
|
}
|
|
1280
|
-
|
|
1281
|
-
this.
|
|
1288
|
+
withObjectProperty(modelType, titleProperty) {
|
|
1289
|
+
this._objectModelType = modelType;
|
|
1290
|
+
if (!titleProperty) {
|
|
1291
|
+
this._objectTitleProperty = ModelUtil.findTitleAttribute(modelType) ?? undefined;
|
|
1292
|
+
}
|
|
1293
|
+
else {
|
|
1294
|
+
this._objectTitleProperty = titleProperty;
|
|
1295
|
+
}
|
|
1282
1296
|
return this;
|
|
1283
1297
|
}
|
|
1284
|
-
|
|
1285
|
-
this.
|
|
1298
|
+
withTitle(title) {
|
|
1299
|
+
this._title = title;
|
|
1300
|
+
return this;
|
|
1286
1301
|
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1302
|
+
withJsonPath(path) {
|
|
1303
|
+
this._jsonPath = path;
|
|
1304
|
+
return this;
|
|
1289
1305
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1306
|
+
withFilter(forceSimple = false) {
|
|
1307
|
+
this._filterDescriptor = new FilterDescriptor(this._property);
|
|
1308
|
+
let filterType;
|
|
1309
|
+
if (!forceSimple && this._objectModelType) {
|
|
1310
|
+
return this.withFilterLookup();
|
|
1311
|
+
}
|
|
1312
|
+
switch (this._columnType) {
|
|
1313
|
+
case ColumnDescriptor.TypeEnum.Number:
|
|
1314
|
+
filterType = FilterDescriptor.TypeEnum.Number;
|
|
1315
|
+
break;
|
|
1316
|
+
case ColumnDescriptor.TypeEnum.Boolean:
|
|
1317
|
+
filterType = FilterDescriptor.TypeEnum.Boolean;
|
|
1318
|
+
break;
|
|
1319
|
+
case ColumnDescriptor.TypeEnum.Date:
|
|
1320
|
+
filterType = FilterDescriptor.TypeEnum.Date;
|
|
1321
|
+
break;
|
|
1322
|
+
case ColumnDescriptor.TypeEnum.Enum:
|
|
1323
|
+
if (!forceSimple) {
|
|
1324
|
+
return this.withFilterLookupEnum();
|
|
1325
|
+
}
|
|
1326
|
+
else {
|
|
1327
|
+
filterType = FilterDescriptor.TypeEnum.String;
|
|
1328
|
+
break;
|
|
1329
|
+
}
|
|
1330
|
+
case ColumnDescriptor.TypeEnum.String:
|
|
1331
|
+
case ColumnDescriptor.TypeEnum.Custom:
|
|
1332
|
+
default:
|
|
1333
|
+
filterType = FilterDescriptor.TypeEnum.String;
|
|
1334
|
+
break;
|
|
1335
|
+
}
|
|
1336
|
+
this._filterDescriptor.asFilterType(filterType);
|
|
1337
|
+
return this._filterDescriptor;
|
|
1305
1338
|
}
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
(function (SizeEnum) {
|
|
1311
|
-
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
1312
|
-
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
1313
|
-
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
1314
|
-
})(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
|
|
1315
|
-
})(FieldDescriptor || (FieldDescriptor = {}));
|
|
1316
|
-
class FieldInputDescriptor extends AFieldDescriptor {
|
|
1317
|
-
constructor(editor, property) {
|
|
1318
|
-
super(editor, property);
|
|
1319
|
-
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1320
|
-
this._numberUseGrouping = true;
|
|
1321
|
-
// radio specific properties
|
|
1322
|
-
this._radioOptions = [];
|
|
1323
|
-
this._datePickerShowTime = false;
|
|
1339
|
+
withFilterLookup() {
|
|
1340
|
+
const filterDescriptor = new FilterLookupDescriptor(this._property, this._objectModelType ?? null);
|
|
1341
|
+
this._filterDescriptor = filterDescriptor;
|
|
1342
|
+
return filterDescriptor;
|
|
1324
1343
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1344
|
+
withFilterLookupEnum(options) {
|
|
1345
|
+
if (this._columnType !== ColumnDescriptor.TypeEnum.Enum || !this._enumType) {
|
|
1346
|
+
throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
|
|
1347
|
+
}
|
|
1348
|
+
const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
|
|
1349
|
+
this._filterDescriptor = filterDescriptor;
|
|
1350
|
+
return filterDescriptor;
|
|
1327
1351
|
}
|
|
1328
|
-
|
|
1329
|
-
|
|
1352
|
+
withSort(isEnabled = true) {
|
|
1353
|
+
this._isSortEnabled = isEnabled;
|
|
1354
|
+
return this;
|
|
1330
1355
|
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1356
|
+
copy() {
|
|
1357
|
+
const descriptor = new ColumnDescriptor(this._table, this._property);
|
|
1358
|
+
descriptor._jsonPath = this._jsonPath;
|
|
1359
|
+
descriptor._title = this._title;
|
|
1360
|
+
descriptor._isSortEnabled = this._isSortEnabled;
|
|
1361
|
+
descriptor._columnType = this._columnType;
|
|
1362
|
+
descriptor._filterDescriptor = this._filterDescriptor?.copy();
|
|
1363
|
+
descriptor._enumType = this._enumType;
|
|
1364
|
+
descriptor._enumTitlePath = this._enumTitlePath;
|
|
1365
|
+
descriptor._enumNameAsValue = this._enumNameAsValue;
|
|
1366
|
+
descriptor._booleanAsIcon = this._booleanAsIcon;
|
|
1367
|
+
descriptor._booleanYes = this._booleanYes;
|
|
1368
|
+
descriptor._booleanNo = this._booleanNo;
|
|
1369
|
+
descriptor._objectModelType = this._objectModelType;
|
|
1370
|
+
descriptor._objectTitleProperty = this._objectTitleProperty;
|
|
1371
|
+
return descriptor;
|
|
1333
1372
|
}
|
|
1334
|
-
|
|
1335
|
-
|
|
1373
|
+
}
|
|
1374
|
+
(function (ColumnDescriptor) {
|
|
1375
|
+
let TypeEnum;
|
|
1376
|
+
(function (TypeEnum) {
|
|
1377
|
+
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1378
|
+
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1379
|
+
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1380
|
+
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1381
|
+
TypeEnum[TypeEnum["Enum"] = 4] = "Enum";
|
|
1382
|
+
TypeEnum[TypeEnum["Custom"] = 5] = "Custom";
|
|
1383
|
+
})(TypeEnum = ColumnDescriptor.TypeEnum || (ColumnDescriptor.TypeEnum = {}));
|
|
1384
|
+
})(ColumnDescriptor || (ColumnDescriptor = {}));
|
|
1385
|
+
|
|
1386
|
+
class EditorDescriptor {
|
|
1387
|
+
constructor(modelType, idProperty, titleProperty, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {
|
|
1388
|
+
this._tabs = [];
|
|
1389
|
+
this._groups = [];
|
|
1390
|
+
this._fields = [];
|
|
1391
|
+
this._disabled = false;
|
|
1392
|
+
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
1393
|
+
this._tableviewEditorType = tableviewEditorType;
|
|
1336
1394
|
}
|
|
1337
|
-
get
|
|
1338
|
-
return this.
|
|
1395
|
+
get model() {
|
|
1396
|
+
return this._model;
|
|
1339
1397
|
}
|
|
1340
|
-
get
|
|
1341
|
-
return this.
|
|
1398
|
+
get tabs() {
|
|
1399
|
+
return this._tabs;
|
|
1342
1400
|
}
|
|
1343
|
-
get
|
|
1344
|
-
return this.
|
|
1401
|
+
get fields() {
|
|
1402
|
+
return this._fields;
|
|
1345
1403
|
}
|
|
1346
|
-
get
|
|
1347
|
-
return this.
|
|
1404
|
+
get tableviewEditorType() {
|
|
1405
|
+
return this._disabled;
|
|
1348
1406
|
}
|
|
1349
|
-
get
|
|
1350
|
-
return this.
|
|
1407
|
+
get disabled() {
|
|
1408
|
+
return this._disabled;
|
|
1351
1409
|
}
|
|
1352
|
-
|
|
1353
|
-
|
|
1410
|
+
createTabGroup(name, title) {
|
|
1411
|
+
const tabGroup = new FieldTabGroupDescriptor(this, name);
|
|
1412
|
+
if (!title) {
|
|
1413
|
+
title = I18nUtil.getModelTabKey(this.model, name);
|
|
1414
|
+
}
|
|
1415
|
+
tabGroup.withTitle(title);
|
|
1416
|
+
this.createTabGroupDescriptor(tabGroup);
|
|
1417
|
+
return tabGroup;
|
|
1354
1418
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1419
|
+
createFieldGroup(name, title) {
|
|
1420
|
+
const fieldGroup = new FieldGroupDescriptor(this, name);
|
|
1421
|
+
if (title !== null) {
|
|
1422
|
+
if (!title) {
|
|
1423
|
+
title = I18nUtil.getModelGroupKey(this.model, name);
|
|
1424
|
+
}
|
|
1425
|
+
fieldGroup.withTitle(title);
|
|
1426
|
+
}
|
|
1427
|
+
this.createFieldGroupDescriptor(fieldGroup);
|
|
1428
|
+
return fieldGroup;
|
|
1357
1429
|
}
|
|
1358
|
-
|
|
1359
|
-
|
|
1430
|
+
addFieldDescriptor(field) {
|
|
1431
|
+
this.createDefaultGroup();
|
|
1432
|
+
this._fields.push(field);
|
|
1433
|
+
this._currentGroup?.addField(field);
|
|
1434
|
+
return this;
|
|
1360
1435
|
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1436
|
+
addField(property) {
|
|
1437
|
+
const field = new FieldInputDescriptor(this, property);
|
|
1438
|
+
this.addFieldDescriptor(field);
|
|
1439
|
+
return field;
|
|
1363
1440
|
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1441
|
+
removeField(property) {
|
|
1442
|
+
const fieldIdx = this._fields.findIndex(f => f.property === property);
|
|
1443
|
+
if (fieldIdx < 0) {
|
|
1444
|
+
throw new Error(`Field ${property} does not exist.`);
|
|
1445
|
+
}
|
|
1446
|
+
const field = this._fields[fieldIdx];
|
|
1447
|
+
if (field.group) {
|
|
1448
|
+
const groupFieldIdx = field.group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);
|
|
1449
|
+
if (groupFieldIdx >= 0) {
|
|
1450
|
+
field.group.fields.splice(groupFieldIdx, 1);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
this._fields.splice(fieldIdx, 1);
|
|
1454
|
+
return this;
|
|
1366
1455
|
}
|
|
1367
|
-
|
|
1368
|
-
return this.
|
|
1456
|
+
getField(property) {
|
|
1457
|
+
return this._fields.find(f => f.property === property) ?? null;
|
|
1369
1458
|
}
|
|
1370
|
-
|
|
1371
|
-
|
|
1459
|
+
addFieldLookup(property, modelType) {
|
|
1460
|
+
const field = new FieldLookupDescriptor(this, property, modelType);
|
|
1461
|
+
this.addFieldDescriptor(field);
|
|
1462
|
+
return field;
|
|
1372
1463
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1464
|
+
addFieldLookupEnum(property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
1465
|
+
const field = new FieldLookupEnumDescriptor(this, property, enumType, options, nameAsValue, optionsTitlePath);
|
|
1466
|
+
this.addFieldDescriptor(field);
|
|
1467
|
+
return field;
|
|
1375
1468
|
}
|
|
1376
|
-
|
|
1377
|
-
|
|
1469
|
+
addFieldManyEditor(property, tableviewDescriptor) {
|
|
1470
|
+
const field = new FieldManyEditorDescriptor(this, property, tableviewDescriptor);
|
|
1471
|
+
this.addFieldDescriptor(field);
|
|
1472
|
+
return field;
|
|
1378
1473
|
}
|
|
1379
|
-
|
|
1380
|
-
|
|
1474
|
+
addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor) {
|
|
1475
|
+
const field = new FieldManyToManyEditorDescriptor(this, property, mainTableDescriptor, lookupTableDescriptor);
|
|
1476
|
+
this.addFieldDescriptor(field);
|
|
1477
|
+
return field;
|
|
1381
1478
|
}
|
|
1382
|
-
|
|
1383
|
-
this.
|
|
1479
|
+
withDisabled(disabled = true) {
|
|
1480
|
+
this._disabled = disabled;
|
|
1384
1481
|
return this;
|
|
1385
1482
|
}
|
|
1386
|
-
|
|
1387
|
-
this.
|
|
1388
|
-
|
|
1389
|
-
this._maxLength = maxLength;
|
|
1390
|
-
this._pattern = pattern;
|
|
1391
|
-
if (isEmail) {
|
|
1392
|
-
this.withValidator('email', control => !Validators.email(control));
|
|
1483
|
+
addValidator(name, expression) {
|
|
1484
|
+
if (this._currentGroup) {
|
|
1485
|
+
this._currentGroup.withValidator(name, expression);
|
|
1393
1486
|
}
|
|
1394
|
-
return this;
|
|
1395
1487
|
}
|
|
1396
|
-
|
|
1397
|
-
this.
|
|
1398
|
-
this.
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1488
|
+
copy() {
|
|
1489
|
+
const editor = new EditorDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);
|
|
1490
|
+
for (const tabGroup of this._tabs) {
|
|
1491
|
+
editor.createTabGroupDescriptor(tabGroup.copy());
|
|
1492
|
+
}
|
|
1493
|
+
for (const tabGroup of editor._tabs) {
|
|
1494
|
+
for (const fieldGroup of tabGroup.fields) {
|
|
1495
|
+
editor._fields.push(...fieldGroup.fields);
|
|
1496
|
+
}
|
|
1497
|
+
editor._groups.push(...tabGroup.fields);
|
|
1498
|
+
}
|
|
1499
|
+
editor._currentTabGroup = editor._tabs[editor._tabs.length - 1];
|
|
1500
|
+
editor._currentGroup = editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1];
|
|
1501
|
+
editor._disabled = this._disabled;
|
|
1502
|
+
return editor;
|
|
1403
1503
|
}
|
|
1404
|
-
|
|
1405
|
-
this.
|
|
1406
|
-
this.
|
|
1407
|
-
this.
|
|
1408
|
-
this.
|
|
1409
|
-
this._numberMin = min ?? Number.MIN_SAFE_INTEGER;
|
|
1410
|
-
this._numberMax = max ?? Number.MAX_SAFE_INTEGER;
|
|
1411
|
-
this._numberUseGrouping = numberUseGrouping;
|
|
1504
|
+
createFieldGroupDescriptor(fieldGroup) {
|
|
1505
|
+
this.createDefaultTabGroup();
|
|
1506
|
+
this._currentGroup = fieldGroup;
|
|
1507
|
+
this._groups.push(fieldGroup);
|
|
1508
|
+
this._currentTabGroup?.addField(fieldGroup);
|
|
1412
1509
|
return this;
|
|
1413
1510
|
}
|
|
1414
|
-
|
|
1415
|
-
this.
|
|
1511
|
+
createTabGroupDescriptor(tabGroup) {
|
|
1512
|
+
this._currentTabGroup = tabGroup;
|
|
1513
|
+
this._tabs.push(tabGroup);
|
|
1416
1514
|
return this;
|
|
1417
1515
|
}
|
|
1418
|
-
|
|
1419
|
-
this.
|
|
1420
|
-
this.
|
|
1421
|
-
|
|
1516
|
+
createDefaultGroup() {
|
|
1517
|
+
this.createDefaultTabGroup();
|
|
1518
|
+
if (this._currentTabGroup?.fields.length === 0) {
|
|
1519
|
+
this.createFieldGroup(EditorDescriptor.defaultGroupName, null);
|
|
1520
|
+
}
|
|
1422
1521
|
}
|
|
1423
|
-
|
|
1424
|
-
this.
|
|
1425
|
-
|
|
1426
|
-
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1522
|
+
createDefaultTabGroup() {
|
|
1523
|
+
if (this._tabs.length === 0) {
|
|
1524
|
+
this.createTabGroup(EditorDescriptor.defaultGroupName, 'general.general');
|
|
1427
1525
|
}
|
|
1428
|
-
this._radioOptions = Array.isArray(values)
|
|
1429
|
-
? EnumUtil.fromValuesAsEnumValueArray(enumType, values, nameAsValue, optionsTitlePath ?? undefined)
|
|
1430
|
-
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);
|
|
1431
|
-
return this;
|
|
1432
1526
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1527
|
+
}
|
|
1528
|
+
EditorDescriptor.defaultGroupName = '_default';
|
|
1529
|
+
(function (EditorDescriptor) {
|
|
1530
|
+
let TableviewEditorTypeEnum;
|
|
1531
|
+
(function (TableviewEditorTypeEnum) {
|
|
1532
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
|
|
1533
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
|
|
1534
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
|
|
1535
|
+
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
|
|
1536
|
+
})(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
|
|
1537
|
+
})(EditorDescriptor || (EditorDescriptor = {}));
|
|
1538
|
+
|
|
1539
|
+
class MngFormEditorSubmitEvent {
|
|
1540
|
+
constructor(formItem) {
|
|
1541
|
+
this.formItem = formItem;
|
|
1542
|
+
this.success = true;
|
|
1440
1543
|
}
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1544
|
+
}
|
|
1545
|
+
var MngFormFieldEventTypeEnum;
|
|
1546
|
+
(function (MngFormFieldEventTypeEnum) {
|
|
1547
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
|
|
1548
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
|
|
1549
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
|
|
1550
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
|
|
1551
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
|
|
1552
|
+
})(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
|
|
1553
|
+
class MngFormFieldEventComponentSubtype {
|
|
1554
|
+
}
|
|
1555
|
+
MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
|
|
1556
|
+
MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
|
|
1557
|
+
MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
|
|
1558
|
+
MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
|
|
1559
|
+
class MngFormFieldEventDialogSubtype {
|
|
1560
|
+
}
|
|
1561
|
+
MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
|
|
1562
|
+
MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
|
|
1563
|
+
MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
|
|
1564
|
+
class MngFormFieldEvent {
|
|
1565
|
+
constructor(type, componentType, componentInstance, data = {}) {
|
|
1566
|
+
this.type = type;
|
|
1567
|
+
this.componentType = componentType;
|
|
1568
|
+
this.componentInstance = componentInstance;
|
|
1569
|
+
this.data = data;
|
|
1446
1570
|
}
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
class AGenericFieldDescriptor {
|
|
1574
|
+
constructor(editor) {
|
|
1575
|
+
this._config = {};
|
|
1576
|
+
this._editor = editor;
|
|
1451
1577
|
}
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
field._numberMaxFractionDigits = this._numberMaxFractionDigits;
|
|
1462
|
-
field._numberUseGrouping = this._numberUseGrouping;
|
|
1463
|
-
field._radioOptions = [...this._radioOptions];
|
|
1464
|
-
field._datePickerFormat = this._datePickerFormat;
|
|
1465
|
-
field._datePickerMin = this._datePickerMin;
|
|
1466
|
-
field._datePickerMax = this._datePickerMax;
|
|
1467
|
-
field._datePickerShowTime = this._datePickerShowTime;
|
|
1468
|
-
field._maxLength = this._maxLength;
|
|
1469
|
-
field._minLength = this._minLength;
|
|
1470
|
-
field._pattern = this._pattern;
|
|
1471
|
-
field._mask = this._mask;
|
|
1472
|
-
field._slotChar = this._slotChar;
|
|
1473
|
-
field._customComponentName = this._customComponentName;
|
|
1474
|
-
return field;
|
|
1578
|
+
get editor() {
|
|
1579
|
+
return this._editor;
|
|
1580
|
+
}
|
|
1581
|
+
get config() {
|
|
1582
|
+
return this._config;
|
|
1583
|
+
}
|
|
1584
|
+
withConfig(config) {
|
|
1585
|
+
this._config = config;
|
|
1586
|
+
return this;
|
|
1475
1587
|
}
|
|
1476
1588
|
}
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
1491
|
-
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
1492
|
-
constructor(editor, property, modelType) {
|
|
1493
|
-
super(editor, property);
|
|
1494
|
-
this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
1495
|
-
this._itemsLabelTranslate = false;
|
|
1496
|
-
this._modelType = modelType;
|
|
1497
|
-
ModelUtil.trySetLookupItemsProperties(this);
|
|
1589
|
+
class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
1590
|
+
constructor(editor, property) {
|
|
1591
|
+
super(editor);
|
|
1592
|
+
this._required = false;
|
|
1593
|
+
this._disabled = false;
|
|
1594
|
+
this._validators = [];
|
|
1595
|
+
this._className = '';
|
|
1596
|
+
this._labelClassName = '';
|
|
1597
|
+
this._inputClassName = '';
|
|
1598
|
+
this._size = FieldDescriptor.SizeEnum.Normal;
|
|
1599
|
+
this._eventsSubject = new Subject();
|
|
1600
|
+
this._property = property;
|
|
1601
|
+
this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
|
|
1498
1602
|
}
|
|
1499
|
-
get
|
|
1500
|
-
return this.
|
|
1603
|
+
get property() {
|
|
1604
|
+
return this._property;
|
|
1501
1605
|
}
|
|
1502
|
-
get
|
|
1503
|
-
return this.
|
|
1606
|
+
get group() {
|
|
1607
|
+
return this._group;
|
|
1504
1608
|
}
|
|
1505
|
-
get
|
|
1506
|
-
return this.
|
|
1609
|
+
get label() {
|
|
1610
|
+
return this._label;
|
|
1507
1611
|
}
|
|
1508
|
-
get
|
|
1509
|
-
return this.
|
|
1612
|
+
get placeholder() {
|
|
1613
|
+
return this._placeholder;
|
|
1510
1614
|
}
|
|
1511
|
-
get
|
|
1512
|
-
return this.
|
|
1615
|
+
get helpText() {
|
|
1616
|
+
return this._helpText;
|
|
1513
1617
|
}
|
|
1514
|
-
get
|
|
1515
|
-
return this.
|
|
1618
|
+
get required() {
|
|
1619
|
+
return this._required;
|
|
1620
|
+
}
|
|
1621
|
+
get disabled() {
|
|
1622
|
+
return this._disabled;
|
|
1623
|
+
}
|
|
1624
|
+
get defaultValue() {
|
|
1625
|
+
return this._defaultValue;
|
|
1626
|
+
}
|
|
1627
|
+
get getter() {
|
|
1628
|
+
return this._getter;
|
|
1629
|
+
}
|
|
1630
|
+
get setter() {
|
|
1631
|
+
return this._setter;
|
|
1632
|
+
}
|
|
1633
|
+
get validators() {
|
|
1634
|
+
return this._validators;
|
|
1635
|
+
}
|
|
1636
|
+
get requiredExpression() {
|
|
1637
|
+
return this._requiredExpression;
|
|
1638
|
+
}
|
|
1639
|
+
get disabledExpression() {
|
|
1640
|
+
return this._disabledExpression;
|
|
1641
|
+
}
|
|
1642
|
+
get hiddenExpression() {
|
|
1643
|
+
return this._hiddenExpression;
|
|
1644
|
+
}
|
|
1645
|
+
get className() {
|
|
1646
|
+
return this._className;
|
|
1647
|
+
}
|
|
1648
|
+
get labelClassName() {
|
|
1649
|
+
return this._labelClassName;
|
|
1516
1650
|
}
|
|
1517
|
-
get
|
|
1518
|
-
return this.
|
|
1651
|
+
get inputClassName() {
|
|
1652
|
+
return this._inputClassName;
|
|
1519
1653
|
}
|
|
1520
|
-
get
|
|
1521
|
-
return this.
|
|
1654
|
+
get size() {
|
|
1655
|
+
return this._size;
|
|
1522
1656
|
}
|
|
1523
|
-
get
|
|
1524
|
-
return this.
|
|
1657
|
+
get isSizeSmall() {
|
|
1658
|
+
return this._size === FieldDescriptor.SizeEnum.Small;
|
|
1525
1659
|
}
|
|
1526
|
-
get
|
|
1527
|
-
return this.
|
|
1660
|
+
get isSizeLarge() {
|
|
1661
|
+
return this._size === FieldDescriptor.SizeEnum.Large;
|
|
1528
1662
|
}
|
|
1529
|
-
|
|
1530
|
-
this.
|
|
1531
|
-
this._itemsLabelTranslate = translate;
|
|
1663
|
+
withLabel(label) {
|
|
1664
|
+
this._label = label;
|
|
1532
1665
|
return this;
|
|
1533
1666
|
}
|
|
1534
|
-
|
|
1535
|
-
this.
|
|
1536
|
-
this._dataKeyProperty = undefined;
|
|
1667
|
+
withPlaceholder(placeholder) {
|
|
1668
|
+
this._placeholder = placeholder;
|
|
1537
1669
|
return this;
|
|
1538
1670
|
}
|
|
1539
|
-
|
|
1540
|
-
this.
|
|
1671
|
+
withHelpText(helpText) {
|
|
1672
|
+
this._helpText = helpText;
|
|
1541
1673
|
return this;
|
|
1542
1674
|
}
|
|
1543
|
-
|
|
1544
|
-
this.
|
|
1545
|
-
|
|
1675
|
+
withRequired(required = true, requiredExpression) {
|
|
1676
|
+
this._required = required;
|
|
1677
|
+
if (requiredExpression) {
|
|
1678
|
+
this._requiredExpression = requiredExpression;
|
|
1679
|
+
}
|
|
1546
1680
|
return this;
|
|
1547
1681
|
}
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
if (
|
|
1551
|
-
|
|
1682
|
+
withDisabled(disabled = true, disabledExpression) {
|
|
1683
|
+
this._disabled = disabled;
|
|
1684
|
+
if (disabledExpression) {
|
|
1685
|
+
this._disabledExpression = disabledExpression;
|
|
1552
1686
|
}
|
|
1553
|
-
dataProvider.withLookup(lookup);
|
|
1554
|
-
this._dataProvider = dataProvider;
|
|
1555
1687
|
return this;
|
|
1556
1688
|
}
|
|
1557
|
-
|
|
1558
|
-
this.
|
|
1689
|
+
withHidden(hiddenExpression) {
|
|
1690
|
+
this._hiddenExpression = hiddenExpression;
|
|
1559
1691
|
return this;
|
|
1560
1692
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
}
|
|
1564
|
-
asAutocomplete() {
|
|
1565
|
-
this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Autocomplete;
|
|
1693
|
+
withDefaultValue(defaultValue) {
|
|
1694
|
+
this._defaultValue = defaultValue;
|
|
1566
1695
|
return this;
|
|
1567
1696
|
}
|
|
1568
|
-
|
|
1569
|
-
this.
|
|
1570
|
-
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
1571
|
-
this._lookupTableDataProvider = tableDataProvider;
|
|
1697
|
+
withGetter(getter) {
|
|
1698
|
+
this._getter = getter;
|
|
1572
1699
|
return this;
|
|
1573
1700
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
this.copyFieldsTo(field);
|
|
1577
|
-
field._lookupType = this._lookupType;
|
|
1578
|
-
field._itemsLabelProperty = this._itemsLabelProperty;
|
|
1579
|
-
field._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
1580
|
-
field._itemsValueProperty = this._itemsValueProperty;
|
|
1581
|
-
field._itemsDisabledProperty = this._itemsDisabledProperty;
|
|
1582
|
-
field._dataKeyProperty = this._dataKeyProperty;
|
|
1583
|
-
field._dataProvider = this._dataProvider;
|
|
1584
|
-
field._lookupTableDescriptor = this._lookupTableDescriptor;
|
|
1585
|
-
return field;
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
(function (FieldLookupDescriptor) {
|
|
1589
|
-
let LookupTypeEnum;
|
|
1590
|
-
(function (LookupTypeEnum) {
|
|
1591
|
-
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
1592
|
-
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
1593
|
-
LookupTypeEnum[LookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
1594
|
-
})(LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum || (FieldLookupDescriptor.LookupTypeEnum = {}));
|
|
1595
|
-
})(FieldLookupDescriptor || (FieldLookupDescriptor = {}));
|
|
1596
|
-
class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
1597
|
-
constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
1598
|
-
super(editor, property, null);
|
|
1599
|
-
this._nameAsValue = false;
|
|
1600
|
-
this._enumType = enumType;
|
|
1601
|
-
this._nameAsValue = nameAsValue;
|
|
1602
|
-
if (typeof optionsTitlePath === 'undefined') {
|
|
1603
|
-
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1604
|
-
}
|
|
1605
|
-
this._optionEnumValues = Array.isArray(options)
|
|
1606
|
-
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)
|
|
1607
|
-
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);
|
|
1608
|
-
const dataProvider = new LookupDataProvider(null).withLookup(() => of(this._optionEnumValues));
|
|
1609
|
-
this.withLookupDataProvider(dataProvider);
|
|
1610
|
-
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
1611
|
-
this.withItemsValueProperty('value');
|
|
1612
|
-
this.withItemsDisabledProperty('disabled');
|
|
1613
|
-
}
|
|
1614
|
-
get enumType() {
|
|
1615
|
-
return this._enumType;
|
|
1616
|
-
}
|
|
1617
|
-
withDisabledOptions(...disabledOptions) {
|
|
1618
|
-
for (const disabledOption of disabledOptions) {
|
|
1619
|
-
const disabledOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, disabledOption) : disabledOption;
|
|
1620
|
-
if (disabledOptionValue) {
|
|
1621
|
-
const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);
|
|
1622
|
-
if (option) {
|
|
1623
|
-
option.disabled = true;
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1701
|
+
withSetter(setter) {
|
|
1702
|
+
this._setter = setter;
|
|
1627
1703
|
return this;
|
|
1628
1704
|
}
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
this.copyFieldsTo(field);
|
|
1632
|
-
field._lookupType = this._lookupType;
|
|
1633
|
-
field._itemsLabelProperty = this._itemsLabelProperty;
|
|
1634
|
-
field._itemsValueProperty = this._itemsValueProperty;
|
|
1635
|
-
field._itemsDisabledProperty = this._itemsDisabledProperty;
|
|
1636
|
-
field._dataKeyProperty = this._dataKeyProperty;
|
|
1637
|
-
field._dataProvider = this._dataProvider;
|
|
1638
|
-
return field;
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
1642
|
-
constructor(editor, property, mainTableDescriptor, lookupTableDescriptor) {
|
|
1643
|
-
super(editor, property);
|
|
1644
|
-
this._fieldType = FieldManyToManyEditorDescriptor.TypeEnum.DialogTableMultiselect;
|
|
1645
|
-
this._lookupTableDataProvider = null;
|
|
1646
|
-
this._actions = [];
|
|
1647
|
-
this._hasLookupExcludeValues = false;
|
|
1648
|
-
this._excludeFilterProperty = '';
|
|
1649
|
-
this._excludeValueProperty = '';
|
|
1650
|
-
this._mainTableDescriptor = mainTableDescriptor;
|
|
1651
|
-
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
1652
|
-
this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);
|
|
1653
|
-
}
|
|
1654
|
-
get fieldType() {
|
|
1655
|
-
return this._fieldType;
|
|
1656
|
-
}
|
|
1657
|
-
get lookupTableDataProvider() {
|
|
1658
|
-
return this._lookupTableDataProvider;
|
|
1659
|
-
}
|
|
1660
|
-
get actions() {
|
|
1661
|
-
return this._actions;
|
|
1662
|
-
}
|
|
1663
|
-
get hasLookupExcludeValues() {
|
|
1664
|
-
return this._hasLookupExcludeValues;
|
|
1665
|
-
}
|
|
1666
|
-
get excludeFilterProperty() {
|
|
1667
|
-
return this._excludeFilterProperty;
|
|
1668
|
-
}
|
|
1669
|
-
get excludeValueProperty() {
|
|
1670
|
-
return this._excludeValueProperty;
|
|
1671
|
-
}
|
|
1672
|
-
get mainTableDescriptor() {
|
|
1673
|
-
return this._mainTableDescriptor;
|
|
1674
|
-
}
|
|
1675
|
-
get lookupTableDescriptor() {
|
|
1676
|
-
return this._lookupTableDescriptor;
|
|
1677
|
-
}
|
|
1678
|
-
withLookup(getAll, serviceType) {
|
|
1679
|
-
const dataProvider = new TableviewDataProvider(this._mainTableDescriptor.model.type);
|
|
1680
|
-
if (serviceType) {
|
|
1681
|
-
dataProvider.withServiceType(serviceType);
|
|
1682
|
-
}
|
|
1683
|
-
dataProvider.withGetAll(getAll);
|
|
1684
|
-
this._lookupTableDataProvider = dataProvider;
|
|
1705
|
+
withValidator(name, expression, message) {
|
|
1706
|
+
this._validators.push(new FieldValidator(name, expression, message));
|
|
1685
1707
|
return this;
|
|
1686
1708
|
}
|
|
1687
|
-
|
|
1688
|
-
this.
|
|
1709
|
+
withClassName(className, labelClassName = '', inputClassName = '') {
|
|
1710
|
+
this._className = className;
|
|
1711
|
+
this._labelClassName = labelClassName;
|
|
1712
|
+
this._inputClassName = inputClassName;
|
|
1689
1713
|
return this;
|
|
1690
1714
|
}
|
|
1691
|
-
|
|
1692
|
-
this.
|
|
1715
|
+
withSize(size = FieldDescriptor.SizeEnum.Normal) {
|
|
1716
|
+
this._size = size;
|
|
1693
1717
|
return this;
|
|
1694
1718
|
}
|
|
1695
|
-
|
|
1696
|
-
this.
|
|
1697
|
-
this._excludeFilterProperty = filterProperty;
|
|
1698
|
-
this._excludeValueProperty = valueProperty;
|
|
1699
|
-
return this;
|
|
1719
|
+
nextEvent(type, cmpType, cmpInstance, data) {
|
|
1720
|
+
this._eventsSubject.next(new MngFormFieldEvent(type, cmpType, cmpInstance, data));
|
|
1700
1721
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1722
|
+
get events$() {
|
|
1723
|
+
return this._eventsSubject.asObservable();
|
|
1724
|
+
}
|
|
1725
|
+
copyFieldsTo(obj) {
|
|
1726
|
+
obj._label = this._label;
|
|
1727
|
+
obj._placeholder = this._placeholder;
|
|
1728
|
+
obj._helpText = this._helpText;
|
|
1729
|
+
obj._required = this._required;
|
|
1730
|
+
obj._disabled = this._disabled;
|
|
1731
|
+
obj._defaultValue = this._defaultValue;
|
|
1732
|
+
obj._requiredExpression = this._requiredExpression;
|
|
1733
|
+
obj._hiddenExpression = this._hiddenExpression;
|
|
1734
|
+
obj._disabledExpression = this._disabledExpression;
|
|
1735
|
+
obj._className = this._className;
|
|
1736
|
+
obj._size = this.size;
|
|
1737
|
+
obj._getter = this._getter;
|
|
1738
|
+
obj._setter = this._setter;
|
|
1739
|
+
obj._validators = this._validators;
|
|
1711
1740
|
}
|
|
1712
1741
|
}
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
1725
|
-
constructor(editor, property, tableviewDescriptor) {
|
|
1742
|
+
var FieldDescriptor;
|
|
1743
|
+
(function (FieldDescriptor) {
|
|
1744
|
+
let SizeEnum;
|
|
1745
|
+
(function (SizeEnum) {
|
|
1746
|
+
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
1747
|
+
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
1748
|
+
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
1749
|
+
})(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
|
|
1750
|
+
})(FieldDescriptor || (FieldDescriptor = {}));
|
|
1751
|
+
class FieldInputDescriptor extends AFieldDescriptor {
|
|
1752
|
+
constructor(editor, property) {
|
|
1726
1753
|
super(editor, property);
|
|
1727
|
-
this._fieldType =
|
|
1728
|
-
this.
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
this.
|
|
1732
|
-
this._fieldActions.push(FieldManyEditorDescriptor.ActionEnum.View, FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
|
|
1754
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1755
|
+
this._numberUseGrouping = true;
|
|
1756
|
+
// radio specific properties
|
|
1757
|
+
this._radioOptions = [];
|
|
1758
|
+
this._datePickerShowTime = false;
|
|
1733
1759
|
}
|
|
1734
1760
|
get fieldType() {
|
|
1735
1761
|
return this._fieldType;
|
|
1736
1762
|
}
|
|
1737
|
-
get
|
|
1738
|
-
return this.
|
|
1763
|
+
get rows() {
|
|
1764
|
+
return this._rows;
|
|
1765
|
+
}
|
|
1766
|
+
get numberMin() {
|
|
1767
|
+
return this._numberMin;
|
|
1739
1768
|
}
|
|
1740
|
-
get
|
|
1741
|
-
return this.
|
|
1769
|
+
get numberMax() {
|
|
1770
|
+
return this._numberMax;
|
|
1742
1771
|
}
|
|
1743
|
-
get
|
|
1744
|
-
return this.
|
|
1772
|
+
get numberStep() {
|
|
1773
|
+
return this._numberStep;
|
|
1745
1774
|
}
|
|
1746
|
-
get
|
|
1747
|
-
return this.
|
|
1775
|
+
get numberMinFractionDigits() {
|
|
1776
|
+
return this._numberMinFractionDigits;
|
|
1748
1777
|
}
|
|
1749
|
-
get
|
|
1750
|
-
return this.
|
|
1778
|
+
get numberMaxFractionDigits() {
|
|
1779
|
+
return this._numberMaxFractionDigits;
|
|
1751
1780
|
}
|
|
1752
|
-
get
|
|
1753
|
-
return this.
|
|
1781
|
+
get numberUseGrouping() {
|
|
1782
|
+
return this._numberUseGrouping;
|
|
1754
1783
|
}
|
|
1755
|
-
get
|
|
1756
|
-
return this.
|
|
1784
|
+
get radioOptions() {
|
|
1785
|
+
return this._radioOptions;
|
|
1757
1786
|
}
|
|
1758
|
-
|
|
1759
|
-
this.
|
|
1760
|
-
return this;
|
|
1787
|
+
get datePickerFormat() {
|
|
1788
|
+
return this._datePickerFormat;
|
|
1761
1789
|
}
|
|
1762
|
-
|
|
1763
|
-
this.
|
|
1764
|
-
return this;
|
|
1790
|
+
get datePickerMin() {
|
|
1791
|
+
return this._datePickerMin;
|
|
1765
1792
|
}
|
|
1766
|
-
|
|
1767
|
-
this.
|
|
1768
|
-
return this;
|
|
1793
|
+
get datePickerMax() {
|
|
1794
|
+
return this._datePickerMax;
|
|
1769
1795
|
}
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
this.copyFieldsTo(field);
|
|
1773
|
-
field._fieldType = this._fieldType;
|
|
1774
|
-
field._fieldActions = this._fieldActions.map(a => a);
|
|
1775
|
-
return field;
|
|
1796
|
+
get datePickerShowTime() {
|
|
1797
|
+
return this._datePickerShowTime;
|
|
1776
1798
|
}
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
let TypeEnum;
|
|
1780
|
-
(function (TypeEnum) {
|
|
1781
|
-
TypeEnum[TypeEnum["DialogEditor"] = 0] = "DialogEditor";
|
|
1782
|
-
})(TypeEnum = FieldManyEditorDescriptor.TypeEnum || (FieldManyEditorDescriptor.TypeEnum = {}));
|
|
1783
|
-
let ActionEnum;
|
|
1784
|
-
(function (ActionEnum) {
|
|
1785
|
-
ActionEnum[ActionEnum["View"] = 0] = "View";
|
|
1786
|
-
ActionEnum[ActionEnum["Add"] = 1] = "Add";
|
|
1787
|
-
ActionEnum[ActionEnum["Edit"] = 2] = "Edit";
|
|
1788
|
-
ActionEnum[ActionEnum["Delete"] = 3] = "Delete";
|
|
1789
|
-
})(ActionEnum = FieldManyEditorDescriptor.ActionEnum || (FieldManyEditorDescriptor.ActionEnum = {}));
|
|
1790
|
-
})(FieldManyEditorDescriptor || (FieldManyEditorDescriptor = {}));
|
|
1791
|
-
class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
1792
|
-
constructor(editor, name) {
|
|
1793
|
-
super(editor);
|
|
1794
|
-
this._fields = [];
|
|
1795
|
-
this._validators = [];
|
|
1796
|
-
this._name = `${this.baseName}${name}`;
|
|
1797
|
-
this._default = name === EditorDescriptor.defaultGroupName;
|
|
1799
|
+
get maxLength() {
|
|
1800
|
+
return this._maxLength;
|
|
1798
1801
|
}
|
|
1799
|
-
get
|
|
1800
|
-
return this.
|
|
1802
|
+
get minLength() {
|
|
1803
|
+
return this._minLength;
|
|
1801
1804
|
}
|
|
1802
|
-
get
|
|
1803
|
-
return this.
|
|
1805
|
+
get pattern() {
|
|
1806
|
+
return this._pattern;
|
|
1804
1807
|
}
|
|
1805
|
-
get
|
|
1806
|
-
return
|
|
1808
|
+
get mask() {
|
|
1809
|
+
return this._mask;
|
|
1807
1810
|
}
|
|
1808
|
-
get
|
|
1809
|
-
return this.
|
|
1811
|
+
get slotChar() {
|
|
1812
|
+
return this._slotChar;
|
|
1810
1813
|
}
|
|
1811
|
-
get
|
|
1812
|
-
return this.
|
|
1814
|
+
get customComponentName() {
|
|
1815
|
+
return this._customComponentName;
|
|
1813
1816
|
}
|
|
1814
|
-
|
|
1815
|
-
this.
|
|
1817
|
+
asHidden() {
|
|
1818
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Hidden;
|
|
1816
1819
|
return this;
|
|
1817
1820
|
}
|
|
1818
|
-
|
|
1819
|
-
this.
|
|
1821
|
+
asText(minLength, maxLength, pattern, isEmail) {
|
|
1822
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1823
|
+
this._minLength = minLength;
|
|
1824
|
+
this._maxLength = maxLength;
|
|
1825
|
+
this._pattern = pattern;
|
|
1826
|
+
if (isEmail) {
|
|
1827
|
+
this.withValidator('email', control => !Validators.email(control));
|
|
1828
|
+
}
|
|
1820
1829
|
return this;
|
|
1821
1830
|
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
return this
|
|
1831
|
+
asTextarea(rows = 3, minLength, maxLength, pattern) {
|
|
1832
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Textarea;
|
|
1833
|
+
this._rows = rows;
|
|
1834
|
+
this._minLength = minLength;
|
|
1835
|
+
this._maxLength = maxLength;
|
|
1836
|
+
this._pattern = pattern;
|
|
1837
|
+
return this;
|
|
1829
1838
|
}
|
|
1830
|
-
|
|
1831
|
-
|
|
1839
|
+
asNumber(step, min, max, minFractionDigits, maxFractionDigits, numberUseGrouping = true) {
|
|
1840
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Number;
|
|
1841
|
+
this._numberStep = step;
|
|
1842
|
+
this._numberMinFractionDigits = minFractionDigits;
|
|
1843
|
+
this._numberMaxFractionDigits = maxFractionDigits;
|
|
1844
|
+
this._numberMin = min ?? Number.MIN_SAFE_INTEGER;
|
|
1845
|
+
this._numberMax = max ?? Number.MAX_SAFE_INTEGER;
|
|
1846
|
+
this._numberUseGrouping = numberUseGrouping;
|
|
1847
|
+
return this;
|
|
1832
1848
|
}
|
|
1833
|
-
|
|
1834
|
-
this.
|
|
1849
|
+
asSwitch() {
|
|
1850
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Switch;
|
|
1835
1851
|
return this;
|
|
1836
1852
|
}
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
return tab;
|
|
1853
|
+
asRadio(options, optionsTitlePath) {
|
|
1854
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Radio;
|
|
1855
|
+
this._radioOptions = options.map(o => ({ value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}` }));
|
|
1856
|
+
return this;
|
|
1842
1857
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1858
|
+
asRadioFromEnum(enumType, optionsTitlePath, values, nameAsValue = false) {
|
|
1859
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Radio;
|
|
1860
|
+
if (typeof optionsTitlePath === 'undefined') {
|
|
1861
|
+
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
1862
|
+
}
|
|
1863
|
+
this._radioOptions = Array.isArray(values)
|
|
1864
|
+
? EnumUtil.fromValuesAsEnumValueArray(enumType, values, nameAsValue, optionsTitlePath ?? undefined)
|
|
1865
|
+
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);
|
|
1866
|
+
return this;
|
|
1847
1867
|
}
|
|
1848
|
-
|
|
1849
|
-
|
|
1868
|
+
asDatePicker(format, min, max, showTime) {
|
|
1869
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Datepicker;
|
|
1870
|
+
this._datePickerFormat = format ? format : 'dd.mm.yy';
|
|
1871
|
+
this._datePickerMin = min;
|
|
1872
|
+
this._datePickerMax = max;
|
|
1873
|
+
this._datePickerShowTime = showTime ?? false;
|
|
1874
|
+
return this;
|
|
1850
1875
|
}
|
|
1851
|
-
|
|
1852
|
-
|
|
1876
|
+
asMask(mask, slotChar) {
|
|
1877
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Mask;
|
|
1878
|
+
this._mask = mask;
|
|
1879
|
+
this._slotChar = slotChar;
|
|
1880
|
+
return this;
|
|
1853
1881
|
}
|
|
1854
|
-
|
|
1855
|
-
this.
|
|
1882
|
+
asCustomComponent(customComponentName) {
|
|
1883
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Custom;
|
|
1884
|
+
this._customComponentName = customComponentName;
|
|
1856
1885
|
return this;
|
|
1857
1886
|
}
|
|
1858
1887
|
copy() {
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1888
|
+
const field = new FieldInputDescriptor(this._editor, this._property);
|
|
1889
|
+
this.copyFieldsTo(field);
|
|
1890
|
+
field._fieldType = this._fieldType;
|
|
1891
|
+
field._rows = this._rows;
|
|
1892
|
+
field._numberMin = this._numberMin;
|
|
1893
|
+
field._numberMax = this._numberMax;
|
|
1894
|
+
field._numberStep = this._numberStep;
|
|
1895
|
+
field._numberMinFractionDigits = this._numberMinFractionDigits;
|
|
1896
|
+
field._numberMaxFractionDigits = this._numberMaxFractionDigits;
|
|
1897
|
+
field._numberUseGrouping = this._numberUseGrouping;
|
|
1898
|
+
field._radioOptions = [...this._radioOptions];
|
|
1899
|
+
field._datePickerFormat = this._datePickerFormat;
|
|
1900
|
+
field._datePickerMin = this._datePickerMin;
|
|
1901
|
+
field._datePickerMax = this._datePickerMax;
|
|
1902
|
+
field._datePickerShowTime = this._datePickerShowTime;
|
|
1903
|
+
field._maxLength = this._maxLength;
|
|
1904
|
+
field._minLength = this._minLength;
|
|
1905
|
+
field._pattern = this._pattern;
|
|
1906
|
+
field._mask = this._mask;
|
|
1907
|
+
field._slotChar = this._slotChar;
|
|
1908
|
+
field._customComponentName = this._customComponentName;
|
|
1909
|
+
return field;
|
|
1863
1910
|
}
|
|
1864
1911
|
}
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1912
|
+
(function (FieldInputDescriptor) {
|
|
1913
|
+
let TypeEnum;
|
|
1914
|
+
(function (TypeEnum) {
|
|
1915
|
+
TypeEnum[TypeEnum["Hidden"] = 0] = "Hidden";
|
|
1916
|
+
TypeEnum[TypeEnum["Text"] = 1] = "Text";
|
|
1917
|
+
TypeEnum[TypeEnum["Textarea"] = 2] = "Textarea";
|
|
1918
|
+
TypeEnum[TypeEnum["Number"] = 3] = "Number";
|
|
1919
|
+
TypeEnum[TypeEnum["Switch"] = 4] = "Switch";
|
|
1920
|
+
TypeEnum[TypeEnum["Radio"] = 5] = "Radio";
|
|
1921
|
+
TypeEnum[TypeEnum["Datepicker"] = 6] = "Datepicker";
|
|
1922
|
+
TypeEnum[TypeEnum["Mask"] = 7] = "Mask";
|
|
1923
|
+
TypeEnum[TypeEnum["Custom"] = 8] = "Custom";
|
|
1924
|
+
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
1925
|
+
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
1926
|
+
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
1927
|
+
constructor(editor, property, modelType) {
|
|
1928
|
+
super(editor, property);
|
|
1929
|
+
this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
1930
|
+
this._itemsLabelTranslate = false;
|
|
1931
|
+
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
1932
|
+
this._autocompleteOpenOnFocus = false;
|
|
1933
|
+
this._autocompleteInlineSearch = false;
|
|
1934
|
+
this._modelType = modelType;
|
|
1935
|
+
ModelUtil.trySetLookupItemsProperties(this);
|
|
1872
1936
|
}
|
|
1873
|
-
get
|
|
1874
|
-
return this.
|
|
1937
|
+
get lookupType() {
|
|
1938
|
+
return this._lookupType;
|
|
1875
1939
|
}
|
|
1876
|
-
get
|
|
1877
|
-
return this.
|
|
1940
|
+
get itemsLabelProperty() {
|
|
1941
|
+
return this._itemsLabelProperty;
|
|
1942
|
+
}
|
|
1943
|
+
get itemsLabelTranslate() {
|
|
1944
|
+
return this._itemsLabelTranslate;
|
|
1945
|
+
}
|
|
1946
|
+
get itemsValueProperty() {
|
|
1947
|
+
return this._itemsValueProperty;
|
|
1948
|
+
}
|
|
1949
|
+
get itemsDisabledProperty() {
|
|
1950
|
+
return this._itemsDisabledProperty;
|
|
1951
|
+
}
|
|
1952
|
+
get dataKeyProperty() {
|
|
1953
|
+
return this._dataKeyProperty;
|
|
1878
1954
|
}
|
|
1879
|
-
get
|
|
1880
|
-
return this.
|
|
1955
|
+
get dataProvider() {
|
|
1956
|
+
return this._dataProvider;
|
|
1881
1957
|
}
|
|
1882
|
-
get
|
|
1883
|
-
return this.
|
|
1958
|
+
get autocompleteOpenOnFocus() {
|
|
1959
|
+
return this._autocompleteOpenOnFocus;
|
|
1884
1960
|
}
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
class ModelDescriptor {
|
|
1888
|
-
constructor(modelType, idProperty, titleProperty) {
|
|
1889
|
-
this._type = modelType;
|
|
1890
|
-
this._idPropertyName = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;
|
|
1891
|
-
this._titlePropertyName = titleProperty ?? ModelUtil.findTitleAttribute(modelType) ?? undefined;
|
|
1892
|
-
this._typeName = TypeUtil.findTypeName(this._type);
|
|
1961
|
+
get autocompleteInlineSearch() {
|
|
1962
|
+
return this._autocompleteInlineSearch;
|
|
1893
1963
|
}
|
|
1894
|
-
get
|
|
1895
|
-
return this.
|
|
1964
|
+
get dropdownClassName() {
|
|
1965
|
+
return this._dropdownClassName;
|
|
1896
1966
|
}
|
|
1897
|
-
get
|
|
1898
|
-
return this.
|
|
1967
|
+
get modelType() {
|
|
1968
|
+
return this._modelType;
|
|
1899
1969
|
}
|
|
1900
|
-
get
|
|
1901
|
-
return this.
|
|
1970
|
+
get dialogTableDescriptor() {
|
|
1971
|
+
return this._dialogTableDescriptor;
|
|
1902
1972
|
}
|
|
1903
|
-
get
|
|
1904
|
-
return this.
|
|
1973
|
+
get dialogTableDataProvider() {
|
|
1974
|
+
return this._dialogTableDataProvider;
|
|
1905
1975
|
}
|
|
1906
|
-
|
|
1907
|
-
this.
|
|
1976
|
+
withItemsLabelProperty(itemsLabelProperty, translate = false) {
|
|
1977
|
+
this._itemsLabelProperty = itemsLabelProperty;
|
|
1978
|
+
this._itemsLabelTranslate = translate;
|
|
1908
1979
|
return this;
|
|
1909
1980
|
}
|
|
1910
|
-
|
|
1911
|
-
this.
|
|
1981
|
+
withItemsValueProperty(itemsValueProperty) {
|
|
1982
|
+
this._itemsValueProperty = itemsValueProperty;
|
|
1983
|
+
this._dataKeyProperty = undefined;
|
|
1912
1984
|
return this;
|
|
1913
1985
|
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
return
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
class TableDescriptor {
|
|
1921
|
-
constructor(modelType, idProperty, titleProperty) {
|
|
1922
|
-
this._filterDisplay = TableDescriptor.FilterDisplayEnum.Menu;
|
|
1923
|
-
this._paginationMode = TableDescriptor.PaginationModeEnum.Pagination;
|
|
1924
|
-
this._columns = [];
|
|
1925
|
-
this._hideHeader = false;
|
|
1926
|
-
this._hasDefaultSort = false;
|
|
1927
|
-
this._defaultSortProperty = [];
|
|
1928
|
-
this._defaultSortAsc = [];
|
|
1929
|
-
this._rowHeight = 45;
|
|
1930
|
-
this._tableFullHeightOffset = 315;
|
|
1931
|
-
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
1932
|
-
}
|
|
1933
|
-
get filterDisplay() {
|
|
1934
|
-
return this._filterDisplay;
|
|
1935
|
-
}
|
|
1936
|
-
get paginationMode() {
|
|
1937
|
-
return this._paginationMode;
|
|
1986
|
+
withItemsDisabledProperty(itemsDisabledProperty) {
|
|
1987
|
+
this._itemsDisabledProperty = itemsDisabledProperty;
|
|
1988
|
+
return this;
|
|
1938
1989
|
}
|
|
1939
|
-
|
|
1940
|
-
|
|
1990
|
+
withDataKeyProperty(property) {
|
|
1991
|
+
this._dataKeyProperty = property;
|
|
1992
|
+
this._itemsValueProperty = undefined;
|
|
1993
|
+
return this;
|
|
1941
1994
|
}
|
|
1942
|
-
|
|
1943
|
-
|
|
1995
|
+
withLookup(lookup, serviceType) {
|
|
1996
|
+
const dataProvider = new LookupDataProvider(this._modelType);
|
|
1997
|
+
if (serviceType) {
|
|
1998
|
+
dataProvider.withServiceType(serviceType);
|
|
1999
|
+
}
|
|
2000
|
+
dataProvider.withLookup(lookup);
|
|
2001
|
+
this._dataProvider = dataProvider;
|
|
2002
|
+
return this;
|
|
1944
2003
|
}
|
|
1945
|
-
|
|
1946
|
-
|
|
2004
|
+
withLookupDataProvider(dataProvider) {
|
|
2005
|
+
this._dataProvider = dataProvider;
|
|
2006
|
+
return this;
|
|
1947
2007
|
}
|
|
1948
|
-
|
|
1949
|
-
return
|
|
2008
|
+
withConfig(config) {
|
|
2009
|
+
return super.withConfig(config);
|
|
1950
2010
|
}
|
|
1951
|
-
|
|
1952
|
-
|
|
2011
|
+
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
2012
|
+
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;
|
|
2013
|
+
this._autocompleteOpenOnFocus = openOnFocus;
|
|
2014
|
+
this._autocompleteInlineSearch = inlineSearch;
|
|
2015
|
+
return this;
|
|
1953
2016
|
}
|
|
1954
|
-
|
|
1955
|
-
|
|
2017
|
+
asDialog(lookupTableDescriptor, tableDataProvider) {
|
|
2018
|
+
this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dialog;
|
|
2019
|
+
this._dialogTableDescriptor = lookupTableDescriptor;
|
|
2020
|
+
this._dialogTableDataProvider = tableDataProvider;
|
|
2021
|
+
return this;
|
|
1956
2022
|
}
|
|
1957
|
-
|
|
1958
|
-
|
|
2023
|
+
copy() {
|
|
2024
|
+
const field = new FieldLookupDescriptor(this._editor, this._property, this._modelType);
|
|
2025
|
+
this.copyFieldsTo(field);
|
|
2026
|
+
field._lookupType = this._lookupType;
|
|
2027
|
+
field._itemsLabelProperty = this._itemsLabelProperty;
|
|
2028
|
+
field._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
2029
|
+
field._itemsValueProperty = this._itemsValueProperty;
|
|
2030
|
+
field._itemsDisabledProperty = this._itemsDisabledProperty;
|
|
2031
|
+
field._dataKeyProperty = this._dataKeyProperty;
|
|
2032
|
+
field._dataProvider = this._dataProvider;
|
|
2033
|
+
field._dropdownClassName = this._dropdownClassName;
|
|
2034
|
+
field._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;
|
|
2035
|
+
field._autocompleteInlineSearch = this._autocompleteInlineSearch;
|
|
2036
|
+
field._dialogTableDescriptor = this._dialogTableDescriptor;
|
|
2037
|
+
return field;
|
|
1959
2038
|
}
|
|
1960
|
-
|
|
1961
|
-
|
|
2039
|
+
}
|
|
2040
|
+
(function (FieldLookupDescriptor) {
|
|
2041
|
+
let LookupTypeEnum;
|
|
2042
|
+
(function (LookupTypeEnum) {
|
|
2043
|
+
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
2044
|
+
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
2045
|
+
LookupTypeEnum[LookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
2046
|
+
})(LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum || (FieldLookupDescriptor.LookupTypeEnum = {}));
|
|
2047
|
+
})(FieldLookupDescriptor || (FieldLookupDescriptor = {}));
|
|
2048
|
+
class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
2049
|
+
constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
2050
|
+
super(editor, property, null);
|
|
2051
|
+
this._nameAsValue = false;
|
|
2052
|
+
this._enumType = enumType;
|
|
2053
|
+
this._nameAsValue = nameAsValue;
|
|
2054
|
+
if (typeof optionsTitlePath === 'undefined') {
|
|
2055
|
+
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
2056
|
+
}
|
|
2057
|
+
this._optionEnumValues = Array.isArray(options)
|
|
2058
|
+
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)
|
|
2059
|
+
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);
|
|
2060
|
+
const dataProvider = new LookupDataProvider(null).withLookup(() => of(this._optionEnumValues));
|
|
2061
|
+
this.withLookupDataProvider(dataProvider);
|
|
2062
|
+
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
2063
|
+
this.withItemsValueProperty('value');
|
|
2064
|
+
this.withItemsDisabledProperty('disabled');
|
|
1962
2065
|
}
|
|
1963
|
-
get
|
|
1964
|
-
return this.
|
|
2066
|
+
get enumType() {
|
|
2067
|
+
return this._enumType;
|
|
1965
2068
|
}
|
|
1966
|
-
|
|
1967
|
-
|
|
2069
|
+
withDisabledOptions(...disabledOptions) {
|
|
2070
|
+
for (const disabledOption of disabledOptions) {
|
|
2071
|
+
const disabledOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, disabledOption) : disabledOption;
|
|
2072
|
+
if (disabledOptionValue) {
|
|
2073
|
+
const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);
|
|
2074
|
+
if (option) {
|
|
2075
|
+
option.disabled = true;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
return this;
|
|
1968
2080
|
}
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
this.setDataKeyFromColumn();
|
|
2081
|
+
asAutocomplete(openOnFocus = true) {
|
|
2082
|
+
super.asAutocomplete(openOnFocus, true);
|
|
1972
2083
|
return this;
|
|
1973
2084
|
}
|
|
1974
|
-
|
|
1975
|
-
const
|
|
1976
|
-
this.
|
|
1977
|
-
this.
|
|
1978
|
-
|
|
2085
|
+
copy() {
|
|
2086
|
+
const field = new FieldLookupEnumDescriptor(this._editor, this._property, this._enumType, []);
|
|
2087
|
+
this.copyFieldsTo(field);
|
|
2088
|
+
field._lookupType = this._lookupType;
|
|
2089
|
+
field._itemsLabelProperty = this._itemsLabelProperty;
|
|
2090
|
+
field._itemsValueProperty = this._itemsValueProperty;
|
|
2091
|
+
field._itemsDisabledProperty = this._itemsDisabledProperty;
|
|
2092
|
+
field._dataKeyProperty = this._dataKeyProperty;
|
|
2093
|
+
field._dataProvider = this._dataProvider;
|
|
2094
|
+
return field;
|
|
1979
2095
|
}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
this.
|
|
1985
|
-
|
|
2096
|
+
}
|
|
2097
|
+
class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
2098
|
+
constructor(editor, property, mainTableDescriptor, lookupTableDescriptor) {
|
|
2099
|
+
super(editor, property);
|
|
2100
|
+
this._fieldType = FieldManyToManyEditorDescriptor.TypeEnum.DialogTableMultiselect;
|
|
2101
|
+
this._lookupTableDataProvider = null;
|
|
2102
|
+
this._actions = [];
|
|
2103
|
+
this._hasLookupExcludeValues = false;
|
|
2104
|
+
this._excludeFilterProperty = '';
|
|
2105
|
+
this._excludeValueProperty = '';
|
|
2106
|
+
this._mainTableDescriptor = mainTableDescriptor;
|
|
2107
|
+
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
2108
|
+
this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);
|
|
1986
2109
|
}
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
column.asDate(displayFormat);
|
|
1990
|
-
this._columns.push(column);
|
|
1991
|
-
this.setDataKeyFromColumn();
|
|
1992
|
-
return column;
|
|
2110
|
+
get fieldType() {
|
|
2111
|
+
return this._fieldType;
|
|
1993
2112
|
}
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
column.asBoolean(yes, no, asIcon);
|
|
1997
|
-
this._columns.push(column);
|
|
1998
|
-
this.setDataKeyFromColumn();
|
|
1999
|
-
return column;
|
|
2113
|
+
get lookupTableDataProvider() {
|
|
2114
|
+
return this._lookupTableDataProvider;
|
|
2000
2115
|
}
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
column.asEnum(enumType, nameAsValue, titlePath);
|
|
2004
|
-
this._columns.push(column);
|
|
2005
|
-
this.setDataKeyFromColumn();
|
|
2006
|
-
return column;
|
|
2116
|
+
get actions() {
|
|
2117
|
+
return this._actions;
|
|
2007
2118
|
}
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
column.withModelType(modelType);
|
|
2011
|
-
column.withDisplayPropertyPath(displayProperty);
|
|
2012
|
-
this._columns.push(column);
|
|
2013
|
-
this.setDataKeyFromColumn();
|
|
2014
|
-
return column;
|
|
2119
|
+
get hasLookupExcludeValues() {
|
|
2120
|
+
return this._hasLookupExcludeValues;
|
|
2015
2121
|
}
|
|
2016
|
-
|
|
2017
|
-
this.
|
|
2018
|
-
return this;
|
|
2122
|
+
get excludeFilterProperty() {
|
|
2123
|
+
return this._excludeFilterProperty;
|
|
2019
2124
|
}
|
|
2020
|
-
|
|
2021
|
-
this.
|
|
2022
|
-
return this;
|
|
2125
|
+
get excludeValueProperty() {
|
|
2126
|
+
return this._excludeValueProperty;
|
|
2023
2127
|
}
|
|
2024
|
-
|
|
2025
|
-
this.
|
|
2026
|
-
return this;
|
|
2128
|
+
get mainTableDescriptor() {
|
|
2129
|
+
return this._mainTableDescriptor;
|
|
2027
2130
|
}
|
|
2028
|
-
|
|
2029
|
-
this.
|
|
2030
|
-
return this;
|
|
2131
|
+
get lookupTableDescriptor() {
|
|
2132
|
+
return this._lookupTableDescriptor;
|
|
2031
2133
|
}
|
|
2032
|
-
|
|
2033
|
-
|
|
2134
|
+
withLookup(getAll, serviceType) {
|
|
2135
|
+
const dataProvider = new TableviewDataProvider(this._mainTableDescriptor.model.type);
|
|
2136
|
+
if (serviceType) {
|
|
2137
|
+
dataProvider.withServiceType(serviceType);
|
|
2138
|
+
}
|
|
2139
|
+
dataProvider.withGetAll(getAll);
|
|
2140
|
+
this._lookupTableDataProvider = dataProvider;
|
|
2034
2141
|
return this;
|
|
2035
2142
|
}
|
|
2036
|
-
|
|
2037
|
-
this.
|
|
2038
|
-
this._defaultSortProperty.push(property);
|
|
2039
|
-
this._defaultSortAsc.push(asc);
|
|
2143
|
+
withLookupDataProvider(dataProvider) {
|
|
2144
|
+
this._lookupTableDataProvider = dataProvider;
|
|
2040
2145
|
return this;
|
|
2041
2146
|
}
|
|
2042
|
-
|
|
2043
|
-
this.
|
|
2147
|
+
withActions(actions = []) {
|
|
2148
|
+
this.actions.push(...actions);
|
|
2044
2149
|
return this;
|
|
2045
2150
|
}
|
|
2046
|
-
|
|
2047
|
-
this.
|
|
2151
|
+
withLookupExclude(filterProperty, valueProperty, hasLookupExclude = true) {
|
|
2152
|
+
this._hasLookupExcludeValues = hasLookupExclude;
|
|
2153
|
+
this._excludeFilterProperty = filterProperty;
|
|
2154
|
+
this._excludeValueProperty = valueProperty;
|
|
2048
2155
|
return this;
|
|
2049
2156
|
}
|
|
2050
2157
|
copy() {
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
return
|
|
2060
|
-
}
|
|
2061
|
-
setDataKeyFromColumn() {
|
|
2062
|
-
if (!this._dataKeyProperty && this._columns.length === 1) {
|
|
2063
|
-
this._dataKeyProperty = this._columns[0].property;
|
|
2064
|
-
}
|
|
2158
|
+
const field = new FieldManyToManyEditorDescriptor(this._editor, this._property, this._mainTableDescriptor.copy(), this._lookupTableDescriptor.copy());
|
|
2159
|
+
this.copyFieldsTo(field);
|
|
2160
|
+
field._fieldType = this._fieldType;
|
|
2161
|
+
field._actions = this._actions.map(a => a);
|
|
2162
|
+
field._lookupTableDataProvider = this._lookupTableDataProvider;
|
|
2163
|
+
field._hasLookupExcludeValues = this._hasLookupExcludeValues;
|
|
2164
|
+
field._excludeFilterProperty = this._excludeFilterProperty;
|
|
2165
|
+
field._excludeValueProperty = this._excludeValueProperty;
|
|
2166
|
+
return field;
|
|
2065
2167
|
}
|
|
2066
2168
|
}
|
|
2067
|
-
(function (
|
|
2068
|
-
let
|
|
2069
|
-
(function (
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
this.
|
|
2082
|
-
this.
|
|
2083
|
-
this.
|
|
2084
|
-
this.
|
|
2085
|
-
|
|
2086
|
-
this.
|
|
2087
|
-
this._table = table;
|
|
2088
|
-
this._property = property;
|
|
2169
|
+
(function (FieldManyToManyEditorDescriptor) {
|
|
2170
|
+
let TypeEnum;
|
|
2171
|
+
(function (TypeEnum) {
|
|
2172
|
+
TypeEnum[TypeEnum["DialogTableMultiselect"] = 0] = "DialogTableMultiselect";
|
|
2173
|
+
})(TypeEnum = FieldManyToManyEditorDescriptor.TypeEnum || (FieldManyToManyEditorDescriptor.TypeEnum = {}));
|
|
2174
|
+
let ActionEnum;
|
|
2175
|
+
(function (ActionEnum) {
|
|
2176
|
+
ActionEnum[ActionEnum["Add"] = 0] = "Add";
|
|
2177
|
+
ActionEnum[ActionEnum["Delete"] = 1] = "Delete";
|
|
2178
|
+
})(ActionEnum = FieldManyToManyEditorDescriptor.ActionEnum || (FieldManyToManyEditorDescriptor.ActionEnum = {}));
|
|
2179
|
+
})(FieldManyToManyEditorDescriptor || (FieldManyToManyEditorDescriptor = {}));
|
|
2180
|
+
class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
2181
|
+
constructor(editor, property, tableviewDescriptor) {
|
|
2182
|
+
super(editor, property);
|
|
2183
|
+
this._fieldType = FieldManyEditorDescriptor.TypeEnum.DialogEditor;
|
|
2184
|
+
this._fieldActions = [];
|
|
2185
|
+
this._actions = [];
|
|
2186
|
+
// this._modelType = modelType;
|
|
2187
|
+
this._tableviewDescriptor = tableviewDescriptor;
|
|
2188
|
+
this._fieldActions.push(FieldManyEditorDescriptor.ActionEnum.View, FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
|
|
2089
2189
|
}
|
|
2090
|
-
get
|
|
2091
|
-
return this.
|
|
2190
|
+
get fieldType() {
|
|
2191
|
+
return this._fieldType;
|
|
2092
2192
|
}
|
|
2093
|
-
get
|
|
2094
|
-
return this.
|
|
2193
|
+
get fieldActions() {
|
|
2194
|
+
return this._fieldActions;
|
|
2095
2195
|
}
|
|
2096
|
-
get
|
|
2097
|
-
return this.
|
|
2196
|
+
get actions() {
|
|
2197
|
+
return this._actions;
|
|
2098
2198
|
}
|
|
2099
|
-
get
|
|
2100
|
-
return this.
|
|
2199
|
+
get tableviewDescriptor() {
|
|
2200
|
+
return this._tableviewDescriptor;
|
|
2101
2201
|
}
|
|
2102
|
-
get
|
|
2103
|
-
return this.
|
|
2202
|
+
get tableDescriptor() {
|
|
2203
|
+
return this._tableviewDescriptor.table;
|
|
2104
2204
|
}
|
|
2105
|
-
get
|
|
2106
|
-
return this.
|
|
2205
|
+
get editorForCreate() {
|
|
2206
|
+
return this._tableviewDescriptor.addEditor;
|
|
2107
2207
|
}
|
|
2108
|
-
get
|
|
2109
|
-
return this.
|
|
2208
|
+
get editorForRead() {
|
|
2209
|
+
return this._tableviewDescriptor.viewEditor;
|
|
2110
2210
|
}
|
|
2111
|
-
get
|
|
2112
|
-
return this.
|
|
2211
|
+
get editorForUpdate() {
|
|
2212
|
+
return this._tableviewDescriptor.editEditor;
|
|
2113
2213
|
}
|
|
2114
|
-
|
|
2115
|
-
|
|
2214
|
+
withFieldAction(action) {
|
|
2215
|
+
this._fieldActions.push(action);
|
|
2216
|
+
return this;
|
|
2116
2217
|
}
|
|
2117
|
-
|
|
2118
|
-
|
|
2218
|
+
withFieldActions(actions) {
|
|
2219
|
+
this._fieldActions = actions;
|
|
2220
|
+
return this;
|
|
2119
2221
|
}
|
|
2120
|
-
|
|
2121
|
-
|
|
2222
|
+
withAction(action) {
|
|
2223
|
+
this._actions.push(action);
|
|
2224
|
+
return this;
|
|
2122
2225
|
}
|
|
2123
|
-
|
|
2124
|
-
|
|
2226
|
+
copy() {
|
|
2227
|
+
const field = new FieldManyEditorDescriptor(this._editor, this._property, this._tableviewDescriptor.copy());
|
|
2228
|
+
this.copyFieldsTo(field);
|
|
2229
|
+
field._fieldType = this._fieldType;
|
|
2230
|
+
field._fieldActions = this._fieldActions.map(a => a);
|
|
2231
|
+
return field;
|
|
2125
2232
|
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2233
|
+
}
|
|
2234
|
+
(function (FieldManyEditorDescriptor) {
|
|
2235
|
+
let TypeEnum;
|
|
2236
|
+
(function (TypeEnum) {
|
|
2237
|
+
TypeEnum[TypeEnum["DialogEditor"] = 0] = "DialogEditor";
|
|
2238
|
+
})(TypeEnum = FieldManyEditorDescriptor.TypeEnum || (FieldManyEditorDescriptor.TypeEnum = {}));
|
|
2239
|
+
let ActionEnum;
|
|
2240
|
+
(function (ActionEnum) {
|
|
2241
|
+
ActionEnum[ActionEnum["View"] = 0] = "View";
|
|
2242
|
+
ActionEnum[ActionEnum["Add"] = 1] = "Add";
|
|
2243
|
+
ActionEnum[ActionEnum["Edit"] = 2] = "Edit";
|
|
2244
|
+
ActionEnum[ActionEnum["Delete"] = 3] = "Delete";
|
|
2245
|
+
})(ActionEnum = FieldManyEditorDescriptor.ActionEnum || (FieldManyEditorDescriptor.ActionEnum = {}));
|
|
2246
|
+
})(FieldManyEditorDescriptor || (FieldManyEditorDescriptor = {}));
|
|
2247
|
+
class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
2248
|
+
constructor(editor, name) {
|
|
2249
|
+
super(editor);
|
|
2250
|
+
this._fields = [];
|
|
2251
|
+
this._validators = [];
|
|
2252
|
+
this._name = `${this.baseName}${name}`;
|
|
2253
|
+
this._default = name === EditorDescriptor.defaultGroupName;
|
|
2128
2254
|
}
|
|
2129
|
-
get
|
|
2130
|
-
return this.
|
|
2255
|
+
get title() {
|
|
2256
|
+
return this._title;
|
|
2131
2257
|
}
|
|
2132
|
-
get
|
|
2133
|
-
return this.
|
|
2258
|
+
get validators() {
|
|
2259
|
+
return this._validators;
|
|
2134
2260
|
}
|
|
2135
|
-
|
|
2136
|
-
this.
|
|
2137
|
-
return this;
|
|
2261
|
+
get baseName() {
|
|
2262
|
+
return `${this.groupName()}_`;
|
|
2138
2263
|
}
|
|
2139
|
-
|
|
2140
|
-
this.
|
|
2141
|
-
this._displayFormat = displayFormat;
|
|
2142
|
-
return this;
|
|
2264
|
+
get name() {
|
|
2265
|
+
return this._name;
|
|
2143
2266
|
}
|
|
2144
|
-
|
|
2145
|
-
this.
|
|
2146
|
-
this._displayFormat = displayFormat;
|
|
2147
|
-
return this;
|
|
2267
|
+
get default() {
|
|
2268
|
+
return this._default;
|
|
2148
2269
|
}
|
|
2149
|
-
|
|
2150
|
-
this.
|
|
2151
|
-
this._booleanAsIcon = asIcon;
|
|
2152
|
-
this._booleanYes = yes;
|
|
2153
|
-
this._booleanNo = no;
|
|
2270
|
+
withTitle(title) {
|
|
2271
|
+
this._title = title;
|
|
2154
2272
|
return this;
|
|
2155
2273
|
}
|
|
2156
|
-
|
|
2157
|
-
this.
|
|
2158
|
-
this._enumType = enumType;
|
|
2159
|
-
this._enumNameAsValue = nameAsValue;
|
|
2160
|
-
if (typeof titlePath === 'undefined') {
|
|
2161
|
-
titlePath = TypeUtil.findEnumName(enumType);
|
|
2162
|
-
}
|
|
2163
|
-
this._enumTitlePath = titlePath;
|
|
2274
|
+
withValidator(name, expression) {
|
|
2275
|
+
this._validators.push(new FieldValidator(name, expression, undefined));
|
|
2164
2276
|
return this;
|
|
2165
2277
|
}
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2278
|
+
}
|
|
2279
|
+
class FieldTabGroupDescriptor extends AFieldGroupDescriptor {
|
|
2280
|
+
constructor(editor, name) {
|
|
2281
|
+
super(editor, name);
|
|
2169
2282
|
}
|
|
2170
|
-
|
|
2171
|
-
this.
|
|
2172
|
-
|
|
2283
|
+
get fields() {
|
|
2284
|
+
return this._fields;
|
|
2285
|
+
}
|
|
2286
|
+
groupName() {
|
|
2287
|
+
return 'tab';
|
|
2173
2288
|
}
|
|
2174
|
-
|
|
2175
|
-
this.
|
|
2289
|
+
addField(field) {
|
|
2290
|
+
this._fields.push(field);
|
|
2176
2291
|
return this;
|
|
2177
2292
|
}
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
filterType = FilterDescriptor.TypeEnum.Number;
|
|
2184
|
-
break;
|
|
2185
|
-
case ColumnDescriptor.TypeEnum.Boolean:
|
|
2186
|
-
filterType = FilterDescriptor.TypeEnum.Boolean;
|
|
2187
|
-
break;
|
|
2188
|
-
case ColumnDescriptor.TypeEnum.Date:
|
|
2189
|
-
filterType = FilterDescriptor.TypeEnum.Date;
|
|
2190
|
-
break;
|
|
2191
|
-
case ColumnDescriptor.TypeEnum.String:
|
|
2192
|
-
default:
|
|
2193
|
-
filterType = FilterDescriptor.TypeEnum.String;
|
|
2194
|
-
break;
|
|
2195
|
-
}
|
|
2196
|
-
this._filterDescriptor.asFilterType(filterType);
|
|
2197
|
-
return this._filterDescriptor;
|
|
2293
|
+
copy() {
|
|
2294
|
+
const tab = new FieldTabGroupDescriptor(this._editor, this.name.substring(this.baseName.length));
|
|
2295
|
+
tab._title = this._title;
|
|
2296
|
+
tab._fields = this.fields.map(f => f.copy());
|
|
2297
|
+
return tab;
|
|
2198
2298
|
}
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2299
|
+
}
|
|
2300
|
+
class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
2301
|
+
constructor(editor, name) {
|
|
2302
|
+
super(editor, name);
|
|
2203
2303
|
}
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
|
|
2207
|
-
}
|
|
2208
|
-
const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
|
|
2209
|
-
this._filterDescriptor = filterDescriptor;
|
|
2210
|
-
return filterDescriptor;
|
|
2304
|
+
get fields() {
|
|
2305
|
+
return this._fields;
|
|
2211
2306
|
}
|
|
2212
|
-
|
|
2213
|
-
|
|
2307
|
+
groupName() {
|
|
2308
|
+
return 'group';
|
|
2309
|
+
}
|
|
2310
|
+
addField(field) {
|
|
2311
|
+
this._fields.push(field);
|
|
2214
2312
|
return this;
|
|
2215
2313
|
}
|
|
2216
2314
|
copy() {
|
|
2217
|
-
const
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
descriptor._columnType = this._columnType;
|
|
2222
|
-
descriptor._filterDescriptor = this._filterDescriptor?.copy();
|
|
2223
|
-
descriptor._enumType = this._enumType;
|
|
2224
|
-
descriptor._enumTitlePath = this._enumTitlePath;
|
|
2225
|
-
descriptor._enumNameAsValue = this._enumNameAsValue;
|
|
2226
|
-
descriptor._booleanAsIcon = this._booleanAsIcon;
|
|
2227
|
-
descriptor._booleanYes = this._booleanYes;
|
|
2228
|
-
descriptor._booleanNo = this._booleanNo;
|
|
2229
|
-
return descriptor;
|
|
2315
|
+
const group = new FieldGroupDescriptor(this._editor, this.name.substring(this.baseName.length));
|
|
2316
|
+
group._title = this._title;
|
|
2317
|
+
group._fields = this.fields.map(f => f.copy());
|
|
2318
|
+
return group;
|
|
2230
2319
|
}
|
|
2231
2320
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
(
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
TypeEnum[TypeEnum["Enum"] = 4] = "Enum";
|
|
2240
|
-
})(TypeEnum = ColumnDescriptor.TypeEnum || (ColumnDescriptor.TypeEnum = {}));
|
|
2241
|
-
})(ColumnDescriptor || (ColumnDescriptor = {}));
|
|
2242
|
-
class FilterDescriptor {
|
|
2243
|
-
constructor(property) {
|
|
2244
|
-
this._filterType = FilterDescriptor.TypeEnum.String;
|
|
2245
|
-
this._matchModes = null;
|
|
2246
|
-
this._className = '';
|
|
2247
|
-
this._property = property;
|
|
2321
|
+
|
|
2322
|
+
class FieldValidator {
|
|
2323
|
+
constructor(name, expression, message, options) {
|
|
2324
|
+
this._name = name;
|
|
2325
|
+
this._expression = expression;
|
|
2326
|
+
this._message = message;
|
|
2327
|
+
this._options = options;
|
|
2248
2328
|
}
|
|
2249
|
-
get
|
|
2250
|
-
return this.
|
|
2329
|
+
get name() {
|
|
2330
|
+
return this._name;
|
|
2251
2331
|
}
|
|
2252
|
-
get
|
|
2253
|
-
return this.
|
|
2332
|
+
get expression() {
|
|
2333
|
+
return this._expression;
|
|
2254
2334
|
}
|
|
2255
|
-
get
|
|
2256
|
-
return this.
|
|
2335
|
+
get message() {
|
|
2336
|
+
return this._message;
|
|
2257
2337
|
}
|
|
2258
|
-
get
|
|
2259
|
-
return this.
|
|
2338
|
+
get options() {
|
|
2339
|
+
return this._options;
|
|
2260
2340
|
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
class ModelDescriptor {
|
|
2344
|
+
constructor(modelType, idProperty, titleProperty) {
|
|
2345
|
+
this._type = modelType;
|
|
2346
|
+
this._idPropertyName = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;
|
|
2347
|
+
this._titlePropertyName = titleProperty ?? ModelUtil.findTitleAttribute(modelType) ?? undefined;
|
|
2348
|
+
this._typeName = TypeUtil.findTypeName(this._type);
|
|
2263
2349
|
}
|
|
2264
|
-
get
|
|
2265
|
-
return this.
|
|
2350
|
+
get type() {
|
|
2351
|
+
return this._type;
|
|
2266
2352
|
}
|
|
2267
|
-
|
|
2268
|
-
this.
|
|
2269
|
-
return this;
|
|
2353
|
+
get typeName() {
|
|
2354
|
+
return this._typeName;
|
|
2270
2355
|
}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
* @param filterProperty
|
|
2274
|
-
*/
|
|
2275
|
-
withFilterProperty(filterProperty) {
|
|
2276
|
-
this._filterProperty = filterProperty;
|
|
2277
|
-
return this;
|
|
2356
|
+
get idPropertyName() {
|
|
2357
|
+
return this._idPropertyName;
|
|
2278
2358
|
}
|
|
2279
|
-
|
|
2280
|
-
this.
|
|
2281
|
-
return this;
|
|
2359
|
+
get titlePropertyName() {
|
|
2360
|
+
return this._titlePropertyName;
|
|
2282
2361
|
}
|
|
2283
|
-
|
|
2284
|
-
this.
|
|
2362
|
+
withIdPropertyName(idProperty) {
|
|
2363
|
+
this._idPropertyName = idProperty;
|
|
2285
2364
|
return this;
|
|
2286
2365
|
}
|
|
2287
|
-
|
|
2288
|
-
this.
|
|
2366
|
+
withTitlePropertyName(titleProperty) {
|
|
2367
|
+
this._titlePropertyName = titleProperty;
|
|
2289
2368
|
return this;
|
|
2290
2369
|
}
|
|
2291
2370
|
copy() {
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2294
|
-
return descriptor;
|
|
2295
|
-
}
|
|
2296
|
-
copyFieldsTo(descriptor) {
|
|
2297
|
-
descriptor._filterType = this._filterType;
|
|
2298
|
-
descriptor._filterProperty = this._filterProperty;
|
|
2299
|
-
descriptor._placeholder = this._placeholder;
|
|
2300
|
-
descriptor._className = this._className;
|
|
2371
|
+
const model = new ModelDescriptor(this._type, this._idPropertyName, this._titlePropertyName);
|
|
2372
|
+
return model;
|
|
2301
2373
|
}
|
|
2302
2374
|
}
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
(
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
MatchModeEnum["Contains"] = "contains";
|
|
2317
|
-
MatchModeEnum["EndsWith"] = "endsWith";
|
|
2318
|
-
MatchModeEnum["Equals"] = "equals";
|
|
2319
|
-
MatchModeEnum["NotEquals"] = "notEquals";
|
|
2320
|
-
MatchModeEnum["In"] = "in";
|
|
2321
|
-
MatchModeEnum["LessThan"] = "lt";
|
|
2322
|
-
MatchModeEnum["LessThanOrEqualTo"] = "lte";
|
|
2323
|
-
MatchModeEnum["GreaterThan"] = "gt";
|
|
2324
|
-
MatchModeEnum["GreaterThanOrEqualTo"] = "gte";
|
|
2325
|
-
MatchModeEnum["Between"] = "between";
|
|
2326
|
-
MatchModeEnum["DateIs"] = "dateIs";
|
|
2327
|
-
MatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
2328
|
-
MatchModeEnum["DateBefore"] = "dateBefore";
|
|
2329
|
-
MatchModeEnum["DateAfter"] = "dateAfter";
|
|
2330
|
-
})(MatchModeEnum = FilterDescriptor.MatchModeEnum || (FilterDescriptor.MatchModeEnum = {}));
|
|
2331
|
-
})(FilterDescriptor || (FilterDescriptor = {}));
|
|
2332
|
-
class FilterLookupDescriptor extends FilterDescriptor {
|
|
2333
|
-
constructor(property, modelType) {
|
|
2334
|
-
super(property);
|
|
2335
|
-
this._modelType = null;
|
|
2336
|
-
this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Dropdown;
|
|
2337
|
-
this._itemsLabelTranslate = false;
|
|
2338
|
-
this._multiselect = false;
|
|
2339
|
-
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
2340
|
-
this._modelType = modelType;
|
|
2341
|
-
this._filterType = FilterDescriptor.TypeEnum.Lookup;
|
|
2342
|
-
ModelUtil.trySetLookupItemsProperties(this);
|
|
2375
|
+
|
|
2376
|
+
class TableDescriptor {
|
|
2377
|
+
constructor(modelType, idProperty, titleProperty) {
|
|
2378
|
+
this._filterDisplay = TableDescriptor.FilterDisplayEnum.Menu;
|
|
2379
|
+
this._paginationMode = TableDescriptor.PaginationModeEnum.Pagination;
|
|
2380
|
+
this._columns = [];
|
|
2381
|
+
this._hideHeader = false;
|
|
2382
|
+
this._hasDefaultSort = false;
|
|
2383
|
+
this._defaultSortProperty = [];
|
|
2384
|
+
this._defaultSortAsc = [];
|
|
2385
|
+
this._rowHeight = 45;
|
|
2386
|
+
this._tableFullHeightOffset = 315;
|
|
2387
|
+
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
2343
2388
|
}
|
|
2344
|
-
get
|
|
2345
|
-
return this.
|
|
2389
|
+
get filterDisplay() {
|
|
2390
|
+
return this._filterDisplay;
|
|
2346
2391
|
}
|
|
2347
|
-
get
|
|
2348
|
-
return this.
|
|
2392
|
+
get paginationMode() {
|
|
2393
|
+
return this._paginationMode;
|
|
2349
2394
|
}
|
|
2350
|
-
get
|
|
2351
|
-
return this.
|
|
2395
|
+
get columns() {
|
|
2396
|
+
return this._columns;
|
|
2352
2397
|
}
|
|
2353
|
-
get
|
|
2354
|
-
return this.
|
|
2398
|
+
get title() {
|
|
2399
|
+
return this._title;
|
|
2355
2400
|
}
|
|
2356
|
-
get
|
|
2357
|
-
return this.
|
|
2401
|
+
get hideHeader() {
|
|
2402
|
+
return this._hideHeader;
|
|
2358
2403
|
}
|
|
2359
2404
|
get dataKeyProperty() {
|
|
2360
2405
|
return this._dataKeyProperty;
|
|
2361
2406
|
}
|
|
2362
|
-
get
|
|
2363
|
-
return this.
|
|
2407
|
+
get hasDefaultSort() {
|
|
2408
|
+
return this._hasDefaultSort;
|
|
2364
2409
|
}
|
|
2365
|
-
get
|
|
2366
|
-
return this.
|
|
2410
|
+
get defaultSortProperty() {
|
|
2411
|
+
return this._defaultSortProperty;
|
|
2367
2412
|
}
|
|
2368
|
-
get
|
|
2369
|
-
return this.
|
|
2413
|
+
get defaultSortAsc() {
|
|
2414
|
+
return this._defaultSortAsc;
|
|
2370
2415
|
}
|
|
2371
|
-
|
|
2372
|
-
this.
|
|
2373
|
-
|
|
2416
|
+
get rowHeight() {
|
|
2417
|
+
return this._rowHeight;
|
|
2418
|
+
}
|
|
2419
|
+
get tableFullHeightOffset() {
|
|
2420
|
+
return this._tableFullHeightOffset;
|
|
2421
|
+
}
|
|
2422
|
+
get model() {
|
|
2423
|
+
return this._model;
|
|
2424
|
+
}
|
|
2425
|
+
addColumnDescriptor(column) {
|
|
2426
|
+
this._columns.push(column);
|
|
2427
|
+
this.setDataKeyFromColumn();
|
|
2374
2428
|
return this;
|
|
2375
2429
|
}
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
this.
|
|
2430
|
+
addColumn(property) {
|
|
2431
|
+
const column = new ColumnDescriptor(this, property);
|
|
2432
|
+
this._columns.push(column);
|
|
2433
|
+
this.setDataKeyFromColumn();
|
|
2434
|
+
return column;
|
|
2435
|
+
}
|
|
2436
|
+
addColumnNumber(property, displayFormat) {
|
|
2437
|
+
const column = new ColumnDescriptor(this, property);
|
|
2438
|
+
column.asNumber(displayFormat);
|
|
2439
|
+
this._columns.push(column);
|
|
2440
|
+
this.setDataKeyFromColumn();
|
|
2441
|
+
return column;
|
|
2442
|
+
}
|
|
2443
|
+
addColumnDate(property, displayFormat) {
|
|
2444
|
+
const column = new ColumnDescriptor(this, property);
|
|
2445
|
+
column.asDate(displayFormat);
|
|
2446
|
+
this._columns.push(column);
|
|
2447
|
+
this.setDataKeyFromColumn();
|
|
2448
|
+
return column;
|
|
2449
|
+
}
|
|
2450
|
+
addColumnBoolean(property, yes, no, asIcon = false) {
|
|
2451
|
+
const column = new ColumnDescriptor(this, property);
|
|
2452
|
+
column.asBoolean(yes, no, asIcon);
|
|
2453
|
+
this._columns.push(column);
|
|
2454
|
+
this.setDataKeyFromColumn();
|
|
2455
|
+
return column;
|
|
2456
|
+
}
|
|
2457
|
+
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2458
|
+
const column = new ColumnDescriptor(this, property);
|
|
2459
|
+
column.asEnum(enumType, nameAsValue, titlePath);
|
|
2460
|
+
this._columns.push(column);
|
|
2461
|
+
this.setDataKeyFromColumn();
|
|
2462
|
+
return column;
|
|
2463
|
+
}
|
|
2464
|
+
addColumnCustomComponent(property, customComponentType) {
|
|
2465
|
+
const column = new ColumnDescriptor(this, property);
|
|
2466
|
+
column.asCustomComponent(customComponentType);
|
|
2467
|
+
this._columns.push(column);
|
|
2468
|
+
this.setDataKeyFromColumn();
|
|
2469
|
+
return column;
|
|
2470
|
+
}
|
|
2471
|
+
withFilterDisplay(filterDisplayType) {
|
|
2472
|
+
this._filterDisplay = filterDisplayType;
|
|
2473
|
+
return this;
|
|
2474
|
+
}
|
|
2475
|
+
withPaginationMode(paginationMode) {
|
|
2476
|
+
this._paginationMode = paginationMode;
|
|
2379
2477
|
return this;
|
|
2380
2478
|
}
|
|
2381
|
-
|
|
2382
|
-
this.
|
|
2383
|
-
this._itemsValueProperty = dataKeyProperty;
|
|
2479
|
+
withTitle(title) {
|
|
2480
|
+
this._title = title;
|
|
2384
2481
|
return this;
|
|
2385
2482
|
}
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
if (serviceType) {
|
|
2389
|
-
dataProvider.withServiceType(serviceType);
|
|
2390
|
-
}
|
|
2391
|
-
dataProvider.withLookup(lookup);
|
|
2392
|
-
this._dataProvider = dataProvider;
|
|
2483
|
+
withHideHeader(hideHeader = true) {
|
|
2484
|
+
this._hideHeader = hideHeader;
|
|
2393
2485
|
return this;
|
|
2394
2486
|
}
|
|
2395
|
-
|
|
2396
|
-
this.
|
|
2487
|
+
withDataKeyProperty(property) {
|
|
2488
|
+
this._dataKeyProperty = property;
|
|
2397
2489
|
return this;
|
|
2398
2490
|
}
|
|
2399
|
-
|
|
2400
|
-
this.
|
|
2491
|
+
withDefaultSort(property, asc = true) {
|
|
2492
|
+
this._hasDefaultSort = true;
|
|
2493
|
+
this._defaultSortProperty.push(property);
|
|
2494
|
+
this._defaultSortAsc.push(asc);
|
|
2401
2495
|
return this;
|
|
2402
2496
|
}
|
|
2403
|
-
|
|
2404
|
-
this.
|
|
2497
|
+
withRowHeight(rowHeight) {
|
|
2498
|
+
this._rowHeight = rowHeight;
|
|
2405
2499
|
return this;
|
|
2406
2500
|
}
|
|
2407
|
-
|
|
2408
|
-
this.
|
|
2501
|
+
withTableFullHeightOffset(tableFullHeightOffset) {
|
|
2502
|
+
this._tableFullHeightOffset = tableFullHeightOffset;
|
|
2409
2503
|
return this;
|
|
2410
2504
|
}
|
|
2411
2505
|
copy() {
|
|
2412
|
-
const descriptor = new
|
|
2413
|
-
this.
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
copyFieldsTo(descriptor) {
|
|
2417
|
-
super.copyFieldsTo(descriptor);
|
|
2418
|
-
descriptor._dataProvider = this._dataProvider;
|
|
2419
|
-
descriptor._lookupType = this._lookupType;
|
|
2420
|
-
descriptor._itemsLabelProperty = this._itemsLabelProperty;
|
|
2421
|
-
descriptor._itemsLabelTranslate = this._itemsLabelTranslate;
|
|
2422
|
-
descriptor._itemsValueProperty = this._itemsValueProperty;
|
|
2506
|
+
const descriptor = new TableDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);
|
|
2507
|
+
descriptor._columns = this.columns.map(c => c.copy());
|
|
2508
|
+
descriptor._title = this._title;
|
|
2509
|
+
descriptor._hideHeader = this._hideHeader;
|
|
2423
2510
|
descriptor._dataKeyProperty = this._dataKeyProperty;
|
|
2511
|
+
descriptor._defaultSortProperty = this._defaultSortProperty.map(p => p);
|
|
2512
|
+
descriptor._defaultSortAsc = this._defaultSortAsc.map(p => p);
|
|
2513
|
+
descriptor._filterDisplay = this._filterDisplay;
|
|
2514
|
+
return descriptor;
|
|
2424
2515
|
}
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
super(property, null);
|
|
2429
|
-
this._enumType = enumType;
|
|
2430
|
-
if (typeof optionsTitlePath === 'undefined') {
|
|
2431
|
-
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
2516
|
+
setDataKeyFromColumn() {
|
|
2517
|
+
if (!this._dataKeyProperty && this._columns.length === 1) {
|
|
2518
|
+
this._dataKeyProperty = this._columns[0].property;
|
|
2432
2519
|
}
|
|
2433
|
-
const optionEnumValues = Array.isArray(options)
|
|
2434
|
-
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)
|
|
2435
|
-
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);
|
|
2436
|
-
const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
|
|
2437
|
-
this.withLookupDataProvider(dataProvider);
|
|
2438
|
-
this.withItemsLabelProperty('title', optionsTitlePath !== null);
|
|
2439
|
-
this.withItemsValueProperty('value');
|
|
2440
|
-
}
|
|
2441
|
-
get enumType() {
|
|
2442
|
-
return this._enumType;
|
|
2443
|
-
}
|
|
2444
|
-
copy() {
|
|
2445
|
-
const field = new FilterLookupEnumDescriptor(this._property, this._enumType, []);
|
|
2446
|
-
this.copyFieldsTo(field);
|
|
2447
|
-
return field;
|
|
2448
2520
|
}
|
|
2449
2521
|
}
|
|
2450
|
-
(function (
|
|
2451
|
-
let
|
|
2452
|
-
(function (
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
})(
|
|
2456
|
-
|
|
2522
|
+
(function (TableDescriptor) {
|
|
2523
|
+
let PaginationModeEnum;
|
|
2524
|
+
(function (PaginationModeEnum) {
|
|
2525
|
+
PaginationModeEnum[PaginationModeEnum["Pagination"] = 0] = "Pagination";
|
|
2526
|
+
PaginationModeEnum[PaginationModeEnum["InfiniteScroll"] = 1] = "InfiniteScroll";
|
|
2527
|
+
})(PaginationModeEnum = TableDescriptor.PaginationModeEnum || (TableDescriptor.PaginationModeEnum = {}));
|
|
2528
|
+
let FilterDisplayEnum;
|
|
2529
|
+
(function (FilterDisplayEnum) {
|
|
2530
|
+
FilterDisplayEnum[FilterDisplayEnum["Row"] = 0] = "Row";
|
|
2531
|
+
FilterDisplayEnum[FilterDisplayEnum["Menu"] = 1] = "Menu";
|
|
2532
|
+
})(FilterDisplayEnum = TableDescriptor.FilterDisplayEnum || (TableDescriptor.FilterDisplayEnum = {}));
|
|
2533
|
+
})(TableDescriptor || (TableDescriptor = {}));
|
|
2457
2534
|
|
|
2458
2535
|
var TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;
|
|
2459
2536
|
class TableviewDescriptor {
|
|
@@ -2528,8 +2605,8 @@ class TableviewDescriptor {
|
|
|
2528
2605
|
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2529
2606
|
return this._table.addColumnEnum(property, enumType, nameAsValue, titlePath);
|
|
2530
2607
|
}
|
|
2531
|
-
|
|
2532
|
-
return this._table.
|
|
2608
|
+
addColumnCustomComponent(property, customComponentType) {
|
|
2609
|
+
return this._table.addColumnCustomComponent(property, customComponentType);
|
|
2533
2610
|
}
|
|
2534
2611
|
createTabGroup(name, title) {
|
|
2535
2612
|
this._viewEditor.createTabGroup(name, title);
|
|
@@ -3023,14 +3100,10 @@ class ModelUtil {
|
|
|
3023
3100
|
if (!attributes) {
|
|
3024
3101
|
return null;
|
|
3025
3102
|
}
|
|
3026
|
-
let idAttribute =
|
|
3103
|
+
let idAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'id', 'uuid', 'code', 'sifra');
|
|
3027
3104
|
if (!idAttribute) {
|
|
3028
|
-
// if no id,
|
|
3029
|
-
idAttribute = attributes
|
|
3030
|
-
if (!idAttribute) {
|
|
3031
|
-
// if no id or code, take the first attribute
|
|
3032
|
-
idAttribute = attributes[0];
|
|
3033
|
-
}
|
|
3105
|
+
// if no id or code, take the first attribute
|
|
3106
|
+
idAttribute = attributes[0];
|
|
3034
3107
|
}
|
|
3035
3108
|
return idAttribute?.name ?? null;
|
|
3036
3109
|
}
|
|
@@ -3040,17 +3113,22 @@ class ModelUtil {
|
|
|
3040
3113
|
if (!attributes) {
|
|
3041
3114
|
return null;
|
|
3042
3115
|
}
|
|
3043
|
-
let titleAttribute =
|
|
3116
|
+
let titleAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'name', 'ime', 'title', 'naziv');
|
|
3044
3117
|
if (!titleAttribute) {
|
|
3045
|
-
// if no name,
|
|
3046
|
-
titleAttribute = attributes
|
|
3047
|
-
if (!titleAttribute) {
|
|
3048
|
-
// if no name or title, take the first attribute
|
|
3049
|
-
titleAttribute = attributes[0];
|
|
3050
|
-
}
|
|
3118
|
+
// if no name or title, take the first attribute
|
|
3119
|
+
titleAttribute = attributes[0];
|
|
3051
3120
|
}
|
|
3052
3121
|
return titleAttribute?.name ?? null;
|
|
3053
3122
|
}
|
|
3123
|
+
static findAttributeByTypeAndName(attributes, type, ...names) {
|
|
3124
|
+
for (const name of names) {
|
|
3125
|
+
const attribute = attributes.find(a => a.type === type && a.name === name);
|
|
3126
|
+
if (attribute) {
|
|
3127
|
+
return attribute;
|
|
3128
|
+
}
|
|
3129
|
+
}
|
|
3130
|
+
return null;
|
|
3131
|
+
}
|
|
3054
3132
|
static trySetLookupItemsProperties(lookup, idAsDataKey = true) {
|
|
3055
3133
|
if (lookup.modelType) {
|
|
3056
3134
|
if (!lookup.itemsValueProperty || !lookup.dataKeyProperty) {
|
|
@@ -3347,6 +3425,9 @@ class ObjectSerializer {
|
|
|
3347
3425
|
serializeClass(data, type) {
|
|
3348
3426
|
return this.serialize(data, TypeUtil.findTypeName(type));
|
|
3349
3427
|
}
|
|
3428
|
+
serializeClassArray(data, type) {
|
|
3429
|
+
return this.serialize(data, `Array<${TypeUtil.findTypeName(type)}>`);
|
|
3430
|
+
}
|
|
3350
3431
|
serialize(data, type) {
|
|
3351
3432
|
if (data == undefined) {
|
|
3352
3433
|
return data;
|
|
@@ -3398,6 +3479,9 @@ class ObjectSerializer {
|
|
|
3398
3479
|
deserializeClass(data, type) {
|
|
3399
3480
|
return this.deserialize(data, TypeUtil.findTypeName(type));
|
|
3400
3481
|
}
|
|
3482
|
+
deserializeClassArray(data, type) {
|
|
3483
|
+
return this.deserialize(data, `Array<${TypeUtil.findTypeName(type)}>`);
|
|
3484
|
+
}
|
|
3401
3485
|
deserialize(data, type) {
|
|
3402
3486
|
// polymorphism may change the actual type.
|
|
3403
3487
|
type = this.findCorrectType(data, type);
|
|
@@ -3792,8 +3876,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
3792
3876
|
}]
|
|
3793
3877
|
}] });
|
|
3794
3878
|
|
|
3795
|
-
|
|
3879
|
+
/**
|
|
3880
|
+
* Imitation of JSONPath Syntax. Supports:
|
|
3881
|
+
* - Root object notation with '$'
|
|
3882
|
+
* - Dot notation (e.g.: $.foo.bar), no bracket notation for properties
|
|
3883
|
+
* - Array notation (e.g.: [0])
|
|
3884
|
+
*/
|
|
3885
|
+
class JsonPathPipe {
|
|
3796
3886
|
transform(value, path = '') {
|
|
3887
|
+
if (path === '$') {
|
|
3888
|
+
// only return the root
|
|
3889
|
+
return value;
|
|
3890
|
+
}
|
|
3891
|
+
// Check for leading root object notation
|
|
3892
|
+
if (path.startsWith('$')) {
|
|
3893
|
+
path = path.substring(1);
|
|
3894
|
+
}
|
|
3895
|
+
// Check for leading .
|
|
3896
|
+
if (path.startsWith('.')) {
|
|
3897
|
+
path = path.substring(1);
|
|
3898
|
+
}
|
|
3797
3899
|
if (path.indexOf('.') >= 0) {
|
|
3798
3900
|
const pathSplit = path.split('.');
|
|
3799
3901
|
let currValue = value;
|
|
@@ -3801,6 +3903,32 @@ class MngPropertyPathPipe {
|
|
|
3801
3903
|
if (typeof currValue === 'undefined' || currValue === null) {
|
|
3802
3904
|
return currValue;
|
|
3803
3905
|
}
|
|
3906
|
+
if (!p.length) {
|
|
3907
|
+
// empty path, return current value
|
|
3908
|
+
return currValue;
|
|
3909
|
+
}
|
|
3910
|
+
const leftBracketIdx = p.indexOf('[');
|
|
3911
|
+
if (leftBracketIdx >= 0 && p.endsWith(']')) {
|
|
3912
|
+
// should be reference to array
|
|
3913
|
+
const arrayPath = p.substring(0, leftBracketIdx);
|
|
3914
|
+
const arrayIdx = +p.substring(leftBracketIdx + 1, p.length - 1);
|
|
3915
|
+
const array = currValue[arrayPath];
|
|
3916
|
+
console.log(arrayPath, arrayIdx, array);
|
|
3917
|
+
if (Array.isArray(array)) {
|
|
3918
|
+
if (arrayIdx >= 0 && arrayIdx < array.length) {
|
|
3919
|
+
// valid index, continue on the path
|
|
3920
|
+
currValue = array[arrayIdx];
|
|
3921
|
+
continue;
|
|
3922
|
+
}
|
|
3923
|
+
else {
|
|
3924
|
+
console.warn(`Path ${path} array index at ${p} is not within valid array range`, value);
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
else {
|
|
3928
|
+
console.warn(`Path ${path} array at ${p} is not a valid array`, value);
|
|
3929
|
+
}
|
|
3930
|
+
return undefined;
|
|
3931
|
+
}
|
|
3804
3932
|
else if (typeof currValue === 'object') {
|
|
3805
3933
|
currValue = currValue[p];
|
|
3806
3934
|
}
|
|
@@ -3812,16 +3940,16 @@ class MngPropertyPathPipe {
|
|
|
3812
3940
|
return currValue;
|
|
3813
3941
|
}
|
|
3814
3942
|
else {
|
|
3815
|
-
return
|
|
3943
|
+
return value[path];
|
|
3816
3944
|
}
|
|
3817
3945
|
}
|
|
3818
3946
|
}
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type:
|
|
3947
|
+
JsonPathPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JsonPathPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3948
|
+
JsonPathPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JsonPathPipe, name: "jsonPath" });
|
|
3949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JsonPathPipe, decorators: [{
|
|
3822
3950
|
type: Pipe,
|
|
3823
3951
|
args: [{
|
|
3824
|
-
name: '
|
|
3952
|
+
name: 'jsonPath',
|
|
3825
3953
|
pure: true
|
|
3826
3954
|
}]
|
|
3827
3955
|
}] });
|
|
@@ -4140,11 +4268,11 @@ class MngActionExecutorService {
|
|
|
4140
4268
|
return this.errorMapper.toMngError(error, actionError);
|
|
4141
4269
|
}
|
|
4142
4270
|
}
|
|
4143
|
-
MngActionExecutorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i3.DialogService }, { token: i2.ConfirmationService }, { token:
|
|
4271
|
+
MngActionExecutorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i3.DialogService }, { token: i2.ConfirmationService }, { token: i1$1.TranslateService }, { token: MngNavigationService }, { token: MngErrorMapperService }, { token: MngLinkFormatterPipe }, { token: ACTION_EDITOR_DIALOG_COMPONENT_SETTING }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4144
4272
|
MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService });
|
|
4145
4273
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService, decorators: [{
|
|
4146
4274
|
type: Injectable
|
|
4147
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type:
|
|
4275
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: i1$1.TranslateService }, { type: MngNavigationService }, { type: MngErrorMapperService }, { type: MngLinkFormatterPipe }, { type: i0.Type, decorators: [{
|
|
4148
4276
|
type: Inject,
|
|
4149
4277
|
args: [ACTION_EDITOR_DIALOG_COMPONENT_SETTING]
|
|
4150
4278
|
}] }]; } });
|
|
@@ -4546,11 +4674,11 @@ class MngCommonsService {
|
|
|
4546
4674
|
return titlePieces.join(' - ');
|
|
4547
4675
|
}
|
|
4548
4676
|
}
|
|
4549
|
-
MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, deps: [{ token: i1.Router }, { token: i2.PrimeNGConfig }, { token:
|
|
4677
|
+
MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, deps: [{ token: i1.Router }, { token: i2.PrimeNGConfig }, { token: i1$1.TranslateService }, { token: i4$1.Title }, { token: MngConfigurationService }, { token: MNG_MODULE_CONFIG_IT }, { token: MNG_BROWSER_STORAGE_IT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4550
4678
|
MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService });
|
|
4551
4679
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, decorators: [{
|
|
4552
4680
|
type: Injectable
|
|
4553
|
-
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type:
|
|
4681
|
+
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i1$1.TranslateService }, { type: i4$1.Title }, { type: MngConfigurationService }, { type: undefined, decorators: [{
|
|
4554
4682
|
type: Inject,
|
|
4555
4683
|
args: [MNG_MODULE_CONFIG_IT]
|
|
4556
4684
|
}] }, { type: Storage, decorators: [{
|
|
@@ -4655,12 +4783,12 @@ class MngActionComponent {
|
|
|
4655
4783
|
return `${action.actionName}_${this.cmpId}`;
|
|
4656
4784
|
}
|
|
4657
4785
|
}
|
|
4658
|
-
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token:
|
|
4659
|
-
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
|
|
4786
|
+
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 });
|
|
4787
|
+
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 });
|
|
4660
4788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
4661
4789
|
type: Component,
|
|
4662
|
-
args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfirmationService], template: "<ng-container *ngIf=\"$isVisible | async\">\n <a
|
|
4663
|
-
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type:
|
|
4790
|
+
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"] }]
|
|
4791
|
+
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: MngActionExecutorService }, { type: i2.ConfirmationService }, { type: MngViewContainerComponentService, decorators: [{
|
|
4664
4792
|
type: Optional
|
|
4665
4793
|
}] }]; }, propDecorators: { hostClass: [{
|
|
4666
4794
|
type: HostBinding,
|
|
@@ -4815,11 +4943,25 @@ class MngComponentDirective {
|
|
|
4815
4943
|
ngOnInit() {
|
|
4816
4944
|
this.viewContainerRef.clear();
|
|
4817
4945
|
this.componentRef = this.viewContainerRef.createComponent(this.component);
|
|
4946
|
+
if (this.inputs) {
|
|
4947
|
+
if (this.isCmpInstanceOfColumnValue(this.componentRef.instance)) {
|
|
4948
|
+
this.componentRef.instance.setColumnValue(this.inputs['value'], this.inputs['item'], this.inputs['descriptor']);
|
|
4949
|
+
}
|
|
4950
|
+
else {
|
|
4951
|
+
const instanceAny = this.componentRef;
|
|
4952
|
+
for (const input in this.inputs) {
|
|
4953
|
+
instanceAny[input] = this.inputs[input];
|
|
4954
|
+
}
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4818
4957
|
this.componentInstanceEventEmitter.next(this.componentRef.instance);
|
|
4819
4958
|
}
|
|
4959
|
+
isCmpInstanceOfColumnValue(cmp) {
|
|
4960
|
+
return typeof cmp.setColumnValue === 'function';
|
|
4961
|
+
}
|
|
4820
4962
|
}
|
|
4821
4963
|
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4822
|
-
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 });
|
|
4964
|
+
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 });
|
|
4823
4965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngComponentDirective, decorators: [{
|
|
4824
4966
|
type: Directive,
|
|
4825
4967
|
args: [{
|
|
@@ -4828,6 +4970,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4828
4970
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { component: [{
|
|
4829
4971
|
type: Input,
|
|
4830
4972
|
args: ['mngComponent']
|
|
4973
|
+
}], inputs: [{
|
|
4974
|
+
type: Input
|
|
4831
4975
|
}], componentInstanceEventEmitter: [{
|
|
4832
4976
|
type: Output,
|
|
4833
4977
|
args: ['instanceCreated']
|
|
@@ -5010,12 +5154,12 @@ class MngFormEditorComponent {
|
|
|
5010
5154
|
this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;
|
|
5011
5155
|
}
|
|
5012
5156
|
}
|
|
5013
|
-
MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, deps: [{ token:
|
|
5014
|
-
MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isSubmitButtonVisible: "isSubmitButtonVisible", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", components: [{ type: i3$
|
|
5157
|
+
MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5158
|
+
MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isSubmitButtonVisible: "isSubmitButtonVisible", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", components: [{ type: i3$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5015
5159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, decorators: [{
|
|
5016
5160
|
type: Component,
|
|
5017
5161
|
args: [{ selector: 'mng-form-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n" }]
|
|
5018
|
-
}], ctorParameters: function () { return [{ type:
|
|
5162
|
+
}], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; }, propDecorators: { descriptor: [{
|
|
5019
5163
|
type: Input
|
|
5020
5164
|
}], submitLoading: [{
|
|
5021
5165
|
type: Input
|
|
@@ -5042,13 +5186,18 @@ const MNG_AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
|
5042
5186
|
multi: true
|
|
5043
5187
|
};
|
|
5044
5188
|
class MngAutocompleteComponent {
|
|
5045
|
-
constructor(injector) {
|
|
5189
|
+
constructor(injector, translate) {
|
|
5046
5190
|
this.injector = injector;
|
|
5191
|
+
this.translate = translate;
|
|
5192
|
+
this.itemsLabelTranslate = false;
|
|
5193
|
+
this.inlineSearch = false;
|
|
5194
|
+
this.openOnFocus = false;
|
|
5047
5195
|
this.multiselect = false;
|
|
5048
5196
|
this.className = null;
|
|
5049
5197
|
this.dropdownClassName = null;
|
|
5050
5198
|
this.valueChangeEventEmitter = new EventEmitter();
|
|
5051
|
-
this.
|
|
5199
|
+
this.isInited = false;
|
|
5200
|
+
this.suggestionsSubject = new BehaviorSubject([]);
|
|
5052
5201
|
this.searchSubscription = null;
|
|
5053
5202
|
this.dataProviderService = null;
|
|
5054
5203
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -5057,15 +5206,9 @@ class MngAutocompleteComponent {
|
|
|
5057
5206
|
this.onTouchedFn = () => { };
|
|
5058
5207
|
this.autocompleteFormControl = new FormControl();
|
|
5059
5208
|
this.suggestions$ = this.suggestionsSubject.asObservable();
|
|
5060
|
-
this.isLoading = false;
|
|
5061
5209
|
}
|
|
5062
5210
|
ngOnInit() {
|
|
5063
|
-
|
|
5064
|
-
this.dataProviderService = this.dataProvider.serviceType ? this.injector.get(this.dataProvider.serviceType) : null;
|
|
5065
|
-
}
|
|
5066
|
-
else {
|
|
5067
|
-
console.warn(`Data provider should be provided for MngAutocompleteComponent.`);
|
|
5068
|
-
}
|
|
5211
|
+
this.setItemsAndDataProvider();
|
|
5069
5212
|
}
|
|
5070
5213
|
ngOnDestroy() {
|
|
5071
5214
|
this.searchSubscription?.unsubscribe();
|
|
@@ -5073,7 +5216,6 @@ class MngAutocompleteComponent {
|
|
|
5073
5216
|
onSearch(event) {
|
|
5074
5217
|
this.searchSubscription?.unsubscribe();
|
|
5075
5218
|
if (this.dataProvider) {
|
|
5076
|
-
this.isLoading = true;
|
|
5077
5219
|
const queryParamBuilder = MediusQueryParamBuilder.create();
|
|
5078
5220
|
if (this.itemsLabelProperty) {
|
|
5079
5221
|
queryParamBuilder.withSort(this.itemsLabelProperty);
|
|
@@ -5081,20 +5223,25 @@ class MngAutocompleteComponent {
|
|
|
5081
5223
|
if (event.query && event.query.length > 0 && this.itemsLabelProperty) {
|
|
5082
5224
|
queryParamBuilder.withFilter(this.itemsLabelProperty, event.query, undefined, MediusFilterMatchType.StartsWith);
|
|
5083
5225
|
}
|
|
5084
|
-
this.searchSubscription = this.
|
|
5085
|
-
next:
|
|
5086
|
-
this.
|
|
5087
|
-
this.isLoading = false;
|
|
5088
|
-
},
|
|
5089
|
-
error: () => {
|
|
5090
|
-
this.isLoading = false;
|
|
5226
|
+
this.searchSubscription = this.getLookup(queryParamBuilder.build(), event.query).subscribe({
|
|
5227
|
+
next: items => {
|
|
5228
|
+
this.setSuggestionsFromItems(items, event.query);
|
|
5091
5229
|
}
|
|
5092
5230
|
});
|
|
5093
5231
|
}
|
|
5094
5232
|
}
|
|
5095
5233
|
onSelect(value) {
|
|
5096
|
-
|
|
5097
|
-
this.
|
|
5234
|
+
let outputValue = value;
|
|
5235
|
+
if (this.itemsValueProperty && typeof value === 'object') {
|
|
5236
|
+
outputValue = value[this.itemsValueProperty];
|
|
5237
|
+
}
|
|
5238
|
+
this.onChangeFn(outputValue);
|
|
5239
|
+
this.valueChangeEventEmitter.next(outputValue);
|
|
5240
|
+
}
|
|
5241
|
+
onFocus(event) {
|
|
5242
|
+
if (this.openOnFocus) {
|
|
5243
|
+
this.primeAutocomplete?.show();
|
|
5244
|
+
}
|
|
5098
5245
|
}
|
|
5099
5246
|
registerOnChange(fn) {
|
|
5100
5247
|
this.onChangeFn = fn;
|
|
@@ -5110,20 +5257,170 @@ class MngAutocompleteComponent {
|
|
|
5110
5257
|
this.autocompleteFormControl.enable();
|
|
5111
5258
|
}
|
|
5112
5259
|
}
|
|
5113
|
-
writeValue(
|
|
5114
|
-
this.
|
|
5260
|
+
writeValue(value) {
|
|
5261
|
+
this.setItemsAndDataProvider();
|
|
5262
|
+
if (this.itemsValuePropertyInit && value != null && typeof value !== 'object') {
|
|
5263
|
+
const defaultItem = { [this.itemsValuePropertyInit]: value };
|
|
5264
|
+
if (this.itemsLabelProperty) {
|
|
5265
|
+
defaultItem[this.itemsLabelProperty] = value;
|
|
5266
|
+
}
|
|
5267
|
+
const matchedItem = this.suggestionsSubject.value.find(i => i[this.itemsValuePropertyInit] === value);
|
|
5268
|
+
if (matchedItem) {
|
|
5269
|
+
this.autocompleteFormControl.setValue(matchedItem, { emitEvent: false });
|
|
5270
|
+
}
|
|
5271
|
+
else if (this.dataProvider) {
|
|
5272
|
+
const queryParamBuilder = MediusQueryParamBuilder.create();
|
|
5273
|
+
queryParamBuilder.withFilter(this.itemsValuePropertyInit, value, undefined, MediusFilterMatchType.Equals);
|
|
5274
|
+
this.getLookup(queryParamBuilder.build())
|
|
5275
|
+
.pipe(first())
|
|
5276
|
+
.subscribe({
|
|
5277
|
+
next: items => {
|
|
5278
|
+
let isMatch = false;
|
|
5279
|
+
if (items.length === 1) {
|
|
5280
|
+
this.autocompleteFormControl.setValue(items[0]);
|
|
5281
|
+
isMatch = true;
|
|
5282
|
+
}
|
|
5283
|
+
else if (items.length > 1) {
|
|
5284
|
+
// for lookup data providers not using query params
|
|
5285
|
+
const matchedItem = items.find(i => i[this.itemsValuePropertyInit] === value);
|
|
5286
|
+
if (matchedItem) {
|
|
5287
|
+
this.setAutocompleteValueFromWrite(matchedItem);
|
|
5288
|
+
isMatch = true;
|
|
5289
|
+
}
|
|
5290
|
+
}
|
|
5291
|
+
if (!isMatch) {
|
|
5292
|
+
this.setAutocompleteValueFromWrite(defaultItem);
|
|
5293
|
+
}
|
|
5294
|
+
},
|
|
5295
|
+
error: () => {
|
|
5296
|
+
this.setAutocompleteValueFromWrite(defaultItem);
|
|
5297
|
+
}
|
|
5298
|
+
});
|
|
5299
|
+
}
|
|
5300
|
+
else {
|
|
5301
|
+
this.setAutocompleteValueFromWrite(defaultItem);
|
|
5302
|
+
}
|
|
5303
|
+
}
|
|
5304
|
+
else {
|
|
5305
|
+
this.setAutocompleteValueFromWrite(value);
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5308
|
+
setItemsAndDataProvider() {
|
|
5309
|
+
if (this.isInited) {
|
|
5310
|
+
return;
|
|
5311
|
+
}
|
|
5312
|
+
this.itemsLabelProperty = this.itemsLabelPropertyInit;
|
|
5313
|
+
this.itemsValueProperty = this.itemsValuePropertyInit;
|
|
5314
|
+
if (this.dataProvider) {
|
|
5315
|
+
this.dataProviderService = this.dataProvider.serviceType ? this.injector.get(this.dataProvider.serviceType) : null;
|
|
5316
|
+
if (this.itemsLabelTranslate) {
|
|
5317
|
+
// setup translation properties
|
|
5318
|
+
if (this.itemsLabelPropertyInit) {
|
|
5319
|
+
this.itemsLabelProperty = `${this.itemsLabelPropertyInit}_i18n`;
|
|
5320
|
+
}
|
|
5321
|
+
else if (!this.itemsLabelProperty && !this.itemsValuePropertyInit) {
|
|
5322
|
+
this.itemsLabelProperty = 'title_i18n';
|
|
5323
|
+
this.itemsValueProperty = 'value';
|
|
5324
|
+
}
|
|
5325
|
+
else {
|
|
5326
|
+
throw new Error(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`);
|
|
5327
|
+
}
|
|
5328
|
+
}
|
|
5329
|
+
}
|
|
5330
|
+
else {
|
|
5331
|
+
console.warn(`Data provider should be provided for MngAutocompleteComponent.`);
|
|
5332
|
+
}
|
|
5333
|
+
if (this.openOnFocus) {
|
|
5334
|
+
this.onSearch({ query: '' });
|
|
5335
|
+
}
|
|
5336
|
+
this.isInited = true;
|
|
5337
|
+
}
|
|
5338
|
+
setAutocompleteValueFromWrite(value) {
|
|
5339
|
+
if (value && this.itemsLabelTranslate) {
|
|
5340
|
+
value = this.i18nPopulateItems([value], this.translate.instant(this.i18nGetItemsKeys([value])))[0];
|
|
5341
|
+
}
|
|
5342
|
+
this.autocompleteFormControl.setValue(value, { emitEvent: false });
|
|
5343
|
+
}
|
|
5344
|
+
getLookup(qp, query) {
|
|
5345
|
+
if (this.dataProvider) {
|
|
5346
|
+
return this.dataProvider.lookup(qp, this.dataProviderService, query).pipe(switchMap(items => {
|
|
5347
|
+
if (this.itemsLabelTranslate) {
|
|
5348
|
+
return this.translate.stream(this.i18nGetItemsKeys(items)).pipe(map(translations => this.i18nPopulateItems(items, translations)));
|
|
5349
|
+
}
|
|
5350
|
+
else {
|
|
5351
|
+
return of(items);
|
|
5352
|
+
}
|
|
5353
|
+
}));
|
|
5354
|
+
}
|
|
5355
|
+
else {
|
|
5356
|
+
return of([]);
|
|
5357
|
+
}
|
|
5358
|
+
}
|
|
5359
|
+
i18nGetItemsKeys(items) {
|
|
5360
|
+
return items.map(item => (typeof item === 'object' && this.itemsLabelPropertyInit ? item[this.itemsLabelPropertyInit] : item));
|
|
5361
|
+
}
|
|
5362
|
+
i18nPopulateItems(items, i18nMap) {
|
|
5363
|
+
return items.map(item => {
|
|
5364
|
+
if (typeof item === 'object' && this.itemsLabelPropertyInit) {
|
|
5365
|
+
const label = item[this.itemsLabelPropertyInit];
|
|
5366
|
+
const translation = i18nMap[label];
|
|
5367
|
+
if (translation) {
|
|
5368
|
+
return { ...item, [this.itemsLabelProperty]: translation };
|
|
5369
|
+
}
|
|
5370
|
+
return { ...item };
|
|
5371
|
+
}
|
|
5372
|
+
else {
|
|
5373
|
+
const translation = i18nMap[item];
|
|
5374
|
+
return {
|
|
5375
|
+
[this.itemsLabelProperty]: translation ?? item,
|
|
5376
|
+
[this.itemsValueProperty]: item
|
|
5377
|
+
};
|
|
5378
|
+
}
|
|
5379
|
+
});
|
|
5380
|
+
}
|
|
5381
|
+
setSuggestionsFromItems(items, query) {
|
|
5382
|
+
if (this.inlineSearch) {
|
|
5383
|
+
const queryLowerCase = query?.toLowerCase() ?? '';
|
|
5384
|
+
const filteredItems = items.filter(i => {
|
|
5385
|
+
let itemLabel = i;
|
|
5386
|
+
if (this.itemsLabelProperty && typeof i === 'object') {
|
|
5387
|
+
itemLabel = i[this.itemsLabelProperty];
|
|
5388
|
+
}
|
|
5389
|
+
if (itemLabel == null) {
|
|
5390
|
+
return queryLowerCase == null || !queryLowerCase.length;
|
|
5391
|
+
}
|
|
5392
|
+
if (typeof itemLabel !== 'string') {
|
|
5393
|
+
itemLabel = itemLabel.toString();
|
|
5394
|
+
}
|
|
5395
|
+
return itemLabel.toLowerCase().startsWith(queryLowerCase);
|
|
5396
|
+
});
|
|
5397
|
+
this.suggestionsSubject.next([...filteredItems]);
|
|
5398
|
+
}
|
|
5399
|
+
else {
|
|
5400
|
+
this.suggestionsSubject.next([...items]);
|
|
5401
|
+
}
|
|
5115
5402
|
}
|
|
5116
5403
|
}
|
|
5117
|
-
MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
5118
|
-
MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty",
|
|
5404
|
+
MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, deps: [{ token: i0.Injector }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5405
|
+
MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", inlineSearch: "inlineSearch", openOnFocus: "openOnFocus", multiselect: "multiselect", placeholder: "placeholder", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", components: [{ type: i2$1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5119
5406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, decorators: [{
|
|
5120
5407
|
type: Component,
|
|
5121
|
-
args: [{ selector: 'mng-autocomplete', providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
|
|
5122
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { dataProvider: [{
|
|
5408
|
+
args: [{ selector: 'mng-autocomplete', providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
|
|
5409
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }]; }, propDecorators: { dataProvider: [{
|
|
5123
5410
|
type: Input
|
|
5124
5411
|
}], dataKeyProperty: [{
|
|
5125
5412
|
type: Input
|
|
5126
|
-
}],
|
|
5413
|
+
}], itemsValuePropertyInit: [{
|
|
5414
|
+
type: Input,
|
|
5415
|
+
args: ['itemsValueProperty']
|
|
5416
|
+
}], itemsLabelPropertyInit: [{
|
|
5417
|
+
type: Input,
|
|
5418
|
+
args: ['itemsLabelProperty']
|
|
5419
|
+
}], itemsLabelTranslate: [{
|
|
5420
|
+
type: Input
|
|
5421
|
+
}], inlineSearch: [{
|
|
5422
|
+
type: Input
|
|
5423
|
+
}], openOnFocus: [{
|
|
5127
5424
|
type: Input
|
|
5128
5425
|
}], multiselect: [{
|
|
5129
5426
|
type: Input
|
|
@@ -5251,12 +5548,12 @@ class MngDropdownComponent {
|
|
|
5251
5548
|
this.dropdownFormControl.setValue(obj, { emitEvent: false });
|
|
5252
5549
|
}
|
|
5253
5550
|
}
|
|
5254
|
-
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }, { token:
|
|
5255
|
-
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngDropdownComponent, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsDisabledProperty: "itemsDisabledProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\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"] }, { type: i3$
|
|
5551
|
+
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5552
|
+
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngDropdownComponent, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsDisabledProperty: "itemsDisabledProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\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"] }, { type: i3$3.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "virtualScroll", "itemSize", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "scrollHeight", "defaultLabel", "placeholder", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onPanelShow", "onPanelHide"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5256
5553
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, decorators: [{
|
|
5257
5554
|
type: Component,
|
|
5258
5555
|
args: [{ selector: 'mng-dropdown', providers: [MNG_DROPDOWN_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n" }]
|
|
5259
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type:
|
|
5556
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }]; }, propDecorators: { dataProvider: [{
|
|
5260
5557
|
type: Input
|
|
5261
5558
|
}], dataKeyProperty: [{
|
|
5262
5559
|
type: Input
|
|
@@ -5474,12 +5771,12 @@ class MngActionEditorComponent {
|
|
|
5474
5771
|
this.subscriptions.push(subscription);
|
|
5475
5772
|
}
|
|
5476
5773
|
}
|
|
5477
|
-
MngActionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, deps: [{ token: i0.Injector }, { token:
|
|
5478
|
-
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: "<
|
|
5774
|
+
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 });
|
|
5775
|
+
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 });
|
|
5479
5776
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, decorators: [{
|
|
5480
5777
|
type: Component,
|
|
5481
|
-
args: [{ selector: 'mng-action-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
5482
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type:
|
|
5778
|
+
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" }]
|
|
5779
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }, { type: MngActionExecutorService }, { type: MngCommonsService }, { type: MngNavigationService }, { type: i3.DynamicDialogRef, decorators: [{
|
|
5483
5780
|
type: Optional
|
|
5484
5781
|
}] }, { type: i3.DynamicDialogConfig, decorators: [{
|
|
5485
5782
|
type: Optional
|
|
@@ -5519,7 +5816,7 @@ class MngFormlyFieldAutocompleteComponent extends FieldType {
|
|
|
5519
5816
|
}
|
|
5520
5817
|
}
|
|
5521
5818
|
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5522
|
-
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type:
|
|
5819
|
+
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5523
5820
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
|
|
5524
5821
|
type: Component,
|
|
5525
5822
|
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
|
|
@@ -5536,10 +5833,10 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
5536
5833
|
}
|
|
5537
5834
|
}
|
|
5538
5835
|
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5539
|
-
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$
|
|
5836
|
+
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 });
|
|
5540
5837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
5541
5838
|
type: Component,
|
|
5542
|
-
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" }]
|
|
5839
|
+
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" }]
|
|
5543
5840
|
}] });
|
|
5544
5841
|
|
|
5545
5842
|
class MngFormlyFieldDropdownComponent extends FieldType {
|
|
@@ -5549,7 +5846,7 @@ class MngFormlyFieldDropdownComponent extends FieldType {
|
|
|
5549
5846
|
}
|
|
5550
5847
|
}
|
|
5551
5848
|
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5552
|
-
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type:
|
|
5849
|
+
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5553
5850
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
|
|
5554
5851
|
type: Component,
|
|
5555
5852
|
args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
|
|
@@ -5623,36 +5920,22 @@ class MngTableColumnFilterComponent {
|
|
|
5623
5920
|
}
|
|
5624
5921
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
5625
5922
|
autocompleteFilter(value, filterCallback) {
|
|
5626
|
-
|
|
5627
|
-
let filterValue = value;
|
|
5628
|
-
if (this.lookupDescriptor.itemsValueProperty) {
|
|
5629
|
-
filterValue = filterValue[this.lookupDescriptor.itemsValueProperty];
|
|
5630
|
-
}
|
|
5631
|
-
filterCallback(filterValue);
|
|
5632
|
-
}
|
|
5633
|
-
else {
|
|
5634
|
-
filterCallback(value);
|
|
5635
|
-
}
|
|
5923
|
+
filterCallback(value);
|
|
5636
5924
|
}
|
|
5637
5925
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
5638
5926
|
dropdownFilter(value, filterCallback) {
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
filterCallback(filterValue);
|
|
5645
|
-
}
|
|
5646
|
-
else {
|
|
5647
|
-
filterCallback(value);
|
|
5648
|
-
}
|
|
5927
|
+
filterCallback(value);
|
|
5928
|
+
}
|
|
5929
|
+
toLookupFilterValue(value) {
|
|
5930
|
+
console.log(this.descriptor.property, value);
|
|
5931
|
+
return this.lookupDescriptor.dataKeyProperty && value ? { [this.lookupDescriptor.dataKeyProperty]: value } : value;
|
|
5649
5932
|
}
|
|
5650
5933
|
}
|
|
5651
5934
|
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
5652
|
-
MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: { descriptor: "descriptor", display: "display" }, ngImport: i0, template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [
|
|
5935
|
+
MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: { descriptor: "descriptor", display: "display" }, ngImport: i0, template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n", components: [{ type: i4$5.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping"] }, { type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }, { type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1$1.TranslatePipe } });
|
|
5653
5936
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
|
|
5654
5937
|
type: Component,
|
|
5655
|
-
args: [{ selector: 'mng-table-column-filter', template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [
|
|
5938
|
+
args: [{ selector: 'mng-table-column-filter', template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n" }]
|
|
5656
5939
|
}], ctorParameters: function () { return [{ type: i2.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
|
|
5657
5940
|
type: Input
|
|
5658
5941
|
}], display: [{
|
|
@@ -5666,13 +5949,26 @@ class MngTableColumnValueComponent {
|
|
|
5666
5949
|
this.columnTypeBoolean = ColumnDescriptor.TypeEnum.Boolean;
|
|
5667
5950
|
this.columnTypeDate = ColumnDescriptor.TypeEnum.Date;
|
|
5668
5951
|
this.columnTypeEnum = ColumnDescriptor.TypeEnum.Enum;
|
|
5952
|
+
this.columnTypeCustom = ColumnDescriptor.TypeEnum.Custom;
|
|
5953
|
+
this.jsonPath = '$';
|
|
5954
|
+
}
|
|
5955
|
+
ngOnInit() {
|
|
5956
|
+
if (this.descriptor.jsonPath) {
|
|
5957
|
+
this.jsonPath = this.descriptor.jsonPath;
|
|
5958
|
+
}
|
|
5959
|
+
else {
|
|
5960
|
+
this.jsonPath = `$.${this.descriptor.property}`;
|
|
5961
|
+
if (this.descriptor.objectModelType) {
|
|
5962
|
+
this.jsonPath = `$.${this.descriptor.property}.${this.descriptor.objectTitleProperty}`;
|
|
5963
|
+
}
|
|
5964
|
+
}
|
|
5669
5965
|
}
|
|
5670
5966
|
}
|
|
5671
5967
|
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5672
|
-
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 {{
|
|
5968
|
+
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 });
|
|
5673
5969
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
5674
5970
|
type: Component,
|
|
5675
|
-
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{
|
|
5971
|
+
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" }]
|
|
5676
5972
|
}], propDecorators: { descriptor: [{
|
|
5677
5973
|
type: Input
|
|
5678
5974
|
}], item: [{
|
|
@@ -5938,12 +6234,12 @@ class MngTableComponent {
|
|
|
5938
6234
|
}
|
|
5939
6235
|
}
|
|
5940
6236
|
}
|
|
5941
|
-
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:
|
|
5942
|
-
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$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$4.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$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4.AsyncPipe, "translate": i3$1.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6237
|
+
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 });
|
|
6238
|
+
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 });
|
|
5943
6239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, decorators: [{
|
|
5944
6240
|
type: Component,
|
|
5945
|
-
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" }]
|
|
5946
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type:
|
|
6241
|
+
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" }]
|
|
6242
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: MngViewContainerComponentService, decorators: [{
|
|
5947
6243
|
type: Optional
|
|
5948
6244
|
}] }]; }, propDecorators: { descriptor: [{
|
|
5949
6245
|
type: Input
|
|
@@ -6057,12 +6353,12 @@ class MngTableviewComponent {
|
|
|
6057
6353
|
}
|
|
6058
6354
|
}
|
|
6059
6355
|
}
|
|
6060
|
-
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.MessageService }, { token:
|
|
6061
|
-
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]=\"
|
|
6356
|
+
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 });
|
|
6357
|
+
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 } });
|
|
6062
6358
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
6063
6359
|
type: Component,
|
|
6064
|
-
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]=\"
|
|
6065
|
-
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.MessageService }, { type:
|
|
6360
|
+
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" }]
|
|
6361
|
+
}], 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: [{
|
|
6066
6362
|
type: Input
|
|
6067
6363
|
}], dataProvider: [{
|
|
6068
6364
|
type: Input
|
|
@@ -6081,12 +6377,24 @@ class AMngTableviewRouteComponent {
|
|
|
6081
6377
|
}
|
|
6082
6378
|
createActionDescriptors() {
|
|
6083
6379
|
const actions = [];
|
|
6084
|
-
actions.push(
|
|
6085
|
-
actions.push(
|
|
6086
|
-
actions.push(
|
|
6087
|
-
actions.push(
|
|
6380
|
+
actions.push(this.createActionDescriptorForDetails());
|
|
6381
|
+
actions.push(this.createActionDescriptorForAdd());
|
|
6382
|
+
actions.push(this.createActionDescriptorForEdit());
|
|
6383
|
+
actions.push(this.createActionDescriptorForDelete());
|
|
6088
6384
|
return actions;
|
|
6089
6385
|
}
|
|
6386
|
+
createActionDescriptorForDetails(descriptor = this.descriptor.viewEditor) {
|
|
6387
|
+
return new ActionEditorDetailsDescriptor(descriptor);
|
|
6388
|
+
}
|
|
6389
|
+
createActionDescriptorForAdd(descriptor = this.descriptor.addEditor) {
|
|
6390
|
+
return new ActionEditorAddDescriptor(descriptor);
|
|
6391
|
+
}
|
|
6392
|
+
createActionDescriptorForEdit(descriptor = this.descriptor.editEditor) {
|
|
6393
|
+
return new ActionEditorEditDescriptor(descriptor);
|
|
6394
|
+
}
|
|
6395
|
+
createActionDescriptorForDelete(descriptor = this.descriptor.model) {
|
|
6396
|
+
return new ActionDeleteDescriptor(descriptor);
|
|
6397
|
+
}
|
|
6090
6398
|
}
|
|
6091
6399
|
AMngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AMngTableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6092
6400
|
AMngTableviewRouteComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: AMngTableviewRouteComponent, ngImport: i0 });
|
|
@@ -6169,14 +6477,14 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
6169
6477
|
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6170
6478
|
});
|
|
6171
6479
|
this.config = this.descriptor.config;
|
|
6172
|
-
if (!this.descriptor.
|
|
6480
|
+
if (!this.descriptor.dialogTableDataProvider && this.descriptor.dataProvider?.serviceType) {
|
|
6173
6481
|
this.dialogUseDataProvider = true;
|
|
6174
6482
|
this.dialogDataProviderService = this.injector.get(this.descriptor.dataProvider.serviceType);
|
|
6175
6483
|
}
|
|
6176
6484
|
// init values
|
|
6177
6485
|
this.setFieldLabelValue(this.formControl.value);
|
|
6178
6486
|
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged((prev, curr) => {
|
|
6179
|
-
const compareProp = this.descriptor.
|
|
6487
|
+
const compareProp = this.descriptor.dialogTableDescriptor.dataKeyProperty ?? this.descriptor.dialogTableDescriptor.model.idPropertyName;
|
|
6180
6488
|
if (compareProp && typeof prev === 'object' && typeof curr === 'object') {
|
|
6181
6489
|
return prev[compareProp] === curr[compareProp];
|
|
6182
6490
|
}
|
|
@@ -6209,8 +6517,8 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
6209
6517
|
if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {
|
|
6210
6518
|
this.dialogIsLoadingSubject.next(true);
|
|
6211
6519
|
const queryParamBuilder = MediusQueryParamBuilder.create(50);
|
|
6212
|
-
if (this.descriptor.
|
|
6213
|
-
this.descriptor.
|
|
6520
|
+
if (this.descriptor.dialogTableDescriptor.hasDefaultSort) {
|
|
6521
|
+
this.descriptor.dialogTableDescriptor.defaultSortProperty.forEach((p, idx) => queryParamBuilder.withSort(p, this.descriptor.dialogTableDescriptor.defaultSortAsc[idx]));
|
|
6214
6522
|
}
|
|
6215
6523
|
this.lookupDataProviderSubscription = this.descriptor.dataProvider?.lookup(queryParamBuilder.build(), this.dialogDataProviderService).subscribe({
|
|
6216
6524
|
next: res => {
|
|
@@ -6281,7 +6589,7 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
6281
6589
|
return;
|
|
6282
6590
|
}
|
|
6283
6591
|
if (typeof value === 'object') {
|
|
6284
|
-
const labelProperty = this.descriptor.itemsLabelProperty ?? this.descriptor.
|
|
6592
|
+
const labelProperty = this.descriptor.itemsLabelProperty ?? this.descriptor.dialogTableDescriptor?.model.titlePropertyName;
|
|
6285
6593
|
if (!labelProperty) {
|
|
6286
6594
|
throw new Error('Could not determine label property.');
|
|
6287
6595
|
}
|
|
@@ -6293,10 +6601,10 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
6293
6601
|
}
|
|
6294
6602
|
}
|
|
6295
6603
|
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
6296
|
-
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
|
|
6604
|
+
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 });
|
|
6297
6605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
6298
6606
|
type: Component,
|
|
6299
|
-
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
|
|
6607
|
+
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" }]
|
|
6300
6608
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
|
|
6301
6609
|
type: ViewChild,
|
|
6302
6610
|
args: [MngTableComponent]
|
|
@@ -6445,7 +6753,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6445
6753
|
}
|
|
6446
6754
|
}
|
|
6447
6755
|
MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: MngActionExecutorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6448
|
-
MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate":
|
|
6756
|
+
MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6449
6757
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
|
|
6450
6758
|
type: Component,
|
|
6451
6759
|
args: [{ selector: 'mng-formly-table-dialog-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
@@ -6556,7 +6864,7 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
6556
6864
|
}
|
|
6557
6865
|
}
|
|
6558
6866
|
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
6559
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$
|
|
6867
|
+
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6560
6868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
6561
6869
|
type: Component,
|
|
6562
6870
|
args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
@@ -6565,7 +6873,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6565
6873
|
class MngFormlyFieldTabsComponent extends FieldType {
|
|
6566
6874
|
}
|
|
6567
6875
|
MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6568
|
-
MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$4.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3$
|
|
6876
|
+
MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$4.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3$1.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6569
6877
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
|
|
6570
6878
|
type: Component,
|
|
6571
6879
|
args: [{ selector: 'mng-formly-field-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n" }]
|
|
@@ -6574,7 +6882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6574
6882
|
class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
6575
6883
|
}
|
|
6576
6884
|
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6577
|
-
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n", components: [{ type: i1$5.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { type: i3$
|
|
6885
|
+
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n", components: [{ type: i1$5.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { type: i3$1.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6578
6886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
|
|
6579
6887
|
type: Component,
|
|
6580
6888
|
args: [{ selector: 'mng-formly-field-fieldset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n" }]
|
|
@@ -6583,7 +6891,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6583
6891
|
class MngFormlyFieldWrapperComponent extends FieldWrapper {
|
|
6584
6892
|
}
|
|
6585
6893
|
MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6586
|
-
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldWrapperComponent, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$
|
|
6894
|
+
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldWrapperComponent, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6587
6895
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
6588
6896
|
type: Component,
|
|
6589
6897
|
args: [{ selector: 'mng-formly-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
@@ -6592,7 +6900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6592
6900
|
class MngFormlyTableWrapperComponent extends FieldWrapper {
|
|
6593
6901
|
}
|
|
6594
6902
|
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6595
|
-
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$
|
|
6903
|
+
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6596
6904
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
|
|
6597
6905
|
type: Component,
|
|
6598
6906
|
args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
@@ -6617,7 +6925,7 @@ class MngFooterComponent {
|
|
|
6617
6925
|
}
|
|
6618
6926
|
}
|
|
6619
6927
|
MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6620
|
-
MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFooterComponent, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", pipes: { "translate":
|
|
6928
|
+
MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFooterComponent, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6621
6929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, decorators: [{
|
|
6622
6930
|
type: Component,
|
|
6623
6931
|
args: [{ selector: 'mng-footer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n" }]
|
|
@@ -6953,7 +7261,7 @@ class MngMenuItemComponent {
|
|
|
6953
7261
|
}
|
|
6954
7262
|
}
|
|
6955
7263
|
MngMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMenuItemComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6956
|
-
MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active" } }, ngImport: i0, template: "<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe, "translate":
|
|
7264
|
+
MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active" } }, ngImport: i0, template: "<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe }, animations: [
|
|
6957
7265
|
trigger('children', [
|
|
6958
7266
|
state('void', style({
|
|
6959
7267
|
height: '0px'
|
|
@@ -7065,7 +7373,7 @@ class MngTopbarComponent {
|
|
|
7065
7373
|
}
|
|
7066
7374
|
}
|
|
7067
7375
|
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 });
|
|
7068
|
-
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:
|
|
7376
|
+
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 });
|
|
7069
7377
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
7070
7378
|
type: Component,
|
|
7071
7379
|
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" }]
|
|
@@ -7102,7 +7410,7 @@ class MngMainLayoutComponent {
|
|
|
7102
7410
|
}
|
|
7103
7411
|
}
|
|
7104
7412
|
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 });
|
|
7105
|
-
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 });
|
|
7413
|
+
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 });
|
|
7106
7414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMainLayoutComponent, decorators: [{
|
|
7107
7415
|
type: Component,
|
|
7108
7416
|
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" }]
|
|
@@ -7364,7 +7672,7 @@ const declarations = [
|
|
|
7364
7672
|
MngComponentDirective,
|
|
7365
7673
|
MngTemplateDirective,
|
|
7366
7674
|
// pipes
|
|
7367
|
-
|
|
7675
|
+
JsonPathPipe,
|
|
7368
7676
|
MngEnumPipe,
|
|
7369
7677
|
MngBooleanPipe,
|
|
7370
7678
|
MngI18nPropertyPipe,
|
|
@@ -7468,7 +7776,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
7468
7776
|
MngComponentDirective,
|
|
7469
7777
|
MngTemplateDirective,
|
|
7470
7778
|
// pipes
|
|
7471
|
-
|
|
7779
|
+
JsonPathPipe,
|
|
7472
7780
|
MngEnumPipe,
|
|
7473
7781
|
MngBooleanPipe,
|
|
7474
7782
|
MngI18nPropertyPipe,
|
|
@@ -7510,7 +7818,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
7510
7818
|
CommonModule,
|
|
7511
7819
|
RouterModule,
|
|
7512
7820
|
HttpClientModule,
|
|
7513
|
-
ReactiveFormsModule,
|
|
7821
|
+
ReactiveFormsModule, i1$1.TranslateModule, i3$1.FormlyModule, AutoCompleteModule,
|
|
7514
7822
|
BreadcrumbModule,
|
|
7515
7823
|
ButtonModule,
|
|
7516
7824
|
CalendarModule,
|
|
@@ -7581,7 +7889,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
7581
7889
|
MngComponentDirective,
|
|
7582
7890
|
MngTemplateDirective,
|
|
7583
7891
|
// pipes
|
|
7584
|
-
|
|
7892
|
+
JsonPathPipe,
|
|
7585
7893
|
MngEnumPipe,
|
|
7586
7894
|
MngBooleanPipe,
|
|
7587
7895
|
MngI18nPropertyPipe,
|
|
@@ -7686,9 +7994,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
7686
7994
|
}]
|
|
7687
7995
|
}] });
|
|
7688
7996
|
|
|
7689
|
-
class
|
|
7690
|
-
constructor(
|
|
7691
|
-
this.type = type;
|
|
7997
|
+
class AMngBaseApiService {
|
|
7998
|
+
constructor(http) {
|
|
7692
7999
|
this.http = http;
|
|
7693
8000
|
this.objectSerializer = ObjectSerializer.get();
|
|
7694
8001
|
}
|
|
@@ -7699,12 +8006,6 @@ class AMngApiService {
|
|
|
7699
8006
|
}
|
|
7700
8007
|
return `${this.getBasePath()}${this.getServiceBasePath()}${path}`;
|
|
7701
8008
|
}
|
|
7702
|
-
deserialize(item) {
|
|
7703
|
-
return this.deserializeClass(item, this.type);
|
|
7704
|
-
}
|
|
7705
|
-
serialize(item) {
|
|
7706
|
-
return this.serializeClass(item, this.type);
|
|
7707
|
-
}
|
|
7708
8009
|
serializeQueryParam(queryParam, type = 'QueryParam') {
|
|
7709
8010
|
return this.objectSerializer.serialize(queryParam, type);
|
|
7710
8011
|
}
|
|
@@ -7714,9 +8015,27 @@ class AMngApiService {
|
|
|
7714
8015
|
deserializeClass(item, type) {
|
|
7715
8016
|
return this.objectSerializer.deserializeClass(item, type);
|
|
7716
8017
|
}
|
|
8018
|
+
deserializeClassArray(item, type) {
|
|
8019
|
+
return this.objectSerializer.deserializeClassArray(item, type);
|
|
8020
|
+
}
|
|
7717
8021
|
serializeClass(item, type) {
|
|
7718
8022
|
return this.objectSerializer.serializeClass(item, type);
|
|
7719
8023
|
}
|
|
8024
|
+
serializeClassArray(item, type) {
|
|
8025
|
+
return this.objectSerializer.serializeClassArray(item, type);
|
|
8026
|
+
}
|
|
8027
|
+
}
|
|
8028
|
+
class AMngApiService extends AMngBaseApiService {
|
|
8029
|
+
constructor(type, http) {
|
|
8030
|
+
super(http);
|
|
8031
|
+
this.type = type;
|
|
8032
|
+
}
|
|
8033
|
+
deserialize(item) {
|
|
8034
|
+
return this.deserializeClass(item, this.type);
|
|
8035
|
+
}
|
|
8036
|
+
serialize(item) {
|
|
8037
|
+
return this.serializeClass(item, this.type);
|
|
8038
|
+
}
|
|
7720
8039
|
}
|
|
7721
8040
|
|
|
7722
8041
|
class AMngGetAllApiService extends AMngApiService {
|
|
@@ -8265,5 +8584,5 @@ class RouteDataBuilder {
|
|
|
8265
8584
|
* Generated bundle index. Do not edit.
|
|
8266
8585
|
*/
|
|
8267
8586
|
|
|
8268
|
-
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,
|
|
8587
|
+
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 };
|
|
8269
8588
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|