@mediusinc/mng-commons 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +46 -0
  2. package/assets/i18n/en.json +202 -151
  3. package/assets/i18n/sl.json +202 -151
  4. package/esm2020/lib/api/utils/object-serializer.util.mjs +12 -7
  5. package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +2 -2
  6. package/esm2020/lib/components/form/editor/form-editor.component.mjs +1 -1
  7. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  8. package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
  9. package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +1 -1
  10. package/esm2020/lib/components/tableview/table/table.component.mjs +5 -4
  11. package/esm2020/lib/components/tableview/tableview.component.mjs +1 -1
  12. package/esm2020/lib/data-providers/base.data-provider.mjs +1 -8
  13. package/esm2020/lib/descriptors/editor.descriptor.mjs +87 -66
  14. package/esm2020/lib/descriptors/table.descriptor.mjs +51 -42
  15. package/esm2020/lib/descriptors/tableview.descriptor.mjs +6 -6
  16. package/esm2020/lib/mng-commons.module.mjs +5 -2
  17. package/esm2020/lib/models/enum.model.mjs +2 -0
  18. package/esm2020/lib/models/index.mjs +2 -1
  19. package/esm2020/lib/pipes/i18n-property.pipe.mjs +18 -0
  20. package/esm2020/lib/pipes/index.mjs +2 -1
  21. package/esm2020/lib/types/type.decorator.mjs +7 -1
  22. package/esm2020/lib/types/type.model.mjs +1 -1
  23. package/esm2020/lib/utils/editor-formly.util.mjs +4 -1
  24. package/esm2020/lib/utils/enum.util.mjs +61 -0
  25. package/esm2020/lib/utils/i18n.util.mjs +38 -26
  26. package/esm2020/lib/utils/index.mjs +2 -1
  27. package/esm2020/lib/utils/type.util.mjs +39 -2
  28. package/fesm2015/mediusinc-mng-commons.mjs +321 -154
  29. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  30. package/fesm2020/mediusinc-mng-commons.mjs +320 -154
  31. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  32. package/lib/api/utils/object-serializer.util.d.ts +1 -0
  33. package/lib/data-providers/base.data-provider.d.ts +0 -3
  34. package/lib/descriptors/editor.descriptor.d.ts +32 -27
  35. package/lib/descriptors/table.descriptor.d.ts +15 -12
  36. package/lib/descriptors/tableview.descriptor.d.ts +8 -8
  37. package/lib/mng-commons.module.d.ts +68 -67
  38. package/lib/models/enum.model.d.ts +5 -0
  39. package/lib/models/index.d.ts +1 -0
  40. package/lib/pipes/i18n-property.pipe.d.ts +8 -0
  41. package/lib/pipes/index.d.ts +1 -0
  42. package/lib/types/type.decorator.d.ts +2 -0
  43. package/lib/types/type.model.d.ts +2 -2
  44. package/lib/utils/enum.util.d.ts +39 -0
  45. package/lib/utils/i18n.util.d.ts +6 -2
  46. package/lib/utils/index.d.ts +1 -0
  47. package/lib/utils/type.util.d.ts +22 -1
  48. package/package.json +2 -2
  49. package/scss/mng-overrides/_layout_forms.scss +5 -0
@@ -22,6 +22,7 @@ export declare class ObjectSerializer {
22
22
  registerTypes(types: SerializableTypeMap): void;
23
23
  registerType(type: ClassType<any>, optTypeName?: string): void;
24
24
  registerEnums(enums: SerializableTypeMap): void;
25
+ registerEnum(enumType: any, enumName: string): void;
25
26
  findCorrectType(data: any, expectedType: string): any;
26
27
  serializeClass<T>(data: any, type: ClassType<T>): any;
27
28
  serialize(data: any, type: string): any;
@@ -7,11 +7,8 @@ export interface IDataProvider<T, S> {
7
7
  export declare class DataProvider<T, S> {
8
8
  protected _modelType: ClassType<T> | null;
9
9
  protected _serviceType?: Type<S>;
10
- protected _enumName?: string;
11
10
  constructor(modelType: ClassType<T> | null, serviceType?: Type<S>);
12
11
  get serviceType(): Type<S> | undefined;
13
12
  get modelType(): ClassType<T> | null;
14
- get enumName(): string | undefined;
15
13
  withServiceType(type: Type<S>): this;
16
- withEnumName(enumName: string): this;
17
14
  }
@@ -4,7 +4,8 @@ import { FormlyFieldConfig } from '@ngx-formly/core';
4
4
  import { Observable } from 'rxjs';
5
5
  import { MediusQueryParam, MediusQueryResult } from '../api/models';
6
6
  import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
7
- import { ClassType, EnumMemberType } from '../types';
7
+ import { EnumValue } from '../models';
8
+ import { ClassType, EnumConstantType, EnumType } from '../types';
8
9
  import { FieldValidator, ILookupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
9
10
  export declare class EditorDescriptor<T> {
10
11
  static readonly defaultGroupName = "_default";
@@ -14,27 +15,27 @@ export declare class EditorDescriptor<T> {
14
15
  private readonly _fields;
15
16
  private _currentTabGroup?;
16
17
  private _currentGroup?;
17
- private _disabled;
18
18
  constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
19
+ private _disabled;
20
+ get disabled(): boolean;
19
21
  get model(): ModelDescriptor<T>;
20
22
  get tabs(): FieldTabGroupDescriptor<T>[];
21
- get disabled(): boolean;
22
23
  get fields(): AFieldDescriptor<any, T>[];
23
24
  createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T>;
24
- createFieldGroup(name: string, title?: string): FieldGroupDescriptor<T>;
25
+ createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<T>;
25
26
  addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this;
26
27
  addField(property: string): FieldInputDescriptor<T>;
27
28
  removeField(property: string): this;
28
29
  getField(property: string): AFieldDescriptor<any, T> | null;
29
30
  addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T>;
30
- addFieldLookupEnum(property: string, options: Array<EnumMemberType>): FieldLookupEnumDescriptor<T>;
31
+ addFieldLookupEnum(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null): FieldLookupEnumDescriptor<T>;
31
32
  addFieldManyEditor<FT>(property: string, type: ClassType<FT>, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
32
33
  addFieldManyToManyEditor<FT>(property: string, type: ClassType<FT>, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
33
34
  withDisabled(disabled?: boolean): this;
34
35
  addValidator(name: string, expression: (control: AbstractControl) => boolean): void;
35
36
  copy(): EditorDescriptor<T>;
36
- private createTabGroupDescriptor;
37
37
  createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<T>): this;
38
+ private createTabGroupDescriptor;
38
39
  private createDefaultGroup;
39
40
  private createDefaultTabGroup;
40
41
  }
@@ -50,28 +51,31 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
50
51
  protected _placeholder?: string;
51
52
  protected _required: boolean;
52
53
  protected _disabled: boolean;
54
+ protected _defaultValue?: T;
53
55
  protected _className: string;
54
56
  protected _getter?: (item: ET) => T;
55
57
  protected _setter?: (item: ET, value: T) => void;
56
58
  protected _validators: Array<FieldValidator>;
57
59
  protected _disabledFunction?: (model: any) => boolean;
58
60
  protected constructor(editor: EditorDescriptor<ET>, property: string);
59
- abstract copy(): AFieldDescriptor<T, ET>;
60
- get property(): string;
61
61
  get group(): AFieldGroupDescriptor<ET> | undefined;
62
62
  get label(): string | undefined;
63
63
  get placeholder(): string | undefined;
64
64
  get required(): boolean;
65
65
  get disabled(): boolean;
66
+ get defaultValue(): T | undefined;
66
67
  get className(): string;
67
68
  get getter(): ((item: ET) => T) | undefined;
68
69
  get setter(): ((item: ET, value: T) => void) | undefined;
69
70
  get validators(): FieldValidator[];
70
71
  get disabledFunction(): ((model: any) => boolean) | undefined;
72
+ get property(): string;
73
+ abstract copy(): AFieldDescriptor<T, ET>;
71
74
  withLabel(label: string): this;
72
75
  withPlaceholder(placeholder: string): this;
73
76
  withRequired(required?: boolean): this;
74
77
  withDisabled(disabled?: boolean, disabledFunction?: (model: any) => boolean): this;
78
+ withDefaultValue(defaultValue: T): this;
75
79
  withClassName(className: string): this;
76
80
  withGetter(getter: (item: ET) => T): this;
77
81
  withSetter(setter: (item: ET, value: T) => void): this;
@@ -96,13 +100,13 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
96
100
  private _pattern?;
97
101
  constructor(editor: EditorDescriptor<ET>, property: string);
98
102
  get fieldType(): FieldInputDescriptor.TypeEnum;
99
- get numberStep(): number | undefined;
103
+ get rows(): number | undefined;
100
104
  get numberMin(): number | undefined;
101
105
  get numberMax(): number | undefined;
102
- get rows(): number | undefined;
106
+ get numberStep(): number | undefined;
103
107
  get numberMinFractionDigits(): number | undefined;
104
108
  get numberMaxFractionDigits(): number | undefined;
105
- get radioOptions(): string[];
109
+ get radioOptions(): EnumValue<string | number | boolean | Date>[];
106
110
  get datePickerFormat(): string | undefined;
107
111
  get datePickerMin(): Date | undefined;
108
112
  get datePickerMax(): Date | undefined;
@@ -114,7 +118,8 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
114
118
  asTextarea(rows?: number, minLength?: number, maxLength?: number, pattern?: string | RegExp): this;
115
119
  asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number): this;
116
120
  asSwitch(): this;
117
- asRadio(options: Array<string>): this;
121
+ asRadio(options: Array<string | number>, optionsTitlePath?: string): this;
122
+ asRadioFromEnum(enumType: EnumType, optionsTitlePath?: string | null, values?: Array<EnumConstantType>, nameAsValue?: boolean): this;
118
123
  asDatePicker(format?: string, min?: Date, max?: Date, showTime?: boolean): this;
119
124
  copy(): FieldInputDescriptor<ET>;
120
125
  }
@@ -136,12 +141,12 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
136
141
  protected _dataKeyProperty?: string;
137
142
  protected _dataProvider?: ILookupDataProvider<T, any>;
138
143
  constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T> | null);
139
- get modelType(): ClassType<T> | null;
140
144
  get lookupType(): FieldLookupDescriptor.LookupTypeEnum;
141
145
  get itemsLabelProperty(): string | undefined;
142
146
  get itemsValueProperty(): string | undefined;
143
147
  get dataKeyProperty(): string | undefined;
144
148
  get dataProvider(): ILookupDataProvider<T, any> | undefined;
149
+ get modelType(): ClassType<T> | null;
145
150
  withItemsLabelProperty(itemsLabelProperty: string): this;
146
151
  withItemsValueProperty(itemsValueProperty: string): this;
147
152
  withDataKeyProperty(property: string): this;
@@ -156,10 +161,10 @@ export declare namespace FieldLookupDescriptor {
156
161
  Autocomplete = 1
157
162
  }
158
163
  }
159
- export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumMemberType, ET> {
160
- private readonly _enumName;
161
- constructor(editor: EditorDescriptor<ET>, property: string, enumName: string, options: Array<EnumMemberType>);
162
- get enumName(): string;
164
+ export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumValue<string | number>, ET> {
165
+ private readonly _enumType;
166
+ constructor(editor: EditorDescriptor<ET>, property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null);
167
+ get enumType(): EnumType;
163
168
  copy(): FieldLookupEnumDescriptor<ET>;
164
169
  }
165
170
  export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
@@ -173,14 +178,14 @@ export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescri
173
178
  private _excludeFilterProperty;
174
179
  private _excludeValueProperty;
175
180
  constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, mainTableDescriptor: TableDescriptor<T>, lookupTableDescriptor: TableDescriptor<T>);
176
- get mainTableDescriptor(): TableDescriptor<T>;
177
- get lookupTableDescriptor(): TableDescriptor<T>;
181
+ get fieldType(): FieldManyToManyEditorDescriptor.TypeEnum;
178
182
  get lookupTableDataProvider(): ITableDataProvider<T, any> | null;
179
183
  get actions(): FieldManyToManyEditorDescriptor.ActionEnum[];
180
- get fieldType(): FieldManyToManyEditorDescriptor.TypeEnum;
181
184
  get hasLookupExcludeValues(): boolean;
182
185
  get excludeFilterProperty(): string;
183
186
  get excludeValueProperty(): string;
187
+ get mainTableDescriptor(): TableDescriptor<T>;
188
+ get lookupTableDescriptor(): TableDescriptor<T>;
184
189
  withLookup<S>(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>, serviceType?: Type<S>): this;
185
190
  withLookupDataProvider(dataProvider: ITableDataProvider<T, any>): this;
186
191
  withActions(actions?: Array<FieldManyToManyEditorDescriptor.ActionEnum>): this;
@@ -202,13 +207,13 @@ export declare class FieldManyEditorDescriptor<T, ET> extends AFieldDescriptor<T
202
207
  private _fieldType;
203
208
  private _actions;
204
209
  constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, tableviewDescriptor: TableviewDescriptor<T>);
210
+ get fieldType(): FieldManyEditorDescriptor.TypeEnum;
211
+ get actions(): FieldManyEditorDescriptor.ActionEnum[];
205
212
  get tableviewDescriptor(): TableviewDescriptor<T>;
206
213
  get tableDescriptor(): TableDescriptor<T>;
207
214
  get editorForCreate(): EditorDescriptor<T>;
208
215
  get editorForRead(): EditorDescriptor<T>;
209
216
  get editorForUpdate(): EditorDescriptor<T>;
210
- get fieldType(): FieldManyEditorDescriptor.TypeEnum;
211
- get actions(): FieldManyEditorDescriptor.ActionEnum[];
212
217
  withActions(actions?: Array<FieldManyToManyEditorDescriptor.ActionEnum>): this;
213
218
  copy(): FieldManyEditorDescriptor<T, ET>;
214
219
  }
@@ -229,15 +234,15 @@ export declare abstract class AFieldGroupDescriptor<ET> extends AGenericFieldDes
229
234
  protected _fields: AGenericFieldDescriptor<ET>[];
230
235
  protected _validators: Array<FieldValidator>;
231
236
  protected constructor(editor: EditorDescriptor<ET>, name: string);
237
+ get title(): string | undefined;
232
238
  abstract get fields(): AGenericFieldDescriptor<ET>[];
233
- abstract groupName(): string;
234
- abstract addField(field: AGenericFieldDescriptor<ET>): this;
235
- abstract copy(): AFieldGroupDescriptor<ET>;
239
+ get validators(): FieldValidator[];
236
240
  get baseName(): string;
237
241
  get name(): string;
238
242
  get default(): boolean;
239
- get title(): string | undefined;
240
- get validators(): FieldValidator[];
243
+ abstract groupName(): string;
244
+ abstract addField(field: AGenericFieldDescriptor<ET>): this;
245
+ abstract copy(): AFieldGroupDescriptor<ET>;
241
246
  withTitle(title: string): this;
242
247
  withValidator(name: string, expression: (control: AbstractControl) => boolean): this;
243
248
  }
@@ -11,6 +11,7 @@ export declare class TableDescriptor<T> {
11
11
  private _paginationMode;
12
12
  private _columns;
13
13
  private _title?;
14
+ private _hideHeader;
14
15
  private _dataKeyProperty?;
15
16
  private _hasDefaultSort;
16
17
  private _defaultSortProperty;
@@ -18,17 +19,18 @@ export declare class TableDescriptor<T> {
18
19
  private _rowHeight;
19
20
  private _tableFullHeightOffset;
20
21
  constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
21
- get model(): ModelDescriptor<T>;
22
22
  get filterDisplay(): TableDescriptor.FilterDisplayEnum;
23
23
  get paginationMode(): TableDescriptor.PaginationModeEnum;
24
24
  get columns(): ColumnDescriptor<any, T>[];
25
25
  get title(): string | undefined;
26
+ get hideHeader(): boolean;
26
27
  get dataKeyProperty(): string | undefined;
27
28
  get hasDefaultSort(): boolean;
28
29
  get defaultSortProperty(): string[];
29
30
  get defaultSortAsc(): boolean[];
30
31
  get rowHeight(): number;
31
32
  get tableFullHeightOffset(): number;
33
+ get model(): ModelDescriptor<T>;
32
34
  addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T>;
33
35
  addColumn(property: string): ColumnDescriptor<string, T>;
34
36
  addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
@@ -38,12 +40,13 @@ export declare class TableDescriptor<T> {
38
40
  withFilterDisplay(filterDisplayType: TableDescriptor.FilterDisplayEnum): this;
39
41
  withPaginationMode(paginationMode: TableDescriptor.PaginationModeEnum): this;
40
42
  withTitle(title: string): TableDescriptor<T>;
43
+ withHideHeader(hideHeader?: boolean): this;
41
44
  withDataKeyProperty(property: string): TableDescriptor<T>;
42
45
  withDefaultSort(property: string, asc?: boolean): TableDescriptor<T>;
43
46
  withRowHeight(rowHeight: number): TableDescriptor<T>;
44
47
  withTableFullHeightOffset(tableFullHeightOffset: number): TableDescriptor<T>;
45
- private setDataKeyFromColumn;
46
48
  copy(): TableDescriptor<T>;
49
+ private setDataKeyFromColumn;
47
50
  }
48
51
  export declare namespace TableDescriptor {
49
52
  enum PaginationModeEnum {
@@ -66,15 +69,15 @@ export declare class ColumnDescriptor<T, TT> {
66
69
  private _filterDescriptor?;
67
70
  private _displayFormat?;
68
71
  constructor(table: TableDescriptor<TT>, property: string);
69
- get table(): TableDescriptor<TT>;
70
- get property(): string;
71
72
  get modelType(): ClassType<T> | null;
72
- get displayPropertyPath(): string | undefined;
73
+ get columnType(): ColumnDescriptor.TypeEnum;
73
74
  get title(): string | undefined;
75
+ get displayPropertyPath(): string | undefined;
74
76
  get isSortEnabled(): boolean;
75
- get columnType(): ColumnDescriptor.TypeEnum;
76
77
  get filterDescriptor(): FilterDescriptor<T> | undefined;
77
78
  get displayFormat(): string | undefined;
79
+ get table(): TableDescriptor<TT>;
80
+ get property(): string;
78
81
  asType(type?: ColumnDescriptor.TypeEnum): this;
79
82
  asNumber(displayFormat?: string): this;
80
83
  asDate(displayFormat?: string): this;
@@ -103,12 +106,12 @@ export declare class FilterDescriptor<T> {
103
106
  protected _placeholder?: string;
104
107
  protected _className: string;
105
108
  constructor(property: string);
106
- get property(): string;
107
109
  get filterType(): FilterDescriptor.TypeEnum;
108
110
  get filterProperty(): string | undefined;
109
111
  get matchModes(): string[] | null;
110
112
  get placeholder(): string | undefined;
111
113
  get className(): string;
114
+ get property(): string;
112
115
  asFilterType(filterType: ColumnDescriptor.TypeEnum): this;
113
116
  /**
114
117
  * Sets different filter property name instead of default property. Use this if API requires different property provided to perform correct filter.
@@ -118,8 +121,8 @@ export declare class FilterDescriptor<T> {
118
121
  withPlaceholder(placeholder: string): this;
119
122
  withClassName(className: string): this;
120
123
  withMatchModes(matchModes: Array<FilterDescriptor.MatchModeEnum>): this;
121
- protected copyFieldsTo(descriptor: FilterDescriptor<T>): void;
122
124
  copy(): FilterDescriptor<T>;
125
+ protected copyFieldsTo(descriptor: FilterDescriptor<T>): void;
123
126
  }
124
127
  export declare namespace FilterDescriptor {
125
128
  enum TypeEnum {
@@ -157,24 +160,24 @@ export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> imple
157
160
  private _multiselect;
158
161
  protected _dropdownClassName: string;
159
162
  constructor(property: string, modelType: ClassType<T> | null);
160
- get modelType(): ClassType<T> | null;
161
163
  get lookupType(): FilterLookupDescriptor.LookupTypeEnum | undefined;
164
+ get dataProvider(): ILookupDataProvider<T, any> | undefined;
162
165
  get itemsLabelProperty(): string | undefined;
163
166
  get itemsValueProperty(): string | undefined;
164
167
  get dataKeyProperty(): string | undefined;
165
- get dataProvider(): ILookupDataProvider<T, any> | undefined;
166
168
  get multiselect(): boolean;
169
+ get dropdownClassName(): string;
170
+ get modelType(): ClassType<T> | null;
167
171
  withItemsLabelProperty(itemsLabelProperty: string): this;
168
172
  withItemsValueProperty(itemsValueProperty: string): this;
169
173
  withDataKeyProperty(dataKeyProperty: string): this;
170
- get dropdownClassName(): string;
171
174
  withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
172
175
  withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
173
176
  withMultiselect(multiselect?: boolean): this;
174
177
  withDropdownClassName(dropdownClassName: string): this;
175
178
  asAutocomplete(): this;
176
- protected copyFieldsTo(descriptor: FilterLookupDescriptor<T>): void;
177
179
  copy(): FilterLookupDescriptor<T>;
180
+ protected copyFieldsTo(descriptor: FilterLookupDescriptor<T>): void;
178
181
  }
179
182
  export declare namespace FilterLookupDescriptor {
180
183
  enum LookupTypeEnum {
@@ -1,20 +1,20 @@
1
1
  import { AbstractControl } from '@angular/forms';
2
- import { ClassType, EnumMemberType } from '../types';
2
+ import { ClassType, EnumConstantType, EnumType } from '../types';
3
3
  import { AFieldDescriptor, ColumnDescriptor, EditorDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, ModelDescriptor, TableDescriptor } from './';
4
4
  export declare class TableviewDescriptor<T> {
5
5
  private readonly _model;
6
- private _table;
7
- private _viewEditor;
8
- private _addEditor;
9
- private _editEditor;
10
- private _tableTitle;
11
6
  constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
12
- get model(): ModelDescriptor<T>;
7
+ private _table;
13
8
  get table(): TableDescriptor<T>;
9
+ private _viewEditor;
14
10
  get viewEditor(): EditorDescriptor<T>;
11
+ private _addEditor;
15
12
  get addEditor(): EditorDescriptor<T>;
13
+ private _editEditor;
16
14
  get editEditor(): EditorDescriptor<T>;
15
+ private _tableTitle;
17
16
  get tableTitle(): string;
17
+ get model(): ModelDescriptor<T>;
18
18
  withTableDescriptor(descriptor: TableDescriptor<T>): this;
19
19
  withViewDescriptor(descriptor: EditorDescriptor<T>): this;
20
20
  withAddDescriptor(descriptor: EditorDescriptor<T>): this;
@@ -32,7 +32,7 @@ export declare class TableviewDescriptor<T> {
32
32
  addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this;
33
33
  addField(property: string): FieldInputDescriptor<T>;
34
34
  addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T>;
35
- addFieldLookupEnum(property: string, options: Array<EnumMemberType>): FieldLookupEnumDescriptor<T>;
35
+ addFieldLookupEnum(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null): FieldLookupEnumDescriptor<T>;
36
36
  addFieldManyEditor<FT>(property: string, type: ClassType<FT>, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
37
37
  addFieldManyToManyEditor<FT>(property: string, type: ClassType<FT>, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
38
38
  copy(): TableviewDescriptor<T>;
@@ -6,76 +6,77 @@ import * as i1 from "./directives/component.directive";
6
6
  import * as i2 from "./directives/template.directive";
7
7
  import * as i3 from "./pipes/property-path.pipe";
8
8
  import * as i4 from "./pipes/boolean.pipe";
9
- import * as i5 from "./components/layout/breadcrumb.component";
10
- import * as i6 from "./components/layout/footer.component";
11
- import * as i7 from "./components/layout/main-layout.component";
12
- import * as i8 from "./components/layout/menu.component";
13
- import * as i9 from "./components/layout/menu-item.component";
14
- import * as i10 from "./components/layout/topbar.component";
15
- import * as i11 from "./components/form/autocomplete/autocomplete.component";
16
- import * as i12 from "./components/form/dropdown/dropdown.component";
17
- import * as i13 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
18
- import * as i14 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
19
- import * as i15 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
20
- import * as i16 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
21
- import * as i17 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
22
- import * as i18 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
23
- import * as i19 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
24
- import * as i20 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
25
- import * as i21 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
26
- import * as i22 from "./components/tableview/table/table.component";
27
- import * as i23 from "./components/tableview/tableview.component";
28
- import * as i24 from "./components/tableview/table/column-value/column-value.component";
29
- import * as i25 from "./components/tableview/table/column-filter/column-filter.component";
30
- import * as i26 from "./components/tableview/route/tableview-route.component";
31
- import * as i27 from "./components/form/editor/form-editor.component";
32
- import * as i28 from "./components/action/action.component";
33
- import * as i29 from "./components/action/dialog/action-dialog.component";
34
- import * as i30 from "./components/action/route/action-route.component";
35
- import * as i31 from "@angular/common";
36
- import * as i32 from "@angular/router";
37
- import * as i33 from "@angular/common/http";
38
- import * as i34 from "@angular/forms";
39
- import * as i35 from "@ngx-translate/core";
40
- import * as i36 from "@ngx-formly/core";
41
- import * as i37 from "primeng/autocomplete";
42
- import * as i38 from "primeng/breadcrumb";
43
- import * as i39 from "primeng/button";
44
- import * as i40 from "primeng/calendar";
45
- import * as i41 from "primeng/card";
46
- import * as i42 from "primeng/checkbox";
47
- import * as i43 from "primeng/chip";
48
- import * as i44 from "primeng/confirmdialog";
49
- import * as i45 from "primeng/confirmpopup";
50
- import * as i46 from "primeng/dialog";
51
- import * as i47 from "primeng/dynamicdialog";
52
- import * as i48 from "primeng/dropdown";
53
- import * as i49 from "primeng/fileupload";
54
- import * as i50 from "primeng/inputnumber";
55
- import * as i51 from "primeng/inputmask";
56
- import * as i52 from "primeng/inputswitch";
57
- import * as i53 from "primeng/inputtext";
58
- import * as i54 from "primeng/inputtextarea";
59
- import * as i55 from "primeng/paginator";
60
- import * as i56 from "primeng/radiobutton";
61
- import * as i57 from "primeng/ripple";
62
- import * as i58 from "primeng/selectbutton";
63
- import * as i59 from "primeng/table";
64
- import * as i60 from "primeng/tag";
65
- import * as i61 from "primeng/toast";
66
- import * as i62 from "primeng/togglebutton";
67
- import * as i63 from "primeng/toolbar";
68
- import * as i64 from "primeng/tooltip";
69
- import * as i65 from "primeng/messages";
70
- import * as i66 from "primeng/progressspinner";
71
- import * as i67 from "primeng/tabview";
72
- import * as i68 from "primeng/fieldset";
73
- import * as i69 from "primeng/multiselect";
74
- import * as i70 from "primeng/skeleton";
9
+ import * as i5 from "./pipes/i18n-property.pipe";
10
+ import * as i6 from "./components/layout/breadcrumb.component";
11
+ import * as i7 from "./components/layout/footer.component";
12
+ import * as i8 from "./components/layout/main-layout.component";
13
+ import * as i9 from "./components/layout/menu.component";
14
+ import * as i10 from "./components/layout/menu-item.component";
15
+ import * as i11 from "./components/layout/topbar.component";
16
+ import * as i12 from "./components/form/autocomplete/autocomplete.component";
17
+ import * as i13 from "./components/form/dropdown/dropdown.component";
18
+ import * as i14 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
19
+ import * as i15 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
20
+ import * as i16 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
21
+ import * as i17 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
22
+ import * as i18 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
23
+ import * as i19 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
24
+ import * as i20 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
25
+ import * as i21 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
26
+ import * as i22 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
27
+ import * as i23 from "./components/tableview/table/table.component";
28
+ import * as i24 from "./components/tableview/tableview.component";
29
+ import * as i25 from "./components/tableview/table/column-value/column-value.component";
30
+ import * as i26 from "./components/tableview/table/column-filter/column-filter.component";
31
+ import * as i27 from "./components/tableview/route/tableview-route.component";
32
+ import * as i28 from "./components/form/editor/form-editor.component";
33
+ import * as i29 from "./components/action/action.component";
34
+ import * as i30 from "./components/action/dialog/action-dialog.component";
35
+ import * as i31 from "./components/action/route/action-route.component";
36
+ import * as i32 from "@angular/common";
37
+ import * as i33 from "@angular/router";
38
+ import * as i34 from "@angular/common/http";
39
+ import * as i35 from "@angular/forms";
40
+ import * as i36 from "@ngx-translate/core";
41
+ import * as i37 from "@ngx-formly/core";
42
+ import * as i38 from "primeng/autocomplete";
43
+ import * as i39 from "primeng/breadcrumb";
44
+ import * as i40 from "primeng/button";
45
+ import * as i41 from "primeng/calendar";
46
+ import * as i42 from "primeng/card";
47
+ import * as i43 from "primeng/checkbox";
48
+ import * as i44 from "primeng/chip";
49
+ import * as i45 from "primeng/confirmdialog";
50
+ import * as i46 from "primeng/confirmpopup";
51
+ import * as i47 from "primeng/dialog";
52
+ import * as i48 from "primeng/dynamicdialog";
53
+ import * as i49 from "primeng/dropdown";
54
+ import * as i50 from "primeng/fileupload";
55
+ import * as i51 from "primeng/inputnumber";
56
+ import * as i52 from "primeng/inputmask";
57
+ import * as i53 from "primeng/inputswitch";
58
+ import * as i54 from "primeng/inputtext";
59
+ import * as i55 from "primeng/inputtextarea";
60
+ import * as i56 from "primeng/paginator";
61
+ import * as i57 from "primeng/radiobutton";
62
+ import * as i58 from "primeng/ripple";
63
+ import * as i59 from "primeng/selectbutton";
64
+ import * as i60 from "primeng/table";
65
+ import * as i61 from "primeng/tag";
66
+ import * as i62 from "primeng/toast";
67
+ import * as i63 from "primeng/togglebutton";
68
+ import * as i64 from "primeng/toolbar";
69
+ import * as i65 from "primeng/tooltip";
70
+ import * as i66 from "primeng/messages";
71
+ import * as i67 from "primeng/progressspinner";
72
+ import * as i68 from "primeng/tabview";
73
+ import * as i69 from "primeng/fieldset";
74
+ import * as i70 from "primeng/multiselect";
75
+ import * as i71 from "primeng/skeleton";
75
76
  export declare const primeNgModules: (typeof InputTextModule)[];
76
77
  export declare class MngCommonsModule {
77
78
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
78
79
  static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
79
- static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngTableviewRouteComponent, typeof i27.MngFormEditorComponent, typeof i28.MngActionComponent, typeof i29.MngActionDialogComponent, typeof i30.MngActionRouteComponent], [typeof i31.CommonModule, typeof i32.RouterModule, typeof i33.HttpClientModule, typeof i34.ReactiveFormsModule, typeof i35.TranslateModule, typeof i36.FormlyModule, typeof i37.AutoCompleteModule, typeof i38.BreadcrumbModule, typeof i39.ButtonModule, typeof i40.CalendarModule, typeof i41.CardModule, typeof i42.CheckboxModule, typeof i43.ChipModule, typeof i44.ConfirmDialogModule, typeof i45.ConfirmPopupModule, typeof i46.DialogModule, typeof i47.DynamicDialogModule, typeof i48.DropdownModule, typeof i49.FileUploadModule, typeof i50.InputNumberModule, typeof i51.InputMaskModule, typeof i52.InputSwitchModule, typeof i53.InputTextModule, typeof i54.InputTextareaModule, typeof i55.PaginatorModule, typeof i56.RadioButtonModule, typeof i57.RippleModule, typeof i58.SelectButtonModule, typeof i59.TableModule, typeof i60.TagModule, typeof i61.ToastModule, typeof i62.ToggleButtonModule, typeof i63.ToolbarModule, typeof i64.TooltipModule, typeof i65.MessagesModule, typeof i66.ProgressSpinnerModule, typeof i67.TabViewModule, typeof i68.FieldsetModule, typeof i69.MultiSelectModule, typeof i70.SkeletonModule], [typeof i37.AutoCompleteModule, typeof i38.BreadcrumbModule, typeof i39.ButtonModule, typeof i40.CalendarModule, typeof i41.CardModule, typeof i42.CheckboxModule, typeof i43.ChipModule, typeof i44.ConfirmDialogModule, typeof i45.ConfirmPopupModule, typeof i46.DialogModule, typeof i47.DynamicDialogModule, typeof i48.DropdownModule, typeof i49.FileUploadModule, typeof i50.InputNumberModule, typeof i51.InputMaskModule, typeof i52.InputSwitchModule, typeof i53.InputTextModule, typeof i54.InputTextareaModule, typeof i55.PaginatorModule, typeof i56.RadioButtonModule, typeof i57.RippleModule, typeof i58.SelectButtonModule, typeof i59.TableModule, typeof i60.TagModule, typeof i61.ToastModule, typeof i62.ToggleButtonModule, typeof i63.ToolbarModule, typeof i64.TooltipModule, typeof i65.MessagesModule, typeof i66.ProgressSpinnerModule, typeof i67.TabViewModule, typeof i68.FieldsetModule, typeof i69.MultiSelectModule, typeof i70.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngTableviewRouteComponent, typeof i27.MngFormEditorComponent, typeof i28.MngActionComponent, typeof i29.MngActionDialogComponent, typeof i30.MngActionRouteComponent]>;
80
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngI18nPropertyPipe, typeof i6.MngBreadcrumbComponent, typeof i7.MngFooterComponent, typeof i8.MngMainLayoutComponent, typeof i9.MngMenuComponent, typeof i10.MngMenuItemComponent, typeof i11.MngTopbarComponent, typeof i12.MngAutocompleteComponent, typeof i13.MngDropdownComponent, typeof i14.MngFormlyFieldWrapperComponent, typeof i15.MngFormlyTableWrapperComponent, typeof i16.MngFormlyFieldInputComponent, typeof i17.MngFormlyFieldDropdownComponent, typeof i18.MngFormlyFieldAutocompleteComponent, typeof i19.MngFormlyFieldTableDialogMultiselectComponent, typeof i20.MngFormlyFieldTableDialogFormComponent, typeof i21.MngFormlyFieldTabsComponent, typeof i22.MngFormlyFieldFieldsetComponent, typeof i23.MngTableComponent, typeof i24.MngTableviewComponent, typeof i25.MngTableColumnValueComponent, typeof i26.MngTableColumnFilterComponent, typeof i27.MngTableviewRouteComponent, typeof i28.MngFormEditorComponent, typeof i29.MngActionComponent, typeof i30.MngActionDialogComponent, typeof i31.MngActionRouteComponent], [typeof i32.CommonModule, typeof i33.RouterModule, typeof i34.HttpClientModule, typeof i35.ReactiveFormsModule, typeof i36.TranslateModule, typeof i37.FormlyModule, typeof i38.AutoCompleteModule, typeof i39.BreadcrumbModule, typeof i40.ButtonModule, typeof i41.CalendarModule, typeof i42.CardModule, typeof i43.CheckboxModule, typeof i44.ChipModule, typeof i45.ConfirmDialogModule, typeof i46.ConfirmPopupModule, typeof i47.DialogModule, typeof i48.DynamicDialogModule, typeof i49.DropdownModule, typeof i50.FileUploadModule, typeof i51.InputNumberModule, typeof i52.InputMaskModule, typeof i53.InputSwitchModule, typeof i54.InputTextModule, typeof i55.InputTextareaModule, typeof i56.PaginatorModule, typeof i57.RadioButtonModule, typeof i58.RippleModule, typeof i59.SelectButtonModule, typeof i60.TableModule, typeof i61.TagModule, typeof i62.ToastModule, typeof i63.ToggleButtonModule, typeof i64.ToolbarModule, typeof i65.TooltipModule, typeof i66.MessagesModule, typeof i67.ProgressSpinnerModule, typeof i68.TabViewModule, typeof i69.FieldsetModule, typeof i70.MultiSelectModule, typeof i71.SkeletonModule], [typeof i38.AutoCompleteModule, typeof i39.BreadcrumbModule, typeof i40.ButtonModule, typeof i41.CalendarModule, typeof i42.CardModule, typeof i43.CheckboxModule, typeof i44.ChipModule, typeof i45.ConfirmDialogModule, typeof i46.ConfirmPopupModule, typeof i47.DialogModule, typeof i48.DynamicDialogModule, typeof i49.DropdownModule, typeof i50.FileUploadModule, typeof i51.InputNumberModule, typeof i52.InputMaskModule, typeof i53.InputSwitchModule, typeof i54.InputTextModule, typeof i55.InputTextareaModule, typeof i56.PaginatorModule, typeof i57.RadioButtonModule, typeof i58.RippleModule, typeof i59.SelectButtonModule, typeof i60.TableModule, typeof i61.TagModule, typeof i62.ToastModule, typeof i63.ToggleButtonModule, typeof i64.ToolbarModule, typeof i65.TooltipModule, typeof i66.MessagesModule, typeof i67.ProgressSpinnerModule, typeof i68.TabViewModule, typeof i69.FieldsetModule, typeof i70.MultiSelectModule, typeof i71.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngI18nPropertyPipe, typeof i6.MngBreadcrumbComponent, typeof i7.MngFooterComponent, typeof i8.MngMainLayoutComponent, typeof i9.MngMenuComponent, typeof i10.MngMenuItemComponent, typeof i11.MngTopbarComponent, typeof i12.MngAutocompleteComponent, typeof i13.MngDropdownComponent, typeof i14.MngFormlyFieldWrapperComponent, typeof i15.MngFormlyTableWrapperComponent, typeof i16.MngFormlyFieldInputComponent, typeof i17.MngFormlyFieldDropdownComponent, typeof i18.MngFormlyFieldAutocompleteComponent, typeof i19.MngFormlyFieldTableDialogMultiselectComponent, typeof i20.MngFormlyFieldTableDialogFormComponent, typeof i21.MngFormlyFieldTabsComponent, typeof i22.MngFormlyFieldFieldsetComponent, typeof i23.MngTableComponent, typeof i24.MngTableviewComponent, typeof i25.MngTableColumnValueComponent, typeof i26.MngTableColumnFilterComponent, typeof i27.MngTableviewRouteComponent, typeof i28.MngFormEditorComponent, typeof i29.MngActionComponent, typeof i30.MngActionDialogComponent, typeof i31.MngActionRouteComponent]>;
80
81
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
81
82
  }
@@ -0,0 +1,5 @@
1
+ export interface EnumValue<T> {
2
+ name?: string;
3
+ value: T;
4
+ title: string;
5
+ }
@@ -1 +1,2 @@
1
+ export * from './enum.model';
1
2
  export * from './user.model';
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { ModelDescriptor } from '../descriptors';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MngI18nPropertyPipe implements PipeTransform {
5
+ transform(property: string, model: ModelDescriptor<any>): any;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngI18nPropertyPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<MngI18nPropertyPipe, "i18nProperty">;
8
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './boolean.pipe';
2
+ export * from './i18n-property.pipe';
2
3
  export * from './property-path.pipe';
@@ -1,2 +1,4 @@
1
1
  export declare const typeNameDecoratorPropertyName = "typeName";
2
2
  export declare function TypeName(typeName: string): ClassDecorator;
3
+ export declare const enumNameDecoratorPropertyName = "enumName";
4
+ export declare function EnumName(typeName: string): ClassDecorator;
@@ -2,9 +2,9 @@ export interface ClassType<T> extends Function {
2
2
  new (...args: any[]): T;
3
3
  }
4
4
  export interface EnumType {
5
- [key: number]: EnumMemberType;
5
+ [key: string]: EnumConstantType;
6
6
  }
7
- export declare type EnumMemberType = string | number;
7
+ export declare type EnumConstantType = string | number;
8
8
  export declare type IdType = number | string;
9
9
  export declare type PrimitiveType = string | boolean | number;
10
10
  export declare type PropertyType = PrimitiveType | Date | EnumType;
@@ -0,0 +1,39 @@
1
+ import { EnumValue } from '../models';
2
+ import { EnumConstantType, EnumType } from '../types';
3
+ export declare class EnumUtil {
4
+ /**
5
+ * Returns array of names for constants in enum.
6
+ * @param enumType Enum object.
7
+ */
8
+ static getConstantNames(enumType: EnumType): Array<string>;
9
+ /**
10
+ * Returns array of string values for constants in enum.
11
+ * @param enumType Enum object.
12
+ */
13
+ static getConstantValuesAsString(enumType: EnumType): Array<string>;
14
+ /**
15
+ * Returns array of number values for constants in enum.
16
+ * @param enumType Enum object.
17
+ */
18
+ static getConstantValuesAsNumber(enumType: EnumType): Array<number>;
19
+ /**
20
+ * Returns array of type EnumValue for all constants in enum.
21
+ * @param enumType Enum object.
22
+ * @param nameAsValue If use name of constant as value (optional, default: false).
23
+ * @param titlePath Base path for title to use as translation (optional).
24
+ */
25
+ static fromConstantsAsEnumValueArray(enumType: EnumType, nameAsValue?: boolean, titlePath?: string): EnumValue<string | number>[];
26
+ /**
27
+ * Returns array of type EnumValue for provided values in enum.
28
+ * @param enumType Enum object.
29
+ * @param nameAsValue If use name of constant as value (optional, default: false).
30
+ * @param titlePath Base path for title to use as translation (optional).
31
+ */
32
+ static fromValuesAsEnumValueArray(enumType: EnumType, values: Array<EnumConstantType>, nameAsValue?: boolean, titlePath?: string): EnumValue<string | number>[];
33
+ /**
34
+ * Gets constant name for value.
35
+ * @param enumType Enum object.
36
+ * @param value Value of enum constant.
37
+ */
38
+ static getConstantName(enumType: EnumType, value: EnumConstantType): string | null;
39
+ }