@mediusinc/mng-commons 0.2.18 → 0.2.21

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 (98) hide show
  1. package/assets/i18n/en.json +16 -15
  2. package/assets/i18n/sl.json +23 -22
  3. package/esm2020/lib/api/services/crud-api.abstract.service.mjs +6 -6
  4. package/esm2020/lib/api/utils/object-serializer.util.mjs +7 -2
  5. package/esm2020/lib/components/action/action.component.mjs +50 -23
  6. package/esm2020/lib/components/action/editor/action-editor.component.mjs +239 -0
  7. package/esm2020/lib/components/action/index.mjs +2 -2
  8. package/esm2020/lib/components/action/models/action-execution.model.mjs +3 -3
  9. package/esm2020/lib/components/action/route/action-route.component.mjs +19 -38
  10. package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +5 -3
  11. package/esm2020/lib/components/form/editor/form-editor.component.mjs +2 -2
  12. package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
  13. package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  14. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  15. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
  16. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +61 -21
  17. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
  18. package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
  19. package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +4 -3
  20. package/esm2020/lib/components/form/models/form-editor.event.mjs +1 -1
  21. package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +2 -2
  22. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -1
  23. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +3 -3
  24. package/esm2020/lib/components/tableview/table/table.component.mjs +13 -9
  25. package/esm2020/lib/components/tableview/tableview.component.mjs +28 -21
  26. package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
  27. package/esm2020/lib/data-providers/table.data-provider.mjs +1 -1
  28. package/esm2020/lib/descriptors/action.descriptor.mjs +151 -2
  29. package/esm2020/lib/descriptors/editor.descriptor.mjs +118 -24
  30. package/esm2020/lib/descriptors/table.descriptor.mjs +21 -4
  31. package/esm2020/lib/descriptors/tableview.descriptor.mjs +7 -6
  32. package/esm2020/lib/mng-commons.module.mjs +17 -10
  33. package/esm2020/lib/models/enum.model.mjs +1 -1
  34. package/esm2020/lib/models/error.model.mjs +2 -0
  35. package/esm2020/lib/models/index.mjs +3 -1
  36. package/esm2020/lib/models/view-container.model.mjs +2 -0
  37. package/esm2020/lib/pipes/boolean.pipe.mjs +8 -3
  38. package/esm2020/lib/services/action-executor.service.mjs +344 -0
  39. package/esm2020/lib/services/error-mapper.service.mjs +14 -0
  40. package/esm2020/lib/services/index.mjs +4 -2
  41. package/esm2020/lib/services/tokens/default-setting.token.mjs +3 -0
  42. package/esm2020/lib/services/tokens/index.mjs +2 -1
  43. package/esm2020/lib/services/view-container.component.service.mjs +35 -0
  44. package/esm2020/lib/utils/i18n.util.mjs +29 -1
  45. package/esm2020/lib/utils/model.util.mjs +9 -7
  46. package/esm2020/lib/utils/toast.util.mjs +18 -14
  47. package/esm2020/public-api.mjs +1 -2
  48. package/fesm2015/mediusinc-mng-commons.mjs +1384 -814
  49. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  50. package/fesm2020/mediusinc-mng-commons.mjs +1367 -809
  51. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  52. package/lib/components/action/action.component.d.ts +16 -9
  53. package/lib/components/action/editor/action-editor.component.d.ts +59 -0
  54. package/lib/components/action/index.d.ts +1 -1
  55. package/lib/components/action/models/action-execution.model.d.ts +3 -3
  56. package/lib/components/action/route/action-route.component.d.ts +5 -6
  57. package/lib/components/form/dropdown/dropdown.component.d.ts +2 -1
  58. package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +8 -2
  59. package/lib/components/tableview/table/table.component.d.ts +5 -4
  60. package/lib/components/tableview/tableview.component.d.ts +9 -7
  61. package/lib/descriptors/action.descriptor.d.ts +72 -16
  62. package/lib/descriptors/editor.descriptor.d.ts +52 -12
  63. package/lib/descriptors/table.descriptor.d.ts +8 -2
  64. package/lib/descriptors/tableview.descriptor.d.ts +1 -1
  65. package/lib/mng-commons.module.d.ts +2 -2
  66. package/lib/models/enum.model.d.ts +1 -0
  67. package/lib/models/error.model.d.ts +12 -0
  68. package/lib/models/index.d.ts +2 -0
  69. package/lib/models/view-container.model.d.ts +6 -0
  70. package/lib/pipes/boolean.pipe.d.ts +1 -1
  71. package/lib/services/{action.service.d.ts → action-executor.service.d.ts} +27 -19
  72. package/lib/services/error-mapper.service.d.ts +7 -0
  73. package/lib/services/index.d.ts +3 -1
  74. package/lib/services/tokens/default-setting.token.d.ts +2 -0
  75. package/lib/services/tokens/index.d.ts +1 -0
  76. package/lib/services/view-container.component.service.d.ts +22 -0
  77. package/lib/utils/i18n.util.d.ts +3 -0
  78. package/lib/utils/model.util.d.ts +1 -1
  79. package/lib/utils/toast.util.d.ts +5 -4
  80. package/package.json +1 -1
  81. package/public-api.d.ts +0 -1
  82. package/scss/mng-overrides/_layout_dialog.scss +0 -7
  83. package/scss/mng-overrides/_layout_forms.scss +2 -0
  84. package/scss/mng-overrides/_mixins.scss +7 -0
  85. package/scss/mng-overrides/_theme_button.scss +57 -0
  86. package/scss/mng-overrides/_theme_dialog.scss +3 -1
  87. package/scss/mng-overrides/_theme_styles.scss +2 -0
  88. package/scss/mng-overrides/_theme_tableview.scss +10 -10
  89. package/scss/mng-overrides/_theme_toolbar.scss +5 -0
  90. package/scss/theme/default/_mng-variables-theme-dark.scss +3 -0
  91. package/scss/theme/default/_mng-variables-theme-light.scss +3 -0
  92. package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +0 -151
  93. package/esm2020/lib/components/tableview/services/index.mjs +0 -2
  94. package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +0 -21
  95. package/esm2020/lib/services/action.service.mjs +0 -273
  96. package/lib/components/action/dialog/action-dialog.component.d.ts +0 -47
  97. package/lib/components/tableview/services/index.d.ts +0 -1
  98. package/lib/components/tableview/services/tableview.component.service.d.ts +0 -14
@@ -7,22 +7,24 @@ import { MngFormFieldEvent, MngFormFieldEventData, MngFormFieldEventTypeEnum } f
7
7
  import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
8
8
  import { EnumValue } from '../models';
9
9
  import { ClassType, EnumConstantType, EnumType } from '../types';
10
- import { FieldValidator, ILookupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
10
+ import { ActionDescriptor, FieldValidator, ILookupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
11
11
  import { FieldConfig, FieldLookupConfig } from './editor.descriptor.interface';
12
12
  export declare class EditorDescriptor<T> {
13
13
  static readonly defaultGroupName = "_default";
14
14
  private readonly _model;
15
+ private readonly _tableviewEditorType;
15
16
  private readonly _tabs;
16
17
  private readonly _groups;
17
18
  private readonly _fields;
18
19
  private _currentTabGroup?;
19
20
  private _currentGroup?;
20
- constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
21
21
  private _disabled;
22
- get disabled(): boolean;
22
+ constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType?: EditorDescriptor.TableviewEditorTypeEnum);
23
23
  get model(): ModelDescriptor<T>;
24
24
  get tabs(): FieldTabGroupDescriptor<T>[];
25
25
  get fields(): AFieldDescriptor<any, T>[];
26
+ get tableviewEditorType(): boolean;
27
+ get disabled(): boolean;
26
28
  createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T>;
27
29
  createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<T>;
28
30
  addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this;
@@ -41,6 +43,14 @@ export declare class EditorDescriptor<T> {
41
43
  private createDefaultGroup;
42
44
  private createDefaultTabGroup;
43
45
  }
46
+ export declare namespace EditorDescriptor {
47
+ enum TableviewEditorTypeEnum {
48
+ None = 0,
49
+ View = 1,
50
+ Edit = 2,
51
+ Add = 3
52
+ }
53
+ }
44
54
  export declare abstract class AGenericFieldDescriptor<ET> {
45
55
  protected readonly _editor: EditorDescriptor<ET>;
46
56
  protected _config: FieldConfig;
@@ -54,47 +64,66 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
54
64
  protected _group?: AFieldGroupDescriptor<ET>;
55
65
  protected _label?: string;
56
66
  protected _placeholder?: string;
67
+ protected _helpText?: string;
57
68
  protected _required: boolean;
58
69
  protected _disabled: boolean;
59
70
  protected _defaultValue?: T;
60
- protected _className: string;
61
71
  protected _getter?: (item: ET) => T;
62
72
  protected _setter?: (item: ET, value: T) => void;
63
73
  protected _validators: Array<FieldValidator>;
64
74
  protected _requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
65
75
  protected _disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
66
76
  protected _hiddenExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
77
+ protected _className: string;
78
+ protected _labelClassName: string;
79
+ protected _inputClassName: string;
80
+ protected _size: FieldDescriptor.SizeEnum;
67
81
  protected readonly _eventsSubject: Subject<MngFormFieldEvent<T, ET>>;
68
82
  protected constructor(editor: EditorDescriptor<ET>, property: string);
83
+ get property(): string;
69
84
  get group(): AFieldGroupDescriptor<ET> | undefined;
70
85
  get label(): string | undefined;
71
86
  get placeholder(): string | undefined;
87
+ get helpText(): string | undefined;
72
88
  get required(): boolean;
73
89
  get disabled(): boolean;
74
90
  get defaultValue(): T | undefined;
75
- get className(): string;
76
91
  get getter(): ((item: ET) => T) | undefined;
77
92
  get setter(): ((item: ET, value: T) => void) | undefined;
78
93
  get validators(): FieldValidator[];
79
94
  get requiredExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
80
95
  get disabledExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
81
96
  get hiddenExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
82
- get property(): string;
97
+ get className(): string;
98
+ get labelClassName(): string;
99
+ get inputClassName(): string;
100
+ get size(): FieldDescriptor.SizeEnum;
101
+ get isSizeSmall(): boolean;
102
+ get isSizeLarge(): boolean;
83
103
  abstract copy(): AFieldDescriptor<T, ET>;
84
104
  withLabel(label: string): this;
85
105
  withPlaceholder(placeholder: string): this;
106
+ withHelpText(helpText: string): this;
86
107
  withRequired(required?: boolean, requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
87
108
  withDisabled(disabled?: boolean, disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
88
109
  withHidden(hiddenExpression: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
89
110
  withDefaultValue(defaultValue: T): this;
90
- withClassName(className: string): this;
91
111
  withGetter(getter: (item: ET) => T): this;
92
112
  withSetter(setter: (item: ET, value: T) => void): this;
93
113
  withValidator(name: string, expression: (control: AbstractControl) => boolean, message?: (err: any, field: FormlyFieldConfig) => string): this;
114
+ withClassName(className: string, labelClassName?: string, inputClassName?: string): this;
115
+ withSize(size?: FieldDescriptor.SizeEnum): this;
94
116
  nextEvent(type: MngFormFieldEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFormFieldEventData<T, ET>): void;
95
117
  get events$(): Observable<MngFormFieldEvent<T, ET>>;
96
118
  protected copyFieldsTo(obj: AFieldDescriptor<T, ET>): void;
97
119
  }
120
+ export declare namespace FieldDescriptor {
121
+ enum SizeEnum {
122
+ Small = 0,
123
+ Normal = 1,
124
+ Large = 2
125
+ }
126
+ }
98
127
  export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date, ET> {
99
128
  private _fieldType;
100
129
  private _rows?;
@@ -165,6 +194,7 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
165
194
  protected _lookupType: FieldLookupDescriptor.LookupTypeEnum;
166
195
  protected _itemsLabelProperty?: string;
167
196
  protected _itemsValueProperty?: string;
197
+ protected _itemsDisabledProperty?: string;
168
198
  protected _dataKeyProperty?: string;
169
199
  protected _dataProvider?: ILookupDataProvider<T, any>;
170
200
  protected _lookupTableDescriptor?: TableDescriptor<T>;
@@ -173,6 +203,7 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
173
203
  get lookupType(): FieldLookupDescriptor.LookupTypeEnum;
174
204
  get itemsLabelProperty(): string | undefined;
175
205
  get itemsValueProperty(): string | undefined;
206
+ get itemsDisabledProperty(): string | undefined;
176
207
  get dataKeyProperty(): string | undefined;
177
208
  get dataProvider(): ILookupDataProvider<T, any> | undefined;
178
209
  get lookupTableDataProvider(): ITableDataProvider<T, any> | undefined;
@@ -180,6 +211,7 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
180
211
  get lookupTableDescriptor(): TableDescriptor<T> | undefined;
181
212
  withItemsLabelProperty(itemsLabelProperty: string): this;
182
213
  withItemsValueProperty(itemsValueProperty: string): this;
214
+ withItemsDisabledProperty(itemsDisabledProperty: string): this;
183
215
  withDataKeyProperty(property: string): this;
184
216
  withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
185
217
  withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
@@ -197,8 +229,11 @@ export declare namespace FieldLookupDescriptor {
197
229
  }
198
230
  export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumValue<string | number>, ET> {
199
231
  private readonly _enumType;
232
+ private readonly _optionEnumValues;
233
+ private readonly _nameAsValue;
200
234
  constructor(editor: EditorDescriptor<ET>, property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null);
201
235
  get enumType(): EnumType;
236
+ withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this;
202
237
  copy(): FieldLookupEnumDescriptor<ET>;
203
238
  }
204
239
  export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
@@ -239,16 +274,20 @@ export declare class FieldManyEditorDescriptor<T, ET> extends AFieldDescriptor<T
239
274
  private readonly _modelType;
240
275
  private readonly _tableviewDescriptor;
241
276
  private _fieldType;
277
+ private _fieldActions;
242
278
  private _actions;
243
279
  constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, tableviewDescriptor: TableviewDescriptor<T>);
244
280
  get fieldType(): FieldManyEditorDescriptor.TypeEnum;
245
- get actions(): FieldManyEditorDescriptor.ActionEnum[];
281
+ get fieldActions(): FieldManyEditorDescriptor.ActionEnum[];
282
+ get actions(): ActionDescriptor<T>[];
246
283
  get tableviewDescriptor(): TableviewDescriptor<T>;
247
284
  get tableDescriptor(): TableDescriptor<T>;
248
285
  get editorForCreate(): EditorDescriptor<T>;
249
286
  get editorForRead(): EditorDescriptor<T>;
250
287
  get editorForUpdate(): EditorDescriptor<T>;
251
- withActions(actions?: Array<FieldManyToManyEditorDescriptor.ActionEnum>): this;
288
+ withFieldAction(action: FieldManyEditorDescriptor.ActionEnum): this;
289
+ withFieldActions(actions: FieldManyEditorDescriptor.ActionEnum[]): this;
290
+ withAction(action: ActionDescriptor<T>): this;
252
291
  copy(): FieldManyEditorDescriptor<T, ET>;
253
292
  }
254
293
  export declare namespace FieldManyEditorDescriptor {
@@ -256,9 +295,10 @@ export declare namespace FieldManyEditorDescriptor {
256
295
  DialogEditor = 0
257
296
  }
258
297
  enum ActionEnum {
259
- Add = 0,
260
- Edit = 1,
261
- Delete = 2
298
+ View = 0,
299
+ Add = 1,
300
+ Edit = 2,
301
+ Delete = 3
262
302
  }
263
303
  }
264
304
  export declare abstract class AFieldGroupDescriptor<ET> extends AGenericFieldDescriptor<ET> {
@@ -36,7 +36,7 @@ export declare class TableDescriptor<T> {
36
36
  addColumn(property: string): ColumnDescriptor<string, T>;
37
37
  addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
38
38
  addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
39
- addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
39
+ addColumnBoolean(property: string, yes?: string, no?: string, asIcon?: boolean): ColumnDescriptor<boolean, T>;
40
40
  addColumnEnum(property: string, enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): ColumnDescriptor<boolean, T>;
41
41
  addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
42
42
  withFilterDisplay(filterDisplayType: TableDescriptor.FilterDisplayEnum): this;
@@ -73,6 +73,9 @@ export declare class ColumnDescriptor<T, TT> {
73
73
  private _enumType?;
74
74
  private _enumTitlePath?;
75
75
  private _enumNameAsValue;
76
+ private _booleanAsIcon;
77
+ private _booleanYes?;
78
+ private _booleanNo?;
76
79
  constructor(table: TableDescriptor<TT>, property: string);
77
80
  get modelType(): ClassType<T> | null;
78
81
  get columnType(): ColumnDescriptor.TypeEnum;
@@ -86,10 +89,13 @@ export declare class ColumnDescriptor<T, TT> {
86
89
  get enumType(): EnumType | undefined;
87
90
  get enumTitlePath(): string | null | undefined;
88
91
  get enumNameAsValue(): boolean;
92
+ get booleanAsIcon(): boolean;
93
+ get booleanYes(): string | undefined;
94
+ get booleanNo(): string | undefined;
89
95
  asType(type?: ColumnDescriptor.TypeEnum): this;
90
96
  asNumber(displayFormat?: string): this;
91
97
  asDate(displayFormat?: string): this;
92
- asBoolean(): this;
98
+ asBoolean(yes?: string, no?: string, asIcon?: boolean): this;
93
99
  asEnum(enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): this;
94
100
  withModelType(modelType: ClassType<T>): this;
95
101
  withTitle(title: string): this;
@@ -25,7 +25,7 @@ export declare class TableviewDescriptor<T> {
25
25
  addColumn(property: string): ColumnDescriptor<string, T>;
26
26
  addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
27
27
  addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
28
- addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
28
+ addColumnBoolean(property: string, yes?: string, no?: string, asIcon?: boolean): ColumnDescriptor<boolean, T>;
29
29
  addColumnEnum(property: string, enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): ColumnDescriptor<boolean, T>;
30
30
  addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
31
31
  createTabGroup(name: string, title?: string): this;
@@ -33,7 +33,7 @@ import * as i28 from "./components/tableview/table/column-filter/column-filter.c
33
33
  import * as i29 from "./components/tableview/route/tableview-route.component";
34
34
  import * as i30 from "./components/form/editor/form-editor.component";
35
35
  import * as i31 from "./components/action/action.component";
36
- import * as i32 from "./components/action/dialog/action-dialog.component";
36
+ import * as i32 from "./components/action/editor/action-editor.component";
37
37
  import * as i33 from "./components/action/route/action-route.component";
38
38
  import * as i34 from "@angular/common";
39
39
  import * as i35 from "@angular/router";
@@ -79,6 +79,6 @@ export declare const primeNgModules: (typeof InputTextModule)[];
79
79
  export declare class MngCommonsModule {
80
80
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
81
81
  static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
82
- static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldLookupDialogComponent, typeof i21.MngFormlyFieldTableDialogMultiselectComponent, typeof i22.MngFormlyFieldTableDialogFormComponent, typeof i23.MngFormlyFieldTabsComponent, typeof i24.MngFormlyFieldFieldsetComponent, typeof i25.MngTableComponent, typeof i26.MngTableviewComponent, typeof i27.MngTableColumnValueComponent, typeof i28.MngTableColumnFilterComponent, typeof i29.MngTableviewRouteComponent, typeof i30.MngFormEditorComponent, typeof i31.MngActionComponent, typeof i32.MngActionDialogComponent, typeof i33.MngActionRouteComponent], [typeof i34.CommonModule, typeof i35.RouterModule, typeof i36.HttpClientModule, typeof i37.ReactiveFormsModule, typeof i38.TranslateModule, typeof i39.FormlyModule, typeof i40.AutoCompleteModule, typeof i41.BreadcrumbModule, typeof i42.ButtonModule, typeof i43.CalendarModule, typeof i44.CardModule, typeof i45.CheckboxModule, typeof i46.ChipModule, typeof i47.ConfirmDialogModule, typeof i48.ConfirmPopupModule, typeof i49.DialogModule, typeof i50.DynamicDialogModule, typeof i51.DropdownModule, typeof i52.FileUploadModule, typeof i53.InputNumberModule, typeof i54.InputMaskModule, typeof i55.InputSwitchModule, typeof i56.InputTextModule, typeof i57.InputTextareaModule, typeof i58.PaginatorModule, typeof i59.RadioButtonModule, typeof i60.RippleModule, typeof i61.SelectButtonModule, typeof i62.TableModule, typeof i63.TagModule, typeof i64.ToastModule, typeof i65.ToggleButtonModule, typeof i66.ToolbarModule, typeof i67.TooltipModule, typeof i68.MessagesModule, typeof i69.ProgressSpinnerModule, typeof i70.TabViewModule, typeof i71.FieldsetModule, typeof i72.MultiSelectModule, typeof i73.SkeletonModule], [typeof i40.AutoCompleteModule, typeof i41.BreadcrumbModule, typeof i42.ButtonModule, typeof i43.CalendarModule, typeof i44.CardModule, typeof i45.CheckboxModule, typeof i46.ChipModule, typeof i47.ConfirmDialogModule, typeof i48.ConfirmPopupModule, typeof i49.DialogModule, typeof i50.DynamicDialogModule, typeof i51.DropdownModule, typeof i52.FileUploadModule, typeof i53.InputNumberModule, typeof i54.InputMaskModule, typeof i55.InputSwitchModule, typeof i56.InputTextModule, typeof i57.InputTextareaModule, typeof i58.PaginatorModule, typeof i59.RadioButtonModule, typeof i60.RippleModule, typeof i61.SelectButtonModule, typeof i62.TableModule, typeof i63.TagModule, typeof i64.ToastModule, typeof i65.ToggleButtonModule, typeof i66.ToolbarModule, typeof i67.TooltipModule, typeof i68.MessagesModule, typeof i69.ProgressSpinnerModule, typeof i70.TabViewModule, typeof i71.FieldsetModule, typeof i72.MultiSelectModule, typeof i73.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldLookupDialogComponent, typeof i21.MngFormlyFieldTableDialogMultiselectComponent, typeof i22.MngFormlyFieldTableDialogFormComponent, typeof i23.MngFormlyFieldTabsComponent, typeof i24.MngFormlyFieldFieldsetComponent, typeof i25.MngTableComponent, typeof i26.MngTableviewComponent, typeof i27.MngTableColumnValueComponent, typeof i28.MngTableColumnFilterComponent, typeof i29.MngTableviewRouteComponent, typeof i30.MngFormEditorComponent, typeof i31.MngActionComponent, typeof i32.MngActionDialogComponent, typeof i33.MngActionRouteComponent]>;
82
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldLookupDialogComponent, typeof i21.MngFormlyFieldTableDialogMultiselectComponent, typeof i22.MngFormlyFieldTableDialogFormComponent, typeof i23.MngFormlyFieldTabsComponent, typeof i24.MngFormlyFieldFieldsetComponent, typeof i25.MngTableComponent, typeof i26.MngTableviewComponent, typeof i27.MngTableColumnValueComponent, typeof i28.MngTableColumnFilterComponent, typeof i29.MngTableviewRouteComponent, typeof i30.MngFormEditorComponent, typeof i31.MngActionComponent, typeof i32.MngActionEditorComponent, typeof i33.MngActionRouteComponent], [typeof i34.CommonModule, typeof i35.RouterModule, typeof i36.HttpClientModule, typeof i37.ReactiveFormsModule, typeof i38.TranslateModule, typeof i39.FormlyModule, typeof i40.AutoCompleteModule, typeof i41.BreadcrumbModule, typeof i42.ButtonModule, typeof i43.CalendarModule, typeof i44.CardModule, typeof i45.CheckboxModule, typeof i46.ChipModule, typeof i47.ConfirmDialogModule, typeof i48.ConfirmPopupModule, typeof i49.DialogModule, typeof i50.DynamicDialogModule, typeof i51.DropdownModule, typeof i52.FileUploadModule, typeof i53.InputNumberModule, typeof i54.InputMaskModule, typeof i55.InputSwitchModule, typeof i56.InputTextModule, typeof i57.InputTextareaModule, typeof i58.PaginatorModule, typeof i59.RadioButtonModule, typeof i60.RippleModule, typeof i61.SelectButtonModule, typeof i62.TableModule, typeof i63.TagModule, typeof i64.ToastModule, typeof i65.ToggleButtonModule, typeof i66.ToolbarModule, typeof i67.TooltipModule, typeof i68.MessagesModule, typeof i69.ProgressSpinnerModule, typeof i70.TabViewModule, typeof i71.FieldsetModule, typeof i72.MultiSelectModule, typeof i73.SkeletonModule], [typeof i40.AutoCompleteModule, typeof i41.BreadcrumbModule, typeof i42.ButtonModule, typeof i43.CalendarModule, typeof i44.CardModule, typeof i45.CheckboxModule, typeof i46.ChipModule, typeof i47.ConfirmDialogModule, typeof i48.ConfirmPopupModule, typeof i49.DialogModule, typeof i50.DynamicDialogModule, typeof i51.DropdownModule, typeof i52.FileUploadModule, typeof i53.InputNumberModule, typeof i54.InputMaskModule, typeof i55.InputSwitchModule, typeof i56.InputTextModule, typeof i57.InputTextareaModule, typeof i58.PaginatorModule, typeof i59.RadioButtonModule, typeof i60.RippleModule, typeof i61.SelectButtonModule, typeof i62.TableModule, typeof i63.TagModule, typeof i64.ToastModule, typeof i65.ToggleButtonModule, typeof i66.ToolbarModule, typeof i67.TooltipModule, typeof i68.MessagesModule, typeof i69.ProgressSpinnerModule, typeof i70.TabViewModule, typeof i71.FieldsetModule, typeof i72.MultiSelectModule, typeof i73.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldLookupDialogComponent, typeof i21.MngFormlyFieldTableDialogMultiselectComponent, typeof i22.MngFormlyFieldTableDialogFormComponent, typeof i23.MngFormlyFieldTabsComponent, typeof i24.MngFormlyFieldFieldsetComponent, typeof i25.MngTableComponent, typeof i26.MngTableviewComponent, typeof i27.MngTableColumnValueComponent, typeof i28.MngTableColumnFilterComponent, typeof i29.MngTableviewRouteComponent, typeof i30.MngFormEditorComponent, typeof i31.MngActionComponent, typeof i32.MngActionEditorComponent, typeof i33.MngActionRouteComponent]>;
83
83
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
84
84
  }
@@ -2,4 +2,5 @@ export interface EnumValue<T> {
2
2
  name?: string;
3
3
  value: T;
4
4
  title: string;
5
+ disabled?: boolean;
5
6
  }
@@ -0,0 +1,12 @@
1
+ import { IdType } from '../types';
2
+ export interface MngError extends Error {
3
+ id?: IdType;
4
+ messageCode?: number | string;
5
+ message: string;
6
+ details?: any;
7
+ status?: number;
8
+ statusDescription?: string;
9
+ stack?: string;
10
+ url?: string;
11
+ cause?: Error;
12
+ }
@@ -1,3 +1,5 @@
1
1
  export * from './enum.model';
2
+ export * from './error.model';
2
3
  export * from './menu.model';
3
4
  export * from './user.model';
5
+ export * from './view-container.model';
@@ -0,0 +1,6 @@
1
+ import { MessageService } from 'primeng/api';
2
+ import { IDataProvider } from '../data-providers';
3
+ export interface IViewContainer<T, S> {
4
+ getMessageService(): MessageService | undefined;
5
+ getDataProvider(): IDataProvider<T, S> | undefined;
6
+ }
@@ -1,7 +1,7 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class MngBooleanPipe implements PipeTransform {
4
- transform(value: any): any;
4
+ transform(value: any, yes?: string, no?: string, icon?: boolean): any;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<MngBooleanPipe, never>;
6
6
  static ɵpipe: i0.ɵɵPipeDeclaration<MngBooleanPipe, "boolean">;
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Injector } from '@angular/core';
1
+ import { Injector, Type } from '@angular/core';
2
2
  import { ActivatedRoute, Router } from '@angular/router';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { ConfirmationService } from 'primeng/api';
@@ -6,20 +6,25 @@ import { DialogService } from 'primeng/dynamicdialog';
6
6
  import { Observable } from 'rxjs';
7
7
  import { ActionActivationResult, ActionData, ActionExecContext, ActionRunResult, ActionTriggerResult } from '../components/action/models';
8
8
  import { MngTableCellClickEvent } from '../components/tableview/models';
9
- import { TableviewComponentService } from '../components/tableview/services';
10
9
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
11
10
  import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
11
+ import { IViewContainer } from '../models';
12
12
  import { IdType } from '../types';
13
+ import { MngErrorMapperService } from './error-mapper.service';
14
+ import { MngNavigationService } from './navigation.service';
13
15
  import * as i0 from "@angular/core";
14
- export declare class MngActionService {
16
+ export declare class MngActionExecutorService {
15
17
  private injector;
16
18
  private router;
17
19
  private dialogService;
18
20
  private confirmationService;
19
21
  private translate;
20
- constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService);
21
- getActionExecContext<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, tableview?: TableviewComponentService<T, S>, sourceComponent?: any, actionData?: ActionData): ActionExecContext<T, S, IDataProvider<T, S>>;
22
- runAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IDataProvider<T, S>>>;
22
+ private navigationService;
23
+ private errorMapper;
24
+ private defaultEditorDialogComponent;
25
+ constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService, navigationService: MngNavigationService, errorMapper: MngErrorMapperService, defaultEditorDialogComponent: Type<any>);
26
+ prepareActionExecContext<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, viewContainer?: IViewContainer<T, S>, sourceComponent?: any, actionData?: ActionData): ActionExecContext<T, S, IDataProvider<T, S>>;
27
+ runAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, sourceComponent?: any, viewContainer?: IViewContainer<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IDataProvider<T, S>>>;
23
28
  /**
24
29
  * Runs editor action save function usually triggered on form submit.
25
30
  *
@@ -28,32 +33,33 @@ export declare class MngActionService {
28
33
  * @param formItem Item instance (from form).
29
34
  * @param dataProvider Data provider
30
35
  * @param sourceComponent Source component from where the fetch function was called.
31
- * @param tableview Tableview component.
36
+ * @param viewContainer View container/service.
32
37
  * @param actionData Additional action data.
33
38
  */
34
- runEditorSave<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, formItem?: T, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
39
+ runEditorSave<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, formItem?: T, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, viewContainer?: IViewContainer<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
35
40
  /**
36
41
  * Runs editor action fetch function.
37
42
  *
38
43
  * @param action Action descriptor.
44
+ * @param item Item instance (if exists).
39
45
  * @param itemId Item id.
40
46
  * @param dataProvider Data provider
41
47
  * @param sourceComponent Source component from where the fetch function was called.
42
- * @param tableview Tableview component.
48
+ * @param viewContainer View container/service. Tableview component.
43
49
  * @param actionData Additional action data.
44
50
  */
45
- runEditorFetch<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
51
+ runEditorFetch<T, S>(action: ActionEditorDescriptor<T>, item?: T, itemId?: IdType, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, viewContainer?: IViewContainer<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
46
52
  /**
47
- * Prepares action run context for action of type editor.
53
+ * Prepares action exec context for action of type editor.
48
54
  *
49
55
  * @param item Item instance (if exists).
50
56
  * @param itemId Item id (if exists).
51
57
  * @param dataProvider Data provider.
52
58
  * @param sourceComponent Source component from where the context preparation was called.
53
- * @param tableview Tableview component.
59
+ * @param viewContainer View container/service.
54
60
  * @param actionData Additional action data.
55
61
  */
56
- private prepareRunContextForEditor;
62
+ private prepareExecContextForEditor;
57
63
  /**
58
64
  * Gets service instance of data provider.
59
65
  *
@@ -67,10 +73,10 @@ export declare class MngActionService {
67
73
  * @param item Item instance (if exists).
68
74
  * @param itemId Item id (if exists).
69
75
  * @param actionData Optional additional action data.
70
- * @param tableview Tableview component.
76
+ * @param viewContainer View container component/service.
71
77
  * @param sourceComponent Source activation component.
72
78
  */
73
- activateAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, tableview?: TableviewComponentService<T, S>, sourceComponent?: any): Observable<ActionActivationResult<T, S, IDataProvider<T, S>>>;
79
+ activateAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, viewContainer?: IViewContainer<T, S>, sourceComponent?: any): Observable<ActionActivationResult<T, S, IDataProvider<T, S>>>;
74
80
  /**
75
81
  * Triggers action from table row click position.
76
82
  *
@@ -78,7 +84,7 @@ export declare class MngActionService {
78
84
  * @param event Target table click event.
79
85
  * @param route Currently activate route.
80
86
  */
81
- triggerRowClickAction<T>(action: ActionDescriptor<T>, event: MngTableCellClickEvent<T>, route: ActivatedRoute): Observable<ActionTriggerResult<T, unknown, IDataProvider<T, unknown>>>;
87
+ triggerRowClickAction<T>(action: ActionDescriptor<T>, event: MngTableCellClickEvent<T>, route?: ActivatedRoute): Observable<ActionTriggerResult<T, unknown, IDataProvider<T, unknown>>>;
82
88
  /**
83
89
  * Triggers action with optional data (item, itemId, ...) and currently activated route.
84
90
  *
@@ -86,7 +92,9 @@ export declare class MngActionService {
86
92
  * @param actionData Optional action data.
87
93
  * @param route Optional activated route.
88
94
  */
89
- triggerAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, route?: ActivatedRoute, tableview?: TableviewComponentService<T, S>, sourceComponent?: any): Observable<ActionTriggerResult<T, S, IDataProvider<T, S>>>;
90
- static ɵfac: i0.ɵɵFactoryDeclaration<MngActionService, never>;
91
- static ɵprov: i0.ɵɵInjectableDeclaration<MngActionService>;
95
+ triggerAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, route?: ActivatedRoute, viewContainer?: IViewContainer<T, S>, sourceComponent?: any): Observable<ActionTriggerResult<T, S, IDataProvider<T, S>>>;
96
+ deactivateAction<T>(action: ActionDescriptor<T>): void;
97
+ private toMngActionError;
98
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngActionExecutorService, never>;
99
+ static ɵprov: i0.ɵɵInjectableDeclaration<MngActionExecutorService>;
92
100
  }
@@ -0,0 +1,7 @@
1
+ import { MngError } from '../models';
2
+ export declare abstract class MngErrorMapperService {
3
+ abstract toMngError(error?: any, mngError?: MngError): MngError;
4
+ }
5
+ export declare class DefaultMngErrorMapperService extends MngErrorMapperService {
6
+ toMngError(error?: any, mngError?: MngError): MngError;
7
+ }
@@ -1,4 +1,6 @@
1
- export * from './action.service';
1
+ export * from './action-executor.service';
2
2
  export * from './configuration.service';
3
3
  export * from './commons.service';
4
+ export * from './error-mapper.service';
4
5
  export * from './navigation.service';
6
+ export * from './view-container.component.service';
@@ -0,0 +1,2 @@
1
+ import { InjectionToken, Type } from '@angular/core';
2
+ export declare const ACTION_EDITOR_DIALOG_COMPONENT_SETTING: InjectionToken<Type<any>>;
@@ -1,2 +1,3 @@
1
1
  export * from './browser-storage.token';
2
+ export * from './default-setting.token';
2
3
  export * from './module-config.token';
@@ -0,0 +1,22 @@
1
+ import { MessageService } from 'primeng/api';
2
+ import { IDataProvider } from '../data-providers';
3
+ import { ActionDescriptor } from '../descriptors';
4
+ import { IViewContainer } from '../models';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Should be used with providers defined within component.
8
+ */
9
+ export declare class MngViewContainerComponentService<T, S> implements IViewContainer<T, S> {
10
+ private messageService;
11
+ private _dataProvider?;
12
+ actions: Array<ActionDescriptor<T>>;
13
+ private _reloadTableSubject;
14
+ constructor(messageService: MessageService);
15
+ set dataProvider(dataProvider: IDataProvider<T, S>);
16
+ get reloadTable$(): import("rxjs").Observable<any>;
17
+ triggerTableReload(event: any): void;
18
+ getMessageService(): MessageService;
19
+ getDataProvider(): IDataProvider<T, S> | undefined;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngViewContainerComponentService<any, any>, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<MngViewContainerComponentService<any, any>>;
22
+ }
@@ -1,6 +1,7 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { ActionDescriptor, ModelDescriptor } from '../descriptors';
4
+ import { MngError } from '../models';
4
5
  export declare class I18nUtil {
5
6
  static instantModelTranslation(translate: TranslateService, model: ModelDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, i18nParams?: any): string | null;
6
7
  static getModelTabKey(model: ModelDescriptor<any>, tab: string): string;
@@ -11,6 +12,8 @@ export declare class I18nUtil {
11
12
  static getActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, oneTime?: boolean): Observable<string | null>;
12
13
  static getModelI18nParams(model: ModelDescriptor<any>, item: any, i18nModelName?: string, i18nParameters?: any): any;
13
14
  static getActionI18nParams(action: ActionDescriptor<any>, item: any, i18nModelName?: string, i18nParameters?: any, functionTitle?: string): any;
15
+ static instantErrorI18nTranslation(translate: TranslateService, error: MngError, i18nParameters?: any): string | null;
16
+ static getErrorI18nParams(error: MngError, i18nParameters?: any): any;
14
17
  static instantModelName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null;
15
18
  static getModelName(translate: TranslateService, model: ModelDescriptor<any>, oneTime?: boolean, singular?: boolean): Observable<string | null>;
16
19
  static getModelNameKeys(model: ModelDescriptor<any>, singular?: boolean): string[];
@@ -3,5 +3,5 @@ import { ClassType } from '../types';
3
3
  export declare class ModelUtil {
4
4
  static findIdAttribute<T>(classType: ClassType<T>): string | null;
5
5
  static findTitleAttribute<T>(classType: ClassType<T>): string | null;
6
- static trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>): void;
6
+ static trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>, idAsDataKey?: boolean): void;
7
7
  }
@@ -1,10 +1,11 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
- import { TableviewComponentService } from '../components/tableview/services';
3
2
  import { ActionDescriptor, TableDescriptor } from '../descriptors';
3
+ import { IViewContainer, MngError } from '../models';
4
4
  export declare class ToastUtil {
5
- static tableNotificationError(translationService: TranslateService, table: TableDescriptor<any>, error: any, tableview?: TableviewComponentService<any, any>): void;
6
- static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, tableview?: TableviewComponentService<any, any>, item?: any): void;
7
- static actionNotificationError(translationService: TranslateService, action: ActionDescriptor<any>, error: any, functionName: string, tableview?: TableviewComponentService<any, any>, item?: any): void;
5
+ static notification(viewContainer?: IViewContainer<any, any>, title?: string, message?: string, severity?: 'success' | 'warn' | 'error'): void;
6
+ static tableNotificationError(translationService: TranslateService, table: TableDescriptor<any>, error: any, viewContainer?: IViewContainer<any, any>): void;
7
+ static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, viewContainer?: IViewContainer<any, any>, item?: any): void;
8
+ static actionNotificationError(translationService: TranslateService, action: ActionDescriptor<any>, error: MngError, functionName: string, viewContainer?: IViewContainer<any, any>, item?: any): void;
8
9
  static getFormEditorWarningMessage(translationService: TranslateService, title: string, message: string): {
9
10
  severity: string;
10
11
  summary: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.2.18",
3
+ "version": "0.2.21",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.1.0",
6
6
  "@angular/core": "^13.1.0",
package/public-api.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from './lib/mng-commons.module';
2
2
  export * from './lib/api/services';
3
3
  export * from './lib/components/layout/services';
4
- export * from './lib/components/tableview/services';
5
4
  export * from './lib/services';
6
5
  export * from './lib/services/providers';
7
6
  export * from './lib/api/utils';
@@ -25,11 +25,4 @@
25
25
  width: 80%;
26
26
  }
27
27
  }
28
-
29
- //&.mng-details-dynamic-dialog {
30
- // .p-dialog-content {
31
- // border-bottom-left-radius: $dialogBorderRadius;
32
- // border-bottom-right-radius: $dialogBorderRadius;
33
- // }
34
- //}
35
28
  }
@@ -10,6 +10,8 @@ form {
10
10
  border-top: none;
11
11
  padding-left: 0;
12
12
  padding-right: 0;
13
+ padding-top: 0;
14
+ padding-bottom: 0.25rem;
13
15
 
14
16
  label.mng-datatable-form-label {
15
17
  flex-basis: 100%;
@@ -0,0 +1,7 @@
1
+ @mixin scaledHeight($val, $scale) {
2
+ height: $val * $scale;
3
+ }
4
+
5
+ @mixin scaledWidth($val, $scale) {
6
+ width: $val * $scale;
7
+ }
@@ -0,0 +1,57 @@
1
+ @import 'mixins';
2
+
3
+ .p-button {
4
+ &.p-button-icon-only {
5
+ &.mng-button-xs {
6
+ @include scaledWidth($buttonIconOnlyWidth, $scaleXS);
7
+ @include scaledPadding($buttonIconOnlyPadding, $scaleXS);
8
+
9
+ .p-button-icon {
10
+ @include scaledFontSize($primeIconFontSize, $scaleXS);
11
+ }
12
+
13
+ &.p-button-rounded {
14
+ @include scaledHeight($buttonIconOnlyWidth, $scaleXS);
15
+ }
16
+ }
17
+
18
+ &.mng-button-sm {
19
+ @include scaledWidth($buttonIconOnlyWidth, $scaleSM);
20
+ @include scaledPadding($buttonIconOnlyPadding, $scaleSM);
21
+
22
+ .p-button-icon {
23
+ @include scaledFontSize($primeIconFontSize, $scaleSM);
24
+ }
25
+
26
+ &.p-button-rounded {
27
+ @include scaledHeight($buttonIconOnlyWidth, $scaleSM);
28
+ }
29
+ }
30
+
31
+ &.mng-button-lg {
32
+ @include scaledWidth($buttonIconOnlyWidth, $scaleLG);
33
+ @include scaledPadding($buttonIconOnlyPadding, $scaleLG);
34
+
35
+ .p-button-icon {
36
+ @include scaledFontSize($primeIconFontSize, $scaleLG);
37
+ }
38
+
39
+ &.p-button-rounded {
40
+ @include scaledHeight($buttonIconOnlyWidth, $scaleLG);
41
+ }
42
+ }
43
+
44
+ &.mng-button-xl {
45
+ @include scaledWidth($buttonIconOnlyWidth, $scaleLG);
46
+ @include scaledPadding($buttonIconOnlyPadding, $scaleLG);
47
+
48
+ .p-button-icon {
49
+ @include scaledFontSize($primeIconFontSize, $scaleLG);
50
+ }
51
+
52
+ &.p-button-rounded {
53
+ @include scaledHeight($buttonIconOnlyWidth, $scaleLG);
54
+ }
55
+ }
56
+ }
57
+ }