@mediusinc/mng-commons 0.3.0 → 0.3.3

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 (42) hide show
  1. package/esm2020/lib/components/action/action.component.mjs +29 -7
  2. package/esm2020/lib/components/action/editor/action-editor.component.mjs +7 -6
  3. package/esm2020/lib/components/action/models/action-execution.model.mjs +1 -1
  4. package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +186 -32
  5. package/esm2020/lib/components/form/editor/form-editor.component.mjs +3 -3
  6. package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +1 -1
  7. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +8 -8
  8. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +4 -6
  9. package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +9 -6
  10. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +18 -23
  11. package/esm2020/lib/components/tableview/table/table.component.mjs +3 -3
  12. package/esm2020/lib/descriptors/action.descriptor.mjs +87 -4
  13. package/esm2020/lib/descriptors/editor.descriptor.mjs +32 -11
  14. package/esm2020/lib/descriptors/table.descriptor.mjs +28 -10
  15. package/esm2020/lib/mng-commons.module.mjs +6 -2
  16. package/esm2020/lib/models/error.model.mjs +1 -1
  17. package/esm2020/lib/pipes/index.mjs +2 -1
  18. package/esm2020/lib/pipes/link-formatter.pipe.mjs +39 -0
  19. package/esm2020/lib/services/action-executor.service.mjs +36 -41
  20. package/esm2020/lib/utils/index.mjs +2 -2
  21. package/esm2020/lib/utils/notification.util.mjs +47 -0
  22. package/fesm2015/mediusinc-mng-commons.mjs +617 -283
  23. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  24. package/fesm2020/mediusinc-mng-commons.mjs +611 -281
  25. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  26. package/lib/components/action/action.component.d.ts +12 -1
  27. package/lib/components/action/models/action-execution.model.d.ts +2 -0
  28. package/lib/components/form/autocomplete/autocomplete.component.d.ts +20 -5
  29. package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +1 -0
  30. package/lib/descriptors/action.descriptor.d.ts +35 -1
  31. package/lib/descriptors/editor.descriptor.d.ts +12 -5
  32. package/lib/descriptors/table.descriptor.d.ts +15 -10
  33. package/lib/mng-commons.module.d.ts +69 -68
  34. package/lib/models/error.model.d.ts +2 -0
  35. package/lib/pipes/index.d.ts +1 -0
  36. package/lib/pipes/link-formatter.pipe.d.ts +11 -0
  37. package/lib/services/action-executor.service.d.ts +5 -3
  38. package/lib/utils/index.d.ts +1 -1
  39. package/lib/utils/{toast.util.d.ts → notification.util.d.ts} +7 -10
  40. package/package.json +1 -1
  41. package/scss/mng-overrides/_theme_button.scss +4 -0
  42. package/esm2020/lib/utils/toast.util.mjs +0 -44
@@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
4
4
  import { ConfirmationService } from 'primeng/api';
5
5
  import { Observable } from 'rxjs';
6
6
  import { IDataProvider } from '../../data-providers';
7
- import { ActionDescriptor } from '../../descriptors';
7
+ import { ActionDescriptor, ActionLevelEnum, ActionLinkDescriptor } from '../../descriptors';
8
8
  import { IViewContainer } from '../../models';
9
9
  import { MngActionExecutorService, MngViewContainerComponentService } from '../../services';
10
10
  import { IdType } from '../../types';
@@ -16,6 +16,15 @@ export declare class MngActionComponent<T, S> implements OnInit, IActionConfirma
16
16
  private actionExecutor;
17
17
  private confirmationService;
18
18
  private viewContainerService;
19
+ readonly levelDefault = ActionLevelEnum.Default;
20
+ readonly levelPrimary = ActionLevelEnum.Primary;
21
+ readonly levelSecondary = ActionLevelEnum.Secondary;
22
+ readonly levelInfo = ActionLevelEnum.Info;
23
+ readonly levelHelp = ActionLevelEnum.Help;
24
+ readonly levelSuccess = ActionLevelEnum.Success;
25
+ readonly levelWarning = ActionLevelEnum.Warning;
26
+ readonly levelDanger = ActionLevelEnum.Danger;
27
+ hostClass: string;
19
28
  action: ActionDescriptor<T>;
20
29
  item?: T;
21
30
  itemId?: IdType;
@@ -33,6 +42,8 @@ export declare class MngActionComponent<T, S> implements OnInit, IActionConfirma
33
42
  $label: Observable<string | null>;
34
43
  $tooltip: Observable<string | null>;
35
44
  private viewContainer?;
45
+ actionLink?: ActionLinkDescriptor<T>;
46
+ hasNoTitle: boolean;
36
47
  constructor(route: ActivatedRoute, translate: TranslateService, actionExecutor: MngActionExecutorService, confirmationService: ConfirmationService, viewContainerService: MngViewContainerComponentService<T, S> | null);
37
48
  ngOnInit(): void;
38
49
  triggerAction(event: Event): void;
@@ -1,3 +1,4 @@
1
+ import { Message } from 'primeng/api';
1
2
  import { DynamicDialogRef } from 'primeng/dynamicdialog';
2
3
  import { Observable } from 'rxjs';
3
4
  import { IDataProvider } from '../../../data-providers';
@@ -29,6 +30,7 @@ export declare class ActionRunResult<T, S, DP extends IDataProvider<T, S>> {
29
30
  readonly context?: ActionExecContext<T, S, DP> | undefined;
30
31
  readonly result?: T | undefined;
31
32
  readonly error?: ActionError | undefined;
33
+ notification?: Message;
32
34
  constructor(context?: ActionExecContext<T, S, DP> | undefined, result?: T | undefined, error?: ActionError | undefined);
33
35
  }
34
36
  export declare class ActionActivationResult<T, S, DP extends IDataProvider<T, S>> {
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter, ExistingProvider, Injector, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, FormControl } from '@angular/forms';
3
+ import { TranslateService } from '@ngx-translate/core';
3
4
  import { AutoComplete } from 'primeng/autocomplete';
4
5
  import { Observable } from 'rxjs';
5
6
  import { ILookupDataProvider } from '../../../data-providers';
@@ -7,32 +8,46 @@ import * as i0 from "@angular/core";
7
8
  export declare const MNG_AUTOCOMPLETE_VALUE_ACCESSOR: ExistingProvider;
8
9
  export declare class MngAutocompleteComponent implements OnInit, OnDestroy, ControlValueAccessor {
9
10
  private injector;
11
+ private translate;
10
12
  dataProvider?: ILookupDataProvider<any, any>;
11
13
  dataKeyProperty?: string;
12
- itemsLabelProperty?: string;
14
+ itemsValuePropertyInit?: string;
15
+ itemsLabelPropertyInit?: string;
16
+ itemsLabelTranslate: boolean;
17
+ inlineSearch: boolean;
18
+ openOnFocus: boolean;
13
19
  multiselect: boolean;
14
20
  placeholder?: string;
15
21
  className: string | null;
16
22
  dropdownClassName: string | null;
17
23
  valueChangeEventEmitter: EventEmitter<any>;
18
24
  primeAutocomplete?: AutoComplete;
25
+ private isInited;
19
26
  private suggestionsSubject;
20
27
  private searchSubscription;
21
28
  private dataProviderService;
22
29
  private onChangeFn;
23
30
  private onTouchedFn;
31
+ itemsLabelProperty?: string;
32
+ itemsValueProperty?: string;
24
33
  autocompleteFormControl: FormControl;
25
34
  suggestions$: Observable<Array<any>>;
26
- isLoading: boolean;
27
- constructor(injector: Injector);
35
+ constructor(injector: Injector, translate: TranslateService);
28
36
  ngOnInit(): void;
29
37
  ngOnDestroy(): void;
30
38
  onSearch(event: any): void;
31
39
  onSelect(value: any): void;
40
+ onFocus(event: Event): void;
32
41
  registerOnChange(fn: any): void;
33
42
  registerOnTouched(fn: any): void;
34
43
  setDisabledState(isDisabled: boolean): void;
35
- writeValue(obj: any): void;
44
+ writeValue(value: any): void;
45
+ private setItemsAndDataProvider;
46
+ private setAutocompleteValueFromWrite;
47
+ private getLookup;
48
+ private i18nGetItemsKeys;
49
+ private i18nPopulateItems;
50
+ private setSuggestionsFromItems;
36
51
  static ɵfac: i0.ɵɵFactoryDeclaration<MngAutocompleteComponent, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<MngAutocompleteComponent, "mng-autocomplete", never, { "dataProvider": "dataProvider"; "dataKeyProperty": "dataKeyProperty"; "itemsLabelProperty": "itemsLabelProperty"; "multiselect": "multiselect"; "placeholder": "placeholder"; "className": "className"; "dropdownClassName": "dropdownClassName"; }, { "valueChangeEventEmitter": "valueChange"; }, never, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<MngAutocompleteComponent, "mng-autocomplete", never, { "dataProvider": "dataProvider"; "dataKeyProperty": "dataKeyProperty"; "itemsValuePropertyInit": "itemsValueProperty"; "itemsLabelPropertyInit": "itemsLabelProperty"; "itemsLabelTranslate": "itemsLabelTranslate"; "inlineSearch": "inlineSearch"; "openOnFocus": "openOnFocus"; "multiselect": "multiselect"; "placeholder": "placeholder"; "className": "className"; "dropdownClassName": "dropdownClassName"; }, { "valueChangeEventEmitter": "valueChange"; }, never, never>;
38
53
  }
@@ -23,6 +23,7 @@ export declare class MngTableColumnFilterComponent<T> implements OnInit {
23
23
  ngOnInit(): void;
24
24
  autocompleteFilter(value: T, filterCallback: Function): void;
25
25
  dropdownFilter(value: T, filterCallback: Function): void;
26
+ toLookupFilterValue(value?: any): any;
26
27
  static ɵfac: i0.ɵɵFactoryDeclaration<MngTableColumnFilterComponent<any>, never>;
27
28
  static ɵcmp: i0.ɵɵComponentDeclaration<MngTableColumnFilterComponent<any>, "mng-table-column-filter", never, { "descriptor": "descriptor"; "display": "display"; }, {}, never, never>;
28
29
  }
@@ -1,4 +1,5 @@
1
1
  import { Type } from '@angular/core';
2
+ import { Params, QueryParamsHandling } from '@angular/router';
2
3
  import { Observable } from 'rxjs';
3
4
  import { ActionExecContext } from '../components/action/models';
4
5
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
@@ -18,9 +19,12 @@ export declare class ActionDescriptor<T> {
18
19
  protected _routeUrl: string | null;
19
20
  protected _title?: string | null;
20
21
  protected _icon?: string | null;
22
+ protected _tooltip?: string | null;
21
23
  protected _className: string;
22
24
  protected _size: ActionDescriptor.SizeEnum;
23
- protected _tooltip?: string | null;
25
+ protected _isStyleText: boolean;
26
+ protected _isStyleOutlined: boolean;
27
+ protected _isStyleRaised: boolean;
24
28
  protected _dataProvider?: IDataProvider<T, any>;
25
29
  protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined>;
26
30
  protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
@@ -57,6 +61,9 @@ export declare class ActionDescriptor<T> {
57
61
  get isEnabledFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
58
62
  get actionName(): string;
59
63
  get className(): string;
64
+ get isStyleText(): boolean;
65
+ get isStyleOutlined(): boolean;
66
+ get isStyleRaised(): boolean;
60
67
  get size(): ActionDescriptor.SizeEnum;
61
68
  get isSizeExtraSmall(): boolean;
62
69
  get isSizeSmall(): boolean;
@@ -94,6 +101,7 @@ export declare class ActionDescriptor<T> {
94
101
  withTooltip(tooltip: string | null): this;
95
102
  withClassName(className: string): this;
96
103
  withSize(size?: ActionDescriptor.SizeEnum): this;
104
+ withStyle(styleText?: boolean, styleOutlined?: boolean, styleRaised?: boolean): this;
97
105
  withPosition(position: ActionPositionEnum): this;
98
106
  withRunConfirmation(icon?: string, title?: string, message?: string, acceptTitle?: string, rejectTitle?: string): this;
99
107
  withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): void;
@@ -115,6 +123,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
115
123
  protected _hasFetchNotificationSuccess: boolean;
116
124
  protected _fetchNotificationSuccessTitle?: string;
117
125
  protected _fetchNotificationSuccessMessage?: string;
126
+ protected _dialogClassName: string;
118
127
  protected _dataProvider?: IEditorDataProvider<T, any>;
119
128
  protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
120
129
  protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
@@ -122,6 +131,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
122
131
  constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
123
132
  get editorTitle(): string | null | undefined;
124
133
  get editorDescriptor(): EditorDescriptor<T>;
134
+ get dialogClassName(): string;
125
135
  get hasFetchNotificationSuccess(): boolean;
126
136
  get fetchNotificationSuccessTitle(): string | undefined;
127
137
  get fetchNotificationSuccessMessage(): string | undefined;
@@ -134,6 +144,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
134
144
  withEditorTitle(title: string | null): this;
135
145
  withDataProvider(dataProvider: IEditorDataProvider<T, any>): this;
136
146
  withServiceType<S>(serviceType: Type<S>): this;
147
+ withDialogClassName(className: string): this;
137
148
  withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
138
149
  withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
139
150
  withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
@@ -174,6 +185,29 @@ export declare class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {
174
185
  withServiceType<S>(serviceType: Type<S>): this;
175
186
  withServiceDeleteFunction<S>(serviceType: Type<S>, deleteFn?: (id: IdType, item?: T, service?: S) => Observable<T>): this;
176
187
  }
188
+ export declare class ActionLinkDescriptor<T> extends ActionDescriptor<T> {
189
+ private _url;
190
+ private _pathSegments;
191
+ private _queryParams?;
192
+ private _queryParamsHandling?;
193
+ private _replaceUrl;
194
+ private _target;
195
+ private _isStyleLink;
196
+ constructor(model: ModelDescriptor<T>);
197
+ get url(): string;
198
+ get pathSegments(): string[];
199
+ get queryParams(): Params | undefined;
200
+ get queryParamsHandling(): QueryParamsHandling | undefined;
201
+ get replaceUrl(): boolean;
202
+ get target(): string;
203
+ get isStyleLink(): boolean;
204
+ withHref(url: string): this;
205
+ withRouterLink(...pathSegments: string[]): this;
206
+ withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this;
207
+ withReplaceUrl(replaceUrl?: boolean): this;
208
+ withTarget(target?: '_self' | '_blank'): this;
209
+ withStyleLink(isStyleLink: boolean): this;
210
+ }
177
211
  export declare enum ActionPositionEnum {
178
212
  ToolbarLeft = 0,
179
213
  ToolbarRight = 1,
@@ -198,8 +198,11 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
198
198
  protected _itemsDisabledProperty?: string;
199
199
  protected _dataKeyProperty?: string;
200
200
  protected _dataProvider?: ILookupDataProvider<T, any>;
201
- protected _lookupTableDescriptor?: TableDescriptor<T>;
202
- protected _lookupTableDataProvider?: ITableDataProvider<T, any>;
201
+ protected _dropdownClassName: string;
202
+ protected _autocompleteOpenOnFocus: boolean;
203
+ protected _autocompleteInlineSearch: boolean;
204
+ protected _dialogTableDescriptor?: TableDescriptor<T>;
205
+ protected _dialogTableDataProvider?: ITableDataProvider<T, any>;
203
206
  constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T> | null);
204
207
  get lookupType(): FieldLookupDescriptor.LookupTypeEnum;
205
208
  get itemsLabelProperty(): string | undefined;
@@ -208,9 +211,12 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
208
211
  get itemsDisabledProperty(): string | undefined;
209
212
  get dataKeyProperty(): string | undefined;
210
213
  get dataProvider(): ILookupDataProvider<T, any> | undefined;
211
- get lookupTableDataProvider(): ITableDataProvider<T, any> | undefined;
214
+ get autocompleteOpenOnFocus(): boolean;
215
+ get autocompleteInlineSearch(): boolean;
216
+ get dropdownClassName(): string;
212
217
  get modelType(): ClassType<T> | null;
213
- get lookupTableDescriptor(): TableDescriptor<T> | undefined;
218
+ get dialogTableDescriptor(): TableDescriptor<T> | undefined;
219
+ get dialogTableDataProvider(): ITableDataProvider<T, any> | undefined;
214
220
  withItemsLabelProperty(itemsLabelProperty: string, translate?: boolean): this;
215
221
  withItemsValueProperty(itemsValueProperty: string): this;
216
222
  withItemsDisabledProperty(itemsDisabledProperty: string): this;
@@ -218,7 +224,7 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
218
224
  withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
219
225
  withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
220
226
  withConfig(config: FieldLookupConfig): this;
221
- asAutocomplete(): this;
227
+ asAutocomplete(openOnFocus?: boolean, inlineSearch?: boolean): this;
222
228
  asDialog(lookupTableDescriptor: TableDescriptor<T>, tableDataProvider?: ITableDataProvider<T, any>): this;
223
229
  copy(): FieldLookupDescriptor<T, ET>;
224
230
  }
@@ -236,6 +242,7 @@ export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor
236
242
  constructor(editor: EditorDescriptor<ET>, property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null);
237
243
  get enumType(): EnumType;
238
244
  withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this;
245
+ asAutocomplete(openOnFocus?: boolean): this;
239
246
  copy(): FieldLookupEnumDescriptor<ET>;
240
247
  }
241
248
  export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
@@ -169,15 +169,17 @@ export declare namespace FilterDescriptor {
169
169
  }
170
170
  }
171
171
  export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> implements ILookupDescriptor<T> {
172
- private readonly _modelType;
173
- private _lookupType?;
174
- private _dataProvider?;
175
- private _itemsLabelProperty?;
176
- private _itemsLabelTranslate;
177
- private _itemsValueProperty?;
178
- private _dataKeyProperty?;
179
- private _multiselect;
172
+ protected readonly _modelType: ClassType<T> | null;
173
+ protected _lookupType?: FilterLookupDescriptor.LookupTypeEnum;
174
+ protected _dataProvider?: ILookupDataProvider<T, any>;
175
+ protected _itemsLabelProperty?: string;
176
+ protected _itemsLabelTranslate: boolean;
177
+ protected _itemsValueProperty?: string;
178
+ protected _dataKeyProperty?: string;
179
+ protected _multiselect: boolean;
180
180
  protected _dropdownClassName: string;
181
+ protected _autocompleteOpenOnFocus: boolean;
182
+ protected _autocompleteInlineSearch: boolean;
181
183
  constructor(property: string, modelType: ClassType<T> | null);
182
184
  get lookupType(): FilterLookupDescriptor.LookupTypeEnum | undefined;
183
185
  get dataProvider(): ILookupDataProvider<T, any> | undefined;
@@ -186,6 +188,8 @@ export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> imple
186
188
  get itemsValueProperty(): string | undefined;
187
189
  get dataKeyProperty(): string | undefined;
188
190
  get multiselect(): boolean;
191
+ get autocompleteOpenOnFocus(): boolean;
192
+ get autocompleteInlineSearch(): boolean;
189
193
  get dropdownClassName(): string;
190
194
  get modelType(): ClassType<T> | null;
191
195
  withItemsLabelProperty(itemsLabelProperty: string, translate?: boolean): this;
@@ -195,14 +199,15 @@ export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> imple
195
199
  withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
196
200
  withMultiselect(multiselect?: boolean): this;
197
201
  withDropdownClassName(dropdownClassName: string): this;
198
- asAutocomplete(): this;
202
+ asAutocomplete(openOnFocus?: boolean, inlineSearch?: boolean): this;
199
203
  copy(): FilterLookupDescriptor<T>;
200
- protected copyFieldsTo(descriptor: FilterLookupDescriptor<T>): void;
204
+ protected copyFieldsTo(filter: FilterLookupDescriptor<T>): void;
201
205
  }
202
206
  export declare class FilterLookupEnumDescriptor extends FilterLookupDescriptor<EnumValue<string | number>> {
203
207
  private readonly _enumType;
204
208
  constructor(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null);
205
209
  get enumType(): EnumType;
210
+ asAutocomplete(openOnFocus?: boolean): this;
206
211
  copy(): FilterLookupEnumDescriptor;
207
212
  }
208
213
  export declare namespace FilterLookupDescriptor {
@@ -8,77 +8,78 @@ import * as i3 from "./pipes/property-path.pipe";
8
8
  import * as i4 from "./pipes/enum.pipe";
9
9
  import * as i5 from "./pipes/boolean.pipe";
10
10
  import * as i6 from "./pipes/i18n-property.pipe";
11
- import * as i7 from "./components/layout/breadcrumb.component";
12
- import * as i8 from "./components/layout/footer.component";
13
- import * as i9 from "./components/layout/main-layout.component";
14
- import * as i10 from "./components/layout/menu.component";
15
- import * as i11 from "./components/layout/menu-item.component";
16
- import * as i12 from "./components/layout/topbar.component";
17
- import * as i13 from "./components/form/autocomplete/autocomplete.component";
18
- import * as i14 from "./components/form/dropdown/dropdown.component";
19
- import * as i15 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
20
- import * as i16 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
21
- import * as i17 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
22
- import * as i18 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
23
- import * as i19 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
24
- import * as i20 from "./components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component";
25
- import * as i21 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
26
- import * as i22 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
27
- import * as i23 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
28
- import * as i24 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
29
- import * as i25 from "./components/tableview/table/table.component";
30
- import * as i26 from "./components/tableview/tableview.component";
31
- import * as i27 from "./components/tableview/table/column-value/column-value.component";
32
- import * as i28 from "./components/tableview/table/column-filter/column-filter.component";
33
- import * as i29 from "./components/tableview/route/tableview-route.component";
34
- import * as i30 from "./components/form/editor/form-editor.component";
35
- import * as i31 from "./components/action/action.component";
36
- import * as i32 from "./components/action/editor/action-editor.component";
37
- import * as i33 from "./components/action/route/action-route.component";
38
- import * as i34 from "@angular/common";
39
- import * as i35 from "@angular/router";
40
- import * as i36 from "@angular/common/http";
41
- import * as i37 from "@angular/forms";
42
- import * as i38 from "@ngx-translate/core";
43
- import * as i39 from "@ngx-formly/core";
44
- import * as i40 from "primeng/autocomplete";
45
- import * as i41 from "primeng/breadcrumb";
46
- import * as i42 from "primeng/button";
47
- import * as i43 from "primeng/calendar";
48
- import * as i44 from "primeng/card";
49
- import * as i45 from "primeng/checkbox";
50
- import * as i46 from "primeng/chip";
51
- import * as i47 from "primeng/confirmdialog";
52
- import * as i48 from "primeng/confirmpopup";
53
- import * as i49 from "primeng/dialog";
54
- import * as i50 from "primeng/dynamicdialog";
55
- import * as i51 from "primeng/dropdown";
56
- import * as i52 from "primeng/fileupload";
57
- import * as i53 from "primeng/inputnumber";
58
- import * as i54 from "primeng/inputmask";
59
- import * as i55 from "primeng/inputswitch";
60
- import * as i56 from "primeng/inputtext";
61
- import * as i57 from "primeng/inputtextarea";
62
- import * as i58 from "primeng/paginator";
63
- import * as i59 from "primeng/radiobutton";
64
- import * as i60 from "primeng/ripple";
65
- import * as i61 from "primeng/selectbutton";
66
- import * as i62 from "primeng/table";
67
- import * as i63 from "primeng/tag";
68
- import * as i64 from "primeng/toast";
69
- import * as i65 from "primeng/togglebutton";
70
- import * as i66 from "primeng/toolbar";
71
- import * as i67 from "primeng/tooltip";
72
- import * as i68 from "primeng/messages";
73
- import * as i69 from "primeng/progressspinner";
74
- import * as i70 from "primeng/tabview";
75
- import * as i71 from "primeng/fieldset";
76
- import * as i72 from "primeng/multiselect";
77
- import * as i73 from "primeng/skeleton";
11
+ import * as i7 from "./pipes/link-formatter.pipe";
12
+ import * as i8 from "./components/layout/breadcrumb.component";
13
+ import * as i9 from "./components/layout/footer.component";
14
+ import * as i10 from "./components/layout/main-layout.component";
15
+ import * as i11 from "./components/layout/menu.component";
16
+ import * as i12 from "./components/layout/menu-item.component";
17
+ import * as i13 from "./components/layout/topbar.component";
18
+ import * as i14 from "./components/form/autocomplete/autocomplete.component";
19
+ import * as i15 from "./components/form/dropdown/dropdown.component";
20
+ import * as i16 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
21
+ import * as i17 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
22
+ import * as i18 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
23
+ import * as i19 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
24
+ import * as i20 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
25
+ import * as i21 from "./components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component";
26
+ import * as i22 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
27
+ import * as i23 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
28
+ import * as i24 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
29
+ import * as i25 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
30
+ import * as i26 from "./components/tableview/table/table.component";
31
+ import * as i27 from "./components/tableview/tableview.component";
32
+ import * as i28 from "./components/tableview/table/column-value/column-value.component";
33
+ import * as i29 from "./components/tableview/table/column-filter/column-filter.component";
34
+ import * as i30 from "./components/tableview/route/tableview-route.component";
35
+ import * as i31 from "./components/form/editor/form-editor.component";
36
+ import * as i32 from "./components/action/action.component";
37
+ import * as i33 from "./components/action/editor/action-editor.component";
38
+ import * as i34 from "./components/action/route/action-route.component";
39
+ import * as i35 from "@angular/common";
40
+ import * as i36 from "@angular/router";
41
+ import * as i37 from "@angular/common/http";
42
+ import * as i38 from "@angular/forms";
43
+ import * as i39 from "@ngx-translate/core";
44
+ import * as i40 from "@ngx-formly/core";
45
+ import * as i41 from "primeng/autocomplete";
46
+ import * as i42 from "primeng/breadcrumb";
47
+ import * as i43 from "primeng/button";
48
+ import * as i44 from "primeng/calendar";
49
+ import * as i45 from "primeng/card";
50
+ import * as i46 from "primeng/checkbox";
51
+ import * as i47 from "primeng/chip";
52
+ import * as i48 from "primeng/confirmdialog";
53
+ import * as i49 from "primeng/confirmpopup";
54
+ import * as i50 from "primeng/dialog";
55
+ import * as i51 from "primeng/dynamicdialog";
56
+ import * as i52 from "primeng/dropdown";
57
+ import * as i53 from "primeng/fileupload";
58
+ import * as i54 from "primeng/inputnumber";
59
+ import * as i55 from "primeng/inputmask";
60
+ import * as i56 from "primeng/inputswitch";
61
+ import * as i57 from "primeng/inputtext";
62
+ import * as i58 from "primeng/inputtextarea";
63
+ import * as i59 from "primeng/paginator";
64
+ import * as i60 from "primeng/radiobutton";
65
+ import * as i61 from "primeng/ripple";
66
+ import * as i62 from "primeng/selectbutton";
67
+ import * as i63 from "primeng/table";
68
+ import * as i64 from "primeng/tag";
69
+ import * as i65 from "primeng/toast";
70
+ import * as i66 from "primeng/togglebutton";
71
+ import * as i67 from "primeng/toolbar";
72
+ import * as i68 from "primeng/tooltip";
73
+ import * as i69 from "primeng/messages";
74
+ import * as i70 from "primeng/progressspinner";
75
+ import * as i71 from "primeng/tabview";
76
+ import * as i72 from "primeng/fieldset";
77
+ import * as i73 from "primeng/multiselect";
78
+ import * as i74 from "primeng/skeleton";
78
79
  export declare const primeNgModules: (typeof InputTextModule)[];
79
80
  export declare class MngCommonsModule {
80
81
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
81
82
  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.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
+ 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.MngLinkFormatterPipe, typeof i8.MngBreadcrumbComponent, typeof i9.MngFooterComponent, typeof i10.MngMainLayoutComponent, typeof i11.MngMenuComponent, typeof i12.MngMenuItemComponent, typeof i13.MngTopbarComponent, typeof i14.MngAutocompleteComponent, typeof i15.MngDropdownComponent, typeof i16.MngFormlyFieldWrapperComponent, typeof i17.MngFormlyTableWrapperComponent, typeof i18.MngFormlyFieldInputComponent, typeof i19.MngFormlyFieldDropdownComponent, typeof i20.MngFormlyFieldAutocompleteComponent, typeof i21.MngFormlyFieldLookupDialogComponent, typeof i22.MngFormlyFieldTableDialogMultiselectComponent, typeof i23.MngFormlyFieldTableDialogFormComponent, typeof i24.MngFormlyFieldTabsComponent, typeof i25.MngFormlyFieldFieldsetComponent, typeof i26.MngTableComponent, typeof i27.MngTableviewComponent, typeof i28.MngTableColumnValueComponent, typeof i29.MngTableColumnFilterComponent, typeof i30.MngTableviewRouteComponent, typeof i31.MngFormEditorComponent, typeof i32.MngActionComponent, typeof i33.MngActionEditorComponent, typeof i34.MngActionRouteComponent], [typeof i35.CommonModule, typeof i36.RouterModule, typeof i37.HttpClientModule, typeof i38.ReactiveFormsModule, typeof i39.TranslateModule, typeof i40.FormlyModule, typeof i41.AutoCompleteModule, typeof i42.BreadcrumbModule, typeof i43.ButtonModule, typeof i44.CalendarModule, typeof i45.CardModule, typeof i46.CheckboxModule, typeof i47.ChipModule, typeof i48.ConfirmDialogModule, typeof i49.ConfirmPopupModule, typeof i50.DialogModule, typeof i51.DynamicDialogModule, typeof i52.DropdownModule, typeof i53.FileUploadModule, typeof i54.InputNumberModule, typeof i55.InputMaskModule, typeof i56.InputSwitchModule, typeof i57.InputTextModule, typeof i58.InputTextareaModule, typeof i59.PaginatorModule, typeof i60.RadioButtonModule, typeof i61.RippleModule, typeof i62.SelectButtonModule, typeof i63.TableModule, typeof i64.TagModule, typeof i65.ToastModule, typeof i66.ToggleButtonModule, typeof i67.ToolbarModule, typeof i68.TooltipModule, typeof i69.MessagesModule, typeof i70.ProgressSpinnerModule, typeof i71.TabViewModule, typeof i72.FieldsetModule, typeof i73.MultiSelectModule, typeof i74.SkeletonModule], [typeof i41.AutoCompleteModule, typeof i42.BreadcrumbModule, typeof i43.ButtonModule, typeof i44.CalendarModule, typeof i45.CardModule, typeof i46.CheckboxModule, typeof i47.ChipModule, typeof i48.ConfirmDialogModule, typeof i49.ConfirmPopupModule, typeof i50.DialogModule, typeof i51.DynamicDialogModule, typeof i52.DropdownModule, typeof i53.FileUploadModule, typeof i54.InputNumberModule, typeof i55.InputMaskModule, typeof i56.InputSwitchModule, typeof i57.InputTextModule, typeof i58.InputTextareaModule, typeof i59.PaginatorModule, typeof i60.RadioButtonModule, typeof i61.RippleModule, typeof i62.SelectButtonModule, typeof i63.TableModule, typeof i64.TagModule, typeof i65.ToastModule, typeof i66.ToggleButtonModule, typeof i67.ToolbarModule, typeof i68.TooltipModule, typeof i69.MessagesModule, typeof i70.ProgressSpinnerModule, typeof i71.TabViewModule, typeof i72.FieldsetModule, typeof i73.MultiSelectModule, typeof i74.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngLinkFormatterPipe, typeof i8.MngBreadcrumbComponent, typeof i9.MngFooterComponent, typeof i10.MngMainLayoutComponent, typeof i11.MngMenuComponent, typeof i12.MngMenuItemComponent, typeof i13.MngTopbarComponent, typeof i14.MngAutocompleteComponent, typeof i15.MngDropdownComponent, typeof i16.MngFormlyFieldWrapperComponent, typeof i17.MngFormlyTableWrapperComponent, typeof i18.MngFormlyFieldInputComponent, typeof i19.MngFormlyFieldDropdownComponent, typeof i20.MngFormlyFieldAutocompleteComponent, typeof i21.MngFormlyFieldLookupDialogComponent, typeof i22.MngFormlyFieldTableDialogMultiselectComponent, typeof i23.MngFormlyFieldTableDialogFormComponent, typeof i24.MngFormlyFieldTabsComponent, typeof i25.MngFormlyFieldFieldsetComponent, typeof i26.MngTableComponent, typeof i27.MngTableviewComponent, typeof i28.MngTableColumnValueComponent, typeof i29.MngTableColumnFilterComponent, typeof i30.MngTableviewRouteComponent, typeof i31.MngFormEditorComponent, typeof i32.MngActionComponent, typeof i33.MngActionEditorComponent, typeof i34.MngActionRouteComponent]>;
83
84
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
84
85
  }
@@ -1,8 +1,10 @@
1
+ import { Message } from 'primeng/api';
1
2
  import { IdType } from '../types';
2
3
  export interface MngError extends Error {
3
4
  id?: IdType;
4
5
  messageCode?: number | string;
5
6
  message: string;
7
+ notification?: Message;
6
8
  details?: any;
7
9
  status?: number;
8
10
  statusDescription?: string;
@@ -1,4 +1,5 @@
1
1
  export * from './boolean.pipe';
2
2
  export * from './enum.pipe';
3
3
  export * from './i18n-property.pipe';
4
+ export * from './link-formatter.pipe';
4
5
  export * from './property-path.pipe';
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { ActionData } from '../components/action/models';
3
+ import { ModelDescriptor } from '../descriptors';
4
+ import { IdType } from '../types';
5
+ import * as i0 from "@angular/core";
6
+ export declare class MngLinkFormatterPipe implements PipeTransform {
7
+ private parseUrl;
8
+ transform(value: string | string[], itemId?: IdType, item?: any, model?: ModelDescriptor<any>, actionData?: ActionData): any;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngLinkFormatterPipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<MngLinkFormatterPipe, "linkFormatter">;
11
+ }
@@ -8,7 +8,8 @@ import { ActionActivationResult, ActionData, ActionExecContext, ActionRunResult,
8
8
  import { MngTableCellClickEvent } from '../components/tableview/models';
9
9
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
10
10
  import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
11
- import { IViewContainer } from '../models';
11
+ import { IViewContainer, MngError } from '../models';
12
+ import { MngLinkFormatterPipe } from '../pipes';
12
13
  import { IdType } from '../types';
13
14
  import { MngErrorMapperService } from './error-mapper.service';
14
15
  import { MngNavigationService } from './navigation.service';
@@ -21,8 +22,9 @@ export declare class MngActionExecutorService {
21
22
  private translate;
22
23
  private navigationService;
23
24
  private errorMapper;
25
+ private linkFormatter;
24
26
  private defaultEditorDialogComponent;
25
- constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService, navigationService: MngNavigationService, errorMapper: MngErrorMapperService, defaultEditorDialogComponent: Type<any>);
27
+ constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService, navigationService: MngNavigationService, errorMapper: MngErrorMapperService, linkFormatter: MngLinkFormatterPipe, defaultEditorDialogComponent: Type<any>);
26
28
  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
29
  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>>>;
28
30
  /**
@@ -94,7 +96,7 @@ export declare class MngActionExecutorService {
94
96
  */
95
97
  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
98
  deactivateAction<T>(action: ActionDescriptor<T>): void;
97
- private toMngActionError;
99
+ toMngActionError(error?: any): MngError;
98
100
  static ɵfac: i0.ɵɵFactoryDeclaration<MngActionExecutorService, never>;
99
101
  static ɵprov: i0.ɵɵInjectableDeclaration<MngActionExecutorService>;
100
102
  }
@@ -2,5 +2,5 @@ export * from './editor-formly.util';
2
2
  export * from './enum.util';
3
3
  export * from './i18n.util';
4
4
  export * from './model.util';
5
- export * from './toast.util';
5
+ export * from './notification.util';
6
6
  export * from './type.util';
@@ -1,14 +1,11 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
+ import { Message } from 'primeng/api';
2
3
  import { ActionDescriptor, TableDescriptor } from '../descriptors';
3
4
  import { IViewContainer, MngError } from '../models';
4
- export declare class ToastUtil {
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;
9
- static getFormEditorWarningMessage(translationService: TranslateService, title: string, message: string): {
10
- severity: string;
11
- summary: any;
12
- detail: any;
13
- };
5
+ export declare class NotificationUtil {
6
+ static notification(viewContainer?: IViewContainer<any, any>, title?: string, message?: string, severity?: 'success' | 'warn' | 'error'): Message;
7
+ static tableNotificationError(translationService: TranslateService, table: TableDescriptor<any>, error: any, viewContainer?: IViewContainer<any, any>): Message;
8
+ static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, viewContainer?: IViewContainer<any, any>, item?: any): Message;
9
+ static actionNotificationError(translationService: TranslateService, action: ActionDescriptor<any>, error: MngError, functionName: string, viewContainer?: IViewContainer<any, any>, item?: any): Message;
10
+ static getFormEditorWarningMessage(translationService: TranslateService, title: string, message: string): Message;
14
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.3.0",
3
+ "version": "0.3.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.1.0",
6
6
  "@angular/core": "^13.1.0",
@@ -1,5 +1,9 @@
1
1
  @import 'mixins';
2
2
 
3
+ mng-action-button.mng-action-button {
4
+ margin: 0.1rem;
5
+ }
6
+
3
7
  .p-button {
4
8
  &.p-button-icon-only {
5
9
  &.mng-button-xs {