@mediusinc/mng-commons 0.2.16 → 0.2.19

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 (100) hide show
  1. package/assets/i18n/en.json +4 -2
  2. package/assets/i18n/sl.json +19 -17
  3. package/esm2020/lib/api/models/filter-param.model.mjs +1 -1
  4. package/esm2020/lib/api/models/query-param.model.mjs +1 -1
  5. package/esm2020/lib/api/services/crud-api.abstract.service.mjs +17 -12
  6. package/esm2020/lib/components/action/action.component.mjs +32 -18
  7. package/esm2020/lib/components/action/editor/action-editor.component.mjs +182 -0
  8. package/esm2020/lib/components/action/index.mjs +2 -2
  9. package/esm2020/lib/components/action/models/action-execution.model.mjs +3 -3
  10. package/esm2020/lib/components/action/route/action-route.component.mjs +17 -12
  11. package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +13 -11
  12. package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +5 -7
  13. package/esm2020/lib/components/form/editor/form-editor.component.mjs +56 -4
  14. package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
  15. package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  16. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  17. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +179 -0
  18. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +28 -9
  19. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +14 -10
  20. package/esm2020/lib/components/form/formly/fields/index.mjs +2 -1
  21. package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
  22. package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +4 -3
  23. package/esm2020/lib/components/form/models/form-editor.event.mjs +28 -1
  24. package/esm2020/lib/components/layout/main-layout.component.mjs +1 -1
  25. package/esm2020/lib/components/layout/topbar.component.mjs +2 -4
  26. package/esm2020/lib/components/tableview/table/table.component.mjs +43 -20
  27. package/esm2020/lib/components/tableview/tableview.component.mjs +22 -15
  28. package/esm2020/lib/config/formly.config.mjs +7 -2
  29. package/esm2020/lib/data-providers/table.data-provider.mjs +17 -2
  30. package/esm2020/lib/descriptors/action.descriptor.mjs +112 -1
  31. package/esm2020/lib/descriptors/editor.descriptor.interface.mjs +2 -0
  32. package/esm2020/lib/descriptors/editor.descriptor.mjs +129 -28
  33. package/esm2020/lib/directives/component.directive.mjs +8 -3
  34. package/esm2020/lib/mng-commons.module.mjs +18 -11
  35. package/esm2020/lib/models/index.mjs +2 -1
  36. package/esm2020/lib/models/view-container.model.mjs +2 -0
  37. package/esm2020/lib/router/models/router.model.mjs +1 -1
  38. package/esm2020/lib/router/route-builder.mjs +75 -11
  39. package/esm2020/lib/services/action-executor.service.mjs +291 -0
  40. package/esm2020/lib/services/configuration.service.mjs +3 -3
  41. package/esm2020/lib/services/index.mjs +2 -2
  42. package/esm2020/lib/services/mng-view-container-component.service.mjs +35 -0
  43. package/esm2020/lib/services/tokens/default-setting.token.mjs +3 -0
  44. package/esm2020/lib/services/tokens/index.mjs +2 -1
  45. package/esm2020/lib/utils/editor-formly.util.mjs +14 -3
  46. package/esm2020/lib/utils/toast.util.mjs +15 -7
  47. package/esm2020/public-api.mjs +1 -2
  48. package/fesm2015/mediusinc-mng-commons.mjs +1738 -1012
  49. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  50. package/fesm2020/mediusinc-mng-commons.mjs +1578 -878
  51. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  52. package/lib/api/models/filter-param.model.d.ts +1 -1
  53. package/lib/api/models/query-param.model.d.ts +1 -1
  54. package/lib/api/services/crud-api.abstract.service.d.ts +9 -8
  55. package/lib/components/action/action.component.d.ts +12 -7
  56. package/lib/components/action/{dialog/action-dialog.component.d.ts → editor/action-editor.component.d.ts} +18 -12
  57. package/lib/components/action/index.d.ts +1 -1
  58. package/lib/components/action/models/action-execution.model.d.ts +3 -3
  59. package/lib/components/action/route/action-route.component.d.ts +6 -6
  60. package/lib/components/form/autocomplete/autocomplete.component.d.ts +3 -2
  61. package/lib/components/form/dropdown/dropdown.component.d.ts +4 -4
  62. package/lib/components/form/editor/form-editor.component.d.ts +7 -2
  63. package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +45 -0
  64. package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +2 -0
  65. package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +1 -0
  66. package/lib/components/form/formly/fields/index.d.ts +1 -0
  67. package/lib/components/form/models/form-editor.event.d.ts +32 -0
  68. package/lib/components/layout/topbar.component.d.ts +2 -3
  69. package/lib/components/tableview/table/table.component.d.ts +14 -6
  70. package/lib/components/tableview/tableview.component.d.ts +10 -7
  71. package/lib/data-providers/table.data-provider.d.ts +9 -1
  72. package/lib/descriptors/action.descriptor.d.ts +41 -5
  73. package/lib/descriptors/editor.descriptor.d.ts +62 -19
  74. package/lib/descriptors/editor.descriptor.interface.d.ts +9 -0
  75. package/lib/directives/component.directive.d.ts +5 -4
  76. package/lib/mng-commons.module.d.ts +55 -54
  77. package/lib/models/index.d.ts +1 -0
  78. package/lib/models/view-container.model.d.ts +6 -0
  79. package/lib/router/models/router.model.d.ts +2 -2
  80. package/lib/router/route-builder.d.ts +18 -4
  81. package/lib/services/{action.service.d.ts → action-executor.service.d.ts} +19 -18
  82. package/lib/services/index.d.ts +1 -1
  83. package/lib/services/mng-view-container-component.service.d.ts +22 -0
  84. package/lib/services/tokens/default-setting.token.d.ts +2 -0
  85. package/lib/services/tokens/index.d.ts +1 -0
  86. package/lib/utils/toast.util.d.ts +5 -4
  87. package/package.json +1 -1
  88. package/public-api.d.ts +0 -1
  89. package/scss/mng-overrides/_layout_forms.scss +2 -0
  90. package/scss/mng-overrides/_mixins.scss +7 -0
  91. package/scss/mng-overrides/_theme_button.scss +58 -0
  92. package/scss/mng-overrides/_theme_dropdown.scss +17 -0
  93. package/scss/mng-overrides/_theme_styles.scss +1 -0
  94. package/scss/mng-overrides/_variables.scss +2 -0
  95. package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +0 -151
  96. package/esm2020/lib/components/tableview/services/index.mjs +0 -2
  97. package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +0 -21
  98. package/esm2020/lib/services/action.service.mjs +0 -273
  99. package/lib/components/tableview/services/index.d.ts +0 -1
  100. package/lib/components/tableview/services/tableview.component.service.d.ts +0 -14
@@ -1,7 +1,8 @@
1
+ import { Type } from '@angular/core';
1
2
  import { Observable } from 'rxjs';
2
3
  import { ActionExecContext } from '../components/action/models';
3
4
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
4
- import { ClassType } from '../types';
5
+ import { ClassType, IdType } from '../types';
5
6
  import { EditorDescriptor, ModelDescriptor } from './';
6
7
  export declare class ActionDescriptor<T> {
7
8
  protected readonly _model: ModelDescriptor<T>;
@@ -18,7 +19,9 @@ export declare class ActionDescriptor<T> {
18
19
  protected _title?: string | null;
19
20
  protected _icon?: string;
20
21
  protected _className: string;
22
+ protected _size: ActionDescriptor.SizeEnum;
21
23
  protected _tooltip?: string | null;
24
+ protected _dataProvider?: IDataProvider<T, any>;
22
25
  protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
23
26
  protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
24
27
  protected _isEnabledFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
@@ -47,11 +50,17 @@ export declare class ActionDescriptor<T> {
47
50
  get title(): string | null | undefined;
48
51
  get icon(): string | undefined;
49
52
  get tooltip(): string | null | undefined;
53
+ get dataProvider(): IDataProvider<T, any> | undefined;
50
54
  get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
51
55
  get isVisibleFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
52
56
  get isEnabledFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
53
57
  get actionName(): string;
54
58
  get className(): string;
59
+ get size(): ActionDescriptor.SizeEnum;
60
+ get isSizeExtraSmall(): boolean;
61
+ get isSizeSmall(): boolean;
62
+ get isSizeLarge(): boolean;
63
+ get isSizeExtraLarge(): boolean;
55
64
  get hasRunConfirmation(): boolean;
56
65
  get runConfirmationIcon(): string | undefined;
57
66
  get runConfirmationTitle(): string | undefined;
@@ -64,6 +73,8 @@ export declare class ActionDescriptor<T> {
64
73
  get hasRunNotificationError(): boolean;
65
74
  get runNotificationErrorTitle(): string | undefined;
66
75
  get runNotificationErrorMessage(): string | undefined;
76
+ withDataProvider(dataProvider: IDataProvider<T, any>): this;
77
+ withServiceType<S>(serviceType: Type<S>): this;
67
78
  withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
68
79
  withIsVisibleFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
69
80
  withIsEnabledFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
@@ -81,45 +92,70 @@ export declare class ActionDescriptor<T> {
81
92
  withIcon(icon: string): this;
82
93
  withTooltip(tooltip: string | null): this;
83
94
  withClassName(className: string): this;
95
+ withSize(size?: ActionDescriptor.SizeEnum): this;
84
96
  withPosition(position: ActionPositionEnum): this;
85
97
  withRunConfirmation(icon?: string, title?: string, message?: string, acceptTitle?: string, rejectTitle?: string): this;
86
98
  withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): void;
87
99
  withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
88
100
  }
101
+ export declare namespace ActionDescriptor {
102
+ enum SizeEnum {
103
+ ExtraSmall = 0,
104
+ Small = 1,
105
+ Normal = 2,
106
+ Large = 3,
107
+ ExtraLarge = 4
108
+ }
109
+ }
89
110
  export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
90
111
  private readonly _editorDescriptor;
91
112
  protected _editorTitle?: string;
92
- private _hasFetchNotificationSuccess;
93
- private _fetchNotificationSuccessTitle?;
94
- private _fetchNotificationSuccessMessage?;
113
+ protected _hasFetchNotificationSuccess: boolean;
114
+ protected _fetchNotificationSuccessTitle?: string;
115
+ protected _fetchNotificationSuccessMessage?: string;
116
+ protected _dataProvider?: IEditorDataProvider<T, any>;
95
117
  protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
96
118
  protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
119
+ protected _editorComponent?: Type<any>;
97
120
  constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
98
121
  get editorTitle(): string | undefined;
99
122
  get editorDescriptor(): EditorDescriptor<T>;
100
123
  get hasFetchNotificationSuccess(): boolean;
101
124
  get fetchNotificationSuccessTitle(): string | undefined;
102
125
  get fetchNotificationSuccessMessage(): string | undefined;
126
+ get dataProvider(): IEditorDataProvider<T, any> | undefined;
103
127
  get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
104
128
  get fetchFunction(): (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
105
129
  get submitFunction(): ((ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>) | undefined;
130
+ get editorComponent(): Type<any> | undefined;
106
131
  withEditorTitle(title: string): this;
132
+ withDataProvider(dataProvider: IEditorDataProvider<T, any>): this;
133
+ withServiceType<S>(serviceType: Type<S>): this;
107
134
  withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
108
135
  withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
109
136
  withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
110
- withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
137
+ withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
138
+ withEditorComponent(editorComponent: Type<any>): this;
111
139
  }
112
140
  export declare class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {
113
141
  constructor(editorDescriptor: EditorDescriptor<T>);
142
+ withServiceType<S>(serviceType: Type<S>): this;
143
+ withServiceFetchFunction<S>(serviceType: Type<S>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
114
144
  }
115
145
  export declare class ActionEditorAddDescriptor<T> extends ActionEditorDescriptor<T> {
116
146
  constructor(editorDescriptor: EditorDescriptor<T>);
147
+ withServiceType<S>(serviceType: Type<S>): this;
148
+ withServiceSubmitFunction<S>(serviceType: Type<S>, createFn?: (item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
117
149
  }
118
150
  export declare class ActionEditorEditDescriptor<T> extends ActionEditorDescriptor<T> {
119
151
  constructor(editorDescriptor: EditorDescriptor<T>);
152
+ withServiceType<S>(serviceType: Type<S>): this;
153
+ withServiceSubmitFunction<S>(serviceType: Type<S>, updateFn?: (id: IdType, item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
120
154
  }
121
155
  export declare class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {
122
156
  constructor(model: ModelDescriptor<T>);
157
+ withServiceType<S>(serviceType: Type<S>): this;
158
+ withServiceDeleteFunction<S>(serviceType: Type<S>, deleteFn?: (id: IdType, item?: T, service?: S) => Observable<T>): this;
123
159
  }
124
160
  export declare enum ActionPositionEnum {
125
161
  ToolbarLeft = 0,
@@ -1,12 +1,14 @@
1
1
  import { Type } from '@angular/core';
2
2
  import { AbstractControl } from '@angular/forms';
3
3
  import { FormlyFieldConfig } from '@ngx-formly/core';
4
- import { Observable } from 'rxjs';
4
+ import { Observable, Subject } from 'rxjs';
5
5
  import { MediusQueryParam, MediusQueryResult } from '../api/models';
6
+ import { MngFormFieldEvent, MngFormFieldEventData, MngFormFieldEventTypeEnum } from '../components/form/models';
6
7
  import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
7
8
  import { EnumValue } from '../models';
8
9
  import { ClassType, EnumConstantType, EnumType } from '../types';
9
10
  import { FieldValidator, ILookupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
11
+ import { FieldConfig, FieldLookupConfig } from './editor.descriptor.interface';
10
12
  export declare class EditorDescriptor<T> {
11
13
  static readonly defaultGroupName = "_default";
12
14
  private readonly _model;
@@ -41,47 +43,77 @@ export declare class EditorDescriptor<T> {
41
43
  }
42
44
  export declare abstract class AGenericFieldDescriptor<ET> {
43
45
  protected readonly _editor: EditorDescriptor<ET>;
46
+ protected _config: FieldConfig;
44
47
  protected constructor(editor: EditorDescriptor<ET>);
45
48
  get editor(): EditorDescriptor<ET>;
49
+ get config(): FieldConfig;
50
+ withConfig(config: FieldConfig): this;
46
51
  }
47
52
  export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescriptor<ET> {
48
53
  protected readonly _property: string;
49
54
  protected _group?: AFieldGroupDescriptor<ET>;
50
55
  protected _label?: string;
51
56
  protected _placeholder?: string;
57
+ protected _helpText?: string;
52
58
  protected _required: boolean;
53
59
  protected _disabled: boolean;
54
60
  protected _defaultValue?: T;
55
- protected _className: string;
56
61
  protected _getter?: (item: ET) => T;
57
62
  protected _setter?: (item: ET, value: T) => void;
58
63
  protected _validators: Array<FieldValidator>;
59
- protected _disabledFunction?: (model: any) => boolean;
64
+ protected _requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
65
+ protected _disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
66
+ protected _hiddenExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
67
+ protected _className: string;
68
+ protected _labelClassName: string;
69
+ protected _inputClassName: string;
70
+ protected _size: FieldDescriptor.SizeEnum;
71
+ protected readonly _eventsSubject: Subject<MngFormFieldEvent<T, ET>>;
60
72
  protected constructor(editor: EditorDescriptor<ET>, property: string);
73
+ get property(): string;
61
74
  get group(): AFieldGroupDescriptor<ET> | undefined;
62
75
  get label(): string | undefined;
63
76
  get placeholder(): string | undefined;
77
+ get helpText(): string | undefined;
64
78
  get required(): boolean;
65
79
  get disabled(): boolean;
66
80
  get defaultValue(): T | undefined;
67
- get className(): string;
68
81
  get getter(): ((item: ET) => T) | undefined;
69
82
  get setter(): ((item: ET, value: T) => void) | undefined;
70
83
  get validators(): FieldValidator[];
71
- get disabledFunction(): ((model: any) => boolean) | undefined;
72
- get property(): string;
84
+ get requiredExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
85
+ get disabledExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
86
+ get hiddenExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
87
+ get className(): string;
88
+ get labelClassName(): string;
89
+ get inputClassName(): string;
90
+ get size(): FieldDescriptor.SizeEnum;
91
+ get isSizeSmall(): boolean;
92
+ get isSizeLarge(): boolean;
73
93
  abstract copy(): AFieldDescriptor<T, ET>;
74
94
  withLabel(label: string): this;
75
95
  withPlaceholder(placeholder: string): this;
76
- withRequired(required?: boolean): this;
77
- withDisabled(disabled?: boolean, disabledFunction?: (model: any) => boolean): this;
96
+ withHelpText(helpText: string): this;
97
+ withRequired(required?: boolean, requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
98
+ withDisabled(disabled?: boolean, disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
99
+ withHidden(hiddenExpression: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
78
100
  withDefaultValue(defaultValue: T): this;
79
- withClassName(className: string): this;
80
101
  withGetter(getter: (item: ET) => T): this;
81
102
  withSetter(setter: (item: ET, value: T) => void): this;
82
103
  withValidator(name: string, expression: (control: AbstractControl) => boolean, message?: (err: any, field: FormlyFieldConfig) => string): this;
104
+ withClassName(className: string, labelClassName?: string, inputClassName?: string): this;
105
+ withSize(size?: FieldDescriptor.SizeEnum): this;
106
+ nextEvent(type: MngFormFieldEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFormFieldEventData<T, ET>): void;
107
+ get events$(): Observable<MngFormFieldEvent<T, ET>>;
83
108
  protected copyFieldsTo(obj: AFieldDescriptor<T, ET>): void;
84
109
  }
110
+ export declare namespace FieldDescriptor {
111
+ enum SizeEnum {
112
+ Small = 0,
113
+ Normal = 1,
114
+ Large = 2
115
+ }
116
+ }
85
117
  export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date, ET> {
86
118
  private _fieldType;
87
119
  private _rows?;
@@ -90,6 +122,7 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
90
122
  private _numberStep?;
91
123
  private _numberMinFractionDigits?;
92
124
  private _numberMaxFractionDigits?;
125
+ private _numberUseGrouping;
93
126
  private _radioOptions;
94
127
  private _datePickerFormat?;
95
128
  private _datePickerMin?;
@@ -109,6 +142,7 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
109
142
  get numberStep(): number | undefined;
110
143
  get numberMinFractionDigits(): number | undefined;
111
144
  get numberMaxFractionDigits(): number | undefined;
145
+ get numberUseGrouping(): boolean;
112
146
  get radioOptions(): EnumValue<string | number | boolean | Date>[];
113
147
  get datePickerFormat(): string | undefined;
114
148
  get datePickerMin(): Date | undefined;
@@ -120,9 +154,10 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
120
154
  get mask(): string | undefined;
121
155
  get slotChar(): string | undefined;
122
156
  get customComponentName(): string | undefined;
157
+ asHidden(): this;
123
158
  asText(minLength?: number, maxLength?: number, pattern?: string | RegExp, isEmail?: boolean): this;
124
159
  asTextarea(rows?: number, minLength?: number, maxLength?: number, pattern?: string | RegExp): this;
125
- asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number): this;
160
+ asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number, numberUseGrouping?: boolean): this;
126
161
  asSwitch(): this;
127
162
  asRadio(options: Array<string | number>, optionsTitlePath?: string): this;
128
163
  asRadioFromEnum(enumType: EnumType, optionsTitlePath?: string | null, values?: Array<EnumConstantType>, nameAsValue?: boolean): this;
@@ -133,14 +168,15 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
133
168
  }
134
169
  export declare namespace FieldInputDescriptor {
135
170
  enum TypeEnum {
136
- Text = 0,
137
- Textarea = 1,
138
- Number = 2,
139
- Switch = 3,
140
- Radio = 4,
141
- Datepicker = 5,
142
- Mask = 6,
143
- Custom = 7
171
+ Hidden = 0,
172
+ Text = 1,
173
+ Textarea = 2,
174
+ Number = 3,
175
+ Switch = 4,
176
+ Radio = 5,
177
+ Datepicker = 6,
178
+ Mask = 7,
179
+ Custom = 8
144
180
  }
145
181
  }
146
182
  export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET> implements ILookupDescriptor<T> {
@@ -150,25 +186,32 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
150
186
  protected _itemsValueProperty?: string;
151
187
  protected _dataKeyProperty?: string;
152
188
  protected _dataProvider?: ILookupDataProvider<T, any>;
189
+ protected _lookupTableDescriptor?: TableDescriptor<T>;
190
+ protected _lookupTableDataProvider?: ITableDataProvider<T, any>;
153
191
  constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T> | null);
154
192
  get lookupType(): FieldLookupDescriptor.LookupTypeEnum;
155
193
  get itemsLabelProperty(): string | undefined;
156
194
  get itemsValueProperty(): string | undefined;
157
195
  get dataKeyProperty(): string | undefined;
158
196
  get dataProvider(): ILookupDataProvider<T, any> | undefined;
197
+ get lookupTableDataProvider(): ITableDataProvider<T, any> | undefined;
159
198
  get modelType(): ClassType<T> | null;
199
+ get lookupTableDescriptor(): TableDescriptor<T> | undefined;
160
200
  withItemsLabelProperty(itemsLabelProperty: string): this;
161
201
  withItemsValueProperty(itemsValueProperty: string): this;
162
202
  withDataKeyProperty(property: string): this;
163
203
  withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
164
204
  withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
205
+ withConfig(config: FieldLookupConfig): this;
165
206
  asAutocomplete(): this;
207
+ asDialog(lookupTableDescriptor: TableDescriptor<T>, tableDataProvider?: ITableDataProvider<T, any>): this;
166
208
  copy(): FieldLookupDescriptor<T, ET>;
167
209
  }
168
210
  export declare namespace FieldLookupDescriptor {
169
211
  enum LookupTypeEnum {
170
212
  Dropdown = 0,
171
- Autocomplete = 1
213
+ Autocomplete = 1,
214
+ Dialog = 2
172
215
  }
173
216
  }
174
217
  export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumValue<string | number>, ET> {
@@ -0,0 +1,9 @@
1
+ import { Type } from '@angular/core';
2
+ export interface FieldConfig {
3
+ }
4
+ export interface FieldLookupConfig extends FieldConfig {
5
+ table?: {
6
+ captionComponent?: Type<any>;
7
+ columnActionComponent?: Type<any>;
8
+ };
9
+ }
@@ -1,11 +1,12 @@
1
1
  import { ComponentRef, OnInit, Type, ViewContainerRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class MngComponentDirective<T> implements OnInit {
3
+ export declare class MngComponentDirective<C> implements OnInit {
4
4
  viewContainerRef: ViewContainerRef;
5
- component: Type<T>;
6
- componentRef: ComponentRef<T>;
5
+ component: Type<C>;
6
+ private componentInstanceEventEmitter;
7
+ componentRef: ComponentRef<C>;
7
8
  constructor(viewContainerRef: ViewContainerRef);
8
9
  ngOnInit(): void;
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<MngComponentDirective<any>, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<MngComponentDirective<any>, "[mngComponent]", never, { "component": "mngComponent"; }, {}, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MngComponentDirective<any>, "[mngComponent]", never, { "component": "mngComponent"; }, { "componentInstanceEventEmitter": "instanceCreated"; }, never>;
11
12
  }
@@ -21,63 +21,64 @@ import * as i16 from "./components/form/formly/wrappers/formly-table-wrapper/for
21
21
  import * as i17 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
22
22
  import * as i18 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
23
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-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
25
- import * as i21 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
26
- import * as i22 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
27
- import * as i23 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
28
- import * as i24 from "./components/tableview/table/table.component";
29
- import * as i25 from "./components/tableview/tableview.component";
30
- import * as i26 from "./components/tableview/table/column-value/column-value.component";
31
- import * as i27 from "./components/tableview/table/column-filter/column-filter.component";
32
- import * as i28 from "./components/tableview/route/tableview-route.component";
33
- import * as i29 from "./components/form/editor/form-editor.component";
34
- import * as i30 from "./components/action/action.component";
35
- import * as i31 from "./components/action/dialog/action-dialog.component";
36
- import * as i32 from "./components/action/route/action-route.component";
37
- import * as i33 from "@angular/common";
38
- import * as i34 from "@angular/router";
39
- import * as i35 from "@angular/common/http";
40
- import * as i36 from "@angular/forms";
41
- import * as i37 from "@ngx-translate/core";
42
- import * as i38 from "@ngx-formly/core";
43
- import * as i39 from "primeng/autocomplete";
44
- import * as i40 from "primeng/breadcrumb";
45
- import * as i41 from "primeng/button";
46
- import * as i42 from "primeng/calendar";
47
- import * as i43 from "primeng/card";
48
- import * as i44 from "primeng/checkbox";
49
- import * as i45 from "primeng/chip";
50
- import * as i46 from "primeng/confirmdialog";
51
- import * as i47 from "primeng/confirmpopup";
52
- import * as i48 from "primeng/dialog";
53
- import * as i49 from "primeng/dynamicdialog";
54
- import * as i50 from "primeng/dropdown";
55
- import * as i51 from "primeng/fileupload";
56
- import * as i52 from "primeng/inputnumber";
57
- import * as i53 from "primeng/inputmask";
58
- import * as i54 from "primeng/inputswitch";
59
- import * as i55 from "primeng/inputtext";
60
- import * as i56 from "primeng/inputtextarea";
61
- import * as i57 from "primeng/paginator";
62
- import * as i58 from "primeng/radiobutton";
63
- import * as i59 from "primeng/ripple";
64
- import * as i60 from "primeng/selectbutton";
65
- import * as i61 from "primeng/table";
66
- import * as i62 from "primeng/tag";
67
- import * as i63 from "primeng/toast";
68
- import * as i64 from "primeng/togglebutton";
69
- import * as i65 from "primeng/toolbar";
70
- import * as i66 from "primeng/tooltip";
71
- import * as i67 from "primeng/messages";
72
- import * as i68 from "primeng/progressspinner";
73
- import * as i69 from "primeng/tabview";
74
- import * as i70 from "primeng/fieldset";
75
- import * as i71 from "primeng/multiselect";
76
- import * as i72 from "primeng/skeleton";
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";
77
78
  export declare const primeNgModules: (typeof InputTextModule)[];
78
79
  export declare class MngCommonsModule {
79
80
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
80
81
  static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
81
- 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.MngFormlyFieldTableDialogMultiselectComponent, typeof i21.MngFormlyFieldTableDialogFormComponent, typeof i22.MngFormlyFieldTabsComponent, typeof i23.MngFormlyFieldFieldsetComponent, typeof i24.MngTableComponent, typeof i25.MngTableviewComponent, typeof i26.MngTableColumnValueComponent, typeof i27.MngTableColumnFilterComponent, typeof i28.MngTableviewRouteComponent, typeof i29.MngFormEditorComponent, typeof i30.MngActionComponent, typeof i31.MngActionDialogComponent, typeof i32.MngActionRouteComponent], [typeof i33.CommonModule, typeof i34.RouterModule, typeof i35.HttpClientModule, typeof i36.ReactiveFormsModule, typeof i37.TranslateModule, typeof i38.FormlyModule, typeof i39.AutoCompleteModule, typeof i40.BreadcrumbModule, typeof i41.ButtonModule, typeof i42.CalendarModule, typeof i43.CardModule, typeof i44.CheckboxModule, typeof i45.ChipModule, typeof i46.ConfirmDialogModule, typeof i47.ConfirmPopupModule, typeof i48.DialogModule, typeof i49.DynamicDialogModule, typeof i50.DropdownModule, typeof i51.FileUploadModule, typeof i52.InputNumberModule, typeof i53.InputMaskModule, typeof i54.InputSwitchModule, typeof i55.InputTextModule, typeof i56.InputTextareaModule, typeof i57.PaginatorModule, typeof i58.RadioButtonModule, typeof i59.RippleModule, typeof i60.SelectButtonModule, typeof i61.TableModule, typeof i62.TagModule, typeof i63.ToastModule, typeof i64.ToggleButtonModule, typeof i65.ToolbarModule, typeof i66.TooltipModule, typeof i67.MessagesModule, typeof i68.ProgressSpinnerModule, typeof i69.TabViewModule, typeof i70.FieldsetModule, typeof i71.MultiSelectModule, typeof i72.SkeletonModule], [typeof i39.AutoCompleteModule, typeof i40.BreadcrumbModule, typeof i41.ButtonModule, typeof i42.CalendarModule, typeof i43.CardModule, typeof i44.CheckboxModule, typeof i45.ChipModule, typeof i46.ConfirmDialogModule, typeof i47.ConfirmPopupModule, typeof i48.DialogModule, typeof i49.DynamicDialogModule, typeof i50.DropdownModule, typeof i51.FileUploadModule, typeof i52.InputNumberModule, typeof i53.InputMaskModule, typeof i54.InputSwitchModule, typeof i55.InputTextModule, typeof i56.InputTextareaModule, typeof i57.PaginatorModule, typeof i58.RadioButtonModule, typeof i59.RippleModule, typeof i60.SelectButtonModule, typeof i61.TableModule, typeof i62.TagModule, typeof i63.ToastModule, typeof i64.ToggleButtonModule, typeof i65.ToolbarModule, typeof i66.TooltipModule, typeof i67.MessagesModule, typeof i68.ProgressSpinnerModule, typeof i69.TabViewModule, typeof i70.FieldsetModule, typeof i71.MultiSelectModule, typeof i72.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.MngFormlyFieldTableDialogMultiselectComponent, typeof i21.MngFormlyFieldTableDialogFormComponent, typeof i22.MngFormlyFieldTabsComponent, typeof i23.MngFormlyFieldFieldsetComponent, typeof i24.MngTableComponent, typeof i25.MngTableviewComponent, typeof i26.MngTableColumnValueComponent, typeof i27.MngTableColumnFilterComponent, typeof i28.MngTableviewRouteComponent, typeof i29.MngFormEditorComponent, typeof i30.MngActionComponent, typeof i31.MngActionDialogComponent, typeof i32.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]>;
82
83
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
83
84
  }
@@ -1,3 +1,4 @@
1
1
  export * from './enum.model';
2
2
  export * from './menu.model';
3
3
  export * from './user.model';
4
+ 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 { Type } from '@angular/core';
2
2
  import { ActivatedRouteSnapshot, Data } from '@angular/router';
3
3
  import { MenuItem } from 'primeng/api';
4
- import { TableviewDataProvider } from '../../data-providers';
4
+ import { ITableviewDataProvider } from '../../data-providers';
5
5
  import { ActionDescriptor, TableviewDescriptor } from '../../descriptors';
6
6
  export declare type BreadcrumbType = string | string[] | MngBreadcrumbMenuItem | MngBreadcrumbMenuItem[] | ((routeUrl: string, route: ActivatedRouteSnapshot) => MngBreadcrumbMenuItem[]);
7
7
  export interface MngBreadcrumbMenuItem extends MenuItem {
@@ -12,7 +12,7 @@ export interface MngRouterData extends Data {
12
12
  pageTitle?: string;
13
13
  tableview?: {
14
14
  descriptor: TableviewDescriptor<any>;
15
- dataProvider: TableviewDataProvider<any, any>;
15
+ dataProvider: ITableviewDataProvider<any, any>;
16
16
  actions?: Array<ActionDescriptor<any>>;
17
17
  };
18
18
  topbarComponent?: Type<any>;
@@ -1,17 +1,17 @@
1
1
  import { Type } from '@angular/core';
2
- import { LoadChildren, Route, Routes } from '@angular/router';
2
+ import { Data, LoadChildren, Route, Routes } from '@angular/router';
3
3
  import { MngMainLayoutComponent } from '../components/layout';
4
4
  import { ITableviewDataProvider } from '../data-providers';
5
5
  import { ActionDescriptor, TableviewDescriptor } from '../descriptors';
6
6
  import { MngMenuItem } from '../models';
7
- import { BreadcrumbType } from './models';
7
+ import { BreadcrumbType, MngRouterData } from './models';
8
8
  export declare class RoutesBuilder {
9
9
  private readonly layoutRoute?;
10
10
  private routes;
11
11
  private currentRoute?;
12
12
  private constructor();
13
13
  static create(): RoutesBuilder;
14
- static createWithLayout(layoutComponent?: typeof MngMainLayoutComponent): RoutesBuilder;
14
+ static createWithLayout(layoutComponent?: typeof MngMainLayoutComponent, topbarComponent?: Type<any>, breadcrumbComponent?: Type<any>, menuComponent?: Type<any>, footerComponent?: Type<any>): RoutesBuilder;
15
15
  addAngularRoute(route: Route): this;
16
16
  addRouteRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): this;
17
17
  addLazyRoute(path: string, loadChildren: LoadChildren, canLoad?: Array<any>): this;
@@ -37,7 +37,7 @@ export declare class RouteBuilder {
37
37
  static create(path: string, component: Type<any>): RouteBuilder;
38
38
  static createRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): RouteBuilder;
39
39
  static createFromRoute(route: Route): RouteBuilder;
40
- static createTableviewRoutes<T, S>(path: string, descriptor: TableviewDescriptor<T>, tableviewDataProvider: ITableviewDataProvider<T, S>, actions?: Array<ActionDescriptor<T>>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): RouteBuilder;
40
+ static createTableviewRoutes<T, S>(path: string, descriptor: TableviewDescriptor<T>, dataProvider: ITableviewDataProvider<T, S>, actions?: Array<ActionDescriptor<T>>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): RouteBuilder;
41
41
  static createTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): RouteBuilder;
42
42
  private static addActionsSubroutesToTableviewParent;
43
43
  withRoot(routesBuilder: RoutesBuilder): this;
@@ -51,6 +51,7 @@ export declare class RouteBuilder {
51
51
  withCanDeactivate(diToken: any): this;
52
52
  withResolver(diToken: any, name: string): this;
53
53
  withData(data: any): this;
54
+ withDataBuilder(dataBuilder: RouteDataBuilder): this;
54
55
  withMngMenuItem(menuItem: MngMenuItem): this;
55
56
  withMenuItem(icon?: string, label?: string, routerLink?: Array<string>): this;
56
57
  withMenuItemChild(label: string, icon?: string, routerLink?: Array<string>): this;
@@ -68,3 +69,16 @@ export declare class RouteBuilder {
68
69
  private adjustMenuRouterLinksFromBuilder;
69
70
  private findMenuItemGuards;
70
71
  }
72
+ export declare class RouteDataBuilder {
73
+ private data;
74
+ constructor(init?: Data);
75
+ static create(data?: Data): RouteDataBuilder;
76
+ withBreadcrumb(breadcrumb: BreadcrumbType): this;
77
+ withPageTitle(pageTitle: string): this;
78
+ withTableview(descriptor: TableviewDescriptor<any>, dataProvider: ITableviewDataProvider<any, any>, actions?: Array<ActionDescriptor<any>>): this;
79
+ withTopbarComponent(component: Type<any>): this;
80
+ withBreadcrumbComponent(component: Type<any>): this;
81
+ withMenuComponent(component: Type<any>): this;
82
+ withFooterComponent(component: Type<any>): this;
83
+ build(): MngRouterData;
84
+ }