@mediusinc/mng-commons 0.2.9 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +2 -4
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +9 -8
- package/esm2020/lib/components/layout/menu-item.component.mjs +59 -17
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +6 -3
- package/esm2020/lib/config/formly.config.mjs +10 -1
- package/esm2020/lib/descriptors/editor.descriptor.mjs +27 -1
- package/esm2020/lib/descriptors/table.descriptor.mjs +82 -3
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +4 -1
- package/esm2020/lib/mng-commons.module.mjs +5 -2
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/models/menu.model.mjs +2 -0
- package/esm2020/lib/pipes/enum.pipe.mjs +22 -0
- package/esm2020/lib/pipes/index.mjs +2 -1
- package/esm2020/lib/router/route-builder.mjs +86 -17
- package/esm2020/lib/services/commons.service.mjs +1 -1
- package/esm2020/lib/utils/editor-formly.util.mjs +7 -1
- package/esm2020/lib/utils/enum.util.mjs +23 -2
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/mediusinc-mng-commons.mjs +330 -51
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +325 -50
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/layout/menu-item.component.d.ts +13 -5
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +1 -0
- package/lib/descriptors/editor.descriptor.d.ts +11 -1
- package/lib/descriptors/table.descriptor.d.ts +22 -4
- package/lib/descriptors/tableview.descriptor.d.ts +1 -0
- package/lib/mng-commons.module.d.ts +70 -69
- package/lib/models/index.d.ts +1 -0
- package/lib/models/menu.model.d.ts +25 -0
- package/lib/pipes/enum.pipe.d.ts +7 -0
- package/lib/pipes/index.d.ts +1 -0
- package/lib/router/route-builder.d.ts +9 -5
- package/lib/services/commons.service.d.ts +6 -6
- package/lib/utils/enum.util.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -6,7 +6,7 @@ import { Injectable, InjectionToken, Inject, Component, ChangeDetectionStrategy,
|
|
|
6
6
|
import * as i2$3 from '@angular/forms';
|
|
7
7
|
import { Validators, FormGroup, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import * as i1 from '@angular/router';
|
|
9
|
-
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
9
|
+
import { NavigationEnd, GuardsCheckEnd, RouterModule } from '@angular/router';
|
|
10
10
|
import * as i3 from '@ngx-formly/core';
|
|
11
11
|
import { FieldType, FieldWrapper, FORMLY_CONFIG, FormlyModule } from '@ngx-formly/core';
|
|
12
12
|
import * as i2$2 from '@ngx-translate/core';
|
|
@@ -36,14 +36,15 @@ import { DynamicDialogModule, DialogService } from 'primeng/dynamicdialog';
|
|
|
36
36
|
import * as i1$5 from 'primeng/fieldset';
|
|
37
37
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
38
38
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
39
|
+
import * as i6$1 from 'primeng/inputmask';
|
|
39
40
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
40
41
|
import * as i1$3 from 'primeng/inputnumber';
|
|
41
42
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
42
43
|
import * as i2$5 from 'primeng/inputswitch';
|
|
43
44
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
44
|
-
import * as
|
|
45
|
+
import * as i10$1 from 'primeng/inputtext';
|
|
45
46
|
import { InputTextModule } from 'primeng/inputtext';
|
|
46
|
-
import * as
|
|
47
|
+
import * as i9$1 from 'primeng/inputtextarea';
|
|
47
48
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
48
49
|
import * as i3$1 from 'primeng/messages';
|
|
49
50
|
import { MessagesModule } from 'primeng/messages';
|
|
@@ -67,11 +68,11 @@ import { TagModule } from 'primeng/tag';
|
|
|
67
68
|
import * as i7$1 from 'primeng/toast';
|
|
68
69
|
import { ToastModule } from 'primeng/toast';
|
|
69
70
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
70
|
-
import * as i8$
|
|
71
|
+
import * as i8$1 from 'primeng/toolbar';
|
|
71
72
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
72
73
|
import * as i10 from 'primeng/tooltip';
|
|
73
74
|
import { TooltipModule } from 'primeng/tooltip';
|
|
74
|
-
import { of, throwError, Observable, from, BehaviorSubject, Subject, ReplaySubject } from 'rxjs';
|
|
75
|
+
import { of, throwError, Observable, from, BehaviorSubject, Subject, ReplaySubject, distinctUntilChanged, combineLatest } from 'rxjs';
|
|
75
76
|
import 'reflect-metadata';
|
|
76
77
|
import { mergeMap, map, first, catchError, filter, finalize, startWith } from 'rxjs/operators';
|
|
77
78
|
import * as i4 from '@angular/platform-browser';
|
|
@@ -1053,6 +1054,15 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1053
1054
|
get pattern() {
|
|
1054
1055
|
return this._pattern;
|
|
1055
1056
|
}
|
|
1057
|
+
get mask() {
|
|
1058
|
+
return this._mask;
|
|
1059
|
+
}
|
|
1060
|
+
get slotChar() {
|
|
1061
|
+
return this._slotChar;
|
|
1062
|
+
}
|
|
1063
|
+
get customComponentName() {
|
|
1064
|
+
return this._customComponentName;
|
|
1065
|
+
}
|
|
1056
1066
|
asText(minLength, maxLength, pattern, isEmail) {
|
|
1057
1067
|
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1058
1068
|
this._minLength = minLength;
|
|
@@ -1107,6 +1117,17 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1107
1117
|
this._datePickerShowTime = showTime !== null && showTime !== void 0 ? showTime : false;
|
|
1108
1118
|
return this;
|
|
1109
1119
|
}
|
|
1120
|
+
asMask(mask, slotChar) {
|
|
1121
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Mask;
|
|
1122
|
+
this._mask = mask;
|
|
1123
|
+
this._slotChar = slotChar;
|
|
1124
|
+
return this;
|
|
1125
|
+
}
|
|
1126
|
+
asCustomComponent(customComponentName) {
|
|
1127
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Custom;
|
|
1128
|
+
this._customComponentName = customComponentName;
|
|
1129
|
+
return this;
|
|
1130
|
+
}
|
|
1110
1131
|
copy() {
|
|
1111
1132
|
const field = new FieldInputDescriptor(this._editor, this._property);
|
|
1112
1133
|
this.copyFieldsTo(field);
|
|
@@ -1125,6 +1146,9 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1125
1146
|
field._maxLength = this._maxLength;
|
|
1126
1147
|
field._minLength = this._minLength;
|
|
1127
1148
|
field._pattern = this._pattern;
|
|
1149
|
+
field._mask = this._mask;
|
|
1150
|
+
field._slotChar = this._slotChar;
|
|
1151
|
+
field._customComponentName = this._customComponentName;
|
|
1128
1152
|
return field;
|
|
1129
1153
|
}
|
|
1130
1154
|
}
|
|
@@ -1137,6 +1161,8 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1137
1161
|
TypeEnum[TypeEnum["Switch"] = 3] = "Switch";
|
|
1138
1162
|
TypeEnum[TypeEnum["Radio"] = 4] = "Radio";
|
|
1139
1163
|
TypeEnum[TypeEnum["Datepicker"] = 5] = "Datepicker";
|
|
1164
|
+
TypeEnum[TypeEnum["Mask"] = 6] = "Mask";
|
|
1165
|
+
TypeEnum[TypeEnum["Custom"] = 7] = "Custom";
|
|
1140
1166
|
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
1141
1167
|
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
1142
1168
|
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
@@ -1225,6 +1251,7 @@ class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
|
1225
1251
|
this.withLookupDataProvider(dataProvider);
|
|
1226
1252
|
this.withItemsLabelProperty('title');
|
|
1227
1253
|
this.withItemsValueProperty('value');
|
|
1254
|
+
this.withDataKeyProperty('value');
|
|
1228
1255
|
}
|
|
1229
1256
|
get enumType() {
|
|
1230
1257
|
return this._enumType;
|
|
@@ -1589,6 +1616,13 @@ class TableDescriptor {
|
|
|
1589
1616
|
this.setDataKeyFromColumn();
|
|
1590
1617
|
return column;
|
|
1591
1618
|
}
|
|
1619
|
+
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
1620
|
+
const column = new ColumnDescriptor(this, property);
|
|
1621
|
+
column.asEnum(enumType, nameAsValue, titlePath);
|
|
1622
|
+
this._columns.push(column);
|
|
1623
|
+
this.setDataKeyFromColumn();
|
|
1624
|
+
return column;
|
|
1625
|
+
}
|
|
1592
1626
|
addColumnObject(property, modelType, displayProperty) {
|
|
1593
1627
|
const column = new ColumnDescriptor(this, property);
|
|
1594
1628
|
column.withModelType(modelType);
|
|
@@ -1665,6 +1699,7 @@ class ColumnDescriptor {
|
|
|
1665
1699
|
this._modelType = null;
|
|
1666
1700
|
this._columnType = ColumnDescriptor.TypeEnum.String;
|
|
1667
1701
|
this._isSortEnabled = false;
|
|
1702
|
+
this._enumNameAsValue = false;
|
|
1668
1703
|
this._table = table;
|
|
1669
1704
|
this._property = property;
|
|
1670
1705
|
}
|
|
@@ -1695,6 +1730,15 @@ class ColumnDescriptor {
|
|
|
1695
1730
|
get property() {
|
|
1696
1731
|
return this._property;
|
|
1697
1732
|
}
|
|
1733
|
+
get enumType() {
|
|
1734
|
+
return this._enumType;
|
|
1735
|
+
}
|
|
1736
|
+
get enumTitlePath() {
|
|
1737
|
+
return this._enumTitlePath;
|
|
1738
|
+
}
|
|
1739
|
+
get enumNameAsValue() {
|
|
1740
|
+
return this._enumNameAsValue;
|
|
1741
|
+
}
|
|
1698
1742
|
asType(type = ColumnDescriptor.TypeEnum.String) {
|
|
1699
1743
|
this._columnType = type;
|
|
1700
1744
|
return this;
|
|
@@ -1713,6 +1757,16 @@ class ColumnDescriptor {
|
|
|
1713
1757
|
this._columnType = ColumnDescriptor.TypeEnum.Boolean;
|
|
1714
1758
|
return this;
|
|
1715
1759
|
}
|
|
1760
|
+
asEnum(enumType, nameAsValue = false, titlePath) {
|
|
1761
|
+
this._columnType = ColumnDescriptor.TypeEnum.Enum;
|
|
1762
|
+
this._enumType = enumType;
|
|
1763
|
+
this._enumNameAsValue = nameAsValue;
|
|
1764
|
+
if (typeof titlePath === 'undefined') {
|
|
1765
|
+
titlePath = TypeUtil.findEnumName(enumType);
|
|
1766
|
+
}
|
|
1767
|
+
this._enumTitlePath = titlePath;
|
|
1768
|
+
return this;
|
|
1769
|
+
}
|
|
1716
1770
|
withModelType(modelType) {
|
|
1717
1771
|
this._modelType = modelType;
|
|
1718
1772
|
return this;
|
|
@@ -1727,7 +1781,23 @@ class ColumnDescriptor {
|
|
|
1727
1781
|
}
|
|
1728
1782
|
withFilter() {
|
|
1729
1783
|
this._filterDescriptor = new FilterDescriptor(this._property);
|
|
1730
|
-
|
|
1784
|
+
let filterType;
|
|
1785
|
+
switch (this._columnType) {
|
|
1786
|
+
case ColumnDescriptor.TypeEnum.Number:
|
|
1787
|
+
filterType = FilterDescriptor.TypeEnum.Number;
|
|
1788
|
+
break;
|
|
1789
|
+
case ColumnDescriptor.TypeEnum.Boolean:
|
|
1790
|
+
filterType = FilterDescriptor.TypeEnum.Boolean;
|
|
1791
|
+
break;
|
|
1792
|
+
case ColumnDescriptor.TypeEnum.Date:
|
|
1793
|
+
filterType = FilterDescriptor.TypeEnum.Date;
|
|
1794
|
+
break;
|
|
1795
|
+
case ColumnDescriptor.TypeEnum.String:
|
|
1796
|
+
default:
|
|
1797
|
+
filterType = FilterDescriptor.TypeEnum.String;
|
|
1798
|
+
break;
|
|
1799
|
+
}
|
|
1800
|
+
this._filterDescriptor.asFilterType(filterType);
|
|
1731
1801
|
return this._filterDescriptor;
|
|
1732
1802
|
}
|
|
1733
1803
|
withFilterLookup() {
|
|
@@ -1735,6 +1805,14 @@ class ColumnDescriptor {
|
|
|
1735
1805
|
this._filterDescriptor = filterDescriptor;
|
|
1736
1806
|
return filterDescriptor;
|
|
1737
1807
|
}
|
|
1808
|
+
withFilterLookupEnum(options) {
|
|
1809
|
+
if (this._columnType !== ColumnDescriptor.TypeEnum.Enum || !this._enumType) {
|
|
1810
|
+
throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
|
|
1811
|
+
}
|
|
1812
|
+
const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
|
|
1813
|
+
this._filterDescriptor = filterDescriptor;
|
|
1814
|
+
return filterDescriptor;
|
|
1815
|
+
}
|
|
1738
1816
|
withSort(isEnabled = true) {
|
|
1739
1817
|
this._isSortEnabled = isEnabled;
|
|
1740
1818
|
return this;
|
|
@@ -1757,6 +1835,7 @@ class ColumnDescriptor {
|
|
|
1757
1835
|
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1758
1836
|
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1759
1837
|
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1838
|
+
TypeEnum[TypeEnum["Enum"] = 4] = "Enum";
|
|
1760
1839
|
})(TypeEnum = ColumnDescriptor.TypeEnum || (ColumnDescriptor.TypeEnum = {}));
|
|
1761
1840
|
})(ColumnDescriptor || (ColumnDescriptor = {}));
|
|
1762
1841
|
class FilterDescriptor {
|
|
@@ -1828,6 +1907,7 @@ class FilterDescriptor {
|
|
|
1828
1907
|
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1829
1908
|
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1830
1909
|
TypeEnum[TypeEnum["Lookup"] = 4] = "Lookup";
|
|
1910
|
+
TypeEnum[TypeEnum["LookupEnum"] = 5] = "LookupEnum";
|
|
1831
1911
|
})(TypeEnum = FilterDescriptor.TypeEnum || (FilterDescriptor.TypeEnum = {}));
|
|
1832
1912
|
let MatchModeEnum;
|
|
1833
1913
|
(function (MatchModeEnum) {
|
|
@@ -1934,6 +2014,31 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
1934
2014
|
descriptor._dataKeyProperty = this._dataKeyProperty;
|
|
1935
2015
|
}
|
|
1936
2016
|
}
|
|
2017
|
+
class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
2018
|
+
constructor(property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
2019
|
+
super(property, null);
|
|
2020
|
+
this._enumType = enumType;
|
|
2021
|
+
if (typeof optionsTitlePath === 'undefined') {
|
|
2022
|
+
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
2023
|
+
}
|
|
2024
|
+
const optionEnumValues = Array.isArray(options)
|
|
2025
|
+
? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
|
|
2026
|
+
: EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
|
|
2027
|
+
const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
|
|
2028
|
+
this.withLookupDataProvider(dataProvider);
|
|
2029
|
+
this.withItemsLabelProperty('title');
|
|
2030
|
+
this.withItemsValueProperty('value');
|
|
2031
|
+
this.withDataKeyProperty('value');
|
|
2032
|
+
}
|
|
2033
|
+
get enumType() {
|
|
2034
|
+
return this._enumType;
|
|
2035
|
+
}
|
|
2036
|
+
copy() {
|
|
2037
|
+
const field = new FilterLookupEnumDescriptor(this._property, this._enumType, []);
|
|
2038
|
+
this.copyFieldsTo(field);
|
|
2039
|
+
return field;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
1937
2042
|
(function (FilterLookupDescriptor) {
|
|
1938
2043
|
let LookupTypeEnum;
|
|
1939
2044
|
(function (LookupTypeEnum) {
|
|
@@ -2011,6 +2116,9 @@ class TableviewDescriptor {
|
|
|
2011
2116
|
addColumnBoolean(property) {
|
|
2012
2117
|
return this._table.addColumnBoolean(property);
|
|
2013
2118
|
}
|
|
2119
|
+
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2120
|
+
return this._table.addColumnEnum(property, enumType, nameAsValue, titlePath);
|
|
2121
|
+
}
|
|
2014
2122
|
addColumnObject(property, modelType, displayProperty) {
|
|
2015
2123
|
return this._table.addColumnObject(property, modelType, displayProperty);
|
|
2016
2124
|
}
|
|
@@ -2183,6 +2291,12 @@ class EditorFormlyUtil {
|
|
|
2183
2291
|
case FieldInputDescriptor.TypeEnum.Datepicker:
|
|
2184
2292
|
field.type = 'datepicker';
|
|
2185
2293
|
break;
|
|
2294
|
+
case FieldInputDescriptor.TypeEnum.Mask:
|
|
2295
|
+
field.type = 'mask';
|
|
2296
|
+
break;
|
|
2297
|
+
case FieldInputDescriptor.TypeEnum.Custom:
|
|
2298
|
+
field.type = descriptor.customComponentName;
|
|
2299
|
+
break;
|
|
2186
2300
|
default:
|
|
2187
2301
|
field.type = 'input';
|
|
2188
2302
|
field.templateOptions.minLength = descriptor.minLength;
|
|
@@ -2242,8 +2356,15 @@ class EnumUtil {
|
|
|
2242
2356
|
* @param enumType Enum object.
|
|
2243
2357
|
*/
|
|
2244
2358
|
static getConstantNames(enumType) {
|
|
2359
|
+
return EnumUtil.getConstantNamesFromEnumObject(enumType);
|
|
2360
|
+
}
|
|
2361
|
+
/**
|
|
2362
|
+
* Returns array of names for constants in enum.
|
|
2363
|
+
* @param enumObj Enum object.
|
|
2364
|
+
*/
|
|
2365
|
+
static getConstantNamesFromEnumObject(enumObj) {
|
|
2245
2366
|
// in number enum, the numbers are also represented in objects and should be filtered out
|
|
2246
|
-
return Object.keys(
|
|
2367
|
+
return Object.keys(enumObj).filter(v => isNaN(+v));
|
|
2247
2368
|
}
|
|
2248
2369
|
/**
|
|
2249
2370
|
* Returns array of string values for constants in enum.
|
|
@@ -2296,6 +2417,21 @@ class EnumUtil {
|
|
|
2296
2417
|
return typeof enumType[value] !== 'undefined' ? enumType[value] : null;
|
|
2297
2418
|
}
|
|
2298
2419
|
}
|
|
2420
|
+
/**
|
|
2421
|
+
* Gets constant name for value.
|
|
2422
|
+
* @param enumObj Enum object.
|
|
2423
|
+
* @param value Value of enum constant.
|
|
2424
|
+
*/
|
|
2425
|
+
static getConstantNameFromEnumObject(enumObj, value) {
|
|
2426
|
+
var _a;
|
|
2427
|
+
const enumObjAny = enumObj;
|
|
2428
|
+
if (typeof value === 'string') {
|
|
2429
|
+
return (_a = this.getConstantNamesFromEnumObject(enumObj).find(c => enumObjAny[c] === value)) !== null && _a !== void 0 ? _a : null;
|
|
2430
|
+
}
|
|
2431
|
+
else {
|
|
2432
|
+
return typeof enumObjAny[value] !== 'undefined' ? enumObjAny[value] : null;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2299
2435
|
}
|
|
2300
2436
|
|
|
2301
2437
|
class I18nUtil {
|
|
@@ -4342,10 +4478,9 @@ class MngDropdownComponent {
|
|
|
4342
4478
|
}
|
|
4343
4479
|
}
|
|
4344
4480
|
writeValue(obj) {
|
|
4481
|
+
var _a;
|
|
4345
4482
|
this.dropdownFormControl.setValue(obj, { emitEvent: false });
|
|
4346
|
-
|
|
4347
|
-
this.primeDropdown.writeValue(obj);
|
|
4348
|
-
}
|
|
4483
|
+
(_a = this.primeDropdown) === null || _a === void 0 ? void 0 : _a.writeValue(obj);
|
|
4349
4484
|
}
|
|
4350
4485
|
}
|
|
4351
4486
|
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -4539,10 +4674,10 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
4539
4674
|
}
|
|
4540
4675
|
}
|
|
4541
4676
|
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4542
|
-
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 [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></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 [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </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 </p-calendar>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$3.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$5.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$3.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.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"] }], directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$3.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:
|
|
4677
|
+
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 [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></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 [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </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 </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 </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$3.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$5.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$3.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.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$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$3.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$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10$1.InputText, selector: "[pInputText]" }], pipes: { "translate": i2$2.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4543
4678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
4544
4679
|
type: Component,
|
|
4545
|
-
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 [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></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 [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </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 </p-calendar>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
4680
|
+
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 [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></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 [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </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 </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 </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
4546
4681
|
}] });
|
|
4547
4682
|
|
|
4548
4683
|
class MngFormlyFieldDropdownComponent extends FieldType {
|
|
@@ -4552,10 +4687,10 @@ class MngFormlyFieldDropdownComponent extends FieldType {
|
|
|
4552
4687
|
}
|
|
4553
4688
|
}
|
|
4554
4689
|
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4555
|
-
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]=\"$any(descriptor.placeholder)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [showClear]=\"!this.to.required\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "multiselect", "placeholder", "showClear", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4690
|
+
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]=\"$any(descriptor.placeholder)\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [showClear]=\"!this.to.required\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "multiselect", "placeholder", "showClear", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4556
4691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
|
|
4557
4692
|
type: Component,
|
|
4558
|
-
args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [showClear]=\"!this.to.required\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\">\n</mng-dropdown>\n" }]
|
|
4693
|
+
args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [showClear]=\"!this.to.required\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\">\n</mng-dropdown>\n" }]
|
|
4559
4694
|
}] });
|
|
4560
4695
|
|
|
4561
4696
|
class MngTableLoadEvent {
|
|
@@ -4640,10 +4775,10 @@ class MngTableColumnFilterComponent {
|
|
|
4640
4775
|
}
|
|
4641
4776
|
}
|
|
4642
4777
|
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2$1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
4643
|
-
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 [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (
|
|
4778
|
+
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 [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"filterCallback($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n", components: [{ type: i4$4.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", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }, { type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "multiselect", "placeholder", "showClear", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i2$2.TranslatePipe } });
|
|
4644
4779
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
|
|
4645
4780
|
type: Component,
|
|
4646
|
-
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 [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (
|
|
4781
|
+
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 [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"filterCallback($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n" }]
|
|
4647
4782
|
}], ctorParameters: function () { return [{ type: i2$1.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
|
|
4648
4783
|
type: Input
|
|
4649
4784
|
}], display: [{
|
|
@@ -4704,19 +4839,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4704
4839
|
}]
|
|
4705
4840
|
}] });
|
|
4706
4841
|
|
|
4842
|
+
class MngEnumPipe {
|
|
4843
|
+
transform(value, enumObj, i18nPath, nameAsValue = false) {
|
|
4844
|
+
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);
|
|
4845
|
+
if (typeof i18nPath === 'undefined') {
|
|
4846
|
+
i18nPath = TypeUtil.findEnumName(enumObj);
|
|
4847
|
+
}
|
|
4848
|
+
return i18nPath ? `${i18nPath}.${enumConstantName}` : enumConstantName;
|
|
4849
|
+
}
|
|
4850
|
+
}
|
|
4851
|
+
MngEnumPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngEnumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4852
|
+
MngEnumPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngEnumPipe, name: "enum" });
|
|
4853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngEnumPipe, decorators: [{
|
|
4854
|
+
type: Pipe,
|
|
4855
|
+
args: [{
|
|
4856
|
+
name: 'enum',
|
|
4857
|
+
pure: true
|
|
4858
|
+
}]
|
|
4859
|
+
}] });
|
|
4860
|
+
|
|
4707
4861
|
class MngTableColumnValueComponent {
|
|
4708
4862
|
constructor() {
|
|
4709
4863
|
this.columnTypeString = ColumnDescriptor.TypeEnum.String;
|
|
4710
4864
|
this.columnTypeNumber = ColumnDescriptor.TypeEnum.Number;
|
|
4711
4865
|
this.columnTypeBoolean = ColumnDescriptor.TypeEnum.Boolean;
|
|
4712
4866
|
this.columnTypeDate = ColumnDescriptor.TypeEnum.Date;
|
|
4867
|
+
this.columnTypeEnum = ColumnDescriptor.TypeEnum.Enum;
|
|
4713
4868
|
}
|
|
4714
4869
|
}
|
|
4715
4870
|
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4716
|
-
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 {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | boolean }}\n </ng-container>\n</ng-container>\n", directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "propertyPath": MngPropertyPathPipe, "number": i4$1.DecimalPipe, "date": i4$1.DatePipe, "boolean": MngBooleanPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4871
|
+
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 {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | boolean }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue\n | translate\n }}\n </ng-container>\n</ng-container>\n", directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "propertyPath": MngPropertyPathPipe, "number": i4$1.DecimalPipe, "date": i4$1.DatePipe, "boolean": MngBooleanPipe, "translate": i2$2.TranslatePipe, "enum": MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4717
4872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
4718
4873
|
type: Component,
|
|
4719
|
-
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | boolean }}\n </ng-container>\n</ng-container>\n" }]
|
|
4874
|
+
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | boolean }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue\n | translate\n }}\n </ng-container>\n</ng-container>\n" }]
|
|
4720
4875
|
}], propDecorators: { descriptor: [{
|
|
4721
4876
|
type: Input
|
|
4722
4877
|
}], item: [{
|
|
@@ -5486,8 +5641,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
5486
5641
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
5487
5642
|
|
|
5488
5643
|
class MngMenuItemComponent {
|
|
5489
|
-
constructor(router, mngCommons, mainLayoutService) {
|
|
5644
|
+
constructor(injector, router, route, mngCommons, mainLayoutService) {
|
|
5645
|
+
this.injector = injector;
|
|
5490
5646
|
this.router = router;
|
|
5647
|
+
this.route = route;
|
|
5491
5648
|
this.mngCommons = mngCommons;
|
|
5492
5649
|
this.mainLayoutService = mainLayoutService;
|
|
5493
5650
|
this.index = 0;
|
|
@@ -5496,6 +5653,8 @@ class MngMenuItemComponent {
|
|
|
5496
5653
|
this.key = '';
|
|
5497
5654
|
this.active = false;
|
|
5498
5655
|
this.hover = false;
|
|
5656
|
+
this.isAllowedSubject = new BehaviorSubject(true);
|
|
5657
|
+
this.isAllowed$ = this.isAllowedSubject.asObservable().pipe(distinctUntilChanged());
|
|
5499
5658
|
}
|
|
5500
5659
|
ngOnInit() {
|
|
5501
5660
|
if (!this.mngCommons.menuModeIsSlim && this.item.routerLink) {
|
|
@@ -5519,14 +5678,20 @@ class MngMenuItemComponent {
|
|
|
5519
5678
|
this.menuResetSubscription = this.mngCommons.menuReset$.subscribe(() => {
|
|
5520
5679
|
this.active = false;
|
|
5521
5680
|
});
|
|
5522
|
-
this.routerEventsSubscription = this.router.events.
|
|
5523
|
-
if (
|
|
5524
|
-
this.
|
|
5681
|
+
this.routerEventsSubscription = this.router.events.subscribe(next => {
|
|
5682
|
+
if (next instanceof GuardsCheckEnd && next.shouldActivate) {
|
|
5683
|
+
this.checkIfMenuItemIsAllowedFromGuard(next.state);
|
|
5525
5684
|
}
|
|
5526
|
-
else {
|
|
5527
|
-
this.
|
|
5685
|
+
else if (next instanceof NavigationEnd) {
|
|
5686
|
+
if (this.mngCommons.menuModeIsSlim && !this.mainLayoutService.isMobile()) {
|
|
5687
|
+
this.active = false;
|
|
5688
|
+
}
|
|
5689
|
+
else {
|
|
5690
|
+
this.updateActiveStateFromRoute();
|
|
5691
|
+
}
|
|
5528
5692
|
}
|
|
5529
5693
|
});
|
|
5694
|
+
this.checkIfMenuItemIsAllowedFromGuard(this.router.routerState.snapshot);
|
|
5530
5695
|
}
|
|
5531
5696
|
updateActiveStateFromRoute() {
|
|
5532
5697
|
if (this.itemUrl) {
|
|
@@ -5548,10 +5713,6 @@ class MngMenuItemComponent {
|
|
|
5548
5713
|
}
|
|
5549
5714
|
// notify other items
|
|
5550
5715
|
this.mngCommons.menuChangeActiveKey(this.key);
|
|
5551
|
-
// execute command
|
|
5552
|
-
if (this.item.command) {
|
|
5553
|
-
this.item.command({ originalEvent: event, item: this.item });
|
|
5554
|
-
}
|
|
5555
5716
|
// toggle active state
|
|
5556
5717
|
if (this.item.items) {
|
|
5557
5718
|
this.active = !this.active;
|
|
@@ -5580,14 +5741,50 @@ class MngMenuItemComponent {
|
|
|
5580
5741
|
}
|
|
5581
5742
|
}
|
|
5582
5743
|
ngOnDestroy() {
|
|
5583
|
-
var _a, _b, _c;
|
|
5744
|
+
var _a, _b, _c, _d;
|
|
5584
5745
|
(_a = this.menuSourceSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
5585
5746
|
(_b = this.menuResetSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
5586
5747
|
(_c = this.routerEventsSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
5748
|
+
(_d = this.guardsSubscription) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
5749
|
+
}
|
|
5750
|
+
checkIfMenuItemIsAllowedFromGuard(routerState) {
|
|
5751
|
+
var _a, _b;
|
|
5752
|
+
(_a = this.guardsSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
5753
|
+
if ((_b = this.item.guards) === null || _b === void 0 ? void 0 : _b.length) {
|
|
5754
|
+
const obs = [];
|
|
5755
|
+
for (const guard of this.item.guards) {
|
|
5756
|
+
const tokenInjectedInstance = this.injector.get(guard);
|
|
5757
|
+
if (tokenInjectedInstance && 'canActivate' in tokenInjectedInstance) {
|
|
5758
|
+
const guardInstance = tokenInjectedInstance;
|
|
5759
|
+
const canActivateRes = guardInstance.canActivate(this.route.snapshot, routerState);
|
|
5760
|
+
let canActivateObs;
|
|
5761
|
+
if (canActivateRes instanceof Observable) {
|
|
5762
|
+
canActivateObs = canActivateRes;
|
|
5763
|
+
}
|
|
5764
|
+
else if (canActivateRes instanceof Promise) {
|
|
5765
|
+
canActivateObs = from(canActivateRes);
|
|
5766
|
+
}
|
|
5767
|
+
else {
|
|
5768
|
+
canActivateObs = of(canActivateRes);
|
|
5769
|
+
}
|
|
5770
|
+
obs.push(canActivateObs.pipe(first(), map(res => res === true) // if url tree is present, that means redirect and implies not allowed
|
|
5771
|
+
));
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
this.guardsSubscription = combineLatest(obs)
|
|
5775
|
+
.pipe(first())
|
|
5776
|
+
.subscribe(next => {
|
|
5777
|
+
const result = next.every(n => n === true);
|
|
5778
|
+
this.isAllowedSubject.next(result);
|
|
5779
|
+
});
|
|
5780
|
+
}
|
|
5781
|
+
else {
|
|
5782
|
+
this.isAllowedSubject.next(true);
|
|
5783
|
+
}
|
|
5587
5784
|
}
|
|
5588
5785
|
}
|
|
5589
|
-
MngMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMenuItemComponent, deps: [{ token: i1.Router }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5590
|
-
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\" class=\"layout-menuitem-root-text\">{{ item.label | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false\"\n [attr.href]=\"item.
|
|
5786
|
+
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 });
|
|
5787
|
+
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$1.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: i9.Ripple, selector: "[pRipple]" }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i2$2.TranslatePipe }, animations: [
|
|
5591
5788
|
trigger('children', [
|
|
5592
5789
|
state('void', style({
|
|
5593
5790
|
height: '0px'
|
|
@@ -5639,8 +5836,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
5639
5836
|
transition('hiddenAnimated => visibleAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),
|
|
5640
5837
|
transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
5641
5838
|
])
|
|
5642
|
-
], template: "<ng-container>\n <div *ngIf=\"root && item.visible !== false\" class=\"layout-menuitem-root-text\">{{ item.label | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false\"\n [attr.href]=\"item.
|
|
5643
|
-
}], ctorParameters: function () { return [{ type: i1.Router }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; }, propDecorators: { item: [{
|
|
5839
|
+
], 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" }]
|
|
5840
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; }, propDecorators: { item: [{
|
|
5644
5841
|
type: Input
|
|
5645
5842
|
}], index: [{
|
|
5646
5843
|
type: Input
|
|
@@ -5811,7 +6008,7 @@ class MngTableviewComponent {
|
|
|
5811
6008
|
}
|
|
5812
6009
|
}
|
|
5813
6010
|
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.MessageService }, { token: i2$2.TranslateService }, { token: i2.DialogService }, { token: i2$1.ConfirmationService }, { token: MngActionService }, { token: TableviewComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5814
|
-
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, TableviewComponentService], 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 [descriptor]=\"descriptor.table\" [dataProvider]=\"dataProvider\" [useQueryParams]=\"true\" (cellClick)=\"onTableCellClick($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-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: i7$1.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: i8$
|
|
6011
|
+
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, TableviewComponentService], 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 [descriptor]=\"descriptor.table\" [dataProvider]=\"dataProvider\" [useQueryParams]=\"true\" (cellClick)=\"onTableCellClick($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-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: i7$1.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: i8$1.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionEnabled"], outputs: ["tableLoad", "cellClick", "selectionChange"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.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": i2$2.TranslatePipe } });
|
|
5815
6012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
5816
6013
|
type: Component,
|
|
5817
6014
|
args: [{ selector: 'mng-tableview', providers: [MessageService, ConfirmationService, TableviewComponentService], 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 [descriptor]=\"descriptor.table\" [dataProvider]=\"dataProvider\" [useQueryParams]=\"true\" (cellClick)=\"onTableCellClick($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-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" }]
|
|
@@ -5965,6 +6162,15 @@ const formlyTypesConfig = [
|
|
|
5965
6162
|
}
|
|
5966
6163
|
}
|
|
5967
6164
|
},
|
|
6165
|
+
{
|
|
6166
|
+
name: 'mask',
|
|
6167
|
+
extends: 'input',
|
|
6168
|
+
defaultOptions: {
|
|
6169
|
+
templateOptions: {
|
|
6170
|
+
type: 'mask'
|
|
6171
|
+
}
|
|
6172
|
+
}
|
|
6173
|
+
},
|
|
5968
6174
|
{
|
|
5969
6175
|
name: 'dropdown',
|
|
5970
6176
|
component: MngFormlyFieldDropdownComponent,
|
|
@@ -6121,6 +6327,7 @@ const declarations = [
|
|
|
6121
6327
|
MngTemplateDirective,
|
|
6122
6328
|
// pipes
|
|
6123
6329
|
MngPropertyPathPipe,
|
|
6330
|
+
MngEnumPipe,
|
|
6124
6331
|
MngBooleanPipe,
|
|
6125
6332
|
MngI18nPropertyPipe,
|
|
6126
6333
|
// layout components
|
|
@@ -6213,6 +6420,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
6213
6420
|
MngTemplateDirective,
|
|
6214
6421
|
// pipes
|
|
6215
6422
|
MngPropertyPathPipe,
|
|
6423
|
+
MngEnumPipe,
|
|
6216
6424
|
MngBooleanPipe,
|
|
6217
6425
|
MngI18nPropertyPipe,
|
|
6218
6426
|
// layout components
|
|
@@ -6325,6 +6533,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
6325
6533
|
MngTemplateDirective,
|
|
6326
6534
|
// pipes
|
|
6327
6535
|
MngPropertyPathPipe,
|
|
6536
|
+
MngEnumPipe,
|
|
6328
6537
|
MngBooleanPipe,
|
|
6329
6538
|
MngI18nPropertyPipe,
|
|
6330
6539
|
// layout components
|
|
@@ -6545,8 +6754,12 @@ class RoutesBuilder {
|
|
|
6545
6754
|
addRouteRedirect(path, redirectTo, pathMatch = 'prefix') {
|
|
6546
6755
|
return this.addRouteBuilder(RouteBuilder.createRedirect(path, redirectTo, pathMatch));
|
|
6547
6756
|
}
|
|
6548
|
-
addLazyRoute(path, loadChildren) {
|
|
6549
|
-
|
|
6757
|
+
addLazyRoute(path, loadChildren, canLoad) {
|
|
6758
|
+
const route = { path: path, loadChildren: loadChildren };
|
|
6759
|
+
if (canLoad === null || canLoad === void 0 ? void 0 : canLoad.length) {
|
|
6760
|
+
route.canLoad = canLoad;
|
|
6761
|
+
}
|
|
6762
|
+
return this.addRouteBuilder(RouteBuilder.createFromRoute(route));
|
|
6550
6763
|
}
|
|
6551
6764
|
addRoute(path, component) {
|
|
6552
6765
|
return this.addRouteBuilder(RouteBuilder.create(path, component));
|
|
@@ -6687,11 +6900,32 @@ class RouteBuilder {
|
|
|
6687
6900
|
this.withBreadcrumb(title);
|
|
6688
6901
|
return this;
|
|
6689
6902
|
}
|
|
6903
|
+
withCanActivate(diToken) {
|
|
6904
|
+
if (!this.route.canActivate) {
|
|
6905
|
+
this.route.canActivate = [];
|
|
6906
|
+
}
|
|
6907
|
+
this.route.canActivate.push(diToken);
|
|
6908
|
+
return this;
|
|
6909
|
+
}
|
|
6910
|
+
withCanDeactivate(diToken) {
|
|
6911
|
+
if (!this.route.canDeactivate) {
|
|
6912
|
+
this.route.canDeactivate = [];
|
|
6913
|
+
}
|
|
6914
|
+
this.route.canDeactivate.push(diToken);
|
|
6915
|
+
return this;
|
|
6916
|
+
}
|
|
6917
|
+
withResolver(diToken, name) {
|
|
6918
|
+
if (!this.route.resolve) {
|
|
6919
|
+
this.route.resolve = {};
|
|
6920
|
+
}
|
|
6921
|
+
this.route.resolve[name] = diToken;
|
|
6922
|
+
return this;
|
|
6923
|
+
}
|
|
6690
6924
|
withData(data) {
|
|
6691
6925
|
this.route.data = data;
|
|
6692
6926
|
return this;
|
|
6693
6927
|
}
|
|
6694
|
-
|
|
6928
|
+
withMngMenuItem(menuItem) {
|
|
6695
6929
|
this.menuItem = menuItem;
|
|
6696
6930
|
return this;
|
|
6697
6931
|
}
|
|
@@ -6762,35 +6996,62 @@ class RouteBuilder {
|
|
|
6762
6996
|
}
|
|
6763
6997
|
}
|
|
6764
6998
|
}
|
|
6999
|
+
if (this.route.canActivate) {
|
|
7000
|
+
angularRoute.canActivate = [...this.route.canActivate];
|
|
7001
|
+
}
|
|
7002
|
+
if (this.route.canActivateChild) {
|
|
7003
|
+
angularRoute.canActivateChild = [...this.route.canActivateChild];
|
|
7004
|
+
}
|
|
7005
|
+
if (this.route.canLoad) {
|
|
7006
|
+
angularRoute.canLoad = [...this.route.canLoad];
|
|
7007
|
+
}
|
|
7008
|
+
if (this.route.canDeactivate) {
|
|
7009
|
+
angularRoute.canDeactivate = [...this.route.canDeactivate];
|
|
7010
|
+
}
|
|
7011
|
+
if (this.route.resolve) {
|
|
7012
|
+
angularRoute.resolve = Object.assign({}, this.route.resolve);
|
|
7013
|
+
}
|
|
6765
7014
|
return angularRoute;
|
|
6766
7015
|
}
|
|
6767
7016
|
buildMenu() {
|
|
6768
7017
|
var _a, _b;
|
|
6769
|
-
const
|
|
7018
|
+
const menuItemBuild = this.menuItem ? Object.assign({}, this.menuItem) : null;
|
|
6770
7019
|
const routeChildrenMenuItems = this.children.flatMap(child => child.buildMenu());
|
|
6771
7020
|
const menuItemChildren = [];
|
|
6772
|
-
const
|
|
6773
|
-
if (
|
|
6774
|
-
|
|
7021
|
+
const menuItemChildrenBuild = [];
|
|
7022
|
+
if (menuItemBuild === null || menuItemBuild === void 0 ? void 0 : menuItemBuild.items) {
|
|
7023
|
+
menuItemChildrenBuild.push(...menuItemBuild.items);
|
|
6775
7024
|
}
|
|
6776
7025
|
for (const menuItemChild of this.menuItemChildren) {
|
|
6777
7026
|
const finalMenuItemChild = Object.assign({}, menuItemChild);
|
|
6778
7027
|
if (!finalMenuItemChild.routerLink) {
|
|
6779
7028
|
finalMenuItemChild.routerLink = this.routePath;
|
|
6780
7029
|
}
|
|
7030
|
+
if (typeof finalMenuItemChild.routerLink === 'string') {
|
|
7031
|
+
finalMenuItemChild.routerLink = [finalMenuItemChild.routerLink];
|
|
7032
|
+
}
|
|
6781
7033
|
finalMenuItemChild.routerLink = RouteUtil.removeEmptyPathSegments(finalMenuItemChild.routerLink);
|
|
6782
7034
|
menuItemChildren.push(finalMenuItemChild);
|
|
6783
7035
|
}
|
|
6784
|
-
|
|
6785
|
-
if (!
|
|
6786
|
-
return
|
|
7036
|
+
menuItemChildrenBuild.push(...menuItemChildren, ...routeChildrenMenuItems);
|
|
7037
|
+
if (!menuItemBuild) {
|
|
7038
|
+
return menuItemChildrenBuild;
|
|
6787
7039
|
}
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
menuItem.items = finalMenuItemChildren;
|
|
7040
|
+
menuItemBuild.label = (_a = menuItemBuild.label) !== null && _a !== void 0 ? _a : this.pageTitle;
|
|
7041
|
+
if (typeof menuItemBuild.routerLink === 'string') {
|
|
7042
|
+
menuItemBuild.routerLink = [menuItemBuild.routerLink];
|
|
6792
7043
|
}
|
|
6793
|
-
|
|
7044
|
+
menuItemBuild.routerLink = RouteUtil.removeEmptyPathSegments((_b = menuItemBuild.routerLink) !== null && _b !== void 0 ? _b : this.routePath);
|
|
7045
|
+
if (menuItemChildrenBuild.length > 0) {
|
|
7046
|
+
menuItemBuild.items = menuItemChildrenBuild;
|
|
7047
|
+
}
|
|
7048
|
+
if (!menuItemBuild.guards) {
|
|
7049
|
+
const guards = this.findMenuItemGuards();
|
|
7050
|
+
if (guards.length > 0) {
|
|
7051
|
+
menuItemBuild.guards = guards;
|
|
7052
|
+
}
|
|
7053
|
+
}
|
|
7054
|
+
return [menuItemBuild];
|
|
6794
7055
|
}
|
|
6795
7056
|
createMenuItem(icon, label, routerLink) {
|
|
6796
7057
|
const menuItem = {};
|
|
@@ -6808,13 +7069,31 @@ class RouteBuilder {
|
|
|
6808
7069
|
adjustMenuRouterLinksFromBuilder(menuItems) {
|
|
6809
7070
|
for (const menuItem of menuItems) {
|
|
6810
7071
|
if (menuItem.routerLink) {
|
|
6811
|
-
menuItem.routerLink = RouteUtil.appendPathToBasePath(this.routePath, menuItem.routerLink);
|
|
7072
|
+
menuItem.routerLink = RouteUtil.appendPathToBasePath(this.routePath, typeof menuItem.routerLink === 'string' ? [menuItem.routerLink] : menuItem.routerLink);
|
|
6812
7073
|
}
|
|
6813
7074
|
if (Array.isArray(menuItem.items)) {
|
|
6814
7075
|
this.adjustMenuRouterLinksFromBuilder(menuItem.items);
|
|
6815
7076
|
}
|
|
6816
7077
|
}
|
|
6817
7078
|
}
|
|
7079
|
+
findMenuItemGuards() {
|
|
7080
|
+
var _a;
|
|
7081
|
+
const guards = [];
|
|
7082
|
+
if ((_a = this.route.canActivate) === null || _a === void 0 ? void 0 : _a.length) {
|
|
7083
|
+
guards.push(...this.route.canActivate);
|
|
7084
|
+
}
|
|
7085
|
+
if (this.parent) {
|
|
7086
|
+
// Check for parent guards that should be included in decision to hide menu item!
|
|
7087
|
+
// Some parent routes might have guards, but no menu items, so this guards must be taken into account here,
|
|
7088
|
+
// because there is no parent menu item to hide.
|
|
7089
|
+
this.parent.findMenuItemGuards().forEach(g => {
|
|
7090
|
+
if (guards.indexOf(g) < 0) {
|
|
7091
|
+
guards.push(g);
|
|
7092
|
+
}
|
|
7093
|
+
});
|
|
7094
|
+
}
|
|
7095
|
+
return guards;
|
|
7096
|
+
}
|
|
6818
7097
|
}
|
|
6819
7098
|
|
|
6820
7099
|
/*
|
|
@@ -6825,5 +7104,5 @@ class RouteBuilder {
|
|
|
6825
7104
|
* Generated bundle index. Do not edit.
|
|
6826
7105
|
*/
|
|
6827
7106
|
|
|
6828
|
-
export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusQueryResultBase, MediusQueryResultWithObject, MediusRestUtil, MngActionComponent, MngActionDialogComponent, MngActionRouteComponent, MngActionService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngPropertyPathPipe, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, ModelDescriptor, ModelUtil, ObjectSerializer, RouteBuilder, RoutesBuilder, TableDescriptor, TableviewComponentService, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
|
|
7107
|
+
export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, 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, MediusQueryResultBase, MediusQueryResultWithObject, MediusRestUtil, MngActionComponent, MngActionDialogComponent, MngActionRouteComponent, MngActionService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngPropertyPathPipe, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, ModelDescriptor, ModelUtil, ObjectSerializer, RouteBuilder, RoutesBuilder, TableDescriptor, TableviewComponentService, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
|
|
6829
7108
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|