@mediusinc/mng-commons 0.2.18 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/assets/i18n/en.json +16 -15
  2. package/assets/i18n/sl.json +23 -22
  3. package/esm2020/lib/api/services/crud-api.abstract.service.mjs +6 -6
  4. package/esm2020/lib/api/utils/object-serializer.util.mjs +7 -2
  5. package/esm2020/lib/components/action/action.component.mjs +50 -23
  6. package/esm2020/lib/components/action/editor/action-editor.component.mjs +239 -0
  7. package/esm2020/lib/components/action/index.mjs +2 -2
  8. package/esm2020/lib/components/action/models/action-execution.model.mjs +3 -3
  9. package/esm2020/lib/components/action/route/action-route.component.mjs +19 -38
  10. package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +5 -3
  11. package/esm2020/lib/components/form/editor/form-editor.component.mjs +2 -2
  12. package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
  13. package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  14. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  15. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
  16. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +61 -21
  17. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
  18. package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
  19. package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +4 -3
  20. package/esm2020/lib/components/form/models/form-editor.event.mjs +1 -1
  21. package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +2 -2
  22. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -1
  23. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +3 -3
  24. package/esm2020/lib/components/tableview/table/table.component.mjs +13 -9
  25. package/esm2020/lib/components/tableview/tableview.component.mjs +28 -21
  26. package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
  27. package/esm2020/lib/data-providers/table.data-provider.mjs +1 -1
  28. package/esm2020/lib/descriptors/action.descriptor.mjs +151 -2
  29. package/esm2020/lib/descriptors/editor.descriptor.mjs +118 -24
  30. package/esm2020/lib/descriptors/table.descriptor.mjs +21 -4
  31. package/esm2020/lib/descriptors/tableview.descriptor.mjs +7 -6
  32. package/esm2020/lib/mng-commons.module.mjs +17 -10
  33. package/esm2020/lib/models/enum.model.mjs +1 -1
  34. package/esm2020/lib/models/error.model.mjs +2 -0
  35. package/esm2020/lib/models/index.mjs +3 -1
  36. package/esm2020/lib/models/view-container.model.mjs +2 -0
  37. package/esm2020/lib/pipes/boolean.pipe.mjs +8 -3
  38. package/esm2020/lib/services/action-executor.service.mjs +344 -0
  39. package/esm2020/lib/services/error-mapper.service.mjs +14 -0
  40. package/esm2020/lib/services/index.mjs +4 -2
  41. package/esm2020/lib/services/tokens/default-setting.token.mjs +3 -0
  42. package/esm2020/lib/services/tokens/index.mjs +2 -1
  43. package/esm2020/lib/services/view-container.component.service.mjs +35 -0
  44. package/esm2020/lib/utils/i18n.util.mjs +29 -1
  45. package/esm2020/lib/utils/model.util.mjs +9 -7
  46. package/esm2020/lib/utils/toast.util.mjs +18 -14
  47. package/esm2020/public-api.mjs +1 -2
  48. package/fesm2015/mediusinc-mng-commons.mjs +1384 -814
  49. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  50. package/fesm2020/mediusinc-mng-commons.mjs +1367 -809
  51. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  52. package/lib/components/action/action.component.d.ts +16 -9
  53. package/lib/components/action/editor/action-editor.component.d.ts +59 -0
  54. package/lib/components/action/index.d.ts +1 -1
  55. package/lib/components/action/models/action-execution.model.d.ts +3 -3
  56. package/lib/components/action/route/action-route.component.d.ts +5 -6
  57. package/lib/components/form/dropdown/dropdown.component.d.ts +2 -1
  58. package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +8 -2
  59. package/lib/components/tableview/table/table.component.d.ts +5 -4
  60. package/lib/components/tableview/tableview.component.d.ts +9 -7
  61. package/lib/descriptors/action.descriptor.d.ts +72 -16
  62. package/lib/descriptors/editor.descriptor.d.ts +52 -12
  63. package/lib/descriptors/table.descriptor.d.ts +8 -2
  64. package/lib/descriptors/tableview.descriptor.d.ts +1 -1
  65. package/lib/mng-commons.module.d.ts +2 -2
  66. package/lib/models/enum.model.d.ts +1 -0
  67. package/lib/models/error.model.d.ts +12 -0
  68. package/lib/models/index.d.ts +2 -0
  69. package/lib/models/view-container.model.d.ts +6 -0
  70. package/lib/pipes/boolean.pipe.d.ts +1 -1
  71. package/lib/services/{action.service.d.ts → action-executor.service.d.ts} +27 -19
  72. package/lib/services/error-mapper.service.d.ts +7 -0
  73. package/lib/services/index.d.ts +3 -1
  74. package/lib/services/tokens/default-setting.token.d.ts +2 -0
  75. package/lib/services/tokens/index.d.ts +1 -0
  76. package/lib/services/view-container.component.service.d.ts +22 -0
  77. package/lib/utils/i18n.util.d.ts +3 -0
  78. package/lib/utils/model.util.d.ts +1 -1
  79. package/lib/utils/toast.util.d.ts +5 -4
  80. package/package.json +1 -1
  81. package/public-api.d.ts +0 -1
  82. package/scss/mng-overrides/_layout_dialog.scss +0 -7
  83. package/scss/mng-overrides/_layout_forms.scss +2 -0
  84. package/scss/mng-overrides/_mixins.scss +7 -0
  85. package/scss/mng-overrides/_theme_button.scss +57 -0
  86. package/scss/mng-overrides/_theme_dialog.scss +3 -1
  87. package/scss/mng-overrides/_theme_styles.scss +2 -0
  88. package/scss/mng-overrides/_theme_tableview.scss +10 -10
  89. package/scss/mng-overrides/_theme_toolbar.scss +5 -0
  90. package/scss/theme/default/_mng-variables-theme-dark.scss +3 -0
  91. package/scss/theme/default/_mng-variables-theme-light.scss +3 -0
  92. package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +0 -151
  93. package/esm2020/lib/components/tableview/services/index.mjs +0 -2
  94. package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +0 -21
  95. package/esm2020/lib/services/action.service.mjs +0 -273
  96. package/lib/components/action/dialog/action-dialog.component.d.ts +0 -47
  97. package/lib/components/tableview/services/index.d.ts +0 -1
  98. package/lib/components/tableview/services/tableview.component.service.d.ts +0 -14
@@ -1,37 +1,37 @@
1
- import * as i4$1 from '@angular/common';
1
+ import * as i4 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
- import { HttpClient, HttpClientModule } from '@angular/common/http';
3
+ import { HttpErrorResponse, HttpClient, HttpClientModule } from '@angular/common/http';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, InjectionToken, Inject, Component, ChangeDetectionStrategy, Input, EventEmitter, Directive, Output, ContentChildren, ViewChild, forwardRef, Pipe, Optional, ViewChildren, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
5
+ import { InjectionToken, Injectable, Inject, EventEmitter, Component, ChangeDetectionStrategy, Optional, Input, Output, Directive, ContentChildren, ViewChild, forwardRef, Pipe, ViewChildren, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
6
6
  import * as i4$2 from '@angular/forms';
7
7
  import { Validators, FormGroup, FormArray, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
8
8
  import * as i1 from '@angular/router';
9
9
  import { NavigationEnd, GuardsCheckEnd, RouterModule } from '@angular/router';
10
- import * as i3$1 from '@ngx-formly/core';
10
+ import * as i3$2 from '@ngx-formly/core';
11
11
  import { FieldType, FieldWrapper, FORMLY_CONFIG, FormlyModule } from '@ngx-formly/core';
12
- import * as i3 from '@ngx-translate/core';
12
+ import * as i3$1 from '@ngx-translate/core';
13
13
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
14
- import * as i2$1 from 'primeng/api';
15
- import { MessageService, ConfirmationService, FilterMatchMode } from 'primeng/api';
14
+ import * as i2 from 'primeng/api';
15
+ import { ConfirmationService, MessageService, FilterMatchMode } from 'primeng/api';
16
16
  import * as i1$1 from 'primeng/autocomplete';
17
17
  import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
18
- import * as i2$4 from 'primeng/breadcrumb';
18
+ import * as i2$3 from 'primeng/breadcrumb';
19
19
  import { BreadcrumbModule } from 'primeng/breadcrumb';
20
- import * as i8 from 'primeng/button';
20
+ import * as i7 from 'primeng/button';
21
21
  import { ButtonModule } from 'primeng/button';
22
- import * as i5 from 'primeng/calendar';
22
+ import * as i5$1 from 'primeng/calendar';
23
23
  import { CalendarModule } from 'primeng/calendar';
24
24
  import { CardModule } from 'primeng/card';
25
25
  import { CheckboxModule } from 'primeng/checkbox';
26
26
  import { ChipModule } from 'primeng/chip';
27
- import * as i6 from 'primeng/confirmdialog';
27
+ import * as i5 from 'primeng/confirmdialog';
28
28
  import { ConfirmDialogModule } from 'primeng/confirmdialog';
29
29
  import { ConfirmPopupModule } from 'primeng/confirmpopup';
30
30
  import * as i1$4 from 'primeng/dialog';
31
31
  import { DialogModule } from 'primeng/dialog';
32
32
  import * as i1$2 from 'primeng/dropdown';
33
33
  import { Dropdown, DropdownModule } from 'primeng/dropdown';
34
- import * as i2 from 'primeng/dynamicdialog';
34
+ import * as i3 from 'primeng/dynamicdialog';
35
35
  import { DynamicDialogModule, DialogService } from 'primeng/dynamicdialog';
36
36
  import * as i1$6 from 'primeng/fieldset';
37
37
  import { FieldsetModule } from 'primeng/fieldset';
@@ -40,479 +40,106 @@ import * as i6$1 from 'primeng/inputmask';
40
40
  import { InputMaskModule } from 'primeng/inputmask';
41
41
  import * as i1$3 from 'primeng/inputnumber';
42
42
  import { InputNumberModule } from 'primeng/inputnumber';
43
- import * as i2$3 from 'primeng/inputswitch';
43
+ import * as i2$2 from 'primeng/inputswitch';
44
44
  import { InputSwitchModule } from 'primeng/inputswitch';
45
- import * as i10$1 from 'primeng/inputtext';
45
+ import * as i10 from 'primeng/inputtext';
46
46
  import { InputTextModule } from 'primeng/inputtext';
47
47
  import * as i9$1 from 'primeng/inputtextarea';
48
48
  import { InputTextareaModule } from 'primeng/inputtextarea';
49
- import * as i3$2 from 'primeng/messages';
49
+ import * as i3$3 from 'primeng/messages';
50
50
  import { MessagesModule } from 'primeng/messages';
51
- import * as i2$2 from 'primeng/multiselect';
51
+ import * as i2$1 from 'primeng/multiselect';
52
52
  import { MultiSelectModule } from 'primeng/multiselect';
53
53
  import { PaginatorModule } from 'primeng/paginator';
54
- import * as i4$3 from 'primeng/progressspinner';
54
+ import * as i6 from 'primeng/progressspinner';
55
55
  import { ProgressSpinnerModule } from 'primeng/progressspinner';
56
56
  import * as i4$4 from 'primeng/radiobutton';
57
57
  import { RadioButtonModule } from 'primeng/radiobutton';
58
- import * as i9 from 'primeng/ripple';
58
+ import * as i8 from 'primeng/ripple';
59
59
  import { RippleModule } from 'primeng/ripple';
60
60
  import { SelectButtonModule } from 'primeng/selectbutton';
61
- import * as i7 from 'primeng/skeleton';
61
+ import * as i7$1 from 'primeng/skeleton';
62
62
  import { SkeletonModule } from 'primeng/skeleton';
63
63
  import * as i4$5 from 'primeng/table';
64
64
  import { Table, TableModule } from 'primeng/table';
65
65
  import * as i1$5 from 'primeng/tabview';
66
66
  import { TabViewModule } from 'primeng/tabview';
67
67
  import { TagModule } from 'primeng/tag';
68
- import * as i7$1 from 'primeng/toast';
68
+ import * as i6$2 from 'primeng/toast';
69
69
  import { ToastModule } from 'primeng/toast';
70
70
  import { ToggleButtonModule } from 'primeng/togglebutton';
71
- import * as i8$1 from 'primeng/toolbar';
71
+ import * as i4$3 from 'primeng/toolbar';
72
72
  import { ToolbarModule } from 'primeng/toolbar';
73
- import * as i10 from 'primeng/tooltip';
73
+ import * as i9 from 'primeng/tooltip';
74
74
  import { TooltipModule } from 'primeng/tooltip';
75
- import { of, throwError, Subject, Observable, from, BehaviorSubject, ReplaySubject, distinctUntilChanged, combineLatest } from 'rxjs';
75
+ import { throwError, of, Subject, Observable, from, BehaviorSubject, ReplaySubject, distinctUntilChanged, combineLatest } from 'rxjs';
76
76
  import 'reflect-metadata';
77
77
  import { mergeMap, map, first, catchError, filter, finalize, startWith } from 'rxjs/operators';
78
- import * as i4 from '@angular/platform-browser';
78
+ import * as i4$1 from '@angular/platform-browser';
79
79
  import { trigger, state, style, transition, animate } from '@angular/animations';
80
80
 
81
- class ActionDescriptor {
82
- constructor(model, actionName, parentType, parentProperty) {
83
- this._type = ActionTypeEnum.Direct;
84
- this._activationTrigger = ActionActivationTriggerEnum.OnClick;
85
- this._position = ActionPositionEnum.ToolbarRight;
86
- this._level = ActionLevelEnum.Default;
87
- this._routeUrl = null;
88
- this._className = '';
89
- this._hasRunConfirmation = false;
90
- this._hasRunNotificationSuccess = true;
91
- this._hasRunNotificationError = true;
92
- this._model = model;
93
- this._actionName = actionName;
94
- if ((parentType && !parentProperty) || (!parentProperty && parentProperty)) {
95
- throw new Error(`Provide both the parent type and parent property or none: ${parentType}, ${parentProperty}.`);
96
- }
97
- this._parentType = parentType;
98
- this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;
99
- this._parentProperty = parentProperty;
100
- this._i18nModelActionBaseKey = this._parentTypeName
101
- ? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`
102
- : `${this._model.typeName}.actions.${actionName}`;
103
- }
104
- get model() {
105
- return this._model;
106
- }
107
- get parentTypeName() {
108
- return this._parentTypeName;
109
- }
110
- get parentProperty() {
111
- return this._parentProperty;
112
- }
113
- get i18nModelActionBaseKey() {
114
- return this._i18nModelActionBaseKey;
115
- }
116
- get type() {
117
- return this._type;
118
- }
119
- get activationTrigger() {
120
- return this._activationTrigger;
121
- }
122
- get position() {
123
- return this._position;
124
- }
125
- get level() {
126
- return this._level;
127
- }
128
- get routeUrl() {
129
- return this._routeUrl;
130
- }
131
- get title() {
132
- return this._title;
133
- }
134
- get icon() {
135
- return this._icon;
136
- }
137
- get tooltip() {
138
- return this._tooltip;
139
- }
140
- get runFunction() {
141
- if (!this._runFunction) {
142
- throw new Error('Run function is not defined and cannot be invoked');
143
- }
144
- return this._runFunction;
145
- }
146
- get isVisibleFunction() {
147
- return this._isVisibleFunction;
148
- }
149
- get isEnabledFunction() {
150
- return this._isEnabledFunction;
151
- }
152
- get actionName() {
153
- return this._actionName;
154
- }
155
- get className() {
156
- return this._className;
157
- }
158
- get hasRunConfirmation() {
159
- return this._hasRunConfirmation;
160
- }
161
- get runConfirmationIcon() {
162
- return this._runConfirmationIcon;
163
- }
164
- get runConfirmationTitle() {
165
- return this._runConfirmationTitle;
166
- }
167
- get runConfirmationMessage() {
168
- return this._runConfirmationMessage;
169
- }
170
- get runConfirmationAcceptTitle() {
171
- return this._runConfirmationAcceptTitle;
172
- }
173
- get runConfirmationRejectTitle() {
174
- return this._runConfirmationRejectTitle;
175
- }
176
- get hasRunNotificationSuccess() {
177
- return this._hasRunNotificationSuccess;
178
- }
179
- get runNotificationSuccessTitle() {
180
- return this._runNotificationSuccessTitle;
181
- }
182
- get runNotificationSuccessMessage() {
183
- return this._runNotificationSuccessMessage;
184
- }
185
- get hasRunNotificationError() {
186
- return this._hasRunNotificationError;
187
- }
188
- get runNotificationErrorTitle() {
189
- return this._runNotificationErrorTitle;
190
- }
191
- get runNotificationErrorMessage() {
192
- return this._runNotificationErrorMessage;
81
+ class DataProvider {
82
+ constructor(modelType, serviceType) {
83
+ this._modelType = modelType;
84
+ this._serviceType = serviceType;
193
85
  }
194
- withRunFunction(fn) {
195
- this._runFunction = fn;
196
- return this;
86
+ get serviceType() {
87
+ return this._serviceType;
197
88
  }
198
- withIsVisibleFunction(fn) {
199
- this._isVisibleFunction = fn;
200
- return this;
89
+ get modelType() {
90
+ return this._modelType;
201
91
  }
202
- withIsEnabledFunction(fn) {
203
- this._isEnabledFunction = fn;
92
+ withServiceType(type) {
93
+ this._serviceType = type;
204
94
  return this;
205
95
  }
206
- withRouteTrigger(routeUrl) {
207
- this._activationTrigger = ActionActivationTriggerEnum.OnRoute;
208
- this._routeUrl = routeUrl;
209
- return this;
96
+ }
97
+
98
+ class EditorDataProvider extends DataProvider {
99
+ constructor(modelType, serviceType) {
100
+ super(modelType, serviceType);
101
+ this._fetch = id => throwError(`No fetch function provided for id ${id}.`);
210
102
  }
211
- withLevel(level) {
212
- this._level = level;
213
- return this;
103
+ get fetch() {
104
+ return this._fetch;
214
105
  }
215
- /**
216
- * Overrides default title key with model action key (${model.typeName}.actions.${actionName}). Not relevant if parentType name is provided.
217
- */
218
- withModelTitle() {
219
- this._title = `${this._i18nModelActionBaseKey}.title`;
220
- return this;
106
+ get create() {
107
+ return this._create;
221
108
  }
222
- /**
223
- * Overrides default title key (${actionName}.title). If null, no title will be shown.
224
- * @param title Title i18n key or title.
225
- */
226
- withTitle(title) {
227
- this._title = title;
228
- return this;
109
+ get update() {
110
+ return this._update;
229
111
  }
230
- withIcon(icon) {
231
- this._icon = icon;
232
- return this;
112
+ get delete() {
113
+ return this._delete;
233
114
  }
234
- withTooltip(tooltip) {
235
- this._title = tooltip;
115
+ withFetch(fetch) {
116
+ this._fetch = fetch;
236
117
  return this;
237
118
  }
238
- withClassName(className) {
239
- this._className = className;
119
+ withCreate(create) {
120
+ this._create = create;
240
121
  return this;
241
122
  }
242
- withPosition(position) {
243
- this._position = position;
123
+ withUpdate(update) {
124
+ this._update = update;
244
125
  return this;
245
126
  }
246
- withRunConfirmation(icon = 'pi pi-exclamation-triangle', title, message, acceptTitle, rejectTitle) {
247
- this._hasRunConfirmation = true;
248
- this._runConfirmationIcon = icon;
249
- this._runConfirmationTitle = title;
250
- this._runConfirmationMessage = message;
251
- this._runConfirmationAcceptTitle = acceptTitle;
252
- this._runConfirmationRejectTitle = rejectTitle;
127
+ withDelete(deleteFn) {
128
+ this._delete = deleteFn;
253
129
  return this;
254
130
  }
255
- withRunNotificationSuccess(title, message, hasNotification = true) {
256
- this._hasRunNotificationSuccess = hasNotification;
257
- this._runNotificationSuccessTitle = title;
258
- this._runNotificationSuccessMessage = message;
259
- }
260
- withRunNotificationError(title, message, hasNotification = true) {
261
- this._hasRunNotificationError = hasNotification;
262
- this._runNotificationErrorTitle = title;
263
- this._runNotificationErrorMessage = message;
264
- }
265
131
  }
266
- class ActionEditorDescriptor extends ActionDescriptor {
267
- constructor(editorDescriptor, actionName, parentType, parentProperty) {
268
- super(editorDescriptor.model, actionName, parentType, parentProperty);
269
- this._editorTitle = undefined;
270
- this._hasFetchNotificationSuccess = false;
271
- this._type = ActionTypeEnum.Editor;
272
- this._editorDescriptor = editorDescriptor;
273
- }
274
- get editorTitle() {
275
- return this._editorTitle;
276
- }
277
- get editorDescriptor() {
278
- return this._editorDescriptor;
279
- }
280
- get hasFetchNotificationSuccess() {
281
- return this._hasFetchNotificationSuccess;
282
- }
283
- get fetchNotificationSuccessTitle() {
284
- return this._fetchNotificationSuccessTitle;
285
- }
286
- get fetchNotificationSuccessMessage() {
287
- return this._fetchNotificationSuccessMessage;
288
- }
289
- get runFunction() {
290
- throw new Error('Run function cannot be used in editor action. Use submit function instead!');
291
- }
292
- get fetchFunction() {
293
- if (!this._fetchFunction) {
294
- return ctx => {
295
- var _a, _b;
296
- console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, (_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item);
297
- return of(((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item) ? ctx.data.item : {});
298
- };
299
- }
300
- return this._fetchFunction;
301
- }
302
- get submitFunction() {
303
- return this._submitFunction;
304
- }
305
- withEditorTitle(title) {
306
- this._editorTitle = title;
307
- return this;
132
+
133
+ class LookupDataProvider extends DataProvider {
134
+ constructor(modelType, serviceType) {
135
+ super(modelType, serviceType);
136
+ this._lookup = () => of([]);
308
137
  }
309
- withRunFunction(fn) {
310
- return this.withSubmitFunction(fn);
138
+ get lookup() {
139
+ return this._lookup;
311
140
  }
312
- withFetchFunction(fn) {
313
- this._fetchFunction = fn;
314
- return this;
315
- }
316
- withSubmitFunction(fn) {
317
- this._submitFunction = fn;
318
- return this;
319
- }
320
- withFetchNotificationError(title, message, hasNotification = true) {
321
- this._hasFetchNotificationSuccess = hasNotification;
322
- this._fetchNotificationSuccessTitle = title;
323
- this._fetchNotificationSuccessMessage = message;
324
- }
325
- }
326
- class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
327
- constructor(editorDescriptor) {
328
- super(editorDescriptor, 'details');
329
- this.withPosition(ActionPositionEnum.RowClick);
330
- this.withRouteTrigger(':itemId');
331
- this.withFetchFunction(ctx => {
332
- var _a, _b, _c, _d;
333
- return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
334
- ? ctx.dataProvider.fetch((_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId, ctx.serviceInstance)
335
- : throwError(new Error(`Data provider fetch function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
336
- });
337
- this.withClassName('mng-details-dynamic-dialog');
338
- }
339
- }
340
- class ActionEditorAddDescriptor extends ActionEditorDescriptor {
341
- constructor(editorDescriptor) {
342
- super(editorDescriptor, 'add');
343
- this.withPosition(ActionPositionEnum.ToolbarLeft);
344
- this.withRouteTrigger('add');
345
- this.withSubmitFunction(ctx => { var _a, _b; return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.create) ? ctx.dataProvider.create((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)); });
346
- this.withLevel(ActionLevelEnum.Success);
347
- this.withIcon('pi pi-plus');
348
- this.withClassName('mng-details-dynamic-dialog');
349
- }
350
- }
351
- class ActionEditorEditDescriptor extends ActionEditorDescriptor {
352
- constructor(editorDescriptor) {
353
- super(editorDescriptor, 'edit');
354
- this.withPosition(ActionPositionEnum.RowInline);
355
- this.withTitle(null);
356
- this.withRouteTrigger(':itemId/edit');
357
- this.withFetchFunction(ctx => {
358
- var _a, _b, _c;
359
- return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
360
- ? ctx.dataProvider.fetch(ctx.data.itemId, ctx.serviceInstance)
361
- : throwError(new Error(`Data provider fetch function or item id ${(_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId} is missing.`));
362
- });
363
- this.withSubmitFunction(ctx => {
364
- var _a, _b, _c, _d;
365
- return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.update) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
366
- ? ctx.dataProvider.update(ctx.data.itemId, (_c = ctx.data) === null || _c === void 0 ? void 0 : _c.item, ctx.serviceInstance)
367
- : throwError(new Error(`Data provider update function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
368
- });
369
- this.withIcon('pi pi-pencil');
370
- this.withClassName('mng-details-dynamic-dialog');
371
- }
372
- }
373
- class ActionDeleteDescriptor extends ActionDescriptor {
374
- constructor(model) {
375
- super(model, 'delete');
376
- this.withPosition(ActionPositionEnum.RowInline);
377
- this.withTitle(null);
378
- this.withRunFunction(ctx => {
379
- var _a, _b;
380
- const editorDataProvider = ctx.dataProvider;
381
- return (editorDataProvider === null || editorDataProvider === void 0 ? void 0 : editorDataProvider.delete) && ((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.itemId)
382
- ? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance)
383
- : throwError(new Error(`Data provider delete function or item id ${(_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId} is missing.`));
384
- });
385
- this.withLevel(ActionLevelEnum.Danger);
386
- this.withIcon('pi pi-trash');
387
- this.withRunConfirmation(undefined);
388
- }
389
- }
390
- var ActionPositionEnum;
391
- (function (ActionPositionEnum) {
392
- ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
393
- ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
394
- ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
395
- ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
396
- ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
397
- })(ActionPositionEnum || (ActionPositionEnum = {}));
398
- var ActionActivationTriggerEnum;
399
- (function (ActionActivationTriggerEnum) {
400
- ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
401
- ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
402
- })(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
403
- var ActionTypeEnum;
404
- (function (ActionTypeEnum) {
405
- ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
406
- ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
407
- })(ActionTypeEnum || (ActionTypeEnum = {}));
408
- var ActionLevelEnum;
409
- (function (ActionLevelEnum) {
410
- ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
411
- ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
412
- ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
413
- ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
414
- ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
415
- ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
416
- ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
417
- ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
418
- })(ActionLevelEnum || (ActionLevelEnum = {}));
419
-
420
- class MngFormEditorSubmitEvent {
421
- constructor(formItem) {
422
- this.formItem = formItem;
423
- this.success = true;
424
- }
425
- }
426
- var MngFormFieldEventTypeEnum;
427
- (function (MngFormFieldEventTypeEnum) {
428
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
429
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
430
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
431
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
432
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
433
- })(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
434
- class MngFormFieldEventComponentSubtype {
435
- }
436
- MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
437
- MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
438
- MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
439
- MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
440
- class MngFormFieldEventDialogSubtype {
441
- }
442
- MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
443
- MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
444
- MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
445
- class MngFormFieldEvent {
446
- constructor(type, componentType, componentInstance, data = {}) {
447
- this.type = type;
448
- this.componentType = componentType;
449
- this.componentInstance = componentInstance;
450
- this.data = data;
451
- }
452
- }
453
-
454
- class DataProvider {
455
- constructor(modelType, serviceType) {
456
- this._modelType = modelType;
457
- this._serviceType = serviceType;
458
- }
459
- get serviceType() {
460
- return this._serviceType;
461
- }
462
- get modelType() {
463
- return this._modelType;
464
- }
465
- withServiceType(type) {
466
- this._serviceType = type;
467
- return this;
468
- }
469
- }
470
-
471
- class EditorDataProvider extends DataProvider {
472
- constructor(modelType, serviceType) {
473
- super(modelType, serviceType);
474
- this._fetch = id => throwError(`No fetch function provided for id ${id}.`);
475
- }
476
- get fetch() {
477
- return this._fetch;
478
- }
479
- get create() {
480
- return this._create;
481
- }
482
- get update() {
483
- return this._update;
484
- }
485
- get delete() {
486
- return this._delete;
487
- }
488
- withFetch(fetch) {
489
- this._fetch = fetch;
490
- return this;
491
- }
492
- withCreate(create) {
493
- this._create = create;
494
- return this;
495
- }
496
- withUpdate(update) {
497
- this._update = update;
498
- return this;
499
- }
500
- withDelete(deleteFn) {
501
- this._delete = deleteFn;
502
- return this;
503
- }
504
- }
505
-
506
- class LookupDataProvider extends DataProvider {
507
- constructor(modelType, serviceType) {
508
- super(modelType, serviceType);
509
- this._lookup = () => of([]);
510
- }
511
- get lookup() {
512
- return this._lookup;
513
- }
514
- withLookup(lookup) {
515
- this._lookup = lookup;
141
+ withLookup(lookup) {
142
+ this._lookup = lookup;
516
143
  return this;
517
144
  }
518
145
  }
@@ -737,76 +364,595 @@ class MediusQueryParamBuilder {
737
364
  this.queryParam.sortAsc.push(asc);
738
365
  return this;
739
366
  }
740
- withFilter(property, value, valueTo = undefined, matchType = MediusFilterMatchType.Contains, matchCaseSensitive = false) {
741
- if (!this.queryParam.filterParams) {
742
- this.queryParam.filterParams = [];
367
+ withFilter(property, value, valueTo = undefined, matchType = MediusFilterMatchType.Contains, matchCaseSensitive = false) {
368
+ if (!this.queryParam.filterParams) {
369
+ this.queryParam.filterParams = [];
370
+ }
371
+ const filterParam = new MediusFilterParam();
372
+ filterParam.property = property;
373
+ filterParam.filterValue = value;
374
+ filterParam.filterValueTo = valueTo;
375
+ filterParam.filterMatchType = matchType;
376
+ filterParam.filterMatchCaseSensitive = matchCaseSensitive;
377
+ this.queryParam.filterParams.push(filterParam);
378
+ return this;
379
+ }
380
+ build() {
381
+ const queryParam = this.queryParam;
382
+ this.queryParam = new MediusQueryParam();
383
+ return queryParam;
384
+ }
385
+ }
386
+
387
+ /* tslint:disable:no-angle-bracket-type-assertion no-trailing-whitespace member-ordering object-literal-key-quotes */
388
+ const enumsMapBase = {
389
+ FilterMatchType: MediusFilterMatchType,
390
+ QueryMode: MediusQueryMode
391
+ };
392
+ const typeMapBase = {
393
+ FilterParam: MediusFilterParam,
394
+ QueryParam: MediusQueryParam,
395
+ QueryResult: MediusQueryResult,
396
+ QueryResultWithObject: MediusQueryResultWithObject
397
+ };
398
+
399
+ class TableDataProvider extends DataProvider {
400
+ constructor(modelType, serviceType) {
401
+ super(modelType, serviceType);
402
+ this._getAll = () => of(new MediusQueryResult());
403
+ }
404
+ get getAll() {
405
+ return this._getAll;
406
+ }
407
+ withGetAll(getAll) {
408
+ this._getAll = getAll;
409
+ return this;
410
+ }
411
+ }
412
+
413
+ class TableviewDataProvider extends EditorDataProvider {
414
+ constructor(modelType, serviceType) {
415
+ super(modelType, serviceType);
416
+ this._getAll = () => of(new MediusQueryResult());
417
+ }
418
+ get getAll() {
419
+ return this._getAll;
420
+ }
421
+ withGetAll(getAll) {
422
+ this._getAll = getAll;
423
+ return this;
424
+ }
425
+ }
426
+
427
+ class ActionDescriptor {
428
+ constructor(model, actionName, parentType, parentProperty) {
429
+ this._type = ActionTypeEnum.Direct;
430
+ this._activationTrigger = ActionActivationTriggerEnum.OnClick;
431
+ this._position = ActionPositionEnum.ToolbarRight;
432
+ this._level = ActionLevelEnum.Default;
433
+ this._routeUrl = null;
434
+ this._className = '';
435
+ this._size = ActionDescriptor.SizeEnum.Normal;
436
+ this._hasRunConfirmation = false;
437
+ this._hasRunNotificationSuccess = true;
438
+ this._hasRunNotificationError = true;
439
+ this._model = model;
440
+ this._actionName = actionName;
441
+ if ((parentType && !parentProperty) || (!parentProperty && parentProperty)) {
442
+ throw new Error(`Provide both the parent type and parent property or none: ${parentType}, ${parentProperty}.`);
443
+ }
444
+ this._parentType = parentType;
445
+ this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;
446
+ this._parentProperty = parentProperty;
447
+ this._i18nModelActionBaseKey = this._parentTypeName
448
+ ? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`
449
+ : `${this._model.typeName}.actions.${actionName}`;
450
+ }
451
+ get model() {
452
+ return this._model;
453
+ }
454
+ get parentTypeName() {
455
+ return this._parentTypeName;
456
+ }
457
+ get parentProperty() {
458
+ return this._parentProperty;
459
+ }
460
+ get i18nModelActionBaseKey() {
461
+ return this._i18nModelActionBaseKey;
462
+ }
463
+ get type() {
464
+ return this._type;
465
+ }
466
+ get activationTrigger() {
467
+ return this._activationTrigger;
468
+ }
469
+ get position() {
470
+ return this._position;
471
+ }
472
+ get level() {
473
+ return this._level;
474
+ }
475
+ get routeUrl() {
476
+ return this._routeUrl;
477
+ }
478
+ get title() {
479
+ return this._title;
480
+ }
481
+ get icon() {
482
+ return this._icon;
483
+ }
484
+ get tooltip() {
485
+ return this._tooltip;
486
+ }
487
+ get dataProvider() {
488
+ return this._dataProvider;
489
+ }
490
+ get hasRunFunction() {
491
+ return typeof this._runFunction === 'function';
492
+ }
493
+ get runFunction() {
494
+ if (!this._runFunction) {
495
+ throw new Error('Run function is not defined and cannot be invoked');
496
+ }
497
+ return this._runFunction;
498
+ }
499
+ get isVisibleFunction() {
500
+ return this._isVisibleFunction;
501
+ }
502
+ get isEnabledFunction() {
503
+ return this._isEnabledFunction;
504
+ }
505
+ get actionName() {
506
+ return this._actionName;
507
+ }
508
+ get className() {
509
+ return this._className;
510
+ }
511
+ get size() {
512
+ return this._size;
513
+ }
514
+ get isSizeExtraSmall() {
515
+ return this._size === ActionDescriptor.SizeEnum.ExtraSmall;
516
+ }
517
+ get isSizeSmall() {
518
+ return this._size === ActionDescriptor.SizeEnum.Small;
519
+ }
520
+ get isSizeLarge() {
521
+ return this._size === ActionDescriptor.SizeEnum.Large;
522
+ }
523
+ get isSizeExtraLarge() {
524
+ return this._size === ActionDescriptor.SizeEnum.ExtraLarge;
525
+ }
526
+ get hasRunConfirmation() {
527
+ return this._hasRunConfirmation;
528
+ }
529
+ get runConfirmationIcon() {
530
+ return this._runConfirmationIcon;
531
+ }
532
+ get runConfirmationTitle() {
533
+ return this._runConfirmationTitle;
534
+ }
535
+ get runConfirmationMessage() {
536
+ return this._runConfirmationMessage;
537
+ }
538
+ get runConfirmationAcceptTitle() {
539
+ return this._runConfirmationAcceptTitle;
540
+ }
541
+ get runConfirmationRejectTitle() {
542
+ return this._runConfirmationRejectTitle;
543
+ }
544
+ get hasRunNotificationSuccess() {
545
+ return this._hasRunNotificationSuccess;
546
+ }
547
+ get runNotificationSuccessTitle() {
548
+ return this._runNotificationSuccessTitle;
549
+ }
550
+ get runNotificationSuccessMessage() {
551
+ return this._runNotificationSuccessMessage;
552
+ }
553
+ get hasRunNotificationError() {
554
+ return this._hasRunNotificationError;
555
+ }
556
+ get runNotificationErrorTitle() {
557
+ return this._runNotificationErrorTitle;
558
+ }
559
+ get runNotificationErrorMessage() {
560
+ return this._runNotificationErrorMessage;
561
+ }
562
+ withDataProvider(dataProvider) {
563
+ this._dataProvider = dataProvider;
564
+ return this;
565
+ }
566
+ withServiceType(serviceType) {
567
+ this._dataProvider = new DataProvider(this._model.type, serviceType);
568
+ return this;
569
+ }
570
+ withRunFunction(fn) {
571
+ this._runFunction = fn;
572
+ return this;
573
+ }
574
+ withIsVisibleFunction(fn) {
575
+ this._isVisibleFunction = fn;
576
+ return this;
577
+ }
578
+ withIsEnabledFunction(fn) {
579
+ this._isEnabledFunction = fn;
580
+ return this;
581
+ }
582
+ withRouteTrigger(routeUrl) {
583
+ this._activationTrigger = ActionActivationTriggerEnum.OnRoute;
584
+ this._routeUrl = routeUrl;
585
+ return this;
586
+ }
587
+ withLevel(level) {
588
+ this._level = level;
589
+ return this;
590
+ }
591
+ /**
592
+ * Overrides default title key with model action key (${model.typeName}.actions.${actionName}). Not relevant if parentType name is provided.
593
+ */
594
+ withModelTitle() {
595
+ this._title = `${this._i18nModelActionBaseKey}.title`;
596
+ return this;
597
+ }
598
+ /**
599
+ * Overrides default title key (${actionName}.title). If null, no title will be shown.
600
+ * @param title Title i18n key or title.
601
+ */
602
+ withTitle(title) {
603
+ this._title = title;
604
+ return this;
605
+ }
606
+ withIcon(icon) {
607
+ this._icon = icon;
608
+ return this;
609
+ }
610
+ withTooltip(tooltip) {
611
+ this._title = tooltip;
612
+ return this;
613
+ }
614
+ withClassName(className) {
615
+ this._className = className;
616
+ return this;
617
+ }
618
+ withSize(size = ActionDescriptor.SizeEnum.Normal) {
619
+ this._size = size;
620
+ return this;
621
+ }
622
+ withPosition(position) {
623
+ this._position = position;
624
+ return this;
625
+ }
626
+ withRunConfirmation(icon = 'pi pi-exclamation-triangle', title, message, acceptTitle, rejectTitle) {
627
+ this._hasRunConfirmation = true;
628
+ this._runConfirmationIcon = icon;
629
+ this._runConfirmationTitle = title;
630
+ this._runConfirmationMessage = message;
631
+ this._runConfirmationAcceptTitle = acceptTitle;
632
+ this._runConfirmationRejectTitle = rejectTitle;
633
+ return this;
634
+ }
635
+ withRunNotificationSuccess(title, message, hasNotification = true) {
636
+ this._hasRunNotificationSuccess = hasNotification;
637
+ this._runNotificationSuccessTitle = title;
638
+ this._runNotificationSuccessMessage = message;
639
+ }
640
+ withRunNotificationError(title, message, hasNotification = true) {
641
+ this._hasRunNotificationError = hasNotification;
642
+ this._runNotificationErrorTitle = title;
643
+ this._runNotificationErrorMessage = message;
644
+ }
645
+ }
646
+ (function (ActionDescriptor) {
647
+ let SizeEnum;
648
+ (function (SizeEnum) {
649
+ SizeEnum[SizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
650
+ SizeEnum[SizeEnum["Small"] = 1] = "Small";
651
+ SizeEnum[SizeEnum["Normal"] = 2] = "Normal";
652
+ SizeEnum[SizeEnum["Large"] = 3] = "Large";
653
+ SizeEnum[SizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
654
+ })(SizeEnum = ActionDescriptor.SizeEnum || (ActionDescriptor.SizeEnum = {}));
655
+ })(ActionDescriptor || (ActionDescriptor = {}));
656
+ class ActionEditorDescriptor extends ActionDescriptor {
657
+ constructor(editorDescriptor, actionName, parentType, parentProperty) {
658
+ super(editorDescriptor.model, actionName, parentType, parentProperty);
659
+ this._editorActions = [];
660
+ this._editorTitle = undefined;
661
+ this._hasFetchNotificationSuccess = false;
662
+ this._type = ActionTypeEnum.Editor;
663
+ this._editorDescriptor = editorDescriptor;
664
+ this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel));
665
+ }
666
+ get editorTitle() {
667
+ return this._editorTitle;
668
+ }
669
+ get editorDescriptor() {
670
+ return this._editorDescriptor;
671
+ }
672
+ get hasFetchNotificationSuccess() {
673
+ return this._hasFetchNotificationSuccess;
674
+ }
675
+ get fetchNotificationSuccessTitle() {
676
+ return this._fetchNotificationSuccessTitle;
677
+ }
678
+ get fetchNotificationSuccessMessage() {
679
+ return this._fetchNotificationSuccessMessage;
680
+ }
681
+ get dataProvider() {
682
+ return this._dataProvider;
683
+ }
684
+ get runFunction() {
685
+ throw new Error('Run function cannot be used in editor action. Use submit function instead!');
686
+ }
687
+ get fetchFunction() {
688
+ if (!this._fetchFunction) {
689
+ return ctx => {
690
+ var _a, _b;
691
+ console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, (_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item);
692
+ return of(((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item) ? ctx.data.item : {});
693
+ };
694
+ }
695
+ return this._fetchFunction;
696
+ }
697
+ get submitFunction() {
698
+ return this._submitFunction;
699
+ }
700
+ get editorActions() {
701
+ return this._editorActions;
702
+ }
703
+ get editorComponent() {
704
+ return this._editorComponent;
705
+ }
706
+ withEditorTitle(title) {
707
+ this._editorTitle = title;
708
+ return this;
709
+ }
710
+ withDataProvider(dataProvider) {
711
+ this._dataProvider = dataProvider;
712
+ return this;
713
+ }
714
+ withServiceType(serviceType) {
715
+ this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
716
+ return this;
717
+ }
718
+ withRunFunction(fn) {
719
+ return this.withSubmitFunction(fn);
720
+ }
721
+ withFetchFunction(fn) {
722
+ this._fetchFunction = fn;
723
+ return this;
724
+ }
725
+ withSubmitFunction(fn) {
726
+ this._submitFunction = fn;
727
+ return this;
728
+ }
729
+ withFetchNotificationError(title, message, hasNotification = true) {
730
+ this._hasFetchNotificationSuccess = hasNotification;
731
+ this._fetchNotificationSuccessTitle = title;
732
+ this._fetchNotificationSuccessMessage = message;
733
+ return this;
734
+ }
735
+ withEditorAction(action) {
736
+ this._editorActions.push(action);
737
+ return this;
738
+ }
739
+ withEditorActions(actions) {
740
+ this._editorActions = actions;
741
+ return this;
742
+ }
743
+ withEditorComponent(editorComponent) {
744
+ this._editorComponent = editorComponent;
745
+ return this;
746
+ }
747
+ }
748
+ class ActionEditorSubmitDescriptor extends ActionDescriptor {
749
+ constructor(editorAction, submitType = ActionEditorSubmitDescriptor.TypeEnum.Submit) {
750
+ super(editorAction.model, submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'submit' : 'cancel');
751
+ this._editorAction = editorAction;
752
+ this._submitType = submitType;
753
+ this._position = ActionPositionEnum.FooterRight;
754
+ }
755
+ get submitType() {
756
+ return this._submitType;
757
+ }
758
+ }
759
+ (function (ActionEditorSubmitDescriptor) {
760
+ let TypeEnum;
761
+ (function (TypeEnum) {
762
+ TypeEnum[TypeEnum["Submit"] = 0] = "Submit";
763
+ TypeEnum[TypeEnum["Cancel"] = 1] = "Cancel";
764
+ })(TypeEnum = ActionEditorSubmitDescriptor.TypeEnum || (ActionEditorSubmitDescriptor.TypeEnum = {}));
765
+ })(ActionEditorSubmitDescriptor || (ActionEditorSubmitDescriptor = {}));
766
+ class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
767
+ constructor(editorDescriptor) {
768
+ super(editorDescriptor, 'details');
769
+ this.withPosition(ActionPositionEnum.RowClick);
770
+ this.withRouteTrigger(':itemId');
771
+ this.withFetchFunction(ctx => {
772
+ var _a, _b, _c, _d;
773
+ return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
774
+ ? ctx.dataProvider.fetch((_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId, ctx.serviceInstance)
775
+ : throwError(new Error(`Data provider fetch function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
776
+ });
777
+ this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
778
+ this.withClassName('mng-details-dynamic-dialog');
779
+ }
780
+ withServiceType(serviceType) {
781
+ return this.withServiceFetchFunction(serviceType);
782
+ }
783
+ withServiceFetchFunction(serviceType, fetchFn) {
784
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
785
+ if (fetchFn) {
786
+ dataProvider.withFetch(fetchFn);
787
+ }
788
+ this._dataProvider = dataProvider;
789
+ return this;
790
+ }
791
+ }
792
+ class ActionEditorAddDescriptor extends ActionEditorDescriptor {
793
+ constructor(editorDescriptor) {
794
+ super(editorDescriptor, 'add');
795
+ this.withPosition(ActionPositionEnum.ToolbarLeft);
796
+ this.withRouteTrigger('add');
797
+ this.withSubmitFunction(ctx => { var _a, _b; return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.create) ? ctx.dataProvider.create((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)); });
798
+ this.withLevel(ActionLevelEnum.Success);
799
+ this.withIcon('pi pi-plus');
800
+ this.withClassName('mng-details-dynamic-dialog');
801
+ }
802
+ withServiceType(serviceType) {
803
+ return this.withServiceSubmitFunction(serviceType);
804
+ }
805
+ withServiceSubmitFunction(serviceType, createFn, fetchFn) {
806
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
807
+ if (createFn) {
808
+ dataProvider.withCreate(createFn);
809
+ }
810
+ if (fetchFn) {
811
+ dataProvider.withFetch(fetchFn);
812
+ }
813
+ this._dataProvider = dataProvider;
814
+ return this;
815
+ }
816
+ }
817
+ class ActionEditorEditDescriptor extends ActionEditorDescriptor {
818
+ constructor(editorDescriptor) {
819
+ super(editorDescriptor, 'edit');
820
+ this.withPosition(ActionPositionEnum.RowInline);
821
+ this.withTitle(null);
822
+ this.withRouteTrigger(':itemId/edit');
823
+ this.withFetchFunction(ctx => {
824
+ var _a, _b, _c;
825
+ return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
826
+ ? ctx.dataProvider.fetch(ctx.data.itemId, ctx.serviceInstance)
827
+ : throwError(new Error(`Data provider fetch function or item id ${(_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId} is missing.`));
828
+ });
829
+ this.withSubmitFunction(ctx => {
830
+ var _a, _b, _c, _d;
831
+ return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.update) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
832
+ ? ctx.dataProvider.update(ctx.data.itemId, (_c = ctx.data) === null || _c === void 0 ? void 0 : _c.item, ctx.serviceInstance)
833
+ : throwError(new Error(`Data provider update function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
834
+ });
835
+ this.withIcon('pi pi-pencil');
836
+ this.withClassName('mng-details-dynamic-dialog');
837
+ }
838
+ withServiceType(serviceType) {
839
+ return this.withServiceSubmitFunction(serviceType);
840
+ }
841
+ withServiceSubmitFunction(serviceType, updateFn, fetchFn) {
842
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
843
+ if (updateFn) {
844
+ dataProvider.withUpdate(updateFn);
743
845
  }
744
- const filterParam = new MediusFilterParam();
745
- filterParam.property = property;
746
- filterParam.filterValue = value;
747
- filterParam.filterValueTo = valueTo;
748
- filterParam.filterMatchType = matchType;
749
- filterParam.filterMatchCaseSensitive = matchCaseSensitive;
750
- this.queryParam.filterParams.push(filterParam);
846
+ if (fetchFn) {
847
+ dataProvider.withFetch(fetchFn);
848
+ }
849
+ this._dataProvider = dataProvider;
751
850
  return this;
752
851
  }
753
- build() {
754
- const queryParam = this.queryParam;
755
- this.queryParam = new MediusQueryParam();
756
- return queryParam;
757
- }
758
852
  }
759
-
760
- /* tslint:disable:no-angle-bracket-type-assertion no-trailing-whitespace member-ordering object-literal-key-quotes */
761
- const enumsMapBase = {
762
- FilterMatchType: MediusFilterMatchType,
763
- QueryMode: MediusQueryMode
764
- };
765
- const typeMapBase = {
766
- FilterParam: MediusFilterParam,
767
- QueryParam: MediusQueryParam,
768
- QueryResult: MediusQueryResult,
769
- QueryResultWithObject: MediusQueryResultWithObject
770
- };
771
-
772
- class TableDataProvider extends DataProvider {
773
- constructor(modelType, serviceType) {
774
- super(modelType, serviceType);
775
- this._getAll = () => of(new MediusQueryResult());
853
+ class ActionDeleteDescriptor extends ActionDescriptor {
854
+ constructor(model) {
855
+ super(model, 'delete');
856
+ this.withPosition(ActionPositionEnum.RowInline);
857
+ this.withTitle(null);
858
+ this.withRunFunction(ctx => {
859
+ var _a, _b;
860
+ const editorDataProvider = ctx.dataProvider;
861
+ return (editorDataProvider === null || editorDataProvider === void 0 ? void 0 : editorDataProvider.delete) && ((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.itemId)
862
+ ? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance)
863
+ : throwError(new Error(`Data provider delete function or item id ${(_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId} is missing.`));
864
+ });
865
+ this.withLevel(ActionLevelEnum.Danger);
866
+ this.withIcon('pi pi-trash');
867
+ this.withRunConfirmation(undefined);
776
868
  }
777
- get getAll() {
778
- return this._getAll;
869
+ withServiceType(serviceType) {
870
+ return this.withServiceDeleteFunction(serviceType);
779
871
  }
780
- withGetAll(getAll) {
781
- this._getAll = getAll;
872
+ withServiceDeleteFunction(serviceType, deleteFn) {
873
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
874
+ if (deleteFn) {
875
+ dataProvider.withDelete(deleteFn);
876
+ }
877
+ this._dataProvider = dataProvider;
782
878
  return this;
783
879
  }
784
880
  }
881
+ var ActionPositionEnum;
882
+ (function (ActionPositionEnum) {
883
+ ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
884
+ ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
885
+ ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
886
+ ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
887
+ ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
888
+ ActionPositionEnum[ActionPositionEnum["FooterLeft"] = 5] = "FooterLeft";
889
+ ActionPositionEnum[ActionPositionEnum["FooterRight"] = 6] = "FooterRight";
890
+ })(ActionPositionEnum || (ActionPositionEnum = {}));
891
+ var ActionActivationTriggerEnum;
892
+ (function (ActionActivationTriggerEnum) {
893
+ ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
894
+ ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
895
+ })(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
896
+ var ActionTypeEnum;
897
+ (function (ActionTypeEnum) {
898
+ ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
899
+ ActionTypeEnum[ActionTypeEnum["Event"] = 1] = "Event";
900
+ ActionTypeEnum[ActionTypeEnum["Editor"] = 2] = "Editor"; // editor providing middle step for activation
901
+ })(ActionTypeEnum || (ActionTypeEnum = {}));
902
+ var ActionLevelEnum;
903
+ (function (ActionLevelEnum) {
904
+ ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
905
+ ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
906
+ ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
907
+ ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
908
+ ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
909
+ ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
910
+ ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
911
+ ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
912
+ })(ActionLevelEnum || (ActionLevelEnum = {}));
785
913
 
786
- class TableviewDataProvider extends EditorDataProvider {
787
- constructor(modelType, serviceType) {
788
- super(modelType, serviceType);
789
- this._getAll = () => of(new MediusQueryResult());
790
- }
791
- get getAll() {
792
- return this._getAll;
914
+ class MngFormEditorSubmitEvent {
915
+ constructor(formItem) {
916
+ this.formItem = formItem;
917
+ this.success = true;
793
918
  }
794
- withGetAll(getAll) {
795
- this._getAll = getAll;
796
- return this;
919
+ }
920
+ var MngFormFieldEventTypeEnum;
921
+ (function (MngFormFieldEventTypeEnum) {
922
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
923
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
924
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
925
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
926
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
927
+ })(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
928
+ class MngFormFieldEventComponentSubtype {
929
+ }
930
+ MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
931
+ MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
932
+ MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
933
+ MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
934
+ class MngFormFieldEventDialogSubtype {
935
+ }
936
+ MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
937
+ MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
938
+ MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
939
+ class MngFormFieldEvent {
940
+ constructor(type, componentType, componentInstance, data = {}) {
941
+ this.type = type;
942
+ this.componentType = componentType;
943
+ this.componentInstance = componentInstance;
944
+ this.data = data;
797
945
  }
798
946
  }
799
947
 
800
948
  class EditorDescriptor {
801
- constructor(modelType, idProperty, titleProperty) {
949
+ constructor(modelType, idProperty, titleProperty, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {
802
950
  this._tabs = [];
803
951
  this._groups = [];
804
952
  this._fields = [];
805
953
  this._disabled = false;
806
954
  this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
807
- }
808
- get disabled() {
809
- return this._disabled;
955
+ this._tableviewEditorType = tableviewEditorType;
810
956
  }
811
957
  get model() {
812
958
  return this._model;
@@ -817,6 +963,12 @@ class EditorDescriptor {
817
963
  get fields() {
818
964
  return this._fields;
819
965
  }
966
+ get tableviewEditorType() {
967
+ return this._disabled;
968
+ }
969
+ get disabled() {
970
+ return this._disabled;
971
+ }
820
972
  createTabGroup(name, title) {
821
973
  const tabGroup = new FieldTabGroupDescriptor(this, name);
822
974
  if (!title) {
@@ -940,6 +1092,15 @@ class EditorDescriptor {
940
1092
  }
941
1093
  }
942
1094
  EditorDescriptor.defaultGroupName = '_default';
1095
+ (function (EditorDescriptor) {
1096
+ let TableviewEditorTypeEnum;
1097
+ (function (TableviewEditorTypeEnum) {
1098
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
1099
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
1100
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
1101
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
1102
+ })(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
1103
+ })(EditorDescriptor || (EditorDescriptor = {}));
943
1104
  class AGenericFieldDescriptor {
944
1105
  constructor(editor) {
945
1106
  this._config = {};
@@ -961,12 +1122,18 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
961
1122
  super(editor);
962
1123
  this._required = false;
963
1124
  this._disabled = false;
964
- this._className = '';
965
1125
  this._validators = [];
1126
+ this._className = '';
1127
+ this._labelClassName = '';
1128
+ this._inputClassName = '';
1129
+ this._size = FieldDescriptor.SizeEnum.Normal;
966
1130
  this._eventsSubject = new Subject();
967
1131
  this._property = property;
968
1132
  this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
969
1133
  }
1134
+ get property() {
1135
+ return this._property;
1136
+ }
970
1137
  get group() {
971
1138
  return this._group;
972
1139
  }
@@ -976,6 +1143,9 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
976
1143
  get placeholder() {
977
1144
  return this._placeholder;
978
1145
  }
1146
+ get helpText() {
1147
+ return this._helpText;
1148
+ }
979
1149
  get required() {
980
1150
  return this._required;
981
1151
  }
@@ -985,9 +1155,6 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
985
1155
  get defaultValue() {
986
1156
  return this._defaultValue;
987
1157
  }
988
- get className() {
989
- return this._className;
990
- }
991
1158
  get getter() {
992
1159
  return this._getter;
993
1160
  }
@@ -1006,8 +1173,23 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1006
1173
  get hiddenExpression() {
1007
1174
  return this._hiddenExpression;
1008
1175
  }
1009
- get property() {
1010
- return this._property;
1176
+ get className() {
1177
+ return this._className;
1178
+ }
1179
+ get labelClassName() {
1180
+ return this._labelClassName;
1181
+ }
1182
+ get inputClassName() {
1183
+ return this._inputClassName;
1184
+ }
1185
+ get size() {
1186
+ return this._size;
1187
+ }
1188
+ get isSizeSmall() {
1189
+ return this._size === FieldDescriptor.SizeEnum.Small;
1190
+ }
1191
+ get isSizeLarge() {
1192
+ return this._size === FieldDescriptor.SizeEnum.Large;
1011
1193
  }
1012
1194
  withLabel(label) {
1013
1195
  this._label = label;
@@ -1017,6 +1199,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1017
1199
  this._placeholder = placeholder;
1018
1200
  return this;
1019
1201
  }
1202
+ withHelpText(helpText) {
1203
+ this._helpText = helpText;
1204
+ return this;
1205
+ }
1020
1206
  withRequired(required = true, requiredExpression) {
1021
1207
  this._required = required;
1022
1208
  if (requiredExpression) {
@@ -1039,10 +1225,6 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1039
1225
  this._defaultValue = defaultValue;
1040
1226
  return this;
1041
1227
  }
1042
- withClassName(className) {
1043
- this._className = className;
1044
- return this;
1045
- }
1046
1228
  withGetter(getter) {
1047
1229
  this._getter = getter;
1048
1230
  return this;
@@ -1055,6 +1237,16 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1055
1237
  this._validators.push(new FieldValidator(name, expression, message));
1056
1238
  return this;
1057
1239
  }
1240
+ withClassName(className, labelClassName = '', inputClassName = '') {
1241
+ this._className = className;
1242
+ this._labelClassName = labelClassName;
1243
+ this._inputClassName = inputClassName;
1244
+ return this;
1245
+ }
1246
+ withSize(size = FieldDescriptor.SizeEnum.Normal) {
1247
+ this._size = size;
1248
+ return this;
1249
+ }
1058
1250
  nextEvent(type, cmpType, cmpInstance, data) {
1059
1251
  this._eventsSubject.next(new MngFormFieldEvent(type, cmpType, cmpInstance, data));
1060
1252
  }
@@ -1064,6 +1256,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1064
1256
  copyFieldsTo(obj) {
1065
1257
  obj._label = this._label;
1066
1258
  obj._placeholder = this._placeholder;
1259
+ obj._helpText = this._helpText;
1067
1260
  obj._required = this._required;
1068
1261
  obj._disabled = this._disabled;
1069
1262
  obj._defaultValue = this._defaultValue;
@@ -1071,11 +1264,21 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1071
1264
  obj._hiddenExpression = this._hiddenExpression;
1072
1265
  obj._disabledExpression = this._disabledExpression;
1073
1266
  obj._className = this._className;
1267
+ obj._size = this.size;
1074
1268
  obj._getter = this._getter;
1075
1269
  obj._setter = this._setter;
1076
1270
  obj._validators = this._validators;
1077
1271
  }
1078
1272
  }
1273
+ var FieldDescriptor;
1274
+ (function (FieldDescriptor) {
1275
+ let SizeEnum;
1276
+ (function (SizeEnum) {
1277
+ SizeEnum[SizeEnum["Small"] = 0] = "Small";
1278
+ SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
1279
+ SizeEnum[SizeEnum["Large"] = 2] = "Large";
1280
+ })(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
1281
+ })(FieldDescriptor || (FieldDescriptor = {}));
1079
1282
  class FieldInputDescriptor extends AFieldDescriptor {
1080
1283
  constructor(editor, property) {
1081
1284
  super(editor, property);
@@ -1267,6 +1470,9 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1267
1470
  get itemsValueProperty() {
1268
1471
  return this._itemsValueProperty;
1269
1472
  }
1473
+ get itemsDisabledProperty() {
1474
+ return this._itemsDisabledProperty;
1475
+ }
1270
1476
  get dataKeyProperty() {
1271
1477
  return this._dataKeyProperty;
1272
1478
  }
@@ -1288,10 +1494,16 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1288
1494
  }
1289
1495
  withItemsValueProperty(itemsValueProperty) {
1290
1496
  this._itemsValueProperty = itemsValueProperty;
1497
+ this._dataKeyProperty = undefined;
1498
+ return this;
1499
+ }
1500
+ withItemsDisabledProperty(itemsDisabledProperty) {
1501
+ this._itemsDisabledProperty = itemsDisabledProperty;
1291
1502
  return this;
1292
1503
  }
1293
1504
  withDataKeyProperty(property) {
1294
1505
  this._dataKeyProperty = property;
1506
+ this._itemsValueProperty = undefined;
1295
1507
  return this;
1296
1508
  }
1297
1509
  withLookup(lookup, serviceType) {
@@ -1326,6 +1538,7 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1326
1538
  field._lookupType = this._lookupType;
1327
1539
  field._itemsLabelProperty = this._itemsLabelProperty;
1328
1540
  field._itemsValueProperty = this._itemsValueProperty;
1541
+ field._itemsDisabledProperty = this._itemsDisabledProperty;
1329
1542
  field._dataKeyProperty = this._dataKeyProperty;
1330
1543
  field._dataProvider = this._dataProvider;
1331
1544
  field._lookupTableDescriptor = this._lookupTableDescriptor;
@@ -1343,27 +1556,43 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1343
1556
  class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
1344
1557
  constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
1345
1558
  super(editor, property, null);
1559
+ this._nameAsValue = false;
1346
1560
  this._enumType = enumType;
1561
+ this._nameAsValue = nameAsValue;
1347
1562
  if (typeof optionsTitlePath === 'undefined') {
1348
1563
  optionsTitlePath = TypeUtil.findEnumName(enumType);
1349
1564
  }
1350
- const optionEnumValues = Array.isArray(options)
1565
+ this._optionEnumValues = Array.isArray(options)
1351
1566
  ? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined)
1352
1567
  : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath !== null && optionsTitlePath !== void 0 ? optionsTitlePath : undefined);
1353
- const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
1568
+ const dataProvider = new LookupDataProvider(null).withLookup(() => of(this._optionEnumValues));
1354
1569
  this.withLookupDataProvider(dataProvider);
1355
1570
  this.withItemsLabelProperty('title');
1356
1571
  this.withItemsValueProperty('value');
1572
+ this.withItemsDisabledProperty('disabled');
1357
1573
  }
1358
1574
  get enumType() {
1359
1575
  return this._enumType;
1360
1576
  }
1577
+ withDisabledOptions(...disabledOptions) {
1578
+ for (const disabledOption of disabledOptions) {
1579
+ const disabledOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, disabledOption) : disabledOption;
1580
+ if (disabledOptionValue) {
1581
+ const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);
1582
+ if (option) {
1583
+ option.disabled = true;
1584
+ }
1585
+ }
1586
+ }
1587
+ return this;
1588
+ }
1361
1589
  copy() {
1362
1590
  const field = new FieldLookupEnumDescriptor(this._editor, this._property, this._enumType, []);
1363
1591
  this.copyFieldsTo(field);
1364
1592
  field._lookupType = this._lookupType;
1365
1593
  field._itemsLabelProperty = this._itemsLabelProperty;
1366
1594
  field._itemsValueProperty = this._itemsValueProperty;
1595
+ field._itemsDisabledProperty = this._itemsDisabledProperty;
1367
1596
  field._dataKeyProperty = this._dataKeyProperty;
1368
1597
  field._dataProvider = this._dataProvider;
1369
1598
  return field;
@@ -1457,14 +1686,18 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1457
1686
  constructor(editor, property, modelType, tableviewDescriptor) {
1458
1687
  super(editor, property);
1459
1688
  this._fieldType = FieldManyEditorDescriptor.TypeEnum.DialogEditor;
1689
+ this._fieldActions = [];
1460
1690
  this._actions = [];
1461
1691
  this._modelType = modelType;
1462
1692
  this._tableviewDescriptor = tableviewDescriptor;
1463
- this._actions.push(FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
1693
+ this._fieldActions.push(FieldManyEditorDescriptor.ActionEnum.View, FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
1464
1694
  }
1465
1695
  get fieldType() {
1466
1696
  return this._fieldType;
1467
1697
  }
1698
+ get fieldActions() {
1699
+ return this._fieldActions;
1700
+ }
1468
1701
  get actions() {
1469
1702
  return this._actions;
1470
1703
  }
@@ -1483,15 +1716,23 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1483
1716
  get editorForUpdate() {
1484
1717
  return this._tableviewDescriptor.editEditor;
1485
1718
  }
1486
- withActions(actions = []) {
1487
- this.actions.push(...actions);
1719
+ withFieldAction(action) {
1720
+ this._fieldActions.push(action);
1721
+ return this;
1722
+ }
1723
+ withFieldActions(actions) {
1724
+ this._fieldActions = actions;
1725
+ return this;
1726
+ }
1727
+ withAction(action) {
1728
+ this._actions.push(action);
1488
1729
  return this;
1489
1730
  }
1490
1731
  copy() {
1491
1732
  const field = new FieldManyEditorDescriptor(this._editor, this._property, this._modelType, this._tableviewDescriptor.copy());
1492
1733
  this.copyFieldsTo(field);
1493
1734
  field._fieldType = this._fieldType;
1494
- field._actions = this._actions.map(a => a);
1735
+ field._fieldActions = this._fieldActions.map(a => a);
1495
1736
  return field;
1496
1737
  }
1497
1738
  }
@@ -1502,9 +1743,10 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1502
1743
  })(TypeEnum = FieldManyEditorDescriptor.TypeEnum || (FieldManyEditorDescriptor.TypeEnum = {}));
1503
1744
  let ActionEnum;
1504
1745
  (function (ActionEnum) {
1505
- ActionEnum[ActionEnum["Add"] = 0] = "Add";
1506
- ActionEnum[ActionEnum["Edit"] = 1] = "Edit";
1507
- ActionEnum[ActionEnum["Delete"] = 2] = "Delete";
1746
+ ActionEnum[ActionEnum["View"] = 0] = "View";
1747
+ ActionEnum[ActionEnum["Add"] = 1] = "Add";
1748
+ ActionEnum[ActionEnum["Edit"] = 2] = "Edit";
1749
+ ActionEnum[ActionEnum["Delete"] = 3] = "Delete";
1508
1750
  })(ActionEnum = FieldManyEditorDescriptor.ActionEnum || (FieldManyEditorDescriptor.ActionEnum = {}));
1509
1751
  })(FieldManyEditorDescriptor || (FieldManyEditorDescriptor = {}));
1510
1752
  class AFieldGroupDescriptor extends AGenericFieldDescriptor {
@@ -1711,9 +1953,9 @@ class TableDescriptor {
1711
1953
  this.setDataKeyFromColumn();
1712
1954
  return column;
1713
1955
  }
1714
- addColumnBoolean(property) {
1956
+ addColumnBoolean(property, yes, no, asIcon = false) {
1715
1957
  const column = new ColumnDescriptor(this, property);
1716
- column.asBoolean();
1958
+ column.asBoolean(yes, no, asIcon);
1717
1959
  this._columns.push(column);
1718
1960
  this.setDataKeyFromColumn();
1719
1961
  return column;
@@ -1802,6 +2044,8 @@ class ColumnDescriptor {
1802
2044
  this._columnType = ColumnDescriptor.TypeEnum.String;
1803
2045
  this._isSortEnabled = false;
1804
2046
  this._enumNameAsValue = false;
2047
+ // boolean specifics
2048
+ this._booleanAsIcon = false;
1805
2049
  this._table = table;
1806
2050
  this._property = property;
1807
2051
  }
@@ -1841,6 +2085,15 @@ class ColumnDescriptor {
1841
2085
  get enumNameAsValue() {
1842
2086
  return this._enumNameAsValue;
1843
2087
  }
2088
+ get booleanAsIcon() {
2089
+ return this._booleanAsIcon;
2090
+ }
2091
+ get booleanYes() {
2092
+ return this._booleanYes;
2093
+ }
2094
+ get booleanNo() {
2095
+ return this._booleanNo;
2096
+ }
1844
2097
  asType(type = ColumnDescriptor.TypeEnum.String) {
1845
2098
  this._columnType = type;
1846
2099
  return this;
@@ -1855,8 +2108,11 @@ class ColumnDescriptor {
1855
2108
  this._displayFormat = displayFormat;
1856
2109
  return this;
1857
2110
  }
1858
- asBoolean() {
2111
+ asBoolean(yes, no, asIcon = false) {
1859
2112
  this._columnType = ColumnDescriptor.TypeEnum.Boolean;
2113
+ this._booleanAsIcon = asIcon;
2114
+ this._booleanYes = yes;
2115
+ this._booleanNo = no;
1860
2116
  return this;
1861
2117
  }
1862
2118
  asEnum(enumType, nameAsValue = false, titlePath) {
@@ -1927,6 +2183,9 @@ class ColumnDescriptor {
1927
2183
  descriptor._isSortEnabled = this._isSortEnabled;
1928
2184
  descriptor._columnType = this._columnType;
1929
2185
  descriptor._filterDescriptor = (_a = this._filterDescriptor) === null || _a === void 0 ? void 0 : _a.copy();
2186
+ descriptor._booleanAsIcon = this._booleanAsIcon;
2187
+ descriptor._booleanYes = this._booleanYes;
2188
+ descriptor._booleanNo = this._booleanNo;
1930
2189
  return descriptor;
1931
2190
  }
1932
2191
  }
@@ -2148,14 +2407,15 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
2148
2407
  })(LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum || (FilterLookupDescriptor.LookupTypeEnum = {}));
2149
2408
  })(FilterLookupDescriptor || (FilterLookupDescriptor = {}));
2150
2409
 
2410
+ var TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;
2151
2411
  class TableviewDescriptor {
2152
2412
  constructor(modelType, idProperty, titleProperty) {
2153
2413
  this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
2154
2414
  this._table = new TableDescriptor(modelType, idProperty, titleProperty);
2155
- this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty);
2415
+ this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.View);
2156
2416
  this._viewEditor.withDisabled();
2157
- this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty);
2158
- this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty);
2417
+ this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add);
2418
+ this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit);
2159
2419
  this._tableTitle = `${this._model.typeName}.name`;
2160
2420
  }
2161
2421
  get table() {
@@ -2214,8 +2474,8 @@ class TableviewDescriptor {
2214
2474
  addColumnDate(property, displayFormat) {
2215
2475
  return this._table.addColumnDate(property, displayFormat);
2216
2476
  }
2217
- addColumnBoolean(property) {
2218
- return this._table.addColumnBoolean(property);
2477
+ addColumnBoolean(property, yes, no, asIcon = false) {
2478
+ return this._table.addColumnBoolean(property, yes, no, asIcon);
2219
2479
  }
2220
2480
  addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
2221
2481
  return this._table.addColumnEnum(property, enumType, nameAsValue, titlePath);
@@ -2611,6 +2871,34 @@ class I18nUtil {
2611
2871
  }
2612
2872
  return i18nParameters;
2613
2873
  }
2874
+ static instantErrorI18nTranslation(translate, error, i18nParameters = {}) {
2875
+ i18nParameters.errorStatus = '';
2876
+ i18nParameters.errorMessage = '';
2877
+ if (error.messageCode) {
2878
+ const params = I18nUtil.getErrorI18nParams(error);
2879
+ const keys = [`errors.${error.messageCode}`, `messages.${error.messageCode}`];
2880
+ const i18ns = translate.instant(keys, params);
2881
+ const i18n = I18nUtil.selectKeyByPriority(keys, i18ns);
2882
+ if (i18n) {
2883
+ return i18n;
2884
+ }
2885
+ }
2886
+ return translate.instant(error.message);
2887
+ }
2888
+ static getErrorI18nParams(error, i18nParameters = {}) {
2889
+ i18nParameters.errorStatus = '';
2890
+ i18nParameters.errorMessage = '';
2891
+ if (error.status) {
2892
+ i18nParameters.errorStatus = error.status;
2893
+ }
2894
+ if (error.message) {
2895
+ i18nParameters.errorMessage = error.message;
2896
+ }
2897
+ if (error.statusDescription) {
2898
+ i18nParameters.errorStatusDescription = error.statusDescription;
2899
+ }
2900
+ return i18nParameters;
2901
+ }
2614
2902
  static instantModelName(translate, model, singular) {
2615
2903
  const keys = I18nUtil.getModelNameKeys(model, singular);
2616
2904
  const i18n = translate.instant(keys);
@@ -2719,16 +3007,18 @@ class ModelUtil {
2719
3007
  }
2720
3008
  return (_a = titleAttribute === null || titleAttribute === void 0 ? void 0 : titleAttribute.name) !== null && _a !== void 0 ? _a : null;
2721
3009
  }
2722
- static trySetLookupItemsProperties(lookup) {
3010
+ static trySetLookupItemsProperties(lookup, idAsDataKey = true) {
2723
3011
  var _a;
2724
3012
  if (lookup.modelType) {
2725
3013
  if (!lookup.itemsValueProperty || !lookup.dataKeyProperty) {
2726
3014
  const idProperty = (_a = ModelUtil.findIdAttribute(lookup.modelType)) !== null && _a !== void 0 ? _a : undefined;
2727
- if (idProperty && !lookup.itemsValueProperty) {
2728
- lookup.withItemsValueProperty(idProperty);
2729
- }
2730
- if (idProperty && !lookup.dataKeyProperty) {
2731
- lookup.withDataKeyProperty(idProperty);
3015
+ if (idProperty && !lookup.itemsValueProperty && !lookup.dataKeyProperty) {
3016
+ if (idAsDataKey) {
3017
+ lookup.withDataKeyProperty(idProperty);
3018
+ }
3019
+ else {
3020
+ lookup.withItemsValueProperty(idProperty);
3021
+ }
2732
3022
  }
2733
3023
  }
2734
3024
  if (!lookup.itemsLabelProperty) {
@@ -2742,8 +3032,16 @@ class ModelUtil {
2742
3032
  }
2743
3033
 
2744
3034
  class ToastUtil {
2745
- static tableNotificationError(translationService, table, error, tableview) {
2746
- var _a, _b, _c;
3035
+ static notification(viewContainer, title, message, severity = 'success') {
3036
+ const messageService = viewContainer === null || viewContainer === void 0 ? void 0 : viewContainer.getMessageService();
3037
+ if (!messageService) {
3038
+ console.warn(`No message service was provided through view container, message will not be displayed.`);
3039
+ return;
3040
+ }
3041
+ messageService.add({ severity: severity, summary: title, detail: message, life: severity === 'error' ? 10000 : 5000 });
3042
+ }
3043
+ static tableNotificationError(translationService, table, error, viewContainer) {
3044
+ var _a, _b;
2747
3045
  const params = {};
2748
3046
  if (error === null || error === void 0 ? void 0 : error.message) {
2749
3047
  params.errorMessage = `: ${error.message}`;
@@ -2754,26 +3052,22 @@ class ToastUtil {
2754
3052
  console.log(params);
2755
3053
  const tableErrorTitle = (_a = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.title', undefined, undefined, 'general.error', params)) !== null && _a !== void 0 ? _a : undefined;
2756
3054
  const tableErrorMessage = (_b = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.message', undefined, undefined, 'general.errorMessage', params)) !== null && _b !== void 0 ? _b : undefined;
2757
- (_c = tableview === null || tableview === void 0 ? void 0 : tableview.messageService) === null || _c === void 0 ? void 0 : _c.add({ severity: 'error', summary: tableErrorTitle, detail: tableErrorMessage });
3055
+ ToastUtil.notification(viewContainer, tableErrorTitle, tableErrorMessage, 'error');
2758
3056
  }
2759
- static actionNotificationSuccess(translationService, action, functionName, customTitleKey, customMessageKey, tableview, item) {
2760
- var _a, _b, _c;
3057
+ static actionNotificationSuccess(translationService, action, functionName, customTitleKey, customMessageKey, viewContainer, item) {
3058
+ var _a, _b;
2761
3059
  const actionSuccessTitle = (_a = I18nUtil.instantActionTranslation(translationService, action, 'success.title', customTitleKey, item, 'general.success', functionName)) !== null && _a !== void 0 ? _a : undefined;
2762
3060
  const actionSuccessMessage = (_b = I18nUtil.instantActionTranslation(translationService, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName)) !== null && _b !== void 0 ? _b : undefined;
2763
- (_c = tableview === null || tableview === void 0 ? void 0 : tableview.messageService) === null || _c === void 0 ? void 0 : _c.add({ severity: 'success', summary: actionSuccessTitle, detail: actionSuccessMessage });
3061
+ ToastUtil.notification(viewContainer, actionSuccessTitle, actionSuccessMessage);
2764
3062
  }
2765
- static actionNotificationError(translationService, action, error, functionName, tableview, item) {
2766
- var _a, _b, _c;
2767
- const params = {};
2768
- if (error === null || error === void 0 ? void 0 : error.message) {
2769
- params.errorMessage = `: ${error.message}`;
2770
- }
2771
- else {
2772
- params.errorMessage = '.';
2773
- }
3063
+ static actionNotificationError(translationService, action, error, functionName, viewContainer, item) {
3064
+ var _a, _b;
3065
+ const params = {
3066
+ errorMessage: I18nUtil.instantErrorI18nTranslation(translationService, error)
3067
+ };
2774
3068
  const actionErrorTitle = (_a = I18nUtil.instantActionTranslation(translationService, action, 'error.title', action.runNotificationErrorTitle, item, 'general.error', functionName, params)) !== null && _a !== void 0 ? _a : undefined;
2775
3069
  const actionErrorMessage = (_b = I18nUtil.instantActionTranslation(translationService, action, 'error.message', action.runNotificationErrorMessage, item, 'general.errorMessage', functionName, params)) !== null && _b !== void 0 ? _b : undefined;
2776
- (_c = tableview === null || tableview === void 0 ? void 0 : tableview.messageService) === null || _c === void 0 ? void 0 : _c.add({ severity: 'error', summary: actionErrorTitle, detail: actionErrorMessage });
3070
+ ToastUtil.notification(viewContainer, actionErrorTitle, actionErrorMessage, 'error');
2777
3071
  }
2778
3072
  static getFormEditorWarningMessage(translationService, title, message) {
2779
3073
  var _a, _b;
@@ -3026,7 +3320,12 @@ class ObjectSerializer {
3026
3320
  return transformedData;
3027
3321
  }
3028
3322
  else if (type === 'Date') {
3029
- return data.toISOString();
3323
+ if (data instanceof Date) {
3324
+ return data.toISOString();
3325
+ }
3326
+ else {
3327
+ return new Date(data).toISOString();
3328
+ }
3030
3329
  }
3031
3330
  else {
3032
3331
  if (this._enumMap[type]) {
@@ -3228,12 +3527,12 @@ MediusRestUtil.matchModeMapping = [
3228
3527
  ];
3229
3528
 
3230
3529
  class ActionExecContext {
3231
- constructor(dataProvider, serviceInstance, data, sourceComponent = null, tableview = null) {
3530
+ constructor(dataProvider, serviceInstance, data, sourceComponent = null, viewContainer = null) {
3232
3531
  this.dataProvider = dataProvider;
3233
3532
  this.serviceInstance = serviceInstance;
3234
3533
  this.data = data;
3235
3534
  this.sourceComponent = sourceComponent;
3236
- this.tableview = tableview;
3535
+ this.viewContainer = viewContainer;
3237
3536
  }
3238
3537
  }
3239
3538
  class ActionError {
@@ -3280,30 +3579,100 @@ class ActionTriggerResult {
3280
3579
  get error() {
3281
3580
  return this.activationResult ? this.activationResult.error : null;
3282
3581
  }
3283
- get dialogRef() {
3284
- return this.activationResult ? this.activationResult.dialogRef : null;
3582
+ get dialogRef() {
3583
+ return this.activationResult ? this.activationResult.dialogRef : null;
3584
+ }
3585
+ }
3586
+
3587
+ const MNG_BROWSER_STORAGE_IT = new InjectionToken('Browser storage', {
3588
+ providedIn: 'root',
3589
+ factory: () => localStorage
3590
+ });
3591
+
3592
+ const ACTION_EDITOR_DIALOG_COMPONENT_SETTING = new InjectionToken('ACTION_EDITOR_DIALOG_COMPONENT_SETTING');
3593
+
3594
+ const MNG_MODULE_CONFIG_IT = new InjectionToken('MngModuleConfig');
3595
+
3596
+ class MngNavigationService {
3597
+ constructor(router, location) {
3598
+ this.router = router;
3599
+ this.location = location;
3600
+ this.history = [];
3601
+ this.router.events.subscribe(event => {
3602
+ if (event instanceof NavigationEnd) {
3603
+ this.history.push(event.urlAfterRedirects);
3604
+ }
3605
+ });
3606
+ }
3607
+ getCurrentLocation() {
3608
+ if (this.history.length > 0) {
3609
+ return this.history[this.history.length - 1];
3610
+ }
3611
+ else {
3612
+ return null;
3613
+ }
3614
+ }
3615
+ getPreviousLocation() {
3616
+ if (this.history.length > 1) {
3617
+ return this.history[this.history.length - 2];
3618
+ }
3619
+ else {
3620
+ return null;
3621
+ }
3622
+ }
3623
+ back() {
3624
+ this.history.pop();
3625
+ if (this.history.length > 0) {
3626
+ this.location.back();
3627
+ }
3628
+ else {
3629
+ this.router.navigateByUrl('/');
3630
+ }
3631
+ }
3632
+ }
3633
+ MngNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService, deps: [{ token: i1.Router }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Injectable });
3634
+ MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService });
3635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService, decorators: [{
3636
+ type: Injectable
3637
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i4.Location }]; } });
3638
+
3639
+ class MngErrorMapperService {
3640
+ }
3641
+ class DefaultMngErrorMapperService extends MngErrorMapperService {
3642
+ toMngError(error, mngError) {
3643
+ var _a, _b;
3644
+ if (!mngError) {
3645
+ mngError = {
3646
+ name: (_a = error === null || error === void 0 ? void 0 : error.name) !== null && _a !== void 0 ? _a : 'UnknownError',
3647
+ message: (_b = error.message) !== null && _b !== void 0 ? _b : 'Unknown error'
3648
+ };
3649
+ }
3650
+ return mngError;
3285
3651
  }
3286
3652
  }
3287
3653
 
3288
- class MngActionService {
3289
- constructor(injector, router, dialogService, confirmationService, translate) {
3654
+ class MngActionExecutorService {
3655
+ constructor(injector, router, dialogService, confirmationService, translate, navigationService, errorMapper, defaultEditorDialogComponent) {
3290
3656
  this.injector = injector;
3291
3657
  this.router = router;
3292
3658
  this.dialogService = dialogService;
3293
3659
  this.confirmationService = confirmationService;
3294
3660
  this.translate = translate;
3661
+ this.navigationService = navigationService;
3662
+ this.errorMapper = errorMapper;
3663
+ this.defaultEditorDialogComponent = defaultEditorDialogComponent;
3295
3664
  }
3296
- getActionExecContext(action, itemId, item, dataProvider, tableview, sourceComponent, actionData) {
3297
- var _a;
3298
- return new ActionExecContext(dataProvider, (_a = this.getDataProviderService(dataProvider)) !== null && _a !== void 0 ? _a : undefined, {
3665
+ prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData) {
3666
+ var _a, _b;
3667
+ return new ActionExecContext((_a = dataProvider !== null && dataProvider !== void 0 ? dataProvider : action.dataProvider) !== null && _a !== void 0 ? _a : viewContainer === null || viewContainer === void 0 ? void 0 : viewContainer.getDataProvider(), (_b = this.getDataProviderService(dataProvider)) !== null && _b !== void 0 ? _b : undefined, {
3299
3668
  item,
3300
3669
  itemId,
3301
3670
  actionData
3302
- }, sourceComponent, tableview);
3671
+ }, sourceComponent, viewContainer);
3303
3672
  }
3304
- runAction(action, itemId, item, dataProvider, sourceComponent, tableview, actionData) {
3673
+ runAction(action, itemId, item, dataProvider, sourceComponent, viewContainer, actionData) {
3305
3674
  var _a, _b, _c, _d;
3306
- const context = this.getActionExecContext(action, itemId, item, dataProvider, tableview, sourceComponent, actionData);
3675
+ const context = this.prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData);
3307
3676
  if (action.hasRunConfirmation) {
3308
3677
  if (typeof (sourceComponent === null || sourceComponent === void 0 ? void 0 : sourceComponent.getConfirmationService) !== 'function' || typeof (sourceComponent === null || sourceComponent === void 0 ? void 0 : sourceComponent.getConfirmationServiceInstanceKey) !== 'function') {
3309
3678
  throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);
@@ -3341,17 +3710,19 @@ class MngActionService {
3341
3710
  .runFunction(context)
3342
3711
  .pipe(first(), map(res => new ActionRunResult(context, res)), map(value => {
3343
3712
  if (action.hasRunNotificationSuccess) {
3344
- ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, tableview, item);
3713
+ ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, item);
3345
3714
  }
3346
3715
  return value;
3347
3716
  }), catchError(err => {
3717
+ const actionError = this.toMngActionError(err);
3348
3718
  if (action.hasRunNotificationError) {
3349
- ToastUtil.actionNotificationError(this.translate, action, err, 'run', tableview, item);
3719
+ ToastUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);
3350
3720
  }
3351
- throw err;
3721
+ throw actionError;
3352
3722
  }))
3353
3723
  .subscribe(res => {
3354
3724
  observer.next(res);
3725
+ observer.complete();
3355
3726
  });
3356
3727
  };
3357
3728
  confirmParams.reject = () => {
@@ -3364,14 +3735,15 @@ class MngActionService {
3364
3735
  else {
3365
3736
  return action.runFunction(context).pipe(map(res => new ActionRunResult(context, res)), map(value => {
3366
3737
  if (action.hasRunNotificationSuccess) {
3367
- ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, tableview, item);
3738
+ ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, item);
3368
3739
  }
3369
3740
  return value;
3370
3741
  }), catchError(err => {
3742
+ const actionError = this.toMngActionError(err);
3371
3743
  if (action.hasRunNotificationError) {
3372
- ToastUtil.actionNotificationError(this.translate, action, err, 'run', tableview, item);
3744
+ ToastUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);
3373
3745
  }
3374
- throw err;
3746
+ throw actionError;
3375
3747
  }));
3376
3748
  }
3377
3749
  }
@@ -3383,58 +3755,70 @@ class MngActionService {
3383
3755
  * @param formItem Item instance (from form).
3384
3756
  * @param dataProvider Data provider
3385
3757
  * @param sourceComponent Source component from where the fetch function was called.
3386
- * @param tableview Tableview component.
3758
+ * @param viewContainer View container/service.
3387
3759
  * @param actionData Additional action data.
3388
3760
  */
3389
- runEditorSave(action, itemId, formItem, dataProvider, sourceComponent, tableview, actionData) {
3390
- const context = this.prepareRunContextForEditor(formItem, itemId, dataProvider, sourceComponent, tableview, actionData);
3761
+ runEditorSave(action, itemId, formItem, dataProvider, sourceComponent, viewContainer, actionData) {
3762
+ const context = this.prepareExecContextForEditor(action, formItem, itemId, dataProvider, sourceComponent, viewContainer, actionData);
3391
3763
  if (typeof action.submitFunction !== 'function') {
3392
3764
  throw new Error(`Submit function for action ${action.actionName} cannot be invoked.`);
3393
3765
  }
3394
3766
  return action.submitFunction(context).pipe(map(res => new ActionRunResult(context, res)), map(value => {
3395
3767
  if (action.hasRunNotificationSuccess) {
3396
- ToastUtil.actionNotificationSuccess(this.translate, action, 'submit', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, tableview, formItem);
3768
+ ToastUtil.actionNotificationSuccess(this.translate, action, 'submit', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, formItem);
3397
3769
  }
3398
3770
  return value;
3399
3771
  }), catchError(err => {
3772
+ const actionError = this.toMngActionError(err);
3400
3773
  if (action.hasRunNotificationError) {
3401
- ToastUtil.actionNotificationError(this.translate, action, err, 'submit', tableview, formItem);
3774
+ ToastUtil.actionNotificationError(this.translate, action, actionError, 'submit', viewContainer, formItem);
3402
3775
  }
3403
- throw err;
3776
+ throw actionError;
3404
3777
  }));
3405
3778
  }
3406
3779
  /**
3407
3780
  * Runs editor action fetch function.
3408
3781
  *
3409
3782
  * @param action Action descriptor.
3783
+ * @param item Item instance (if exists).
3410
3784
  * @param itemId Item id.
3411
3785
  * @param dataProvider Data provider
3412
3786
  * @param sourceComponent Source component from where the fetch function was called.
3413
- * @param tableview Tableview component.
3787
+ * @param viewContainer View container/service. Tableview component.
3414
3788
  * @param actionData Additional action data.
3415
3789
  */
3416
- runEditorFetch(action, itemId, dataProvider, sourceComponent, tableview, actionData) {
3417
- const context = this.prepareRunContextForEditor(undefined, itemId, dataProvider, sourceComponent, tableview, actionData);
3790
+ runEditorFetch(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData) {
3791
+ const context = this.prepareExecContextForEditor(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData);
3418
3792
  return action.fetchFunction(context).pipe(map(res => new ActionRunResult(context, res)));
3419
3793
  // TODO: error handling
3420
3794
  }
3421
3795
  /**
3422
- * Prepares action run context for action of type editor.
3796
+ * Prepares action exec context for action of type editor.
3423
3797
  *
3424
3798
  * @param item Item instance (if exists).
3425
3799
  * @param itemId Item id (if exists).
3426
3800
  * @param dataProvider Data provider.
3427
3801
  * @param sourceComponent Source component from where the context preparation was called.
3428
- * @param tableview Tableview component.
3802
+ * @param viewContainer View container/service.
3429
3803
  * @param actionData Additional action data.
3430
3804
  */
3431
- prepareRunContextForEditor(item, itemId, dataProvider, sourceComponent, tableview, actionData) {
3805
+ prepareExecContextForEditor(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData) {
3432
3806
  var _a;
3433
- const context = new ActionExecContext(dataProvider, (_a = this.getDataProviderService(dataProvider)) !== null && _a !== void 0 ? _a : undefined, {
3807
+ let ctxDataProvider = dataProvider;
3808
+ if (!ctxDataProvider && action.dataProvider) {
3809
+ ctxDataProvider = action.dataProvider;
3810
+ }
3811
+ if (!ctxDataProvider) {
3812
+ const viewContainerDataProvider = viewContainer === null || viewContainer === void 0 ? void 0 : viewContainer.getDataProvider();
3813
+ if (viewContainerDataProvider) {
3814
+ ctxDataProvider = action.dataProvider;
3815
+ }
3816
+ }
3817
+ const context = new ActionExecContext(ctxDataProvider, (_a = this.getDataProviderService(ctxDataProvider)) !== null && _a !== void 0 ? _a : undefined, {
3434
3818
  item,
3435
3819
  itemId,
3436
3820
  actionData
3437
- }, sourceComponent, tableview);
3821
+ }, sourceComponent, viewContainer);
3438
3822
  return context;
3439
3823
  }
3440
3824
  /**
@@ -3457,12 +3841,15 @@ class MngActionService {
3457
3841
  * @param item Item instance (if exists).
3458
3842
  * @param itemId Item id (if exists).
3459
3843
  * @param actionData Optional additional action data.
3460
- * @param tableview Tableview component.
3844
+ * @param viewContainer View container component/service.
3461
3845
  * @param sourceComponent Source activation component.
3462
3846
  */
3463
- activateAction(action, itemId, item, actionData, tableview, sourceComponent) {
3464
- var _a;
3847
+ activateAction(action, itemId, item, actionData, viewContainer, sourceComponent) {
3465
3848
  if (action.type === ActionTypeEnum.Editor) {
3849
+ let dialogComponent = this.defaultEditorDialogComponent;
3850
+ if (action instanceof ActionEditorDescriptor && action.editorComponent) {
3851
+ dialogComponent = action.editorComponent;
3852
+ }
3466
3853
  const dialogConfig = {
3467
3854
  data: {
3468
3855
  action
@@ -3478,18 +3865,22 @@ class MngActionService {
3478
3865
  if (actionData) {
3479
3866
  dialogConfig.data.actionData = actionData;
3480
3867
  }
3481
- if (tableview) {
3482
- dialogConfig.data.tableview = tableview;
3868
+ if (viewContainer) {
3869
+ dialogConfig.data.viewContainer = viewContainer;
3483
3870
  }
3484
3871
  if (sourceComponent) {
3485
3872
  dialogConfig.data.sourceComponent = sourceComponent;
3486
3873
  }
3487
- const dialogRef = this.dialogService.open(MngActionDialogComponent, dialogConfig);
3874
+ const dialogRef = this.dialogService.open(dialogComponent, dialogConfig);
3488
3875
  return of(new ActionActivationResult(undefined, dialogRef));
3489
3876
  }
3877
+ else if (action.type === ActionTypeEnum.Event) {
3878
+ // just emit event
3879
+ return of(new ActionActivationResult(undefined));
3880
+ }
3490
3881
  else {
3491
3882
  // directly execute action
3492
- return this.runAction(action, itemId, item, (_a = tableview === null || tableview === void 0 ? void 0 : tableview.dataProvider) !== null && _a !== void 0 ? _a : undefined, sourceComponent, tableview, actionData).pipe(map(res => new ActionActivationResult(res)));
3883
+ return this.runAction(action, itemId, item, undefined, sourceComponent, viewContainer, actionData).pipe(map(res => new ActionActivationResult(res)));
3493
3884
  }
3494
3885
  }
3495
3886
  /**
@@ -3513,7 +3904,7 @@ class MngActionService {
3513
3904
  * @param actionData Optional action data.
3514
3905
  * @param route Optional activated route.
3515
3906
  */
3516
- triggerAction(action, itemId, item, actionData, route, tableview, sourceComponent) {
3907
+ triggerAction(action, itemId, item, actionData, route, viewContainer, sourceComponent) {
3517
3908
  var _a;
3518
3909
  if (action.activationTrigger === ActionActivationTriggerEnum.OnRoute) {
3519
3910
  const baseUrl = this.router.url.split('?')[0];
@@ -3542,15 +3933,61 @@ class MngActionService {
3542
3933
  return of(new ActionTriggerResult(undefined, from(this.router.navigate([baseUrl, ...actionUrlSegments], { relativeTo: route, queryParams: parsedUrl.queryParams }))));
3543
3934
  }
3544
3935
  else {
3545
- return this.activateAction(action, itemId, item, actionData, tableview, sourceComponent).pipe(map(res => new ActionTriggerResult(res)));
3936
+ return this.activateAction(action, itemId, item, actionData, viewContainer, sourceComponent).pipe(map(res => new ActionTriggerResult(res)));
3937
+ }
3938
+ }
3939
+ deactivateAction(action) {
3940
+ var _a;
3941
+ if (this.navigationService.getPreviousLocation()) {
3942
+ // there are internal history records, so back can be normally called
3943
+ this.navigationService.back();
3944
+ }
3945
+ else {
3946
+ // there is no internal history records, figure out the base url by eliminating action specific url
3947
+ let url = this.navigationService.getCurrentLocation();
3948
+ if (!url) {
3949
+ this.navigationService.back();
3950
+ }
3951
+ else {
3952
+ if (url.startsWith('/')) {
3953
+ url = url.substring(1);
3954
+ }
3955
+ const urlPathSegments = url.split('?')[0].split('#')[0].split('/');
3956
+ let actionUrl = (_a = action === null || action === void 0 ? void 0 : action.routeUrl) !== null && _a !== void 0 ? _a : '';
3957
+ if (actionUrl.startsWith('/')) {
3958
+ actionUrl = actionUrl.substring(1);
3959
+ }
3960
+ const actionUrlSegments = actionUrl.split('/');
3961
+ const redirectUrl = urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');
3962
+ this.router.navigateByUrl(`/${redirectUrl}`, { replaceUrl: true });
3963
+ }
3546
3964
  }
3547
3965
  }
3966
+ toMngActionError(error) {
3967
+ var _a, _b, _c;
3968
+ const actionError = {
3969
+ name: (_a = error === null || error === void 0 ? void 0 : error.name) !== null && _a !== void 0 ? _a : 'UnknownError',
3970
+ message: (_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : 'Unknown error',
3971
+ cause: error
3972
+ };
3973
+ if (error instanceof HttpErrorResponse) {
3974
+ actionError.status = error.status;
3975
+ actionError.statusDescription = error.statusText;
3976
+ actionError.url = (_c = error.url) !== null && _c !== void 0 ? _c : undefined;
3977
+ }
3978
+ return this.errorMapper.toMngError(error, actionError);
3979
+ }
3548
3980
  }
3549
- MngActionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionService, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i2.DialogService }, { token: i2$1.ConfirmationService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
3550
- MngActionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionService });
3551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionService, decorators: [{
3981
+ MngActionExecutorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i3.DialogService }, { token: i2.ConfirmationService }, { token: i3$1.TranslateService }, { token: MngNavigationService }, { token: MngErrorMapperService }, { token: ACTION_EDITOR_DIALOG_COMPONENT_SETTING }], target: i0.ɵɵFactoryTarget.Injectable });
3982
+ MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService });
3983
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService, decorators: [{
3552
3984
  type: Injectable
3553
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i2.DialogService }, { type: i2$1.ConfirmationService }, { type: i3.TranslateService }]; } });
3985
+ }], ctorParameters: function () {
3986
+ return [{ type: i0.Injector }, { type: i1.Router }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: i3$1.TranslateService }, { type: MngNavigationService }, { type: MngErrorMapperService }, { type: i0.Type, decorators: [{
3987
+ type: Inject,
3988
+ args: [ACTION_EDITOR_DIALOG_COMPONENT_SETTING]
3989
+ }] }];
3990
+ } });
3554
3991
 
3555
3992
  class MngConfigurationService {
3556
3993
  constructor(http) {
@@ -3628,13 +4065,6 @@ class MngConfigurationService {
3628
4065
  }
3629
4066
  MngConfigurationService._instance = null;
3630
4067
 
3631
- const MNG_BROWSER_STORAGE_IT = new InjectionToken('Browser storage', {
3632
- providedIn: 'root',
3633
- factory: () => localStorage
3634
- });
3635
-
3636
- const MNG_MODULE_CONFIG_IT = new InjectionToken('MngModuleConfig');
3637
-
3638
4068
  class MngCommonsService {
3639
4069
  constructor(router, primengConfig, translate, titleService, configurationService, moduleConfig, localStorage) {
3640
4070
  this.router = router;
@@ -3966,12 +4396,12 @@ class MngCommonsService {
3966
4396
  return titlePieces.join(' - ');
3967
4397
  }
3968
4398
  }
3969
- MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, deps: [{ token: i1.Router }, { token: i2$1.PrimeNGConfig }, { token: i3.TranslateService }, { token: i4.Title }, { token: MngConfigurationService }, { token: MNG_MODULE_CONFIG_IT }, { token: MNG_BROWSER_STORAGE_IT }], target: i0.ɵɵFactoryTarget.Injectable });
4399
+ MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, deps: [{ token: i1.Router }, { token: i2.PrimeNGConfig }, { token: i3$1.TranslateService }, { token: i4$1.Title }, { token: MngConfigurationService }, { token: MNG_MODULE_CONFIG_IT }, { token: MNG_BROWSER_STORAGE_IT }], target: i0.ɵɵFactoryTarget.Injectable });
3970
4400
  MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService });
3971
4401
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, decorators: [{
3972
4402
  type: Injectable
3973
4403
  }], ctorParameters: function () {
3974
- return [{ type: i1.Router }, { type: i2$1.PrimeNGConfig }, { type: i3.TranslateService }, { type: i4.Title }, { type: MngConfigurationService }, { type: undefined, decorators: [{
4404
+ return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i3$1.TranslateService }, { type: i4$1.Title }, { type: MngConfigurationService }, { type: undefined, decorators: [{
3975
4405
  type: Inject,
3976
4406
  args: [MNG_MODULE_CONFIG_IT]
3977
4407
  }] }, { type: Storage, decorators: [{
@@ -3980,97 +4410,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
3980
4410
  }] }];
3981
4411
  } });
3982
4412
 
3983
- class MngNavigationService {
3984
- constructor(router, location) {
3985
- this.router = router;
3986
- this.location = location;
3987
- this.history = [];
3988
- this.router.events.subscribe(event => {
3989
- if (event instanceof NavigationEnd) {
3990
- this.history.push(event.urlAfterRedirects);
3991
- }
3992
- });
3993
- }
3994
- getCurrentLocation() {
3995
- if (this.history.length > 0) {
3996
- return this.history[this.history.length - 1];
3997
- }
3998
- else {
3999
- return null;
4000
- }
4001
- }
4002
- getPreviousLocation() {
4003
- if (this.history.length > 1) {
4004
- return this.history[this.history.length - 2];
4005
- }
4006
- else {
4007
- return null;
4008
- }
4009
- }
4010
- back() {
4011
- this.history.pop();
4012
- if (this.history.length > 0) {
4013
- this.location.back();
4014
- }
4015
- else {
4016
- this.router.navigateByUrl('/');
4017
- }
4018
- }
4019
- }
4020
- MngNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService, deps: [{ token: i1.Router }, { token: i4$1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
4021
- MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService });
4022
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService, decorators: [{
4023
- type: Injectable
4024
- }], ctorParameters: function () { return [{ type: i1.Router }, { type: i4$1.Location }]; } });
4025
-
4026
- class TableviewComponentService {
4027
- constructor() {
4413
+ /**
4414
+ * Should be used with providers defined within component.
4415
+ */
4416
+ class MngViewContainerComponentService {
4417
+ constructor(messageService) {
4418
+ this.messageService = messageService;
4028
4419
  this.actions = [];
4029
4420
  this._reloadTableSubject = new Subject();
4030
4421
  }
4422
+ set dataProvider(dataProvider) {
4423
+ this._dataProvider = dataProvider;
4424
+ }
4031
4425
  get reloadTable$() {
4032
4426
  return this._reloadTableSubject.asObservable();
4033
4427
  }
4034
4428
  triggerTableReload(event) {
4035
4429
  this._reloadTableSubject.next(event);
4036
4430
  }
4431
+ getMessageService() {
4432
+ return this.messageService;
4433
+ }
4434
+ getDataProvider() {
4435
+ return this._dataProvider;
4436
+ }
4037
4437
  }
4038
- TableviewComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TableviewComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4039
- TableviewComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TableviewComponentService });
4040
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TableviewComponentService, decorators: [{
4438
+ MngViewContainerComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService, deps: [{ token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
4439
+ MngViewContainerComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService });
4440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService, decorators: [{
4041
4441
  type: Injectable
4042
- }] });
4442
+ }], ctorParameters: function () { return [{ type: i2.MessageService }]; } });
4043
4443
 
4044
4444
  class MngActionComponent {
4045
- constructor(route, translate, actionService, confirmationService, tableviewService) {
4445
+ constructor(route, translate, actionExecutor, confirmationService, viewContainerService) {
4046
4446
  this.route = route;
4047
4447
  this.translate = translate;
4048
- this.actionService = actionService;
4448
+ this.actionExecutor = actionExecutor;
4049
4449
  this.confirmationService = confirmationService;
4050
- this.tableviewService = tableviewService;
4450
+ this.viewContainerService = viewContainerService;
4451
+ this.inputDisabled = of(false);
4452
+ this.inputLoading = of(false);
4453
+ this.triggerEventEmitter = new EventEmitter();
4051
4454
  this.loadingSubject = new ReplaySubject(1);
4052
4455
  this.$loading = this.loadingSubject.asObservable();
4053
4456
  this.cmpId = Math.random().toString(36).substring(2);
4054
4457
  this.loadingSubject.next(false);
4055
4458
  }
4056
4459
  ngOnInit() {
4057
- var _a, _b, _c, _d, _e, _f;
4058
- const context = this.actionService.getActionExecContext(this.action, this.itemId, this.item, (_b = (_a = this.tableviewService) === null || _a === void 0 ? void 0 : _a.dataProvider) !== null && _b !== void 0 ? _b : undefined, this.tableviewService, this, this.actionData);
4460
+ var _a, _b, _c, _d, _e, _f, _g;
4461
+ this.viewContainer = (_b = (_a = this.viewContainerInit) !== null && _a !== void 0 ? _a : this.viewContainerService) !== null && _b !== void 0 ? _b : undefined;
4462
+ const context = this.actionExecutor.prepareActionExecContext(this.action, this.itemId, this.item, this.dataProvider, (_c = this.viewContainer) !== null && _c !== void 0 ? _c : undefined, this, this.actionData);
4059
4463
  this.$isVisible = typeof this.action.isVisibleFunction === 'function' ? this.action.isVisibleFunction(context) : of(true);
4060
4464
  this.$isEnabled = typeof this.action.isEnabledFunction === 'function' ? this.action.isEnabledFunction(context) : of(true);
4061
- this.$label = I18nUtil.streamActionTranslation(this.translate, this.action, 'title', (_d = (_c = this.action) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : undefined, this.item);
4062
- this.$tooltip = I18nUtil.streamActionTranslation(this.translate, this.action, 'tooltip', (_f = (_e = this.action) === null || _e === void 0 ? void 0 : _e.tooltip) !== null && _f !== void 0 ? _f : undefined, this.item);
4465
+ this.$label = I18nUtil.streamActionTranslation(this.translate, this.action, 'title', (_e = (_d = this.action) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : undefined, this.item);
4466
+ this.$tooltip = I18nUtil.streamActionTranslation(this.translate, this.action, 'tooltip', (_g = (_f = this.action) === null || _f === void 0 ? void 0 : _f.tooltip) !== null && _g !== void 0 ? _g : undefined, this.item);
4063
4467
  }
4064
4468
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
4065
4469
  triggerAction(event) {
4066
4470
  this.loadingSubject.next(true);
4067
4471
  const actionData = this.actionData ? this.actionData : {};
4068
4472
  actionData['cmpId'] = this.cmpId;
4069
- this.actionService
4070
- .triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.tableviewService, this)
4071
- .pipe(first(), finalize(() => this.loadingSubject.next(false)))
4072
- // eslint-disable-next-line @typescript-eslint/no-empty-function
4073
- .subscribe(() => { });
4473
+ this.actionExecutor
4474
+ .triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.viewContainer, this)
4475
+ .pipe(first())
4476
+ .subscribe({
4477
+ next: atr => {
4478
+ this.triggerEventEmitter.next(atr);
4479
+ this.loadingSubject.next(false);
4480
+ },
4481
+ error: err => {
4482
+ console.error(`Error occurred while executing action ${this.action.actionName}.`, err);
4483
+ this.loadingSubject.next(false);
4484
+ }
4485
+ });
4074
4486
  }
4075
4487
  getConfirmationService() {
4076
4488
  return this.confirmationService;
@@ -4079,12 +4491,16 @@ class MngActionComponent {
4079
4491
  return `${action.actionName}_${this.cmpId}`;
4080
4492
  }
4081
4493
  }
4082
- MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i3.TranslateService }, { token: MngActionService }, { token: i2$1.ConfirmationService }, { token: TableviewComponentService }], target: i0.ɵɵFactoryTarget.Component });
4083
- MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionComponent, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData" }, providers: [MessageService, ConfirmationService], ngImport: i0, template: "<ng-container *ngIf=\"$isVisible | async\">\n <button\n *ngIf=\"action.icon && action.title === null; else noIcon\"\n type=\"button\"\n pButton\n pRipple\n [icon]=\"action.icon\"\n [loading]=\"($loading | async) ?? false\"\n [disabled]=\"($isEnabled | async) === false\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button mng-action-button-icon p-button-rounded\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n <ng-template #noIcon>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [loading]=\"($loading | async) ?? false\"\n [disabled]=\"($isEnabled | async) === false\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button p-button-text\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n", components: [{ type: i6.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i9.Ripple, selector: "[pRipple]" }, { type: i10.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4494
+ MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i3$1.TranslateService }, { token: MngActionExecutorService }, { token: i2.ConfirmationService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
4495
+ MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionComponent, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataProvider: "dataProvider", inputDisabled: ["disabled", "inputDisabled"], inputLoading: ["loading", "inputLoading"], viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { triggerEventEmitter: "trigger" }, providers: [ConfirmationService], ngImport: i0, template: "<ng-container *ngIf=\"$isVisible | async\">\n <button\n *ngIf=\"action.icon && action.title === null; else noIcon\"\n type=\"button\"\n pButton\n pRipple\n [icon]=\"action.icon\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false && ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button mng-action-button-icon p-button-rounded\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n <ng-template #noIcon>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false && ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button p-button-text\"\n [class.p-button-sm]=\"action.isSizeSmall\"\n [class.p-button-lg]=\"action.isSizeLarge\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n", components: [{ type: i5.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4084
4496
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, decorators: [{
4085
4497
  type: Component,
4086
- args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, providers: [MessageService, ConfirmationService], template: "<ng-container *ngIf=\"$isVisible | async\">\n <button\n *ngIf=\"action.icon && action.title === null; else noIcon\"\n type=\"button\"\n pButton\n pRipple\n [icon]=\"action.icon\"\n [loading]=\"($loading | async) ?? false\"\n [disabled]=\"($isEnabled | async) === false\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button mng-action-button-icon p-button-rounded\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n <ng-template #noIcon>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [loading]=\"($loading | async) ?? false\"\n [disabled]=\"($isEnabled | async) === false\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button p-button-text\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n" }]
4087
- }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i3.TranslateService }, { type: MngActionService }, { type: i2$1.ConfirmationService }, { type: TableviewComponentService }]; }, propDecorators: { action: [{
4498
+ args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfirmationService], template: "<ng-container *ngIf=\"$isVisible | async\">\n <button\n *ngIf=\"action.icon && action.title === null; else noIcon\"\n type=\"button\"\n pButton\n pRipple\n [icon]=\"action.icon\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false && ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button mng-action-button-icon p-button-rounded\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n <ng-template #noIcon>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false && ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"$any($tooltip | async)\"\n (click)=\"triggerAction($event)\"\n class=\"mng-action-button p-button-text\"\n [class.p-button-sm]=\"action.isSizeSmall\"\n [class.p-button-lg]=\"action.isSizeLarge\"\n [class.p-button-primary]=\"action.level === 1\"\n [class.p-button-success]=\"action.level === 5\"\n [class.p-button-danger]=\"action.level === 7\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n" }]
4499
+ }], ctorParameters: function () {
4500
+ return [{ type: i1.ActivatedRoute }, { type: i3$1.TranslateService }, { type: MngActionExecutorService }, { type: i2.ConfirmationService }, { type: MngViewContainerComponentService, decorators: [{
4501
+ type: Optional
4502
+ }] }];
4503
+ }, propDecorators: { action: [{
4088
4504
  type: Input
4089
4505
  }], item: [{
4090
4506
  type: Input
@@ -4092,23 +4508,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4092
4508
  type: Input
4093
4509
  }], actionData: [{
4094
4510
  type: Input
4511
+ }], dataProvider: [{
4512
+ type: Input
4513
+ }], inputDisabled: [{
4514
+ type: Input,
4515
+ args: ['disabled']
4516
+ }], inputLoading: [{
4517
+ type: Input,
4518
+ args: ['loading']
4519
+ }], viewContainerInit: [{
4520
+ type: Input,
4521
+ args: ['viewContainer']
4522
+ }], triggerEventEmitter: [{
4523
+ type: Output,
4524
+ args: ['trigger']
4095
4525
  }] } });
4096
4526
 
4097
4527
  class MngActionRouteComponent {
4098
- constructor(router, route, confirmationService, navigationService, actionService, tableviewService) {
4528
+ constructor(router, route, confirmationService, navigationService, actionExecutor, viewContainerService) {
4099
4529
  this.router = router;
4100
4530
  this.route = route;
4101
4531
  this.confirmationService = confirmationService;
4102
4532
  this.navigationService = navigationService;
4103
- this.actionService = actionService;
4104
- this.tableviewService = tableviewService;
4533
+ this.actionExecutor = actionExecutor;
4534
+ this.viewContainerService = viewContainerService;
4105
4535
  this.cmpId = Math.random().toString(36).substring(2);
4106
4536
  this.actions = [];
4107
4537
  this.subscriptions = [];
4108
4538
  }
4109
4539
  ngOnInit() {
4110
4540
  var _a, _b;
4111
- this.actions = (_b = (_a = this.tableviewService) === null || _a === void 0 ? void 0 : _a.actions.filter(a => a.activationTrigger === ActionActivationTriggerEnum.OnRoute)) !== null && _b !== void 0 ? _b : [];
4541
+ this.actions = (_b = (_a = this.viewContainerService) === null || _a === void 0 ? void 0 : _a.actions.filter(a => a.activationTrigger === ActionActivationTriggerEnum.OnRoute)) !== null && _b !== void 0 ? _b : [];
4112
4542
  const subscription = this.route.params.subscribe(p => {
4113
4543
  const action = this.findActiveAction(p);
4114
4544
  if (action) {
@@ -4131,6 +4561,7 @@ class MngActionRouteComponent {
4131
4561
  return `actionRoute_${this.cmpId}`;
4132
4562
  }
4133
4563
  activateAction(action, p, qp) {
4564
+ var _a;
4134
4565
  this.activeAction = action;
4135
4566
  const itemId = p['itemId'];
4136
4567
  const actionData = {};
@@ -4143,18 +4574,21 @@ class MngActionRouteComponent {
4143
4574
  for (const key in qp) {
4144
4575
  actionData[key] = p[key];
4145
4576
  }
4146
- this.actionService
4147
- .activateAction(action, itemId, undefined, actionData, this.tableviewService, this)
4577
+ this.actionExecutor
4578
+ .activateAction(action, itemId, undefined, actionData, (_a = this.viewContainerService) !== null && _a !== void 0 ? _a : undefined, this)
4148
4579
  .pipe(first())
4149
4580
  .subscribe(res => {
4150
4581
  var _a;
4151
4582
  if (res.dialogRef) {
4152
4583
  this.dialogRef = res.dialogRef;
4153
4584
  this.dialogCloseSubscription = (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.onClose.subscribe(e => {
4154
- var _a;
4585
+ var _a, _b;
4155
4586
  const actionEv = e;
4156
4587
  if (!(actionEv === null || actionEv === void 0 ? void 0 : actionEv.error) || !((_a = actionEv === null || actionEv === void 0 ? void 0 : actionEv.error) === null || _a === void 0 ? void 0 : _a.dismissed)) {
4157
- this.tableviewService.triggerTableReload(actionEv); // reload only if no error in action and
4588
+ if (!this.viewContainerService) {
4589
+ console.warn(`View container service could not be found, table reload will not be triggered.`);
4590
+ }
4591
+ (_b = this.viewContainerService) === null || _b === void 0 ? void 0 : _b.triggerTableReload(actionEv); // reload only if no error in action and
4158
4592
  }
4159
4593
  this.deactivateAction();
4160
4594
  });
@@ -4162,35 +4596,11 @@ class MngActionRouteComponent {
4162
4596
  });
4163
4597
  }
4164
4598
  deactivateAction() {
4165
- var _a, _b;
4166
4599
  if (this.dialogCloseSubscription) {
4167
4600
  this.dialogCloseSubscription.unsubscribe();
4168
4601
  this.dialogCloseSubscription = undefined;
4169
4602
  }
4170
- if (this.navigationService.getPreviousLocation()) {
4171
- // there are internal history records, so back can be normally called
4172
- this.navigationService.back();
4173
- }
4174
- else {
4175
- // there is no internal history records, figure out the base url by eliminating action specific url
4176
- let url = this.navigationService.getCurrentLocation();
4177
- if (!url) {
4178
- this.navigationService.back();
4179
- }
4180
- else {
4181
- if (url.startsWith('/')) {
4182
- url = url.substring(1);
4183
- }
4184
- const urlPathSegments = url.split('?')[0].split('#')[0].split('/');
4185
- let actionUrl = (_b = (_a = this.activeAction) === null || _a === void 0 ? void 0 : _a.routeUrl) !== null && _b !== void 0 ? _b : '';
4186
- if (actionUrl.startsWith('/')) {
4187
- actionUrl = actionUrl.substring(1);
4188
- }
4189
- const actionUrlSegments = actionUrl.split('/');
4190
- const redirectUrl = urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');
4191
- this.router.navigateByUrl(`/${redirectUrl}`, { replaceUrl: true });
4192
- }
4193
- }
4603
+ this.actionExecutor.deactivateAction(this.activeAction);
4194
4604
  this.activeAction = undefined;
4195
4605
  this.dialogRef = undefined;
4196
4606
  }
@@ -4228,12 +4638,16 @@ class MngActionRouteComponent {
4228
4638
  return null;
4229
4639
  }
4230
4640
  }
4231
- MngActionRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionRouteComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.ConfirmationService }, { token: MngNavigationService }, { token: MngActionService }, { token: TableviewComponentService }], target: i0.ɵɵFactoryTarget.Component });
4232
- MngActionRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionRouteComponent, selector: "mng-action-route", providers: [MessageService, ConfirmationService], ngImport: i0, template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n", components: [{ type: i6.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4641
+ MngActionRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionRouteComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.ConfirmationService }, { token: MngNavigationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
4642
+ MngActionRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionRouteComponent, selector: "mng-action-route", providers: [MessageService, ConfirmationService], ngImport: i0, template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n", components: [{ type: i5.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4233
4643
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionRouteComponent, decorators: [{
4234
4644
  type: Component,
4235
4645
  args: [{ selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [MessageService, ConfirmationService], template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n" }]
4236
- }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.ConfirmationService }, { type: MngNavigationService }, { type: MngActionService }, { type: TableviewComponentService }]; } });
4646
+ }], ctorParameters: function () {
4647
+ return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.ConfirmationService }, { type: MngNavigationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService, decorators: [{
4648
+ type: Optional
4649
+ }] }];
4650
+ } });
4237
4651
 
4238
4652
  class MngComponentDirective {
4239
4653
  constructor(viewContainerRef) {
@@ -4393,7 +4807,7 @@ class MngFormEditorComponent {
4393
4807
  }
4394
4808
  let nextControl = null;
4395
4809
  if (control instanceof FormGroup) {
4396
- const nextField = control.get(keyPath[0]);
4810
+ nextControl = control.get(keyPath[0]);
4397
4811
  }
4398
4812
  else if (control instanceof FormArray) {
4399
4813
  const idx = +keyPath[0];
@@ -4441,12 +4855,12 @@ class MngFormEditorComponent {
4441
4855
  this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;
4442
4856
  }
4443
4857
  }
4444
- MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, deps: [{ token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
4445
- MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isSubmitButtonVisible: "isSubmitButtonVisible", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", components: [{ type: i3$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4858
+ MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, deps: [{ token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
4859
+ MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isSubmitButtonVisible: "isSubmitButtonVisible", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", components: [{ type: i3$2.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { type: i3$3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4446
4860
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, decorators: [{
4447
4861
  type: Component,
4448
4862
  args: [{ selector: 'mng-form-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n" }]
4449
- }], ctorParameters: function () { return [{ type: i3.TranslateService }]; }, propDecorators: { descriptor: [{
4863
+ }], ctorParameters: function () { return [{ type: i3$1.TranslateService }]; }, propDecorators: { descriptor: [{
4450
4864
  type: Input
4451
4865
  }], submitLoading: [{
4452
4866
  type: Input
@@ -4548,7 +4962,7 @@ class MngAutocompleteComponent {
4548
4962
  }
4549
4963
  }
4550
4964
  MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
4551
- MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelProperty: "itemsLabelProperty", multiselect: "multiselect", placeholder: "placeholder", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-autoComplete\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", components: [{ type: i1$1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4965
+ MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelProperty: "itemsLabelProperty", multiselect: "multiselect", placeholder: "placeholder", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-autoComplete\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", components: [{ type: i1$1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4.AsyncPipe, "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4552
4966
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, decorators: [{
4553
4967
  type: Component,
4554
4968
  args: [{ selector: 'mng-autocomplete', providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
@@ -4644,10 +5058,10 @@ class MngDropdownComponent {
4644
5058
  }
4645
5059
  }
4646
5060
  MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
4647
- MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngDropdownComponent, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelProperty: "itemsLabelProperty", itemsValueProperty: "itemsValueProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n", components: [{ type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i2$2.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "virtualScroll", "itemSize", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "scrollHeight", "defaultLabel", "placeholder", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onPanelShow", "onPanelHide"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5061
+ MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngDropdownComponent, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelProperty: "itemsLabelProperty", itemsValueProperty: "itemsValueProperty", itemsDisabledProperty: "itemsDisabledProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n", components: [{ type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i2$1.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "virtualScroll", "itemSize", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "scrollHeight", "defaultLabel", "placeholder", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onPanelShow", "onPanelHide"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4648
5062
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, decorators: [{
4649
5063
  type: Component,
4650
- args: [{ selector: 'mng-dropdown', providers: [MNG_DROPDOWN_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n" }]
5064
+ args: [{ selector: 'mng-dropdown', providers: [MNG_DROPDOWN_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n" }]
4651
5065
  }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { dataProvider: [{
4652
5066
  type: Input
4653
5067
  }], dataKeyProperty: [{
@@ -4656,6 +5070,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4656
5070
  type: Input
4657
5071
  }], itemsValueProperty: [{
4658
5072
  type: Input
5073
+ }], itemsDisabledProperty: [{
5074
+ type: Input
4659
5075
  }], multiselect: [{
4660
5076
  type: Input
4661
5077
  }], placeholder: [{
@@ -4676,16 +5092,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4676
5092
  args: [Dropdown]
4677
5093
  }] } });
4678
5094
 
4679
- class MngActionDialogComponent {
4680
- constructor(injector, translate, dialogRef, dialogConfig, actionService, mngCommonsService) {
5095
+ class MngActionEditorComponent {
5096
+ constructor(injector, translate, actionExecutor, mngCommonsService, navigationService, dialogRef, dialogConfig, viewContainerService) {
4681
5097
  this.injector = injector;
4682
5098
  this.translate = translate;
5099
+ this.actionExecutor = actionExecutor;
5100
+ this.mngCommonsService = mngCommonsService;
5101
+ this.navigationService = navigationService;
4683
5102
  this.dialogRef = dialogRef;
4684
5103
  this.dialogConfig = dialogConfig;
4685
- this.actionService = actionService;
4686
- this.mngCommonsService = mngCommonsService;
5104
+ this.viewContainerService = viewContainerService;
5105
+ this.actionRunEventEmitter = new EventEmitter();
4687
5106
  this.cmpId = Math.random().toString(36).substring(2);
5107
+ this.isDialog = true;
4688
5108
  this.isSaveButton = true;
5109
+ // actions
5110
+ this.toolbarLeftActions = [];
5111
+ this.toolbarRightActions = [];
5112
+ this.footerLeftActions = [];
5113
+ this.footerRightActions = [];
4689
5114
  this.loadingSubject = new ReplaySubject(1);
4690
5115
  this.loading$ = this.loadingSubject.asObservable();
4691
5116
  this.submitLoadingSubject = new ReplaySubject(1);
@@ -4694,8 +5119,8 @@ class MngActionDialogComponent {
4694
5119
  this.subscriptions = [];
4695
5120
  }
4696
5121
  ngOnInit() {
4697
- var _a;
4698
- if (this.dialogConfig.data) {
5122
+ var _a, _b, _c;
5123
+ if ((_a = this.dialogConfig) === null || _a === void 0 ? void 0 : _a.data) {
4699
5124
  if (this.dialogConfig.data.action) {
4700
5125
  this.action = this.dialogConfig.data.action;
4701
5126
  }
@@ -4708,18 +5133,65 @@ class MngActionDialogComponent {
4708
5133
  if (this.dialogConfig.data.actionData) {
4709
5134
  this.actionData = this.dialogConfig.data.actionData;
4710
5135
  }
4711
- if (this.dialogConfig.data.tableview) {
4712
- this.tableviewService = this.dialogConfig.data.tableview;
4713
- if (!this.dataProvider && ((_a = this.tableviewService) === null || _a === void 0 ? void 0 : _a.dataProvider)) {
4714
- this.dataProvider = this.tableviewService.dataProvider;
5136
+ if (this.dialogConfig.data.viewContainer) {
5137
+ this.viewContainer = this.dialogConfig.data.viewContainer;
5138
+ if (!this.dataProvider && this.viewContainer) {
5139
+ const dataProvider = this.viewContainer.getDataProvider();
5140
+ if (dataProvider && typeof dataProvider['fetch'] === 'function') {
5141
+ this.dataProvider = dataProvider;
5142
+ }
4715
5143
  }
4716
5144
  }
4717
5145
  if (this.dialogConfig.data.sourceComponent) {
4718
5146
  this.sourceComponent = this.dialogConfig.data.sourceComponent;
4719
5147
  }
4720
5148
  }
5149
+ else {
5150
+ this.isDialog = false;
5151
+ this.viewContainer = (_c = (_b = this.viewContainerInit) !== null && _b !== void 0 ? _b : this.viewContainerService) !== null && _c !== void 0 ? _c : undefined;
5152
+ }
4721
5153
  this.isSaveButton = typeof this.action.submitFunction === 'function';
4722
- this.setDialogHeaderTitle();
5154
+ this.setTitle();
5155
+ for (const action of this.action.editorActions) {
5156
+ if (action instanceof ActionEditorSubmitDescriptor) {
5157
+ if (typeof action.icon === 'undefined') {
5158
+ action.withIcon(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'pi pi-check' : 'pi pi-times');
5159
+ }
5160
+ if (typeof action.title === 'undefined') {
5161
+ action.withTitle(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'general.save' : this.isDialog ? 'general.close' : 'general.cancel');
5162
+ }
5163
+ // assign run operations
5164
+ action.withRunNotificationSuccess(undefined, undefined, false);
5165
+ if (action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit) {
5166
+ action.withRunFunction(ctx => {
5167
+ this.triggerSubmit();
5168
+ return of(undefined);
5169
+ });
5170
+ }
5171
+ else {
5172
+ action.withRunFunction(ctx => {
5173
+ this.cancel();
5174
+ return of(undefined);
5175
+ });
5176
+ }
5177
+ }
5178
+ switch (action.position) {
5179
+ case ActionPositionEnum.ToolbarLeft:
5180
+ this.toolbarLeftActions.push(action);
5181
+ break;
5182
+ case ActionPositionEnum.ToolbarRight:
5183
+ this.toolbarRightActions.push(action);
5184
+ break;
5185
+ case ActionPositionEnum.FooterLeft:
5186
+ this.footerLeftActions.push(action);
5187
+ break;
5188
+ case ActionPositionEnum.FooterRight:
5189
+ this.footerRightActions.push(action);
5190
+ break;
5191
+ }
5192
+ }
5193
+ this.toolbarRightActions = this.toolbarRightActions.reverse();
5194
+ this.footerRightActions = this.footerRightActions.reverse();
4723
5195
  this.loadItemWithDataProvider();
4724
5196
  }
4725
5197
  ngOnDestroy() {
@@ -4731,18 +5203,31 @@ class MngActionDialogComponent {
4731
5203
  return;
4732
5204
  }
4733
5205
  this.submitLoadingSubject.next(true);
4734
- this.actionService
4735
- .runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.tableviewService, this.actionData)
4736
- .pipe(first(), finalize(() => this.submitLoadingSubject.next(false)))
4737
- .subscribe(res => {
4738
- this.closeDialog(res);
5206
+ this.actionExecutor
5207
+ .runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.viewContainer, this.actionData)
5208
+ .pipe(first())
5209
+ .subscribe({
5210
+ next: res => {
5211
+ this.submitLoadingSubject.next(false);
5212
+ this.cancel(res);
5213
+ },
5214
+ error: () => {
5215
+ this.submitLoadingSubject.next(false);
5216
+ }
4739
5217
  });
4740
5218
  }
4741
5219
  }
4742
- closeDialog(result) {
4743
- this.dialogRef.close(result ? result : new ActionRunResult(undefined, undefined, new ActionError(null, true)));
5220
+ cancel(result) {
5221
+ var _a;
5222
+ if (!result) {
5223
+ result = new ActionRunResult(undefined, undefined, new ActionError(null, true));
5224
+ }
5225
+ if (this.isDialog) {
5226
+ (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.close(result);
5227
+ }
5228
+ this.actionRunEventEmitter.next(result);
4744
5229
  }
4745
- saveItem() {
5230
+ triggerSubmit() {
4746
5231
  this.editorComponent.submit();
4747
5232
  }
4748
5233
  loadItemWithDataProvider() {
@@ -4750,48 +5235,62 @@ class MngActionDialogComponent {
4750
5235
  return;
4751
5236
  }
4752
5237
  this.loadingSubject.next(true);
4753
- this.actionService
4754
- .runEditorFetch(this.action, this.itemId, this.dataProvider, this.sourceComponent, this.tableviewService)
5238
+ this.actionExecutor
5239
+ .runEditorFetch(this.action, this.item, this.itemId, this.dataProvider, this.sourceComponent, this.viewContainer)
4755
5240
  .pipe(first(), catchError(err => {
4756
5241
  if (this.action.hasRunNotificationError) {
4757
- ToastUtil.actionNotificationError(this.translate, this.action, err, 'fetch', this.tableviewService, this.item);
5242
+ ToastUtil.actionNotificationError(this.translate, this.action, err, 'fetch', this.viewContainer, this.item);
4758
5243
  }
4759
5244
  throw err;
4760
5245
  }), finalize(() => this.loadingSubject.next(false)))
4761
5246
  .subscribe(res => {
4762
5247
  this.item = res.result;
4763
5248
  if (this.action.hasFetchNotificationSuccess) {
4764
- ToastUtil.actionNotificationSuccess(this.translate, this.action, 'fetch', this.action.fetchNotificationSuccessTitle, this.action.fetchNotificationSuccessMessage, this.tableviewService, this.item);
5249
+ ToastUtil.actionNotificationSuccess(this.translate, this.action, 'fetch', this.action.fetchNotificationSuccessTitle, this.action.fetchNotificationSuccessMessage, this.viewContainer, this.item);
4765
5250
  }
4766
- this.setDialogHeaderTitle();
5251
+ this.setTitle();
4767
5252
  });
4768
5253
  }
4769
- setDialogHeaderTitle() {
5254
+ setTitle() {
4770
5255
  if (this.action.editorTitle === null) {
4771
- requestAnimationFrame(() => {
4772
- this.dialogConfig.header = undefined;
4773
- });
5256
+ this.title = undefined;
5257
+ if (this.dialogConfig) {
5258
+ requestAnimationFrame(() => {
5259
+ this.dialogConfig.header = undefined;
5260
+ });
5261
+ }
4774
5262
  return;
4775
5263
  }
4776
- const subscription = I18nUtil.streamActionTranslation(this.translate, this.action, 'dialog.title', undefined, this.item)
5264
+ const subscription = I18nUtil.streamActionTranslation(this.translate, this.action, 'editor.title', this.action.editorTitle, this.item)
4777
5265
  .pipe(mergeMap(i18nDialogTitle => i18nDialogTitle === null
4778
- ? I18nUtil.getActionTranslation(this.translate, this.action, 'title', this.action.editorTitle, this.item)
5266
+ ? I18nUtil.getActionTranslation(this.translate, this.action, 'title', undefined, this.item)
4779
5267
  : of(i18nDialogTitle)))
4780
5268
  .subscribe(t => {
4781
- requestAnimationFrame(() => {
4782
- this.dialogConfig.header = t !== null && t !== void 0 ? t : undefined;
4783
- this.mngCommonsService.setPageTitle(t !== null && t !== void 0 ? t : undefined);
4784
- });
5269
+ this.title = t !== null && t !== void 0 ? t : undefined;
5270
+ if (this.dialogConfig) {
5271
+ requestAnimationFrame(() => {
5272
+ this.dialogConfig.header = t !== null && t !== void 0 ? t : undefined;
5273
+ this.mngCommonsService.setPageTitle(t !== null && t !== void 0 ? t : undefined);
5274
+ });
5275
+ }
4785
5276
  });
4786
5277
  this.subscriptions.push(subscription);
4787
5278
  }
4788
5279
  }
4789
- MngActionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionDialogComponent, deps: [{ token: i0.Injector }, { token: i3.TranslateService }, { token: i2.DynamicDialogRef }, { token: i2.DynamicDialogConfig }, { token: MngActionService }, { token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
4790
- MngActionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionDialogComponent, selector: "mng-action-dialog", inputs: { action: "action", itemId: "itemId", item: "item", actionData: "actionData", dataProvider: "dataProvider" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], ngImport: i0, template: "<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n <div class=\"flex flex-row justify-content-between\">\n <div></div>\n <div>\n <button\n type=\"button\"\n pButton\n pRipple\n [label]=\"'general.close' | translate\"\n icon=\"pi pi-times\"\n class=\"p-button-text\"\n (click)=\"closeDialog()\"\n [disabled]=\"submitLoading$ | async\"></button>\n <button\n *ngIf=\"isSaveButton\"\n #submitButton\n type=\"button\"\n pButton\n pRipple\n [label]=\"'general.save' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"saveItem()\"\n [loading]=\"(submitLoading$ | async) ?? false\"\n [disabled]=\"(submitLoading$ | async) ?? false\"></button>\n </div>\n </div>\n</div>\n", components: [{ type: i4$3.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { type: MngFormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isSubmitButtonVisible", "isFormDisabled"], outputs: ["formSubmit"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i9.Ripple, selector: "[pRipple]" }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionDialogComponent, decorators: [{
5280
+ MngActionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, deps: [{ token: i0.Injector }, { token: i3$1.TranslateService }, { token: MngActionExecutorService }, { token: MngCommonsService }, { token: MngNavigationService }, { token: i3.DynamicDialogRef, optional: true }, { token: i3.DynamicDialogConfig, optional: true }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
5281
+ MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionEditorComponent, selector: "mng-action-editor", inputs: { action: "action", itemId: "itemId", item: "item", actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], ngImport: i0, template: "<h2 *ngIf=\"!isDialog && title\">{{ title }}</h2>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n", components: [{ type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }, { type: i6.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { type: MngFormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isSubmitButtonVisible", "isFormDisabled"], outputs: ["formSubmit"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, decorators: [{
4792
5283
  type: Component,
4793
- args: [{ selector: 'mng-action-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n <div class=\"flex flex-row justify-content-between\">\n <div></div>\n <div>\n <button\n type=\"button\"\n pButton\n pRipple\n [label]=\"'general.close' | translate\"\n icon=\"pi pi-times\"\n class=\"p-button-text\"\n (click)=\"closeDialog()\"\n [disabled]=\"submitLoading$ | async\"></button>\n <button\n *ngIf=\"isSaveButton\"\n #submitButton\n type=\"button\"\n pButton\n pRipple\n [label]=\"'general.save' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"saveItem()\"\n [loading]=\"(submitLoading$ | async) ?? false\"\n [disabled]=\"(submitLoading$ | async) ?? false\"></button>\n </div>\n </div>\n</div>\n" }]
4794
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i3.TranslateService }, { type: i2.DynamicDialogRef }, { type: i2.DynamicDialogConfig }, { type: MngActionService }, { type: MngCommonsService }]; }, propDecorators: { action: [{
5284
+ args: [{ selector: 'mng-action-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h2 *ngIf=\"!isDialog && title\">{{ title }}</h2>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n" }]
5285
+ }], ctorParameters: function () {
5286
+ return [{ type: i0.Injector }, { type: i3$1.TranslateService }, { type: MngActionExecutorService }, { type: MngCommonsService }, { type: MngNavigationService }, { type: i3.DynamicDialogRef, decorators: [{
5287
+ type: Optional
5288
+ }] }, { type: i3.DynamicDialogConfig, decorators: [{
5289
+ type: Optional
5290
+ }] }, { type: MngViewContainerComponentService, decorators: [{
5291
+ type: Optional
5292
+ }] }];
5293
+ }, propDecorators: { action: [{
4795
5294
  type: Input
4796
5295
  }], itemId: [{
4797
5296
  type: Input
@@ -4801,6 +5300,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4801
5300
  type: Input
4802
5301
  }], dataProvider: [{
4803
5302
  type: Input
5303
+ }], viewContainerInit: [{
5304
+ type: Input,
5305
+ args: ['viewContainer']
5306
+ }], actionRunEventEmitter: [{
5307
+ type: Output,
5308
+ args: ['actionSubmit']
4804
5309
  }], templates: [{
4805
5310
  type: ContentChildren,
4806
5311
  args: [MngTemplateDirective]
@@ -4819,10 +5324,10 @@ class MngFormlyFieldAutocompleteComponent extends FieldType {
4819
5324
  }
4820
5325
  }
4821
5326
  MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4822
- MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5327
+ MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4823
5328
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
4824
5329
  type: Component,
4825
- args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\">\n</mng-autocomplete>\n" }]
5330
+ args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
4826
5331
  }] });
4827
5332
 
4828
5333
  class MngFormlyFieldInputComponent extends FieldType {
@@ -4836,10 +5341,10 @@ class MngFormlyFieldInputComponent extends FieldType {
4836
5341
  }
4837
5342
  }
4838
5343
  MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4839
- MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$3.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$4.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }], directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10$1.InputText, selector: "[pInputText]" }], pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5344
+ MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$3.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$2.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$4.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }], directives: [{ type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10.InputText, selector: "[pInputText]" }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4840
5345
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
4841
5346
  type: Component,
4842
- args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-radioButton>\n <label [for]=\"option.value\" class=\"mng-radio-button-label\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea *ngSwitchCase=\"'textarea'\" [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea> </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
5347
+ args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
4843
5348
  }] });
4844
5349
 
4845
5350
  class MngFormlyFieldDropdownComponent extends FieldType {
@@ -4849,10 +5354,10 @@ class MngFormlyFieldDropdownComponent extends FieldType {
4849
5354
  }
4850
5355
  }
4851
5356
  MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4852
- MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [showClear]=\"!to.required\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5357
+ MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4853
5358
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
4854
5359
  type: Component,
4855
- args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [showClear]=\"!to.required\">\n</mng-dropdown>\n" }]
5360
+ args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
4856
5361
  }] });
4857
5362
 
4858
5363
  class MngTableLoadEvent {
@@ -4936,12 +5441,12 @@ class MngTableColumnFilterComponent {
4936
5441
  }
4937
5442
  }
4938
5443
  }
4939
- MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2$1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
4940
- MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: { descriptor: "descriptor", display: "display" }, ngImport: i0, template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"filterCallback($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n", components: [{ type: i4$5.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping"] }, { type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }, { type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i3.TranslatePipe } });
5444
+ MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
5445
+ MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: { descriptor: "descriptor", display: "display" }, ngImport: i0, template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"filterCallback($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n", components: [{ type: i4$5.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping"] }, { type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }, { type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i3$1.TranslatePipe } });
4941
5446
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
4942
5447
  type: Component,
4943
5448
  args: [{ selector: 'mng-table-column-filter', template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"filterCallback($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n" }]
4944
- }], ctorParameters: function () { return [{ type: i2$1.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
5449
+ }], ctorParameters: function () { return [{ type: i2.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
4945
5450
  type: Input
4946
5451
  }], display: [{
4947
5452
  type: Input
@@ -4982,9 +5487,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4982
5487
  }] });
4983
5488
 
4984
5489
  class MngBooleanPipe {
4985
- transform(value) {
5490
+ transform(value, yes, no, icon = false) {
4986
5491
  if (typeof value === 'boolean') {
4987
- return value ? 'general.yes' : 'general.no';
5492
+ if (icon) {
5493
+ return value ? yes !== null && yes !== void 0 ? yes : 'pi pi-check' : no !== null && no !== void 0 ? no : 'pi pi-times';
5494
+ }
5495
+ else {
5496
+ return value ? yes !== null && yes !== void 0 ? yes : 'general.yes' : no !== null && no !== void 0 ? no : 'general.no';
5497
+ }
4988
5498
  }
4989
5499
  else {
4990
5500
  return value;
@@ -5030,10 +5540,10 @@ class MngTableColumnValueComponent {
5030
5540
  }
5031
5541
  }
5032
5542
  MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5033
- MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | boolean }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue\n | translate\n }}\n </ng-container>\n</ng-container>\n", directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "propertyPath": MngPropertyPathPipe, "number": i4$1.DecimalPipe, "date": i4$1.DatePipe, "boolean": MngBooleanPipe, "translate": i3.TranslatePipe, "enum": MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5543
+ MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item[descriptor.property] | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | boolean: descriptor.booleanYes:descriptor.booleanNo\n | translate\n }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue\n | translate\n }}\n </ng-container>\n</ng-container>\n", directives: [{ type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "propertyPath": MngPropertyPathPipe, "number": i4.DecimalPipe, "date": i4.DatePipe, "boolean": MngBooleanPipe, "translate": i3$1.TranslatePipe, "enum": MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5034
5544
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
5035
5545
  type: Component,
5036
- args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | boolean }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue\n | translate\n }}\n </ng-container>\n</ng-container>\n" }]
5546
+ args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item[descriptor.property] | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | boolean: descriptor.booleanYes:descriptor.booleanNo\n | translate\n }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue\n | translate\n }}\n </ng-container>\n</ng-container>\n" }]
5037
5547
  }], propDecorators: { descriptor: [{
5038
5548
  type: Input
5039
5549
  }], item: [{
@@ -5058,18 +5568,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5058
5568
  var TypeEnum = FilterDescriptor.TypeEnum;
5059
5569
  var PaginationModeEnum = TableDescriptor.PaginationModeEnum;
5060
5570
  class MngTableComponent {
5061
- constructor(injector, router, activatedRoute, translate, tableviewService) {
5571
+ constructor(injector, router, activatedRoute, translate, viewContainerService) {
5062
5572
  this.injector = injector;
5063
5573
  this.router = router;
5064
5574
  this.activatedRoute = activatedRoute;
5065
5575
  this.translate = translate;
5066
- this.tableviewService = tableviewService;
5576
+ this.viewContainerService = viewContainerService;
5067
5577
  this.filterDisplayRow = TableDescriptor.FilterDisplayEnum.Row;
5068
5578
  this.filterDisplayMenu = TableDescriptor.FilterDisplayEnum.Menu;
5069
5579
  this.useQueryParams = false;
5070
5580
  // extra features input
5071
5581
  this.selectionMode = 'multiple';
5072
5582
  this.selectionEnabled = false;
5583
+ // visual
5584
+ this.isColumnClickable = true;
5073
5585
  // event outputs
5074
5586
  this.loadEventEmitter = new EventEmitter();
5075
5587
  this.cellClickEventEmitter = new EventEmitter();
@@ -5251,7 +5763,8 @@ class MngTableComponent {
5251
5763
  this.isSortChanged = false;
5252
5764
  this.dataProviderLoadingSubject.next(false);
5253
5765
  }, err => {
5254
- ToastUtil.tableNotificationError(this.translate, this.descriptor, err, this.tableviewService);
5766
+ var _a;
5767
+ ToastUtil.tableNotificationError(this.translate, this.descriptor, err, (_a = this.viewContainerService) !== null && _a !== void 0 ? _a : undefined);
5255
5768
  const emptyQueryResult = new MediusQueryResult();
5256
5769
  emptyQueryResult.pageData = [];
5257
5770
  emptyQueryResult.allDataCount = 0;
@@ -5318,13 +5831,13 @@ class MngTableComponent {
5318
5831
  }
5319
5832
  }
5320
5833
  }
5321
- MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i3.TranslateService }, { token: TableviewComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
5322
- MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableComponent, selector: "mng-table", inputs: { descriptor: "descriptor", items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", captionComponent: "captionComponent", columnActionComponent: "columnActionComponent" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], ngImport: i0, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", components: [{ type: i4$5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$5.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$5.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$5.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5834
+ MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i3$1.TranslateService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
5835
+ MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableComponent, selector: "mng-table", inputs: { descriptor: "descriptor", items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", isColumnClickable: "isColumnClickable", captionComponent: "captionComponent", columnActionComponent: "columnActionComponent" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], ngImport: i0, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", components: [{ type: i4$5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$5.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$5.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$5.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4.AsyncPipe, "translate": i3$1.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5323
5836
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, decorators: [{
5324
5837
  type: Component,
5325
- args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
5838
+ args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
5326
5839
  }], ctorParameters: function () {
5327
- return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i3.TranslateService }, { type: TableviewComponentService, decorators: [{
5840
+ return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i3$1.TranslateService }, { type: MngViewContainerComponentService, decorators: [{
5328
5841
  type: Optional
5329
5842
  }] }];
5330
5843
  }, propDecorators: { descriptor: [{
@@ -5343,6 +5856,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5343
5856
  type: Input
5344
5857
  }], selectionEnabled: [{
5345
5858
  type: Input
5859
+ }], isColumnClickable: [{
5860
+ type: Input
5346
5861
  }], captionComponent: [{
5347
5862
  type: Input
5348
5863
  }], columnActionComponent: [{
@@ -5374,14 +5889,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5374
5889
  }] } });
5375
5890
 
5376
5891
  class MngTableviewComponent {
5377
- constructor(route, messageService, translateService, dialogService, confirmationService, actionService, tableviewService) {
5892
+ constructor(route, messageService, translateService, dialogService, confirmationService, actionExecutor, viewContainerService) {
5378
5893
  this.route = route;
5379
5894
  this.messageService = messageService;
5380
5895
  this.translateService = translateService;
5381
5896
  this.dialogService = dialogService;
5382
5897
  this.confirmationService = confirmationService;
5383
- this.actionService = actionService;
5384
- this.tableviewService = tableviewService;
5898
+ this.actionExecutor = actionExecutor;
5899
+ this.viewContainerService = viewContainerService;
5385
5900
  this.actions = [];
5386
5901
  this.tableComponent = null;
5387
5902
  this.rowClickActions = [];
@@ -5391,10 +5906,11 @@ class MngTableviewComponent {
5391
5906
  this.subscriptions = [];
5392
5907
  }
5393
5908
  ngOnInit() {
5394
- this.tableviewService.actions = this.actions;
5395
- this.tableviewService.dataProvider = this.dataProvider;
5396
- this.tableviewService.messageService = this.messageService;
5397
- const reloadTableSubscription = this.tableviewService.reloadTable$.subscribe(() => {
5909
+ this.viewContainerService.actions = this.actions;
5910
+ if (this.dataProvider) {
5911
+ this.viewContainerService.dataProvider = this.dataProvider;
5912
+ }
5913
+ const reloadTableSubscription = this.viewContainerService.reloadTable$.subscribe(() => {
5398
5914
  this.reloadTable();
5399
5915
  });
5400
5916
  this.subscriptions.push(reloadTableSubscription);
@@ -5414,10 +5930,17 @@ class MngTableviewComponent {
5414
5930
  break;
5415
5931
  }
5416
5932
  }
5933
+ this.toolbarRightActions = this.toolbarRightActions.reverse();
5417
5934
  }
5418
5935
  ngOnDestroy() {
5419
5936
  this.subscriptions.forEach(s => s.unsubscribe());
5420
5937
  }
5938
+ getMessageService() {
5939
+ return this.messageService;
5940
+ }
5941
+ getDataProvider() {
5942
+ return this.dataProvider;
5943
+ }
5421
5944
  reloadTable() {
5422
5945
  var _a;
5423
5946
  (_a = this.tableComponent) === null || _a === void 0 ? void 0 : _a.reload();
@@ -5425,17 +5948,17 @@ class MngTableviewComponent {
5425
5948
  onTableCellClick(event) {
5426
5949
  if (this.rowClickActions.length) {
5427
5950
  for (const action of this.rowClickActions) {
5428
- this.actionService.triggerRowClickAction(action, event, this.route);
5951
+ this.actionExecutor.triggerRowClickAction(action, event, this.route);
5429
5952
  }
5430
5953
  }
5431
5954
  }
5432
5955
  }
5433
- MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.MessageService }, { token: i3.TranslateService }, { token: i2.DialogService }, { token: i2$1.ConfirmationService }, { token: MngActionService }, { token: TableviewComponentService }], target: i0.ɵɵFactoryTarget.Component });
5434
- MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableviewComponent, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, TableviewComponentService], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table [descriptor]=\"descriptor.table\" [dataProvider]=\"dataProvider\" [useQueryParams]=\"true\" (cellClick)=\"onTableCellClick($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\">\n </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", components: [{ type: i7$1.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: i8$1.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "translate": i3.TranslatePipe } });
5956
+ MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.MessageService }, { token: i3$1.TranslateService }, { token: i3.DialogService }, { token: i2.ConfirmationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService }], target: i0.ɵɵFactoryTarget.Component });
5957
+ MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableviewComponent, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\">\n </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", components: [{ type: i6$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "translate": i3$1.TranslatePipe } });
5435
5958
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, decorators: [{
5436
5959
  type: Component,
5437
- args: [{ selector: 'mng-tableview', providers: [MessageService, ConfirmationService, TableviewComponentService], template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table [descriptor]=\"descriptor.table\" [dataProvider]=\"dataProvider\" [useQueryParams]=\"true\" (cellClick)=\"onTableCellClick($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\">\n </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
5438
- }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$1.MessageService }, { type: i3.TranslateService }, { type: i2.DialogService }, { type: i2$1.ConfirmationService }, { type: MngActionService }, { type: TableviewComponentService }]; }, propDecorators: { descriptor: [{
5960
+ args: [{ selector: 'mng-tableview', providers: [MessageService, ConfirmationService, MngViewContainerComponentService], template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\">\n </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
5961
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.MessageService }, { type: i3$1.TranslateService }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
5439
5962
  type: Input
5440
5963
  }], dataProvider: [{
5441
5964
  type: Input
@@ -5486,7 +6009,7 @@ class MngTableviewRouteComponent extends AMngTableviewRouteComponent {
5486
6009
  }
5487
6010
  createActionDescriptors() {
5488
6011
  var _a;
5489
- return (_a = this.route.snapshot.data['tableviewData'].actions) !== null && _a !== void 0 ? _a : super.createActionDescriptors();
6012
+ return (_a = this.route.snapshot.data['tableviewData'].fieldActions) !== null && _a !== void 0 ? _a : super.createActionDescriptors();
5490
6013
  }
5491
6014
  }
5492
6015
  MngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewRouteComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
@@ -5651,36 +6174,52 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
5651
6174
  }
5652
6175
  }
5653
6176
  MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
5654
- MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldLookupDialogComponent, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"p-inputgroup mng-dropdown-dialog\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value\"></i>\n <button pButton pRipple class=\"mng-dropdown-dialog-search-button\" type=\"button\" [label]=\"'general.search' | translate: {item: ''}\" (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.lookupTableDescriptor!\"\n [dataProvider]=\"descriptor.lookupTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: i1$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10$1.InputText, selector: "[pInputText]" }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i9.Ripple, selector: "[pRipple]" }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3.TranslatePipe, "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6177
+ MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldLookupDialogComponent, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value\"></i>\n <button pButton pRipple class=\"mng-dropdown-dialog-search-button\" type=\"button\" [label]=\"'general.search' | translate: {item: ''}\" (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.lookupTableDescriptor!\"\n [dataProvider]=\"descriptor.lookupTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: i1$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i3$3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10.InputText, selector: "[pInputText]" }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5655
6178
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
5656
6179
  type: Component,
5657
- args: [{ selector: 'mng-formly-field-lookup-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"p-inputgroup mng-dropdown-dialog\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value\"></i>\n <button pButton pRipple class=\"mng-dropdown-dialog-search-button\" type=\"button\" [label]=\"'general.search' | translate: {item: ''}\" (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.lookupTableDescriptor!\"\n [dataProvider]=\"descriptor.lookupTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
6180
+ args: [{ selector: 'mng-formly-field-lookup-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value\"></i>\n <button pButton pRipple class=\"mng-dropdown-dialog-search-button\" type=\"button\" [label]=\"'general.search' | translate: {item: ''}\" (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.lookupTableDescriptor!\"\n [dataProvider]=\"descriptor.lookupTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
5658
6181
  }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
5659
6182
  type: ViewChild,
5660
6183
  args: [MngTableComponent]
5661
6184
  }] } });
5662
6185
 
6186
+ var SizeEnum = ActionDescriptor.SizeEnum;
5663
6187
  class MngFormlyFieldTableDialogFormComponent extends FieldType {
5664
- constructor() {
5665
- super(...arguments);
6188
+ constructor(actionExecutor) {
6189
+ super();
6190
+ this.actionExecutor = actionExecutor;
5666
6191
  this.itemsSubject = new ReplaySubject(1);
5667
6192
  this.items$ = this.itemsSubject.asObservable();
5668
- this.toolbarActions = [];
5669
- this.rowActions = [];
6193
+ this.toolbarRightActions = [];
6194
+ this.rowClickActions = [];
6195
+ this.rowInlineActions = [];
5670
6196
  this.subscriptions = [];
5671
6197
  this.isDisabledSubject = new BehaviorSubject(false);
5672
6198
  this.isEnabled$ = this.isDisabledSubject.asObservable().pipe(distinctUntilChanged(), map(e => !e));
5673
6199
  }
5674
6200
  ngOnInit() {
5675
6201
  this.descriptor = this.to['descriptor'];
5676
- const hasAddAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Add);
5677
- const hasEditAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Edit);
5678
- const hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Delete);
6202
+ const hasViewAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.View);
6203
+ const hasAddAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Add);
6204
+ const hasEditAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Edit);
6205
+ const hasDeleteAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Delete);
6206
+ if (hasViewAction) {
6207
+ const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)
6208
+ .withPosition(ActionPositionEnum.RowClick)
6209
+ .withTitle(null)
6210
+ .withIcon('pi pi-search')
6211
+ .withClassName('mng-formly-field-table-form-dialog')
6212
+ .withSize(SizeEnum.ExtraSmall);
6213
+ viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
6214
+ this.rowClickActions.push(viewAction);
6215
+ }
5679
6216
  if (hasAddAction) {
5680
6217
  const addAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.addEditor, 'add', this.descriptor.editor.model.type, this.descriptor.property)
6218
+ .withPosition(ActionPositionEnum.ToolbarRight)
5681
6219
  .withTitle(null)
5682
6220
  .withIcon('pi pi-plus')
5683
6221
  .withClassName('mng-formly-field-table-form-dialog')
6222
+ .withSize(SizeEnum.ExtraSmall)
5684
6223
  .withSubmitFunction(ctx => {
5685
6224
  var _a;
5686
6225
  if (!((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item)) {
@@ -5694,13 +6233,14 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5694
6233
  })
5695
6234
  .withIsVisibleFunction(() => { var _a; return of(!((_a = this.options) === null || _a === void 0 ? void 0 : _a.formState.disabled)); })
5696
6235
  .withIsEnabledFunction(() => this.isEnabled$);
5697
- this.toolbarActions.push(addAction);
6236
+ this.toolbarRightActions.push(addAction);
5698
6237
  }
5699
6238
  if (hasEditAction) {
5700
6239
  const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)
5701
6240
  .withTitle(null)
5702
6241
  .withIcon('pi pi-pencil')
5703
6242
  .withClassName('mng-formly-field-table-form-dialog')
6243
+ .withSize(SizeEnum.ExtraSmall)
5704
6244
  .withSubmitFunction(ctx => {
5705
6245
  var _a, _b;
5706
6246
  if (!((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item)) {
@@ -5714,13 +6254,14 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5714
6254
  })
5715
6255
  .withIsVisibleFunction(() => { var _a; return of(!((_a = this.formControl) === null || _a === void 0 ? void 0 : _a.disabled)); })
5716
6256
  .withIsEnabledFunction(() => this.isEnabled$);
5717
- this.rowActions.push(editAction);
6257
+ this.rowInlineActions.push(editAction);
5718
6258
  }
5719
6259
  if (hasDeleteAction) {
5720
6260
  const deleteAction = new ActionDescriptor(this.descriptor.tableviewDescriptor.model, 'delete', this.descriptor.editor.model.type, this.descriptor.property)
5721
6261
  .withLevel(ActionLevelEnum.Danger)
5722
6262
  .withTitle(null)
5723
6263
  .withIcon('pi pi-trash')
6264
+ .withSize(SizeEnum.ExtraSmall)
5724
6265
  .withRunFunction(ctx => {
5725
6266
  var _a;
5726
6267
  if (!((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item)) {
@@ -5743,7 +6284,20 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5743
6284
  })
5744
6285
  .withIsVisibleFunction(() => { var _a; return of(!((_a = this.options) === null || _a === void 0 ? void 0 : _a.formState.disabled)); })
5745
6286
  .withIsEnabledFunction(() => this.isEnabled$);
5746
- this.rowActions.push(deleteAction);
6287
+ this.rowInlineActions.push(deleteAction);
6288
+ }
6289
+ for (const action of this.descriptor.actions) {
6290
+ switch (action.position) {
6291
+ case ActionPositionEnum.ToolbarRight:
6292
+ this.toolbarRightActions.push(action);
6293
+ break;
6294
+ case ActionPositionEnum.RowInline:
6295
+ this.rowInlineActions.push(action);
6296
+ break;
6297
+ case ActionPositionEnum.RowClick:
6298
+ // this.footerRightActions.push(action);
6299
+ break;
6300
+ }
5747
6301
  }
5748
6302
  // init values
5749
6303
  if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
@@ -5767,13 +6321,21 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5767
6321
  ngOnDestroy() {
5768
6322
  this.subscriptions.forEach(s => s.unsubscribe());
5769
6323
  }
6324
+ onTableCellClick(event) {
6325
+ console.log(event);
6326
+ if (this.rowClickActions.length) {
6327
+ for (const action of this.rowClickActions) {
6328
+ this.actionExecutor.triggerRowClickAction(action, event);
6329
+ }
6330
+ }
6331
+ }
5770
6332
  }
5771
- MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5772
- MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6333
+ MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: MngActionExecutorService }], target: i0.ɵɵFactoryTarget.Component });
6334
+ MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5773
6335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
5774
6336
  type: Component,
5775
- args: [{ selector: 'mng-formly-table-dialog-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
5776
- }] });
6337
+ args: [{ selector: 'mng-formly-table-dialog-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
6338
+ }], ctorParameters: function () { return [{ type: MngActionExecutorService }]; } });
5777
6339
 
5778
6340
  class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
5779
6341
  constructor(injector) {
@@ -5883,16 +6445,16 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
5883
6445
  }
5884
6446
  }
5885
6447
  MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
5886
- MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i9.Ripple, selector: "[pRipple]" }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3.TranslatePipe, "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6448
+ MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5887
6449
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
5888
6450
  type: Component,
5889
- args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
6451
+ args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
5890
6452
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
5891
6453
 
5892
6454
  class MngFormlyFieldTabsComponent extends FieldType {
5893
6455
  }
5894
6456
  MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5895
- MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$5.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$5.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3$1.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6457
+ MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$5.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$5.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3$2.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5896
6458
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
5897
6459
  type: Component,
5898
6460
  args: [{ selector: 'mng-formly-field-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n" }]
@@ -5901,7 +6463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5901
6463
  class MngFormlyFieldFieldsetComponent extends FieldType {
5902
6464
  }
5903
6465
  MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5904
- MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n", components: [{ type: i1$6.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { type: i3$1.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6466
+ MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n", components: [{ type: i1$6.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { type: i3$2.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5905
6467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
5906
6468
  type: Component,
5907
6469
  args: [{ selector: 'mng-formly-field-fieldset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n" }]
@@ -5910,19 +6472,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5910
6472
  class MngFormlyFieldWrapperComponent extends FieldWrapper {
5911
6473
  }
5912
6474
  MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5913
- MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldWrapperComponent, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n <label [for]=\"key\">{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6475
+ MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldWrapperComponent, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5914
6476
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, decorators: [{
5915
6477
  type: Component,
5916
- args: [{ selector: 'mng-formly-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field\">\n <label [for]=\"key\">{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
6478
+ args: [{ selector: 'mng-formly-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
5917
6479
  }] });
5918
6480
 
5919
6481
  class MngFormlyTableWrapperComponent extends FieldWrapper {
5920
6482
  }
5921
6483
  MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5922
- MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6484
+ MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5923
6485
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
5924
6486
  type: Component,
5925
- args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
6487
+ args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
5926
6488
  }] });
5927
6489
 
5928
6490
  class MngBreadcrumbComponent {
@@ -5931,7 +6493,7 @@ class MngBreadcrumbComponent {
5931
6493
  }
5932
6494
  }
5933
6495
  MngBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngBreadcrumbComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
5934
- MngBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngBreadcrumbComponent, selector: "mng-breadcrumb", ngImport: i0, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n", components: [{ type: i2$4.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6496
+ MngBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngBreadcrumbComponent, selector: "mng-breadcrumb", ngImport: i0, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n", components: [{ type: i2$3.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5935
6497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngBreadcrumbComponent, decorators: [{
5936
6498
  type: Component,
5937
6499
  args: [{ selector: 'mng-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n" }]
@@ -5944,7 +6506,7 @@ class MngFooterComponent {
5944
6506
  }
5945
6507
  }
5946
6508
  MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
5947
- MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFooterComponent, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">&#169; {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6509
+ MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFooterComponent, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">&#169; {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
5948
6510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, decorators: [{
5949
6511
  type: Component,
5950
6512
  args: [{ selector: 'mng-footer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">&#169; {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n" }]
@@ -6282,7 +6844,7 @@ class MngMenuItemComponent {
6282
6844
  }
6283
6845
  }
6284
6846
  MngMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMenuItemComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
6285
- MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active" } }, ngImport: i0, template: "<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i9.Ripple, selector: "[pRipple]" }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe }, animations: [
6847
+ MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active" } }, ngImport: i0, template: "<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe, "translate": i3$1.TranslatePipe }, animations: [
6286
6848
  trigger('children', [
6287
6849
  state('void', style({
6288
6850
  height: '0px'
@@ -6352,7 +6914,7 @@ class MngMenuComponent {
6352
6914
  }
6353
6915
  }
6354
6916
  MngMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMenuComponent, deps: [{ token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
6355
- MngMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMenuComponent, selector: "mng-menu", ngImport: i0, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of mngCommons.menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n</div>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6917
+ MngMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMenuComponent, selector: "mng-menu", ngImport: i0, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of mngCommons.menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n</div>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6356
6918
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMenuComponent, decorators: [{
6357
6919
  type: Component,
6358
6920
  args: [{ selector: 'mng-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of mngCommons.menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n</div>\n" }]
@@ -6394,7 +6956,7 @@ class MngTopbarComponent {
6394
6956
  }
6395
6957
  }
6396
6958
  MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
6397
- MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTopbarComponent, selector: "mng-topbar", viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", components: [{ type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6959
+ MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTopbarComponent, selector: "mng-topbar", viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", components: [{ type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4.AsyncPipe, "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6398
6960
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, decorators: [{
6399
6961
  type: Component,
6400
6962
  args: [{ selector: 'mng-topbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n" }]
@@ -6432,7 +6994,7 @@ class MngMainLayoutComponent {
6432
6994
  }
6433
6995
  }
6434
6996
  MngMainLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMainLayoutComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
6435
- MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMainLayoutComponent, selector: "mng-main-layout", host: { listeners: { "window:resize": "onWindowResize($event)" } }, providers: [MngMainLayoutComponentService], viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n", directives: [{ type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6997
+ MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMainLayoutComponent, selector: "mng-main-layout", host: { listeners: { "window:resize": "onWindowResize($event)" } }, providers: [MngMainLayoutComponentService], viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n", directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
6436
6998
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMainLayoutComponent, decorators: [{
6437
6999
  type: Component,
6438
7000
  args: [{ selector: 'mng-main-layout', providers: [MngMainLayoutComponentService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n" }]
@@ -6737,7 +7299,7 @@ const declarations = [
6737
7299
  // editor components
6738
7300
  MngFormEditorComponent,
6739
7301
  MngActionComponent,
6740
- MngActionDialogComponent,
7302
+ MngActionEditorComponent,
6741
7303
  MngActionRouteComponent
6742
7304
  ];
6743
7305
  class MngCommonsModule {
@@ -6749,12 +7311,12 @@ class MngCommonsModule {
6749
7311
  DialogService,
6750
7312
  MessageService,
6751
7313
  ConfirmationService,
6752
- MngActionService,
7314
+ MngActionExecutorService,
6753
7315
  MngNavigationService,
6754
7316
  MngCommonsService,
6755
7317
  // component service
6756
7318
  MngMainLayoutComponentService,
6757
- TableviewComponentService,
7319
+ MngViewContainerComponentService,
6758
7320
  {
6759
7321
  provide: MNG_MODULE_CONFIG_IT,
6760
7322
  useValue: config
@@ -6785,6 +7347,14 @@ class MngCommonsModule {
6785
7347
  multi: true,
6786
7348
  useFactory: mngFormlyConfigProvider,
6787
7349
  deps: [TranslateService, MNG_MODULE_CONFIG_IT]
7350
+ },
7351
+ {
7352
+ provide: ACTION_EDITOR_DIALOG_COMPONENT_SETTING,
7353
+ useValue: MngActionEditorComponent
7354
+ },
7355
+ {
7356
+ provide: MngErrorMapperService,
7357
+ useClass: DefaultMngErrorMapperService
6788
7358
  }
6789
7359
  ]
6790
7360
  };
@@ -6831,14 +7401,14 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
6831
7401
  // editor components
6832
7402
  MngFormEditorComponent,
6833
7403
  MngActionComponent,
6834
- MngActionDialogComponent,
7404
+ MngActionEditorComponent,
6835
7405
  MngActionRouteComponent
6836
7406
  ], imports: [
6837
7407
  // angular modules
6838
7408
  CommonModule,
6839
7409
  RouterModule,
6840
7410
  HttpClientModule,
6841
- ReactiveFormsModule, i3.TranslateModule, i3$1.FormlyModule, AutoCompleteModule,
7411
+ ReactiveFormsModule, i3$1.TranslateModule, i3$2.FormlyModule, AutoCompleteModule,
6842
7412
  BreadcrumbModule,
6843
7413
  ButtonModule,
6844
7414
  CalendarModule,
@@ -6945,7 +7515,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
6945
7515
  // editor components
6946
7516
  MngFormEditorComponent,
6947
7517
  MngActionComponent,
6948
- MngActionDialogComponent,
7518
+ MngActionEditorComponent,
6949
7519
  MngActionRouteComponent] });
6950
7520
  MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsModule, imports: [[
6951
7521
  // angular modules
@@ -7022,7 +7592,7 @@ class AMngCrudApiService {
7022
7592
  this.objectSerializer = ObjectSerializer.get();
7023
7593
  }
7024
7594
  createPost(item, params) {
7025
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getCreatePostPath()}`;
7595
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getCreatePostPath()}`;
7026
7596
  return this.http
7027
7597
  .post(url, this.objectSerializer.serializeClass(item, this.type), {
7028
7598
  withCredentials: true,
@@ -7033,7 +7603,7 @@ class AMngCrudApiService {
7033
7603
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.type)));
7034
7604
  }
7035
7605
  getAllPost(queryParamBody, params) {
7036
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getGetAllPostPath()}`;
7606
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getGetAllPostPath()}`;
7037
7607
  return this.http
7038
7608
  .post(url, this.objectSerializer.serialize(queryParamBody, 'QueryParam'), {
7039
7609
  withCredentials: true,
@@ -7044,7 +7614,7 @@ class AMngCrudApiService {
7044
7614
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.queryResultType)));
7045
7615
  }
7046
7616
  getByIdGet(id, params) {
7047
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getGetByIdGetPath(id)}`;
7617
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getGetByIdGetPath(id)}`;
7048
7618
  return this.http
7049
7619
  .get(url, {
7050
7620
  withCredentials: true,
@@ -7055,7 +7625,7 @@ class AMngCrudApiService {
7055
7625
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.type)));
7056
7626
  }
7057
7627
  updatePut(id, item, params) {
7058
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getUpdatePutPath(id, item)}`;
7628
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getUpdatePutPath(id, item)}`;
7059
7629
  return this.http
7060
7630
  .put(url, this.objectSerializer.serializeClass(item, this.type), {
7061
7631
  withCredentials: true,
@@ -7066,7 +7636,7 @@ class AMngCrudApiService {
7066
7636
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.type)));
7067
7637
  }
7068
7638
  removeDelete(id, item, params) {
7069
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getRemoveDeletePath(id, item)}`;
7639
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getRemoveDeletePath(id, item)}`;
7070
7640
  return this.http
7071
7641
  .request('delete', url, {
7072
7642
  withCredentials: true,
@@ -7552,5 +8122,5 @@ class RouteDataBuilder {
7552
8122
  * Generated bundle index. Do not edit.
7553
8123
  */
7554
8124
 
7555
- export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusQueryResultBase, MediusQueryResultWithObject, MediusRestUtil, MngActionComponent, MngActionDialogComponent, MngActionRouteComponent, MngActionService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngPropertyPathPipe, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, ModelDescriptor, ModelUtil, ObjectSerializer, RouteBuilder, RouteDataBuilder, RoutesBuilder, TableDataProvider, TableDescriptor, TableviewComponentService, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
8125
+ export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusQueryResultBase, MediusQueryResultWithObject, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngPropertyPathPipe, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, ObjectSerializer, RouteBuilder, RouteDataBuilder, RoutesBuilder, TableDataProvider, TableDescriptor, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
7556
8126
  //# sourceMappingURL=mediusinc-mng-commons.mjs.map