@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,468 +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
- console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, ctx.data?.item);
296
- return of(ctx.data?.item ? ctx.data.item : {});
297
- };
298
- }
299
- return this._fetchFunction;
300
- }
301
- get submitFunction() {
302
- return this._submitFunction;
303
- }
304
- withEditorTitle(title) {
305
- this._editorTitle = title;
306
- return this;
307
- }
308
- withRunFunction(fn) {
309
- return this.withSubmitFunction(fn);
132
+
133
+ class LookupDataProvider extends DataProvider {
134
+ constructor(modelType, serviceType) {
135
+ super(modelType, serviceType);
136
+ this._lookup = () => of([]);
310
137
  }
311
- withFetchFunction(fn) {
312
- this._fetchFunction = fn;
313
- return this;
138
+ get lookup() {
139
+ return this._lookup;
314
140
  }
315
- withSubmitFunction(fn) {
316
- this._submitFunction = fn;
317
- return this;
318
- }
319
- withFetchNotificationError(title, message, hasNotification = true) {
320
- this._hasFetchNotificationSuccess = hasNotification;
321
- this._fetchNotificationSuccessTitle = title;
322
- this._fetchNotificationSuccessMessage = message;
323
- }
324
- }
325
- class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
326
- constructor(editorDescriptor) {
327
- super(editorDescriptor, 'details');
328
- this.withPosition(ActionPositionEnum.RowClick);
329
- this.withRouteTrigger(':itemId');
330
- this.withFetchFunction(ctx => ctx.dataProvider?.fetch && ctx.data?.itemId
331
- ? ctx.dataProvider.fetch(ctx.data?.itemId, ctx.serviceInstance)
332
- : throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`)));
333
- this.withClassName('mng-details-dynamic-dialog');
334
- }
335
- }
336
- class ActionEditorAddDescriptor extends ActionEditorDescriptor {
337
- constructor(editorDescriptor) {
338
- super(editorDescriptor, 'add');
339
- this.withPosition(ActionPositionEnum.ToolbarLeft);
340
- this.withRouteTrigger('add');
341
- this.withSubmitFunction(ctx => ctx.dataProvider?.create ? ctx.dataProvider.create(ctx.data?.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)));
342
- this.withLevel(ActionLevelEnum.Success);
343
- this.withIcon('pi pi-plus');
344
- this.withClassName('mng-details-dynamic-dialog');
345
- }
346
- }
347
- class ActionEditorEditDescriptor extends ActionEditorDescriptor {
348
- constructor(editorDescriptor) {
349
- super(editorDescriptor, 'edit');
350
- this.withPosition(ActionPositionEnum.RowInline);
351
- this.withTitle(null);
352
- this.withRouteTrigger(':itemId/edit');
353
- this.withFetchFunction(ctx => ctx.dataProvider?.fetch && ctx.data?.itemId
354
- ? ctx.dataProvider.fetch(ctx.data.itemId, ctx.serviceInstance)
355
- : throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`)));
356
- this.withSubmitFunction(ctx => ctx.dataProvider?.update && ctx.data?.itemId
357
- ? ctx.dataProvider.update(ctx.data.itemId, ctx.data?.item, ctx.serviceInstance)
358
- : throwError(new Error(`Data provider update function or item id ${ctx.data?.itemId} is missing.`)));
359
- this.withIcon('pi pi-pencil');
360
- this.withClassName('mng-details-dynamic-dialog');
361
- }
362
- }
363
- class ActionDeleteDescriptor extends ActionDescriptor {
364
- constructor(model) {
365
- super(model, 'delete');
366
- this.withPosition(ActionPositionEnum.RowInline);
367
- this.withTitle(null);
368
- this.withRunFunction(ctx => {
369
- const editorDataProvider = ctx.dataProvider;
370
- return editorDataProvider?.delete && ctx.data?.itemId
371
- ? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance)
372
- : throwError(new Error(`Data provider delete function or item id ${ctx.data?.itemId} is missing.`));
373
- });
374
- this.withLevel(ActionLevelEnum.Danger);
375
- this.withIcon('pi pi-trash');
376
- this.withRunConfirmation(undefined);
377
- }
378
- }
379
- var ActionPositionEnum;
380
- (function (ActionPositionEnum) {
381
- ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
382
- ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
383
- ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
384
- ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
385
- ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
386
- })(ActionPositionEnum || (ActionPositionEnum = {}));
387
- var ActionActivationTriggerEnum;
388
- (function (ActionActivationTriggerEnum) {
389
- ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
390
- ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
391
- })(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
392
- var ActionTypeEnum;
393
- (function (ActionTypeEnum) {
394
- ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
395
- ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
396
- })(ActionTypeEnum || (ActionTypeEnum = {}));
397
- var ActionLevelEnum;
398
- (function (ActionLevelEnum) {
399
- ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
400
- ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
401
- ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
402
- ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
403
- ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
404
- ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
405
- ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
406
- ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
407
- })(ActionLevelEnum || (ActionLevelEnum = {}));
408
-
409
- class MngFormEditorSubmitEvent {
410
- constructor(formItem) {
411
- this.formItem = formItem;
412
- this.success = true;
413
- }
414
- }
415
- var MngFormFieldEventTypeEnum;
416
- (function (MngFormFieldEventTypeEnum) {
417
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
418
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
419
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
420
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
421
- MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
422
- })(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
423
- class MngFormFieldEventComponentSubtype {
424
- }
425
- MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
426
- MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
427
- MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
428
- MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
429
- class MngFormFieldEventDialogSubtype {
430
- }
431
- MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
432
- MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
433
- MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
434
- class MngFormFieldEvent {
435
- constructor(type, componentType, componentInstance, data = {}) {
436
- this.type = type;
437
- this.componentType = componentType;
438
- this.componentInstance = componentInstance;
439
- this.data = data;
440
- }
441
- }
442
-
443
- class DataProvider {
444
- constructor(modelType, serviceType) {
445
- this._modelType = modelType;
446
- this._serviceType = serviceType;
447
- }
448
- get serviceType() {
449
- return this._serviceType;
450
- }
451
- get modelType() {
452
- return this._modelType;
453
- }
454
- withServiceType(type) {
455
- this._serviceType = type;
456
- return this;
457
- }
458
- }
459
-
460
- class EditorDataProvider extends DataProvider {
461
- constructor(modelType, serviceType) {
462
- super(modelType, serviceType);
463
- this._fetch = id => throwError(`No fetch function provided for id ${id}.`);
464
- }
465
- get fetch() {
466
- return this._fetch;
467
- }
468
- get create() {
469
- return this._create;
470
- }
471
- get update() {
472
- return this._update;
473
- }
474
- get delete() {
475
- return this._delete;
476
- }
477
- withFetch(fetch) {
478
- this._fetch = fetch;
479
- return this;
480
- }
481
- withCreate(create) {
482
- this._create = create;
483
- return this;
484
- }
485
- withUpdate(update) {
486
- this._update = update;
487
- return this;
488
- }
489
- withDelete(deleteFn) {
490
- this._delete = deleteFn;
491
- return this;
492
- }
493
- }
494
-
495
- class LookupDataProvider extends DataProvider {
496
- constructor(modelType, serviceType) {
497
- super(modelType, serviceType);
498
- this._lookup = () => of([]);
499
- }
500
- get lookup() {
501
- return this._lookup;
502
- }
503
- withLookup(lookup) {
504
- this._lookup = lookup;
141
+ withLookup(lookup) {
142
+ this._lookup = lookup;
505
143
  return this;
506
144
  }
507
145
  }
@@ -713,89 +351,597 @@ class MediusQueryParamBuilder {
713
351
  this.queryParam.itemsPerPage = itemsPerPage;
714
352
  return this;
715
353
  }
716
- withItemsOffset(itemsOffset) {
717
- this.queryParam.itemsOffset = itemsOffset;
718
- return this;
354
+ withItemsOffset(itemsOffset) {
355
+ this.queryParam.itemsOffset = itemsOffset;
356
+ return this;
357
+ }
358
+ withSort(property, asc = true) {
359
+ if (!this.queryParam.sortProperty || !this.queryParam.sortAsc) {
360
+ this.queryParam.sortProperty = [];
361
+ this.queryParam.sortAsc = [];
362
+ }
363
+ this.queryParam.sortProperty.push(property);
364
+ this.queryParam.sortAsc.push(asc);
365
+ return this;
366
+ }
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
+ console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, ctx.data?.item);
691
+ return of(ctx.data?.item ? ctx.data.item : {});
692
+ };
693
+ }
694
+ return this._fetchFunction;
695
+ }
696
+ get submitFunction() {
697
+ return this._submitFunction;
698
+ }
699
+ get editorActions() {
700
+ return this._editorActions;
701
+ }
702
+ get editorComponent() {
703
+ return this._editorComponent;
704
+ }
705
+ withEditorTitle(title) {
706
+ this._editorTitle = title;
707
+ return this;
708
+ }
709
+ withDataProvider(dataProvider) {
710
+ this._dataProvider = dataProvider;
711
+ return this;
712
+ }
713
+ withServiceType(serviceType) {
714
+ this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
715
+ return this;
716
+ }
717
+ withRunFunction(fn) {
718
+ return this.withSubmitFunction(fn);
719
+ }
720
+ withFetchFunction(fn) {
721
+ this._fetchFunction = fn;
722
+ return this;
723
+ }
724
+ withSubmitFunction(fn) {
725
+ this._submitFunction = fn;
726
+ return this;
727
+ }
728
+ withFetchNotificationError(title, message, hasNotification = true) {
729
+ this._hasFetchNotificationSuccess = hasNotification;
730
+ this._fetchNotificationSuccessTitle = title;
731
+ this._fetchNotificationSuccessMessage = message;
732
+ return this;
733
+ }
734
+ withEditorAction(action) {
735
+ this._editorActions.push(action);
736
+ return this;
737
+ }
738
+ withEditorActions(actions) {
739
+ this._editorActions = actions;
740
+ return this;
741
+ }
742
+ withEditorComponent(editorComponent) {
743
+ this._editorComponent = editorComponent;
744
+ return this;
745
+ }
746
+ }
747
+ class ActionEditorSubmitDescriptor extends ActionDescriptor {
748
+ constructor(editorAction, submitType = ActionEditorSubmitDescriptor.TypeEnum.Submit) {
749
+ super(editorAction.model, submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'submit' : 'cancel');
750
+ this._editorAction = editorAction;
751
+ this._submitType = submitType;
752
+ this._position = ActionPositionEnum.FooterRight;
753
+ }
754
+ get submitType() {
755
+ return this._submitType;
756
+ }
757
+ }
758
+ (function (ActionEditorSubmitDescriptor) {
759
+ let TypeEnum;
760
+ (function (TypeEnum) {
761
+ TypeEnum[TypeEnum["Submit"] = 0] = "Submit";
762
+ TypeEnum[TypeEnum["Cancel"] = 1] = "Cancel";
763
+ })(TypeEnum = ActionEditorSubmitDescriptor.TypeEnum || (ActionEditorSubmitDescriptor.TypeEnum = {}));
764
+ })(ActionEditorSubmitDescriptor || (ActionEditorSubmitDescriptor = {}));
765
+ class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
766
+ constructor(editorDescriptor) {
767
+ super(editorDescriptor, 'details');
768
+ this.withPosition(ActionPositionEnum.RowClick);
769
+ this.withRouteTrigger(':itemId');
770
+ this.withFetchFunction(ctx => ctx.dataProvider?.fetch && ctx.data?.itemId
771
+ ? ctx.dataProvider.fetch(ctx.data?.itemId, ctx.serviceInstance)
772
+ : throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`)));
773
+ this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
774
+ this.withClassName('mng-details-dynamic-dialog');
775
+ }
776
+ withServiceType(serviceType) {
777
+ return this.withServiceFetchFunction(serviceType);
778
+ }
779
+ withServiceFetchFunction(serviceType, fetchFn) {
780
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
781
+ if (fetchFn) {
782
+ dataProvider.withFetch(fetchFn);
783
+ }
784
+ this._dataProvider = dataProvider;
785
+ return this;
786
+ }
787
+ }
788
+ class ActionEditorAddDescriptor extends ActionEditorDescriptor {
789
+ constructor(editorDescriptor) {
790
+ super(editorDescriptor, 'add');
791
+ this.withPosition(ActionPositionEnum.ToolbarLeft);
792
+ this.withRouteTrigger('add');
793
+ this.withSubmitFunction(ctx => ctx.dataProvider?.create ? ctx.dataProvider.create(ctx.data?.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)));
794
+ this.withLevel(ActionLevelEnum.Success);
795
+ this.withIcon('pi pi-plus');
796
+ this.withClassName('mng-details-dynamic-dialog');
797
+ }
798
+ withServiceType(serviceType) {
799
+ return this.withServiceSubmitFunction(serviceType);
800
+ }
801
+ withServiceSubmitFunction(serviceType, createFn, fetchFn) {
802
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
803
+ if (createFn) {
804
+ dataProvider.withCreate(createFn);
805
+ }
806
+ if (fetchFn) {
807
+ dataProvider.withFetch(fetchFn);
808
+ }
809
+ this._dataProvider = dataProvider;
810
+ return this;
811
+ }
812
+ }
813
+ class ActionEditorEditDescriptor extends ActionEditorDescriptor {
814
+ constructor(editorDescriptor) {
815
+ super(editorDescriptor, 'edit');
816
+ this.withPosition(ActionPositionEnum.RowInline);
817
+ this.withTitle(null);
818
+ this.withRouteTrigger(':itemId/edit');
819
+ this.withFetchFunction(ctx => ctx.dataProvider?.fetch && ctx.data?.itemId
820
+ ? ctx.dataProvider.fetch(ctx.data.itemId, ctx.serviceInstance)
821
+ : throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`)));
822
+ this.withSubmitFunction(ctx => ctx.dataProvider?.update && ctx.data?.itemId
823
+ ? ctx.dataProvider.update(ctx.data.itemId, ctx.data?.item, ctx.serviceInstance)
824
+ : throwError(new Error(`Data provider update function or item id ${ctx.data?.itemId} is missing.`)));
825
+ this.withIcon('pi pi-pencil');
826
+ this.withClassName('mng-details-dynamic-dialog');
827
+ }
828
+ withServiceType(serviceType) {
829
+ return this.withServiceSubmitFunction(serviceType);
719
830
  }
720
- withSort(property, asc = true) {
721
- if (!this.queryParam.sortProperty || !this.queryParam.sortAsc) {
722
- this.queryParam.sortProperty = [];
723
- this.queryParam.sortAsc = [];
831
+ withServiceSubmitFunction(serviceType, updateFn, fetchFn) {
832
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
833
+ if (updateFn) {
834
+ dataProvider.withUpdate(updateFn);
724
835
  }
725
- this.queryParam.sortProperty.push(property);
726
- this.queryParam.sortAsc.push(asc);
727
- return this;
728
- }
729
- withFilter(property, value, valueTo = undefined, matchType = MediusFilterMatchType.Contains, matchCaseSensitive = false) {
730
- if (!this.queryParam.filterParams) {
731
- this.queryParam.filterParams = [];
836
+ if (fetchFn) {
837
+ dataProvider.withFetch(fetchFn);
732
838
  }
733
- const filterParam = new MediusFilterParam();
734
- filterParam.property = property;
735
- filterParam.filterValue = value;
736
- filterParam.filterValueTo = valueTo;
737
- filterParam.filterMatchType = matchType;
738
- filterParam.filterMatchCaseSensitive = matchCaseSensitive;
739
- this.queryParam.filterParams.push(filterParam);
839
+ this._dataProvider = dataProvider;
740
840
  return this;
741
841
  }
742
- build() {
743
- const queryParam = this.queryParam;
744
- this.queryParam = new MediusQueryParam();
745
- return queryParam;
746
- }
747
842
  }
748
-
749
- /* tslint:disable:no-angle-bracket-type-assertion no-trailing-whitespace member-ordering object-literal-key-quotes */
750
- const enumsMapBase = {
751
- FilterMatchType: MediusFilterMatchType,
752
- QueryMode: MediusQueryMode
753
- };
754
- const typeMapBase = {
755
- FilterParam: MediusFilterParam,
756
- QueryParam: MediusQueryParam,
757
- QueryResult: MediusQueryResult,
758
- QueryResultWithObject: MediusQueryResultWithObject
759
- };
760
-
761
- class TableDataProvider extends DataProvider {
762
- constructor(modelType, serviceType) {
763
- super(modelType, serviceType);
764
- this._getAll = () => of(new MediusQueryResult());
843
+ class ActionDeleteDescriptor extends ActionDescriptor {
844
+ constructor(model) {
845
+ super(model, 'delete');
846
+ this.withPosition(ActionPositionEnum.RowInline);
847
+ this.withTitle(null);
848
+ this.withRunFunction(ctx => {
849
+ const editorDataProvider = ctx.dataProvider;
850
+ return editorDataProvider?.delete && ctx.data?.itemId
851
+ ? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance)
852
+ : throwError(new Error(`Data provider delete function or item id ${ctx.data?.itemId} is missing.`));
853
+ });
854
+ this.withLevel(ActionLevelEnum.Danger);
855
+ this.withIcon('pi pi-trash');
856
+ this.withRunConfirmation(undefined);
765
857
  }
766
- get getAll() {
767
- return this._getAll;
858
+ withServiceType(serviceType) {
859
+ return this.withServiceDeleteFunction(serviceType);
768
860
  }
769
- withGetAll(getAll) {
770
- this._getAll = getAll;
861
+ withServiceDeleteFunction(serviceType, deleteFn) {
862
+ const dataProvider = new EditorDataProvider(this._model.type, serviceType);
863
+ if (deleteFn) {
864
+ dataProvider.withDelete(deleteFn);
865
+ }
866
+ this._dataProvider = dataProvider;
771
867
  return this;
772
868
  }
773
869
  }
870
+ var ActionPositionEnum;
871
+ (function (ActionPositionEnum) {
872
+ ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
873
+ ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
874
+ ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
875
+ ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
876
+ ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
877
+ ActionPositionEnum[ActionPositionEnum["FooterLeft"] = 5] = "FooterLeft";
878
+ ActionPositionEnum[ActionPositionEnum["FooterRight"] = 6] = "FooterRight";
879
+ })(ActionPositionEnum || (ActionPositionEnum = {}));
880
+ var ActionActivationTriggerEnum;
881
+ (function (ActionActivationTriggerEnum) {
882
+ ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
883
+ ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
884
+ })(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
885
+ var ActionTypeEnum;
886
+ (function (ActionTypeEnum) {
887
+ ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
888
+ ActionTypeEnum[ActionTypeEnum["Event"] = 1] = "Event";
889
+ ActionTypeEnum[ActionTypeEnum["Editor"] = 2] = "Editor"; // editor providing middle step for activation
890
+ })(ActionTypeEnum || (ActionTypeEnum = {}));
891
+ var ActionLevelEnum;
892
+ (function (ActionLevelEnum) {
893
+ ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
894
+ ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
895
+ ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
896
+ ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
897
+ ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
898
+ ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
899
+ ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
900
+ ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
901
+ })(ActionLevelEnum || (ActionLevelEnum = {}));
774
902
 
775
- class TableviewDataProvider extends EditorDataProvider {
776
- constructor(modelType, serviceType) {
777
- super(modelType, serviceType);
778
- this._getAll = () => of(new MediusQueryResult());
779
- }
780
- get getAll() {
781
- return this._getAll;
903
+ class MngFormEditorSubmitEvent {
904
+ constructor(formItem) {
905
+ this.formItem = formItem;
906
+ this.success = true;
782
907
  }
783
- withGetAll(getAll) {
784
- this._getAll = getAll;
785
- return this;
908
+ }
909
+ var MngFormFieldEventTypeEnum;
910
+ (function (MngFormFieldEventTypeEnum) {
911
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
912
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
913
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
914
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
915
+ MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
916
+ })(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
917
+ class MngFormFieldEventComponentSubtype {
918
+ }
919
+ MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
920
+ MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
921
+ MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
922
+ MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
923
+ class MngFormFieldEventDialogSubtype {
924
+ }
925
+ MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
926
+ MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
927
+ MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
928
+ class MngFormFieldEvent {
929
+ constructor(type, componentType, componentInstance, data = {}) {
930
+ this.type = type;
931
+ this.componentType = componentType;
932
+ this.componentInstance = componentInstance;
933
+ this.data = data;
786
934
  }
787
935
  }
788
936
 
789
937
  class EditorDescriptor {
790
- constructor(modelType, idProperty, titleProperty) {
938
+ constructor(modelType, idProperty, titleProperty, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {
791
939
  this._tabs = [];
792
940
  this._groups = [];
793
941
  this._fields = [];
794
942
  this._disabled = false;
795
943
  this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
796
- }
797
- get disabled() {
798
- return this._disabled;
944
+ this._tableviewEditorType = tableviewEditorType;
799
945
  }
800
946
  get model() {
801
947
  return this._model;
@@ -806,6 +952,12 @@ class EditorDescriptor {
806
952
  get fields() {
807
953
  return this._fields;
808
954
  }
955
+ get tableviewEditorType() {
956
+ return this._disabled;
957
+ }
958
+ get disabled() {
959
+ return this._disabled;
960
+ }
809
961
  createTabGroup(name, title) {
810
962
  const tabGroup = new FieldTabGroupDescriptor(this, name);
811
963
  if (!title) {
@@ -925,6 +1077,15 @@ class EditorDescriptor {
925
1077
  }
926
1078
  }
927
1079
  EditorDescriptor.defaultGroupName = '_default';
1080
+ (function (EditorDescriptor) {
1081
+ let TableviewEditorTypeEnum;
1082
+ (function (TableviewEditorTypeEnum) {
1083
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
1084
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
1085
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
1086
+ TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
1087
+ })(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
1088
+ })(EditorDescriptor || (EditorDescriptor = {}));
928
1089
  class AGenericFieldDescriptor {
929
1090
  constructor(editor) {
930
1091
  this._config = {};
@@ -946,12 +1107,18 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
946
1107
  super(editor);
947
1108
  this._required = false;
948
1109
  this._disabled = false;
949
- this._className = '';
950
1110
  this._validators = [];
1111
+ this._className = '';
1112
+ this._labelClassName = '';
1113
+ this._inputClassName = '';
1114
+ this._size = FieldDescriptor.SizeEnum.Normal;
951
1115
  this._eventsSubject = new Subject();
952
1116
  this._property = property;
953
1117
  this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
954
1118
  }
1119
+ get property() {
1120
+ return this._property;
1121
+ }
955
1122
  get group() {
956
1123
  return this._group;
957
1124
  }
@@ -961,6 +1128,9 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
961
1128
  get placeholder() {
962
1129
  return this._placeholder;
963
1130
  }
1131
+ get helpText() {
1132
+ return this._helpText;
1133
+ }
964
1134
  get required() {
965
1135
  return this._required;
966
1136
  }
@@ -970,9 +1140,6 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
970
1140
  get defaultValue() {
971
1141
  return this._defaultValue;
972
1142
  }
973
- get className() {
974
- return this._className;
975
- }
976
1143
  get getter() {
977
1144
  return this._getter;
978
1145
  }
@@ -991,8 +1158,23 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
991
1158
  get hiddenExpression() {
992
1159
  return this._hiddenExpression;
993
1160
  }
994
- get property() {
995
- return this._property;
1161
+ get className() {
1162
+ return this._className;
1163
+ }
1164
+ get labelClassName() {
1165
+ return this._labelClassName;
1166
+ }
1167
+ get inputClassName() {
1168
+ return this._inputClassName;
1169
+ }
1170
+ get size() {
1171
+ return this._size;
1172
+ }
1173
+ get isSizeSmall() {
1174
+ return this._size === FieldDescriptor.SizeEnum.Small;
1175
+ }
1176
+ get isSizeLarge() {
1177
+ return this._size === FieldDescriptor.SizeEnum.Large;
996
1178
  }
997
1179
  withLabel(label) {
998
1180
  this._label = label;
@@ -1002,6 +1184,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1002
1184
  this._placeholder = placeholder;
1003
1185
  return this;
1004
1186
  }
1187
+ withHelpText(helpText) {
1188
+ this._helpText = helpText;
1189
+ return this;
1190
+ }
1005
1191
  withRequired(required = true, requiredExpression) {
1006
1192
  this._required = required;
1007
1193
  if (requiredExpression) {
@@ -1024,10 +1210,6 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1024
1210
  this._defaultValue = defaultValue;
1025
1211
  return this;
1026
1212
  }
1027
- withClassName(className) {
1028
- this._className = className;
1029
- return this;
1030
- }
1031
1213
  withGetter(getter) {
1032
1214
  this._getter = getter;
1033
1215
  return this;
@@ -1040,6 +1222,16 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1040
1222
  this._validators.push(new FieldValidator(name, expression, message));
1041
1223
  return this;
1042
1224
  }
1225
+ withClassName(className, labelClassName = '', inputClassName = '') {
1226
+ this._className = className;
1227
+ this._labelClassName = labelClassName;
1228
+ this._inputClassName = inputClassName;
1229
+ return this;
1230
+ }
1231
+ withSize(size = FieldDescriptor.SizeEnum.Normal) {
1232
+ this._size = size;
1233
+ return this;
1234
+ }
1043
1235
  nextEvent(type, cmpType, cmpInstance, data) {
1044
1236
  this._eventsSubject.next(new MngFormFieldEvent(type, cmpType, cmpInstance, data));
1045
1237
  }
@@ -1049,6 +1241,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1049
1241
  copyFieldsTo(obj) {
1050
1242
  obj._label = this._label;
1051
1243
  obj._placeholder = this._placeholder;
1244
+ obj._helpText = this._helpText;
1052
1245
  obj._required = this._required;
1053
1246
  obj._disabled = this._disabled;
1054
1247
  obj._defaultValue = this._defaultValue;
@@ -1056,11 +1249,21 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
1056
1249
  obj._hiddenExpression = this._hiddenExpression;
1057
1250
  obj._disabledExpression = this._disabledExpression;
1058
1251
  obj._className = this._className;
1252
+ obj._size = this.size;
1059
1253
  obj._getter = this._getter;
1060
1254
  obj._setter = this._setter;
1061
1255
  obj._validators = this._validators;
1062
1256
  }
1063
1257
  }
1258
+ var FieldDescriptor;
1259
+ (function (FieldDescriptor) {
1260
+ let SizeEnum;
1261
+ (function (SizeEnum) {
1262
+ SizeEnum[SizeEnum["Small"] = 0] = "Small";
1263
+ SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
1264
+ SizeEnum[SizeEnum["Large"] = 2] = "Large";
1265
+ })(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
1266
+ })(FieldDescriptor || (FieldDescriptor = {}));
1064
1267
  class FieldInputDescriptor extends AFieldDescriptor {
1065
1268
  constructor(editor, property) {
1066
1269
  super(editor, property);
@@ -1252,6 +1455,9 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1252
1455
  get itemsValueProperty() {
1253
1456
  return this._itemsValueProperty;
1254
1457
  }
1458
+ get itemsDisabledProperty() {
1459
+ return this._itemsDisabledProperty;
1460
+ }
1255
1461
  get dataKeyProperty() {
1256
1462
  return this._dataKeyProperty;
1257
1463
  }
@@ -1273,10 +1479,16 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1273
1479
  }
1274
1480
  withItemsValueProperty(itemsValueProperty) {
1275
1481
  this._itemsValueProperty = itemsValueProperty;
1482
+ this._dataKeyProperty = undefined;
1483
+ return this;
1484
+ }
1485
+ withItemsDisabledProperty(itemsDisabledProperty) {
1486
+ this._itemsDisabledProperty = itemsDisabledProperty;
1276
1487
  return this;
1277
1488
  }
1278
1489
  withDataKeyProperty(property) {
1279
1490
  this._dataKeyProperty = property;
1491
+ this._itemsValueProperty = undefined;
1280
1492
  return this;
1281
1493
  }
1282
1494
  withLookup(lookup, serviceType) {
@@ -1311,6 +1523,7 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1311
1523
  field._lookupType = this._lookupType;
1312
1524
  field._itemsLabelProperty = this._itemsLabelProperty;
1313
1525
  field._itemsValueProperty = this._itemsValueProperty;
1526
+ field._itemsDisabledProperty = this._itemsDisabledProperty;
1314
1527
  field._dataKeyProperty = this._dataKeyProperty;
1315
1528
  field._dataProvider = this._dataProvider;
1316
1529
  field._lookupTableDescriptor = this._lookupTableDescriptor;
@@ -1328,27 +1541,43 @@ class FieldLookupDescriptor extends AFieldDescriptor {
1328
1541
  class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
1329
1542
  constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
1330
1543
  super(editor, property, null);
1544
+ this._nameAsValue = false;
1331
1545
  this._enumType = enumType;
1546
+ this._nameAsValue = nameAsValue;
1332
1547
  if (typeof optionsTitlePath === 'undefined') {
1333
1548
  optionsTitlePath = TypeUtil.findEnumName(enumType);
1334
1549
  }
1335
- const optionEnumValues = Array.isArray(options)
1550
+ this._optionEnumValues = Array.isArray(options)
1336
1551
  ? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)
1337
1552
  : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);
1338
- const dataProvider = new LookupDataProvider(null).withLookup(() => of(optionEnumValues));
1553
+ const dataProvider = new LookupDataProvider(null).withLookup(() => of(this._optionEnumValues));
1339
1554
  this.withLookupDataProvider(dataProvider);
1340
1555
  this.withItemsLabelProperty('title');
1341
1556
  this.withItemsValueProperty('value');
1557
+ this.withItemsDisabledProperty('disabled');
1342
1558
  }
1343
1559
  get enumType() {
1344
1560
  return this._enumType;
1345
1561
  }
1562
+ withDisabledOptions(...disabledOptions) {
1563
+ for (const disabledOption of disabledOptions) {
1564
+ const disabledOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, disabledOption) : disabledOption;
1565
+ if (disabledOptionValue) {
1566
+ const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);
1567
+ if (option) {
1568
+ option.disabled = true;
1569
+ }
1570
+ }
1571
+ }
1572
+ return this;
1573
+ }
1346
1574
  copy() {
1347
1575
  const field = new FieldLookupEnumDescriptor(this._editor, this._property, this._enumType, []);
1348
1576
  this.copyFieldsTo(field);
1349
1577
  field._lookupType = this._lookupType;
1350
1578
  field._itemsLabelProperty = this._itemsLabelProperty;
1351
1579
  field._itemsValueProperty = this._itemsValueProperty;
1580
+ field._itemsDisabledProperty = this._itemsDisabledProperty;
1352
1581
  field._dataKeyProperty = this._dataKeyProperty;
1353
1582
  field._dataProvider = this._dataProvider;
1354
1583
  return field;
@@ -1442,14 +1671,18 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1442
1671
  constructor(editor, property, modelType, tableviewDescriptor) {
1443
1672
  super(editor, property);
1444
1673
  this._fieldType = FieldManyEditorDescriptor.TypeEnum.DialogEditor;
1674
+ this._fieldActions = [];
1445
1675
  this._actions = [];
1446
1676
  this._modelType = modelType;
1447
1677
  this._tableviewDescriptor = tableviewDescriptor;
1448
- this._actions.push(FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
1678
+ this._fieldActions.push(FieldManyEditorDescriptor.ActionEnum.View, FieldManyEditorDescriptor.ActionEnum.Add, FieldManyEditorDescriptor.ActionEnum.Edit, FieldManyEditorDescriptor.ActionEnum.Delete);
1449
1679
  }
1450
1680
  get fieldType() {
1451
1681
  return this._fieldType;
1452
1682
  }
1683
+ get fieldActions() {
1684
+ return this._fieldActions;
1685
+ }
1453
1686
  get actions() {
1454
1687
  return this._actions;
1455
1688
  }
@@ -1468,15 +1701,23 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1468
1701
  get editorForUpdate() {
1469
1702
  return this._tableviewDescriptor.editEditor;
1470
1703
  }
1471
- withActions(actions = []) {
1472
- this.actions.push(...actions);
1704
+ withFieldAction(action) {
1705
+ this._fieldActions.push(action);
1706
+ return this;
1707
+ }
1708
+ withFieldActions(actions) {
1709
+ this._fieldActions = actions;
1710
+ return this;
1711
+ }
1712
+ withAction(action) {
1713
+ this._actions.push(action);
1473
1714
  return this;
1474
1715
  }
1475
1716
  copy() {
1476
1717
  const field = new FieldManyEditorDescriptor(this._editor, this._property, this._modelType, this._tableviewDescriptor.copy());
1477
1718
  this.copyFieldsTo(field);
1478
1719
  field._fieldType = this._fieldType;
1479
- field._actions = this._actions.map(a => a);
1720
+ field._fieldActions = this._fieldActions.map(a => a);
1480
1721
  return field;
1481
1722
  }
1482
1723
  }
@@ -1487,9 +1728,10 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
1487
1728
  })(TypeEnum = FieldManyEditorDescriptor.TypeEnum || (FieldManyEditorDescriptor.TypeEnum = {}));
1488
1729
  let ActionEnum;
1489
1730
  (function (ActionEnum) {
1490
- ActionEnum[ActionEnum["Add"] = 0] = "Add";
1491
- ActionEnum[ActionEnum["Edit"] = 1] = "Edit";
1492
- ActionEnum[ActionEnum["Delete"] = 2] = "Delete";
1731
+ ActionEnum[ActionEnum["View"] = 0] = "View";
1732
+ ActionEnum[ActionEnum["Add"] = 1] = "Add";
1733
+ ActionEnum[ActionEnum["Edit"] = 2] = "Edit";
1734
+ ActionEnum[ActionEnum["Delete"] = 3] = "Delete";
1493
1735
  })(ActionEnum = FieldManyEditorDescriptor.ActionEnum || (FieldManyEditorDescriptor.ActionEnum = {}));
1494
1736
  })(FieldManyEditorDescriptor || (FieldManyEditorDescriptor = {}));
1495
1737
  class AFieldGroupDescriptor extends AGenericFieldDescriptor {
@@ -1695,9 +1937,9 @@ class TableDescriptor {
1695
1937
  this.setDataKeyFromColumn();
1696
1938
  return column;
1697
1939
  }
1698
- addColumnBoolean(property) {
1940
+ addColumnBoolean(property, yes, no, asIcon = false) {
1699
1941
  const column = new ColumnDescriptor(this, property);
1700
- column.asBoolean();
1942
+ column.asBoolean(yes, no, asIcon);
1701
1943
  this._columns.push(column);
1702
1944
  this.setDataKeyFromColumn();
1703
1945
  return column;
@@ -1786,6 +2028,8 @@ class ColumnDescriptor {
1786
2028
  this._columnType = ColumnDescriptor.TypeEnum.String;
1787
2029
  this._isSortEnabled = false;
1788
2030
  this._enumNameAsValue = false;
2031
+ // boolean specifics
2032
+ this._booleanAsIcon = false;
1789
2033
  this._table = table;
1790
2034
  this._property = property;
1791
2035
  }
@@ -1825,6 +2069,15 @@ class ColumnDescriptor {
1825
2069
  get enumNameAsValue() {
1826
2070
  return this._enumNameAsValue;
1827
2071
  }
2072
+ get booleanAsIcon() {
2073
+ return this._booleanAsIcon;
2074
+ }
2075
+ get booleanYes() {
2076
+ return this._booleanYes;
2077
+ }
2078
+ get booleanNo() {
2079
+ return this._booleanNo;
2080
+ }
1828
2081
  asType(type = ColumnDescriptor.TypeEnum.String) {
1829
2082
  this._columnType = type;
1830
2083
  return this;
@@ -1839,8 +2092,11 @@ class ColumnDescriptor {
1839
2092
  this._displayFormat = displayFormat;
1840
2093
  return this;
1841
2094
  }
1842
- asBoolean() {
2095
+ asBoolean(yes, no, asIcon = false) {
1843
2096
  this._columnType = ColumnDescriptor.TypeEnum.Boolean;
2097
+ this._booleanAsIcon = asIcon;
2098
+ this._booleanYes = yes;
2099
+ this._booleanNo = no;
1844
2100
  return this;
1845
2101
  }
1846
2102
  asEnum(enumType, nameAsValue = false, titlePath) {
@@ -1910,6 +2166,9 @@ class ColumnDescriptor {
1910
2166
  descriptor._isSortEnabled = this._isSortEnabled;
1911
2167
  descriptor._columnType = this._columnType;
1912
2168
  descriptor._filterDescriptor = this._filterDescriptor?.copy();
2169
+ descriptor._booleanAsIcon = this._booleanAsIcon;
2170
+ descriptor._booleanYes = this._booleanYes;
2171
+ descriptor._booleanNo = this._booleanNo;
1913
2172
  return descriptor;
1914
2173
  }
1915
2174
  }
@@ -2131,14 +2390,15 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
2131
2390
  })(LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum || (FilterLookupDescriptor.LookupTypeEnum = {}));
2132
2391
  })(FilterLookupDescriptor || (FilterLookupDescriptor = {}));
2133
2392
 
2393
+ var TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;
2134
2394
  class TableviewDescriptor {
2135
2395
  constructor(modelType, idProperty, titleProperty) {
2136
2396
  this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
2137
2397
  this._table = new TableDescriptor(modelType, idProperty, titleProperty);
2138
- this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty);
2398
+ this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.View);
2139
2399
  this._viewEditor.withDisabled();
2140
- this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty);
2141
- this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty);
2400
+ this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add);
2401
+ this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit);
2142
2402
  this._tableTitle = `${this._model.typeName}.name`;
2143
2403
  }
2144
2404
  get table() {
@@ -2197,8 +2457,8 @@ class TableviewDescriptor {
2197
2457
  addColumnDate(property, displayFormat) {
2198
2458
  return this._table.addColumnDate(property, displayFormat);
2199
2459
  }
2200
- addColumnBoolean(property) {
2201
- return this._table.addColumnBoolean(property);
2460
+ addColumnBoolean(property, yes, no, asIcon = false) {
2461
+ return this._table.addColumnBoolean(property, yes, no, asIcon);
2202
2462
  }
2203
2463
  addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
2204
2464
  return this._table.addColumnEnum(property, enumType, nameAsValue, titlePath);
@@ -2592,6 +2852,34 @@ class I18nUtil {
2592
2852
  }
2593
2853
  return i18nParameters;
2594
2854
  }
2855
+ static instantErrorI18nTranslation(translate, error, i18nParameters = {}) {
2856
+ i18nParameters.errorStatus = '';
2857
+ i18nParameters.errorMessage = '';
2858
+ if (error.messageCode) {
2859
+ const params = I18nUtil.getErrorI18nParams(error);
2860
+ const keys = [`errors.${error.messageCode}`, `messages.${error.messageCode}`];
2861
+ const i18ns = translate.instant(keys, params);
2862
+ const i18n = I18nUtil.selectKeyByPriority(keys, i18ns);
2863
+ if (i18n) {
2864
+ return i18n;
2865
+ }
2866
+ }
2867
+ return translate.instant(error.message);
2868
+ }
2869
+ static getErrorI18nParams(error, i18nParameters = {}) {
2870
+ i18nParameters.errorStatus = '';
2871
+ i18nParameters.errorMessage = '';
2872
+ if (error.status) {
2873
+ i18nParameters.errorStatus = error.status;
2874
+ }
2875
+ if (error.message) {
2876
+ i18nParameters.errorMessage = error.message;
2877
+ }
2878
+ if (error.statusDescription) {
2879
+ i18nParameters.errorStatusDescription = error.statusDescription;
2880
+ }
2881
+ return i18nParameters;
2882
+ }
2595
2883
  static instantModelName(translate, model, singular) {
2596
2884
  const keys = I18nUtil.getModelNameKeys(model, singular);
2597
2885
  const i18n = translate.instant(keys);
@@ -2698,15 +2986,17 @@ class ModelUtil {
2698
2986
  }
2699
2987
  return titleAttribute?.name ?? null;
2700
2988
  }
2701
- static trySetLookupItemsProperties(lookup) {
2989
+ static trySetLookupItemsProperties(lookup, idAsDataKey = true) {
2702
2990
  if (lookup.modelType) {
2703
2991
  if (!lookup.itemsValueProperty || !lookup.dataKeyProperty) {
2704
2992
  const idProperty = ModelUtil.findIdAttribute(lookup.modelType) ?? undefined;
2705
- if (idProperty && !lookup.itemsValueProperty) {
2706
- lookup.withItemsValueProperty(idProperty);
2707
- }
2708
- if (idProperty && !lookup.dataKeyProperty) {
2709
- lookup.withDataKeyProperty(idProperty);
2993
+ if (idProperty && !lookup.itemsValueProperty && !lookup.dataKeyProperty) {
2994
+ if (idAsDataKey) {
2995
+ lookup.withDataKeyProperty(idProperty);
2996
+ }
2997
+ else {
2998
+ lookup.withItemsValueProperty(idProperty);
2999
+ }
2710
3000
  }
2711
3001
  }
2712
3002
  if (!lookup.itemsLabelProperty) {
@@ -2720,7 +3010,15 @@ class ModelUtil {
2720
3010
  }
2721
3011
 
2722
3012
  class ToastUtil {
2723
- static tableNotificationError(translationService, table, error, tableview) {
3013
+ static notification(viewContainer, title, message, severity = 'success') {
3014
+ const messageService = viewContainer?.getMessageService();
3015
+ if (!messageService) {
3016
+ console.warn(`No message service was provided through view container, message will not be displayed.`);
3017
+ return;
3018
+ }
3019
+ messageService.add({ severity: severity, summary: title, detail: message, life: severity === 'error' ? 10000 : 5000 });
3020
+ }
3021
+ static tableNotificationError(translationService, table, error, viewContainer) {
2724
3022
  const params = {};
2725
3023
  if (error?.message) {
2726
3024
  params.errorMessage = `: ${error.message}`;
@@ -2731,25 +3029,21 @@ class ToastUtil {
2731
3029
  console.log(params);
2732
3030
  const tableErrorTitle = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.title', undefined, undefined, 'general.error', params) ?? undefined;
2733
3031
  const tableErrorMessage = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.message', undefined, undefined, 'general.errorMessage', params) ?? undefined;
2734
- tableview?.messageService?.add({ severity: 'error', summary: tableErrorTitle, detail: tableErrorMessage });
3032
+ ToastUtil.notification(viewContainer, tableErrorTitle, tableErrorMessage, 'error');
2735
3033
  }
2736
- static actionNotificationSuccess(translationService, action, functionName, customTitleKey, customMessageKey, tableview, item) {
3034
+ static actionNotificationSuccess(translationService, action, functionName, customTitleKey, customMessageKey, viewContainer, item) {
2737
3035
  const actionSuccessTitle = I18nUtil.instantActionTranslation(translationService, action, 'success.title', customTitleKey, item, 'general.success', functionName) ?? undefined;
2738
3036
  const actionSuccessMessage = I18nUtil.instantActionTranslation(translationService, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName) ?? undefined;
2739
- tableview?.messageService?.add({ severity: 'success', summary: actionSuccessTitle, detail: actionSuccessMessage });
3037
+ ToastUtil.notification(viewContainer, actionSuccessTitle, actionSuccessMessage);
2740
3038
  }
2741
- static actionNotificationError(translationService, action, error, functionName, tableview, item) {
2742
- const params = {};
2743
- if (error?.message) {
2744
- params.errorMessage = `: ${error.message}`;
2745
- }
2746
- else {
2747
- params.errorMessage = '.';
2748
- }
3039
+ static actionNotificationError(translationService, action, error, functionName, viewContainer, item) {
3040
+ const params = {
3041
+ errorMessage: I18nUtil.instantErrorI18nTranslation(translationService, error)
3042
+ };
2749
3043
  const actionErrorTitle = I18nUtil.instantActionTranslation(translationService, action, 'error.title', action.runNotificationErrorTitle, item, 'general.error', functionName, params) ??
2750
3044
  undefined;
2751
3045
  const actionErrorMessage = I18nUtil.instantActionTranslation(translationService, action, 'error.message', action.runNotificationErrorMessage, item, 'general.errorMessage', functionName, params) ?? undefined;
2752
- tableview?.messageService?.add({ severity: 'error', summary: actionErrorTitle, detail: actionErrorMessage });
3046
+ ToastUtil.notification(viewContainer, actionErrorTitle, actionErrorMessage, 'error');
2753
3047
  }
2754
3048
  static getFormEditorWarningMessage(translationService, title, message) {
2755
3049
  const actionErrorTitle = translationService.instant(title) ?? undefined;
@@ -3005,7 +3299,12 @@ class ObjectSerializer {
3005
3299
  return transformedData;
3006
3300
  }
3007
3301
  else if (type === 'Date') {
3008
- return data.toISOString();
3302
+ if (data instanceof Date) {
3303
+ return data.toISOString();
3304
+ }
3305
+ else {
3306
+ return new Date(data).toISOString();
3307
+ }
3009
3308
  }
3010
3309
  else {
3011
3310
  if (this._enumMap[type]) {
@@ -3203,12 +3502,12 @@ MediusRestUtil.matchModeMapping = [
3203
3502
  ];
3204
3503
 
3205
3504
  class ActionExecContext {
3206
- constructor(dataProvider, serviceInstance, data, sourceComponent = null, tableview = null) {
3505
+ constructor(dataProvider, serviceInstance, data, sourceComponent = null, viewContainer = null) {
3207
3506
  this.dataProvider = dataProvider;
3208
3507
  this.serviceInstance = serviceInstance;
3209
3508
  this.data = data;
3210
3509
  this.sourceComponent = sourceComponent;
3211
- this.tableview = tableview;
3510
+ this.viewContainer = viewContainer;
3212
3511
  }
3213
3512
  }
3214
3513
  class ActionError {
@@ -3246,37 +3545,106 @@ class ActionTriggerResult {
3246
3545
  this.activationResult = activationResult;
3247
3546
  this.routerNavigation = routerNavigation;
3248
3547
  }
3249
- get runContext() {
3250
- return this.activationResult ? this.activationResult.runResult : null;
3548
+ get runContext() {
3549
+ return this.activationResult ? this.activationResult.runResult : null;
3550
+ }
3551
+ get result() {
3552
+ return this.activationResult ? this.activationResult.result : null;
3553
+ }
3554
+ get error() {
3555
+ return this.activationResult ? this.activationResult.error : null;
3556
+ }
3557
+ get dialogRef() {
3558
+ return this.activationResult ? this.activationResult.dialogRef : null;
3559
+ }
3560
+ }
3561
+
3562
+ const MNG_BROWSER_STORAGE_IT = new InjectionToken('Browser storage', {
3563
+ providedIn: 'root',
3564
+ factory: () => localStorage
3565
+ });
3566
+
3567
+ const ACTION_EDITOR_DIALOG_COMPONENT_SETTING = new InjectionToken('ACTION_EDITOR_DIALOG_COMPONENT_SETTING');
3568
+
3569
+ const MNG_MODULE_CONFIG_IT = new InjectionToken('MngModuleConfig');
3570
+
3571
+ class MngNavigationService {
3572
+ constructor(router, location) {
3573
+ this.router = router;
3574
+ this.location = location;
3575
+ this.history = [];
3576
+ this.router.events.subscribe(event => {
3577
+ if (event instanceof NavigationEnd) {
3578
+ this.history.push(event.urlAfterRedirects);
3579
+ }
3580
+ });
3581
+ }
3582
+ getCurrentLocation() {
3583
+ if (this.history.length > 0) {
3584
+ return this.history[this.history.length - 1];
3585
+ }
3586
+ else {
3587
+ return null;
3588
+ }
3251
3589
  }
3252
- get result() {
3253
- return this.activationResult ? this.activationResult.result : null;
3590
+ getPreviousLocation() {
3591
+ if (this.history.length > 1) {
3592
+ return this.history[this.history.length - 2];
3593
+ }
3594
+ else {
3595
+ return null;
3596
+ }
3254
3597
  }
3255
- get error() {
3256
- return this.activationResult ? this.activationResult.error : null;
3598
+ back() {
3599
+ this.history.pop();
3600
+ if (this.history.length > 0) {
3601
+ this.location.back();
3602
+ }
3603
+ else {
3604
+ this.router.navigateByUrl('/');
3605
+ }
3257
3606
  }
3258
- get dialogRef() {
3259
- return this.activationResult ? this.activationResult.dialogRef : null;
3607
+ }
3608
+ 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 });
3609
+ MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService });
3610
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService, decorators: [{
3611
+ type: Injectable
3612
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i4.Location }]; } });
3613
+
3614
+ class MngErrorMapperService {
3615
+ }
3616
+ class DefaultMngErrorMapperService extends MngErrorMapperService {
3617
+ toMngError(error, mngError) {
3618
+ if (!mngError) {
3619
+ mngError = {
3620
+ name: error?.name ?? 'UnknownError',
3621
+ message: error.message ?? 'Unknown error'
3622
+ };
3623
+ }
3624
+ return mngError;
3260
3625
  }
3261
3626
  }
3262
3627
 
3263
- class MngActionService {
3264
- constructor(injector, router, dialogService, confirmationService, translate) {
3628
+ class MngActionExecutorService {
3629
+ constructor(injector, router, dialogService, confirmationService, translate, navigationService, errorMapper, defaultEditorDialogComponent) {
3265
3630
  this.injector = injector;
3266
3631
  this.router = router;
3267
3632
  this.dialogService = dialogService;
3268
3633
  this.confirmationService = confirmationService;
3269
3634
  this.translate = translate;
3635
+ this.navigationService = navigationService;
3636
+ this.errorMapper = errorMapper;
3637
+ this.defaultEditorDialogComponent = defaultEditorDialogComponent;
3270
3638
  }
3271
- getActionExecContext(action, itemId, item, dataProvider, tableview, sourceComponent, actionData) {
3272
- return new ActionExecContext(dataProvider, this.getDataProviderService(dataProvider) ?? undefined, {
3639
+ prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData) {
3640
+ return new ActionExecContext(dataProvider ?? action.dataProvider ?? viewContainer?.getDataProvider(), this.getDataProviderService(dataProvider) ?? undefined, {
3273
3641
  item,
3274
3642
  itemId,
3275
3643
  actionData
3276
- }, sourceComponent, tableview);
3644
+ }, sourceComponent, viewContainer);
3277
3645
  }
3278
- runAction(action, itemId, item, dataProvider, sourceComponent, tableview, actionData) {
3279
- const context = this.getActionExecContext(action, itemId, item, dataProvider, tableview, sourceComponent, actionData);
3646
+ runAction(action, itemId, item, dataProvider, sourceComponent, viewContainer, actionData) {
3647
+ const context = this.prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData);
3280
3648
  if (action.hasRunConfirmation) {
3281
3649
  if (typeof sourceComponent?.getConfirmationService !== 'function' || typeof sourceComponent?.getConfirmationServiceInstanceKey !== 'function') {
3282
3650
  throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);
@@ -3314,17 +3682,19 @@ class MngActionService {
3314
3682
  .runFunction(context)
3315
3683
  .pipe(first(), map(res => new ActionRunResult(context, res)), map(value => {
3316
3684
  if (action.hasRunNotificationSuccess) {
3317
- ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, tableview, item);
3685
+ ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, item);
3318
3686
  }
3319
3687
  return value;
3320
3688
  }), catchError(err => {
3689
+ const actionError = this.toMngActionError(err);
3321
3690
  if (action.hasRunNotificationError) {
3322
- ToastUtil.actionNotificationError(this.translate, action, err, 'run', tableview, item);
3691
+ ToastUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);
3323
3692
  }
3324
- throw err;
3693
+ throw actionError;
3325
3694
  }))
3326
3695
  .subscribe(res => {
3327
3696
  observer.next(res);
3697
+ observer.complete();
3328
3698
  });
3329
3699
  };
3330
3700
  confirmParams.reject = () => {
@@ -3337,14 +3707,15 @@ class MngActionService {
3337
3707
  else {
3338
3708
  return action.runFunction(context).pipe(map(res => new ActionRunResult(context, res)), map(value => {
3339
3709
  if (action.hasRunNotificationSuccess) {
3340
- ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, tableview, item);
3710
+ ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, item);
3341
3711
  }
3342
3712
  return value;
3343
3713
  }), catchError(err => {
3714
+ const actionError = this.toMngActionError(err);
3344
3715
  if (action.hasRunNotificationError) {
3345
- ToastUtil.actionNotificationError(this.translate, action, err, 'run', tableview, item);
3716
+ ToastUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);
3346
3717
  }
3347
- throw err;
3718
+ throw actionError;
3348
3719
  }));
3349
3720
  }
3350
3721
  }
@@ -3356,57 +3727,69 @@ class MngActionService {
3356
3727
  * @param formItem Item instance (from form).
3357
3728
  * @param dataProvider Data provider
3358
3729
  * @param sourceComponent Source component from where the fetch function was called.
3359
- * @param tableview Tableview component.
3730
+ * @param viewContainer View container/service.
3360
3731
  * @param actionData Additional action data.
3361
3732
  */
3362
- runEditorSave(action, itemId, formItem, dataProvider, sourceComponent, tableview, actionData) {
3363
- const context = this.prepareRunContextForEditor(formItem, itemId, dataProvider, sourceComponent, tableview, actionData);
3733
+ runEditorSave(action, itemId, formItem, dataProvider, sourceComponent, viewContainer, actionData) {
3734
+ const context = this.prepareExecContextForEditor(action, formItem, itemId, dataProvider, sourceComponent, viewContainer, actionData);
3364
3735
  if (typeof action.submitFunction !== 'function') {
3365
3736
  throw new Error(`Submit function for action ${action.actionName} cannot be invoked.`);
3366
3737
  }
3367
3738
  return action.submitFunction(context).pipe(map(res => new ActionRunResult(context, res)), map(value => {
3368
3739
  if (action.hasRunNotificationSuccess) {
3369
- ToastUtil.actionNotificationSuccess(this.translate, action, 'submit', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, tableview, formItem);
3740
+ ToastUtil.actionNotificationSuccess(this.translate, action, 'submit', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, formItem);
3370
3741
  }
3371
3742
  return value;
3372
3743
  }), catchError(err => {
3744
+ const actionError = this.toMngActionError(err);
3373
3745
  if (action.hasRunNotificationError) {
3374
- ToastUtil.actionNotificationError(this.translate, action, err, 'submit', tableview, formItem);
3746
+ ToastUtil.actionNotificationError(this.translate, action, actionError, 'submit', viewContainer, formItem);
3375
3747
  }
3376
- throw err;
3748
+ throw actionError;
3377
3749
  }));
3378
3750
  }
3379
3751
  /**
3380
3752
  * Runs editor action fetch function.
3381
3753
  *
3382
3754
  * @param action Action descriptor.
3755
+ * @param item Item instance (if exists).
3383
3756
  * @param itemId Item id.
3384
3757
  * @param dataProvider Data provider
3385
3758
  * @param sourceComponent Source component from where the fetch function was called.
3386
- * @param tableview Tableview component.
3759
+ * @param viewContainer View container/service. Tableview component.
3387
3760
  * @param actionData Additional action data.
3388
3761
  */
3389
- runEditorFetch(action, itemId, dataProvider, sourceComponent, tableview, actionData) {
3390
- const context = this.prepareRunContextForEditor(undefined, itemId, dataProvider, sourceComponent, tableview, actionData);
3762
+ runEditorFetch(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData) {
3763
+ const context = this.prepareExecContextForEditor(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData);
3391
3764
  return action.fetchFunction(context).pipe(map(res => new ActionRunResult(context, res)));
3392
3765
  // TODO: error handling
3393
3766
  }
3394
3767
  /**
3395
- * Prepares action run context for action of type editor.
3768
+ * Prepares action exec context for action of type editor.
3396
3769
  *
3397
3770
  * @param item Item instance (if exists).
3398
3771
  * @param itemId Item id (if exists).
3399
3772
  * @param dataProvider Data provider.
3400
3773
  * @param sourceComponent Source component from where the context preparation was called.
3401
- * @param tableview Tableview component.
3774
+ * @param viewContainer View container/service.
3402
3775
  * @param actionData Additional action data.
3403
3776
  */
3404
- prepareRunContextForEditor(item, itemId, dataProvider, sourceComponent, tableview, actionData) {
3405
- const context = new ActionExecContext(dataProvider, this.getDataProviderService(dataProvider) ?? undefined, {
3777
+ prepareExecContextForEditor(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData) {
3778
+ let ctxDataProvider = dataProvider;
3779
+ if (!ctxDataProvider && action.dataProvider) {
3780
+ ctxDataProvider = action.dataProvider;
3781
+ }
3782
+ if (!ctxDataProvider) {
3783
+ const viewContainerDataProvider = viewContainer?.getDataProvider();
3784
+ if (viewContainerDataProvider) {
3785
+ ctxDataProvider = action.dataProvider;
3786
+ }
3787
+ }
3788
+ const context = new ActionExecContext(ctxDataProvider, this.getDataProviderService(ctxDataProvider) ?? undefined, {
3406
3789
  item,
3407
3790
  itemId,
3408
3791
  actionData
3409
- }, sourceComponent, tableview);
3792
+ }, sourceComponent, viewContainer);
3410
3793
  return context;
3411
3794
  }
3412
3795
  /**
@@ -3429,11 +3812,15 @@ class MngActionService {
3429
3812
  * @param item Item instance (if exists).
3430
3813
  * @param itemId Item id (if exists).
3431
3814
  * @param actionData Optional additional action data.
3432
- * @param tableview Tableview component.
3815
+ * @param viewContainer View container component/service.
3433
3816
  * @param sourceComponent Source activation component.
3434
3817
  */
3435
- activateAction(action, itemId, item, actionData, tableview, sourceComponent) {
3818
+ activateAction(action, itemId, item, actionData, viewContainer, sourceComponent) {
3436
3819
  if (action.type === ActionTypeEnum.Editor) {
3820
+ let dialogComponent = this.defaultEditorDialogComponent;
3821
+ if (action instanceof ActionEditorDescriptor && action.editorComponent) {
3822
+ dialogComponent = action.editorComponent;
3823
+ }
3437
3824
  const dialogConfig = {
3438
3825
  data: {
3439
3826
  action
@@ -3449,18 +3836,22 @@ class MngActionService {
3449
3836
  if (actionData) {
3450
3837
  dialogConfig.data.actionData = actionData;
3451
3838
  }
3452
- if (tableview) {
3453
- dialogConfig.data.tableview = tableview;
3839
+ if (viewContainer) {
3840
+ dialogConfig.data.viewContainer = viewContainer;
3454
3841
  }
3455
3842
  if (sourceComponent) {
3456
3843
  dialogConfig.data.sourceComponent = sourceComponent;
3457
3844
  }
3458
- const dialogRef = this.dialogService.open(MngActionDialogComponent, dialogConfig);
3845
+ const dialogRef = this.dialogService.open(dialogComponent, dialogConfig);
3459
3846
  return of(new ActionActivationResult(undefined, dialogRef));
3460
3847
  }
3848
+ else if (action.type === ActionTypeEnum.Event) {
3849
+ // just emit event
3850
+ return of(new ActionActivationResult(undefined));
3851
+ }
3461
3852
  else {
3462
3853
  // directly execute action
3463
- return this.runAction(action, itemId, item, tableview?.dataProvider ?? undefined, sourceComponent, tableview, actionData).pipe(map(res => new ActionActivationResult(res)));
3854
+ return this.runAction(action, itemId, item, undefined, sourceComponent, viewContainer, actionData).pipe(map(res => new ActionActivationResult(res)));
3464
3855
  }
3465
3856
  }
3466
3857
  /**
@@ -3484,7 +3875,7 @@ class MngActionService {
3484
3875
  * @param actionData Optional action data.
3485
3876
  * @param route Optional activated route.
3486
3877
  */
3487
- triggerAction(action, itemId, item, actionData, route, tableview, sourceComponent) {
3878
+ triggerAction(action, itemId, item, actionData, route, viewContainer, sourceComponent) {
3488
3879
  if (action.activationTrigger === ActionActivationTriggerEnum.OnRoute) {
3489
3880
  const baseUrl = this.router.url.split('?')[0];
3490
3881
  const parsedUrl = this.router.parseUrl(this.router.url);
@@ -3511,15 +3902,57 @@ class MngActionService {
3511
3902
  return of(new ActionTriggerResult(undefined, from(this.router.navigate([baseUrl, ...actionUrlSegments], { relativeTo: route, queryParams: parsedUrl.queryParams }))));
3512
3903
  }
3513
3904
  else {
3514
- return this.activateAction(action, itemId, item, actionData, tableview, sourceComponent).pipe(map(res => new ActionTriggerResult(res)));
3905
+ return this.activateAction(action, itemId, item, actionData, viewContainer, sourceComponent).pipe(map(res => new ActionTriggerResult(res)));
3906
+ }
3907
+ }
3908
+ deactivateAction(action) {
3909
+ if (this.navigationService.getPreviousLocation()) {
3910
+ // there are internal history records, so back can be normally called
3911
+ this.navigationService.back();
3912
+ }
3913
+ else {
3914
+ // there is no internal history records, figure out the base url by eliminating action specific url
3915
+ let url = this.navigationService.getCurrentLocation();
3916
+ if (!url) {
3917
+ this.navigationService.back();
3918
+ }
3919
+ else {
3920
+ if (url.startsWith('/')) {
3921
+ url = url.substring(1);
3922
+ }
3923
+ const urlPathSegments = url.split('?')[0].split('#')[0].split('/');
3924
+ let actionUrl = action?.routeUrl ?? '';
3925
+ if (actionUrl.startsWith('/')) {
3926
+ actionUrl = actionUrl.substring(1);
3927
+ }
3928
+ const actionUrlSegments = actionUrl.split('/');
3929
+ const redirectUrl = urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');
3930
+ this.router.navigateByUrl(`/${redirectUrl}`, { replaceUrl: true });
3931
+ }
3515
3932
  }
3516
3933
  }
3934
+ toMngActionError(error) {
3935
+ const actionError = {
3936
+ name: error?.name ?? 'UnknownError',
3937
+ message: error?.message ?? 'Unknown error',
3938
+ cause: error
3939
+ };
3940
+ if (error instanceof HttpErrorResponse) {
3941
+ actionError.status = error.status;
3942
+ actionError.statusDescription = error.statusText;
3943
+ actionError.url = error.url ?? undefined;
3944
+ }
3945
+ return this.errorMapper.toMngError(error, actionError);
3946
+ }
3517
3947
  }
3518
- 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 });
3519
- MngActionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionService });
3520
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionService, decorators: [{
3948
+ 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 });
3949
+ MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService });
3950
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService, decorators: [{
3521
3951
  type: Injectable
3522
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i2.DialogService }, { type: i2$1.ConfirmationService }, { type: i3.TranslateService }]; } });
3952
+ }], ctorParameters: function () { 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: [{
3953
+ type: Inject,
3954
+ args: [ACTION_EDITOR_DIALOG_COMPONENT_SETTING]
3955
+ }] }]; } });
3523
3956
 
3524
3957
  class MngConfigurationService {
3525
3958
  constructor(http) {
@@ -3597,13 +4030,6 @@ class MngConfigurationService {
3597
4030
  }
3598
4031
  MngConfigurationService._instance = null;
3599
4032
 
3600
- const MNG_BROWSER_STORAGE_IT = new InjectionToken('Browser storage', {
3601
- providedIn: 'root',
3602
- factory: () => localStorage
3603
- });
3604
-
3605
- const MNG_MODULE_CONFIG_IT = new InjectionToken('MngModuleConfig');
3606
-
3607
4033
  class MngCommonsService {
3608
4034
  constructor(router, primengConfig, translate, titleService, configurationService, moduleConfig, localStorage) {
3609
4035
  this.router = router;
@@ -3926,11 +4352,11 @@ class MngCommonsService {
3926
4352
  return titlePieces.join(' - ');
3927
4353
  }
3928
4354
  }
3929
- 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 });
4355
+ 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 });
3930
4356
  MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService });
3931
4357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, decorators: [{
3932
4358
  type: Injectable
3933
- }], ctorParameters: function () { return [{ type: i1.Router }, { type: i2$1.PrimeNGConfig }, { type: i3.TranslateService }, { type: i4.Title }, { type: MngConfigurationService }, { type: undefined, decorators: [{
4359
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i3$1.TranslateService }, { type: i4$1.Title }, { type: MngConfigurationService }, { type: undefined, decorators: [{
3934
4360
  type: Inject,
3935
4361
  args: [MNG_MODULE_CONFIG_IT]
3936
4362
  }] }, { type: Storage, decorators: [{
@@ -3938,81 +4364,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
3938
4364
  args: [MNG_BROWSER_STORAGE_IT]
3939
4365
  }] }]; } });
3940
4366
 
3941
- class MngNavigationService {
3942
- constructor(router, location) {
3943
- this.router = router;
3944
- this.location = location;
3945
- this.history = [];
3946
- this.router.events.subscribe(event => {
3947
- if (event instanceof NavigationEnd) {
3948
- this.history.push(event.urlAfterRedirects);
3949
- }
3950
- });
3951
- }
3952
- getCurrentLocation() {
3953
- if (this.history.length > 0) {
3954
- return this.history[this.history.length - 1];
3955
- }
3956
- else {
3957
- return null;
3958
- }
3959
- }
3960
- getPreviousLocation() {
3961
- if (this.history.length > 1) {
3962
- return this.history[this.history.length - 2];
3963
- }
3964
- else {
3965
- return null;
3966
- }
3967
- }
3968
- back() {
3969
- this.history.pop();
3970
- if (this.history.length > 0) {
3971
- this.location.back();
3972
- }
3973
- else {
3974
- this.router.navigateByUrl('/');
3975
- }
3976
- }
3977
- }
3978
- 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 });
3979
- MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService });
3980
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngNavigationService, decorators: [{
3981
- type: Injectable
3982
- }], ctorParameters: function () { return [{ type: i1.Router }, { type: i4$1.Location }]; } });
3983
-
3984
- class TableviewComponentService {
3985
- constructor() {
4367
+ /**
4368
+ * Should be used with providers defined within component.
4369
+ */
4370
+ class MngViewContainerComponentService {
4371
+ constructor(messageService) {
4372
+ this.messageService = messageService;
3986
4373
  this.actions = [];
3987
4374
  this._reloadTableSubject = new Subject();
3988
4375
  }
4376
+ set dataProvider(dataProvider) {
4377
+ this._dataProvider = dataProvider;
4378
+ }
3989
4379
  get reloadTable$() {
3990
4380
  return this._reloadTableSubject.asObservable();
3991
4381
  }
3992
4382
  triggerTableReload(event) {
3993
4383
  this._reloadTableSubject.next(event);
3994
4384
  }
4385
+ getMessageService() {
4386
+ return this.messageService;
4387
+ }
4388
+ getDataProvider() {
4389
+ return this._dataProvider;
4390
+ }
3995
4391
  }
3996
- TableviewComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TableviewComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3997
- TableviewComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TableviewComponentService });
3998
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TableviewComponentService, decorators: [{
4392
+ MngViewContainerComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService, deps: [{ token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
4393
+ MngViewContainerComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService });
4394
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService, decorators: [{
3999
4395
  type: Injectable
4000
- }] });
4396
+ }], ctorParameters: function () { return [{ type: i2.MessageService }]; } });
4001
4397
 
4002
4398
  class MngActionComponent {
4003
- constructor(route, translate, actionService, confirmationService, tableviewService) {
4399
+ constructor(route, translate, actionExecutor, confirmationService, viewContainerService) {
4004
4400
  this.route = route;
4005
4401
  this.translate = translate;
4006
- this.actionService = actionService;
4402
+ this.actionExecutor = actionExecutor;
4007
4403
  this.confirmationService = confirmationService;
4008
- this.tableviewService = tableviewService;
4404
+ this.viewContainerService = viewContainerService;
4405
+ this.inputDisabled = of(false);
4406
+ this.inputLoading = of(false);
4407
+ this.triggerEventEmitter = new EventEmitter();
4009
4408
  this.loadingSubject = new ReplaySubject(1);
4010
4409
  this.$loading = this.loadingSubject.asObservable();
4011
4410
  this.cmpId = Math.random().toString(36).substring(2);
4012
4411
  this.loadingSubject.next(false);
4013
4412
  }
4014
4413
  ngOnInit() {
4015
- const context = this.actionService.getActionExecContext(this.action, this.itemId, this.item, this.tableviewService?.dataProvider ?? undefined, this.tableviewService, this, this.actionData);
4414
+ this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;
4415
+ const context = this.actionExecutor.prepareActionExecContext(this.action, this.itemId, this.item, this.dataProvider, this.viewContainer ?? undefined, this, this.actionData);
4016
4416
  this.$isVisible = typeof this.action.isVisibleFunction === 'function' ? this.action.isVisibleFunction(context) : of(true);
4017
4417
  this.$isEnabled = typeof this.action.isEnabledFunction === 'function' ? this.action.isEnabledFunction(context) : of(true);
4018
4418
  this.$label = I18nUtil.streamActionTranslation(this.translate, this.action, 'title', this.action?.title ?? undefined, this.item);
@@ -4023,11 +4423,19 @@ class MngActionComponent {
4023
4423
  this.loadingSubject.next(true);
4024
4424
  const actionData = this.actionData ? this.actionData : {};
4025
4425
  actionData['cmpId'] = this.cmpId;
4026
- this.actionService
4027
- .triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.tableviewService, this)
4028
- .pipe(first(), finalize(() => this.loadingSubject.next(false)))
4029
- // eslint-disable-next-line @typescript-eslint/no-empty-function
4030
- .subscribe(() => { });
4426
+ this.actionExecutor
4427
+ .triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.viewContainer, this)
4428
+ .pipe(first())
4429
+ .subscribe({
4430
+ next: atr => {
4431
+ this.triggerEventEmitter.next(atr);
4432
+ this.loadingSubject.next(false);
4433
+ },
4434
+ error: err => {
4435
+ console.error(`Error occurred while executing action ${this.action.actionName}.`, err);
4436
+ this.loadingSubject.next(false);
4437
+ }
4438
+ });
4031
4439
  }
4032
4440
  getConfirmationService() {
4033
4441
  return this.confirmationService;
@@ -4036,12 +4444,14 @@ class MngActionComponent {
4036
4444
  return `${action.actionName}_${this.cmpId}`;
4037
4445
  }
4038
4446
  }
4039
- 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 });
4040
- 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 });
4447
+ 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 });
4448
+ 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 });
4041
4449
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, decorators: [{
4042
4450
  type: Component,
4043
- 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" }]
4044
- }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i3.TranslateService }, { type: MngActionService }, { type: i2$1.ConfirmationService }, { type: TableviewComponentService }]; }, propDecorators: { action: [{
4451
+ 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" }]
4452
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i3$1.TranslateService }, { type: MngActionExecutorService }, { type: i2.ConfirmationService }, { type: MngViewContainerComponentService, decorators: [{
4453
+ type: Optional
4454
+ }] }]; }, propDecorators: { action: [{
4045
4455
  type: Input
4046
4456
  }], item: [{
4047
4457
  type: Input
@@ -4049,22 +4459,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4049
4459
  type: Input
4050
4460
  }], actionData: [{
4051
4461
  type: Input
4462
+ }], dataProvider: [{
4463
+ type: Input
4464
+ }], inputDisabled: [{
4465
+ type: Input,
4466
+ args: ['disabled']
4467
+ }], inputLoading: [{
4468
+ type: Input,
4469
+ args: ['loading']
4470
+ }], viewContainerInit: [{
4471
+ type: Input,
4472
+ args: ['viewContainer']
4473
+ }], triggerEventEmitter: [{
4474
+ type: Output,
4475
+ args: ['trigger']
4052
4476
  }] } });
4053
4477
 
4054
4478
  class MngActionRouteComponent {
4055
- constructor(router, route, confirmationService, navigationService, actionService, tableviewService) {
4479
+ constructor(router, route, confirmationService, navigationService, actionExecutor, viewContainerService) {
4056
4480
  this.router = router;
4057
4481
  this.route = route;
4058
4482
  this.confirmationService = confirmationService;
4059
4483
  this.navigationService = navigationService;
4060
- this.actionService = actionService;
4061
- this.tableviewService = tableviewService;
4484
+ this.actionExecutor = actionExecutor;
4485
+ this.viewContainerService = viewContainerService;
4062
4486
  this.cmpId = Math.random().toString(36).substring(2);
4063
4487
  this.actions = [];
4064
4488
  this.subscriptions = [];
4065
4489
  }
4066
4490
  ngOnInit() {
4067
- this.actions = this.tableviewService?.actions.filter(a => a.activationTrigger === ActionActivationTriggerEnum.OnRoute) ?? [];
4491
+ this.actions = this.viewContainerService?.actions.filter(a => a.activationTrigger === ActionActivationTriggerEnum.OnRoute) ?? [];
4068
4492
  const subscription = this.route.params.subscribe(p => {
4069
4493
  const action = this.findActiveAction(p);
4070
4494
  if (action) {
@@ -4099,8 +4523,8 @@ class MngActionRouteComponent {
4099
4523
  for (const key in qp) {
4100
4524
  actionData[key] = p[key];
4101
4525
  }
4102
- this.actionService
4103
- .activateAction(action, itemId, undefined, actionData, this.tableviewService, this)
4526
+ this.actionExecutor
4527
+ .activateAction(action, itemId, undefined, actionData, this.viewContainerService ?? undefined, this)
4104
4528
  .pipe(first())
4105
4529
  .subscribe(res => {
4106
4530
  if (res.dialogRef) {
@@ -4108,7 +4532,10 @@ class MngActionRouteComponent {
4108
4532
  this.dialogCloseSubscription = this.dialogRef?.onClose.subscribe(e => {
4109
4533
  const actionEv = e;
4110
4534
  if (!actionEv?.error || !actionEv?.error?.dismissed) {
4111
- this.tableviewService.triggerTableReload(actionEv); // reload only if no error in action and
4535
+ if (!this.viewContainerService) {
4536
+ console.warn(`View container service could not be found, table reload will not be triggered.`);
4537
+ }
4538
+ this.viewContainerService?.triggerTableReload(actionEv); // reload only if no error in action and
4112
4539
  }
4113
4540
  this.deactivateAction();
4114
4541
  });
@@ -4120,30 +4547,7 @@ class MngActionRouteComponent {
4120
4547
  this.dialogCloseSubscription.unsubscribe();
4121
4548
  this.dialogCloseSubscription = undefined;
4122
4549
  }
4123
- if (this.navigationService.getPreviousLocation()) {
4124
- // there are internal history records, so back can be normally called
4125
- this.navigationService.back();
4126
- }
4127
- else {
4128
- // there is no internal history records, figure out the base url by eliminating action specific url
4129
- let url = this.navigationService.getCurrentLocation();
4130
- if (!url) {
4131
- this.navigationService.back();
4132
- }
4133
- else {
4134
- if (url.startsWith('/')) {
4135
- url = url.substring(1);
4136
- }
4137
- const urlPathSegments = url.split('?')[0].split('#')[0].split('/');
4138
- let actionUrl = this.activeAction?.routeUrl ?? '';
4139
- if (actionUrl.startsWith('/')) {
4140
- actionUrl = actionUrl.substring(1);
4141
- }
4142
- const actionUrlSegments = actionUrl.split('/');
4143
- const redirectUrl = urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');
4144
- this.router.navigateByUrl(`/${redirectUrl}`, { replaceUrl: true });
4145
- }
4146
- }
4550
+ this.actionExecutor.deactivateAction(this.activeAction);
4147
4551
  this.activeAction = undefined;
4148
4552
  this.dialogRef = undefined;
4149
4553
  }
@@ -4180,12 +4584,14 @@ class MngActionRouteComponent {
4180
4584
  return null;
4181
4585
  }
4182
4586
  }
4183
- 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 });
4184
- 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 });
4587
+ 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 });
4588
+ 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 });
4185
4589
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionRouteComponent, decorators: [{
4186
4590
  type: Component,
4187
4591
  args: [{ selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [MessageService, ConfirmationService], template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n" }]
4188
- }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.ConfirmationService }, { type: MngNavigationService }, { type: MngActionService }, { type: TableviewComponentService }]; } });
4592
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.ConfirmationService }, { type: MngNavigationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService, decorators: [{
4593
+ type: Optional
4594
+ }] }]; } });
4189
4595
 
4190
4596
  class MngComponentDirective {
4191
4597
  constructor(viewContainerRef) {
@@ -4343,7 +4749,7 @@ class MngFormEditorComponent {
4343
4749
  }
4344
4750
  let nextControl = null;
4345
4751
  if (control instanceof FormGroup) {
4346
- const nextField = control.get(keyPath[0]);
4752
+ nextControl = control.get(keyPath[0]);
4347
4753
  }
4348
4754
  else if (control instanceof FormArray) {
4349
4755
  const idx = +keyPath[0];
@@ -4390,12 +4796,12 @@ class MngFormEditorComponent {
4390
4796
  this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;
4391
4797
  }
4392
4798
  }
4393
- MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, deps: [{ token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
4394
- 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 });
4799
+ 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 });
4800
+ 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 });
4395
4801
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, decorators: [{
4396
4802
  type: Component,
4397
4803
  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" }]
4398
- }], ctorParameters: function () { return [{ type: i3.TranslateService }]; }, propDecorators: { descriptor: [{
4804
+ }], ctorParameters: function () { return [{ type: i3$1.TranslateService }]; }, propDecorators: { descriptor: [{
4399
4805
  type: Input
4400
4806
  }], submitLoading: [{
4401
4807
  type: Input
@@ -4495,7 +4901,7 @@ class MngAutocompleteComponent {
4495
4901
  }
4496
4902
  }
4497
4903
  MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
4498
- 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 });
4904
+ 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 });
4499
4905
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, decorators: [{
4500
4906
  type: Component,
4501
4907
  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" }]
@@ -4588,10 +4994,10 @@ class MngDropdownComponent {
4588
4994
  }
4589
4995
  }
4590
4996
  MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
4591
- 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 });
4997
+ 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 });
4592
4998
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, decorators: [{
4593
4999
  type: Component,
4594
- 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" }]
5000
+ 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" }]
4595
5001
  }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { dataProvider: [{
4596
5002
  type: Input
4597
5003
  }], dataKeyProperty: [{
@@ -4600,6 +5006,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4600
5006
  type: Input
4601
5007
  }], itemsValueProperty: [{
4602
5008
  type: Input
5009
+ }], itemsDisabledProperty: [{
5010
+ type: Input
4603
5011
  }], multiselect: [{
4604
5012
  type: Input
4605
5013
  }], placeholder: [{
@@ -4620,16 +5028,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4620
5028
  args: [Dropdown]
4621
5029
  }] } });
4622
5030
 
4623
- class MngActionDialogComponent {
4624
- constructor(injector, translate, dialogRef, dialogConfig, actionService, mngCommonsService) {
5031
+ class MngActionEditorComponent {
5032
+ constructor(injector, translate, actionExecutor, mngCommonsService, navigationService, dialogRef, dialogConfig, viewContainerService) {
4625
5033
  this.injector = injector;
4626
5034
  this.translate = translate;
5035
+ this.actionExecutor = actionExecutor;
5036
+ this.mngCommonsService = mngCommonsService;
5037
+ this.navigationService = navigationService;
4627
5038
  this.dialogRef = dialogRef;
4628
5039
  this.dialogConfig = dialogConfig;
4629
- this.actionService = actionService;
4630
- this.mngCommonsService = mngCommonsService;
5040
+ this.viewContainerService = viewContainerService;
5041
+ this.actionRunEventEmitter = new EventEmitter();
4631
5042
  this.cmpId = Math.random().toString(36).substring(2);
5043
+ this.isDialog = true;
4632
5044
  this.isSaveButton = true;
5045
+ // actions
5046
+ this.toolbarLeftActions = [];
5047
+ this.toolbarRightActions = [];
5048
+ this.footerLeftActions = [];
5049
+ this.footerRightActions = [];
4633
5050
  this.loadingSubject = new ReplaySubject(1);
4634
5051
  this.loading$ = this.loadingSubject.asObservable();
4635
5052
  this.submitLoadingSubject = new ReplaySubject(1);
@@ -4638,7 +5055,7 @@ class MngActionDialogComponent {
4638
5055
  this.subscriptions = [];
4639
5056
  }
4640
5057
  ngOnInit() {
4641
- if (this.dialogConfig.data) {
5058
+ if (this.dialogConfig?.data) {
4642
5059
  if (this.dialogConfig.data.action) {
4643
5060
  this.action = this.dialogConfig.data.action;
4644
5061
  }
@@ -4651,18 +5068,65 @@ class MngActionDialogComponent {
4651
5068
  if (this.dialogConfig.data.actionData) {
4652
5069
  this.actionData = this.dialogConfig.data.actionData;
4653
5070
  }
4654
- if (this.dialogConfig.data.tableview) {
4655
- this.tableviewService = this.dialogConfig.data.tableview;
4656
- if (!this.dataProvider && this.tableviewService?.dataProvider) {
4657
- this.dataProvider = this.tableviewService.dataProvider;
5071
+ if (this.dialogConfig.data.viewContainer) {
5072
+ this.viewContainer = this.dialogConfig.data.viewContainer;
5073
+ if (!this.dataProvider && this.viewContainer) {
5074
+ const dataProvider = this.viewContainer.getDataProvider();
5075
+ if (dataProvider && typeof dataProvider['fetch'] === 'function') {
5076
+ this.dataProvider = dataProvider;
5077
+ }
4658
5078
  }
4659
5079
  }
4660
5080
  if (this.dialogConfig.data.sourceComponent) {
4661
5081
  this.sourceComponent = this.dialogConfig.data.sourceComponent;
4662
5082
  }
4663
5083
  }
5084
+ else {
5085
+ this.isDialog = false;
5086
+ this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;
5087
+ }
4664
5088
  this.isSaveButton = typeof this.action.submitFunction === 'function';
4665
- this.setDialogHeaderTitle();
5089
+ this.setTitle();
5090
+ for (const action of this.action.editorActions) {
5091
+ if (action instanceof ActionEditorSubmitDescriptor) {
5092
+ if (typeof action.icon === 'undefined') {
5093
+ action.withIcon(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'pi pi-check' : 'pi pi-times');
5094
+ }
5095
+ if (typeof action.title === 'undefined') {
5096
+ action.withTitle(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'general.save' : this.isDialog ? 'general.close' : 'general.cancel');
5097
+ }
5098
+ // assign run operations
5099
+ action.withRunNotificationSuccess(undefined, undefined, false);
5100
+ if (action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit) {
5101
+ action.withRunFunction(ctx => {
5102
+ this.triggerSubmit();
5103
+ return of(undefined);
5104
+ });
5105
+ }
5106
+ else {
5107
+ action.withRunFunction(ctx => {
5108
+ this.cancel();
5109
+ return of(undefined);
5110
+ });
5111
+ }
5112
+ }
5113
+ switch (action.position) {
5114
+ case ActionPositionEnum.ToolbarLeft:
5115
+ this.toolbarLeftActions.push(action);
5116
+ break;
5117
+ case ActionPositionEnum.ToolbarRight:
5118
+ this.toolbarRightActions.push(action);
5119
+ break;
5120
+ case ActionPositionEnum.FooterLeft:
5121
+ this.footerLeftActions.push(action);
5122
+ break;
5123
+ case ActionPositionEnum.FooterRight:
5124
+ this.footerRightActions.push(action);
5125
+ break;
5126
+ }
5127
+ }
5128
+ this.toolbarRightActions = this.toolbarRightActions.reverse();
5129
+ this.footerRightActions = this.footerRightActions.reverse();
4666
5130
  this.loadItemWithDataProvider();
4667
5131
  }
4668
5132
  ngOnDestroy() {
@@ -4674,18 +5138,30 @@ class MngActionDialogComponent {
4674
5138
  return;
4675
5139
  }
4676
5140
  this.submitLoadingSubject.next(true);
4677
- this.actionService
4678
- .runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.tableviewService, this.actionData)
4679
- .pipe(first(), finalize(() => this.submitLoadingSubject.next(false)))
4680
- .subscribe(res => {
4681
- this.closeDialog(res);
5141
+ this.actionExecutor
5142
+ .runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.viewContainer, this.actionData)
5143
+ .pipe(first())
5144
+ .subscribe({
5145
+ next: res => {
5146
+ this.submitLoadingSubject.next(false);
5147
+ this.cancel(res);
5148
+ },
5149
+ error: () => {
5150
+ this.submitLoadingSubject.next(false);
5151
+ }
4682
5152
  });
4683
5153
  }
4684
5154
  }
4685
- closeDialog(result) {
4686
- this.dialogRef.close(result ? result : new ActionRunResult(undefined, undefined, new ActionError(null, true)));
5155
+ cancel(result) {
5156
+ if (!result) {
5157
+ result = new ActionRunResult(undefined, undefined, new ActionError(null, true));
5158
+ }
5159
+ if (this.isDialog) {
5160
+ this.dialogRef?.close(result);
5161
+ }
5162
+ this.actionRunEventEmitter.next(result);
4687
5163
  }
4688
- saveItem() {
5164
+ triggerSubmit() {
4689
5165
  this.editorComponent.submit();
4690
5166
  }
4691
5167
  loadItemWithDataProvider() {
@@ -4693,48 +5169,60 @@ class MngActionDialogComponent {
4693
5169
  return;
4694
5170
  }
4695
5171
  this.loadingSubject.next(true);
4696
- this.actionService
4697
- .runEditorFetch(this.action, this.itemId, this.dataProvider, this.sourceComponent, this.tableviewService)
5172
+ this.actionExecutor
5173
+ .runEditorFetch(this.action, this.item, this.itemId, this.dataProvider, this.sourceComponent, this.viewContainer)
4698
5174
  .pipe(first(), catchError(err => {
4699
5175
  if (this.action.hasRunNotificationError) {
4700
- ToastUtil.actionNotificationError(this.translate, this.action, err, 'fetch', this.tableviewService, this.item);
5176
+ ToastUtil.actionNotificationError(this.translate, this.action, err, 'fetch', this.viewContainer, this.item);
4701
5177
  }
4702
5178
  throw err;
4703
5179
  }), finalize(() => this.loadingSubject.next(false)))
4704
5180
  .subscribe(res => {
4705
5181
  this.item = res.result;
4706
5182
  if (this.action.hasFetchNotificationSuccess) {
4707
- ToastUtil.actionNotificationSuccess(this.translate, this.action, 'fetch', this.action.fetchNotificationSuccessTitle, this.action.fetchNotificationSuccessMessage, this.tableviewService, this.item);
5183
+ ToastUtil.actionNotificationSuccess(this.translate, this.action, 'fetch', this.action.fetchNotificationSuccessTitle, this.action.fetchNotificationSuccessMessage, this.viewContainer, this.item);
4708
5184
  }
4709
- this.setDialogHeaderTitle();
5185
+ this.setTitle();
4710
5186
  });
4711
5187
  }
4712
- setDialogHeaderTitle() {
5188
+ setTitle() {
4713
5189
  if (this.action.editorTitle === null) {
4714
- requestAnimationFrame(() => {
4715
- this.dialogConfig.header = undefined;
4716
- });
5190
+ this.title = undefined;
5191
+ if (this.dialogConfig) {
5192
+ requestAnimationFrame(() => {
5193
+ this.dialogConfig.header = undefined;
5194
+ });
5195
+ }
4717
5196
  return;
4718
5197
  }
4719
- const subscription = I18nUtil.streamActionTranslation(this.translate, this.action, 'dialog.title', undefined, this.item)
5198
+ const subscription = I18nUtil.streamActionTranslation(this.translate, this.action, 'editor.title', this.action.editorTitle, this.item)
4720
5199
  .pipe(mergeMap(i18nDialogTitle => i18nDialogTitle === null
4721
- ? I18nUtil.getActionTranslation(this.translate, this.action, 'title', this.action.editorTitle, this.item)
5200
+ ? I18nUtil.getActionTranslation(this.translate, this.action, 'title', undefined, this.item)
4722
5201
  : of(i18nDialogTitle)))
4723
5202
  .subscribe(t => {
4724
- requestAnimationFrame(() => {
4725
- this.dialogConfig.header = t ?? undefined;
4726
- this.mngCommonsService.setPageTitle(t ?? undefined);
4727
- });
5203
+ this.title = t ?? undefined;
5204
+ if (this.dialogConfig) {
5205
+ requestAnimationFrame(() => {
5206
+ this.dialogConfig.header = t ?? undefined;
5207
+ this.mngCommonsService.setPageTitle(t ?? undefined);
5208
+ });
5209
+ }
4728
5210
  });
4729
5211
  this.subscriptions.push(subscription);
4730
5212
  }
4731
5213
  }
4732
- 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 });
4733
- 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 });
4734
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionDialogComponent, decorators: [{
5214
+ 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 });
5215
+ 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 });
5216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, decorators: [{
4735
5217
  type: Component,
4736
- 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" }]
4737
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i3.TranslateService }, { type: i2.DynamicDialogRef }, { type: i2.DynamicDialogConfig }, { type: MngActionService }, { type: MngCommonsService }]; }, propDecorators: { action: [{
5218
+ 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" }]
5219
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i3$1.TranslateService }, { type: MngActionExecutorService }, { type: MngCommonsService }, { type: MngNavigationService }, { type: i3.DynamicDialogRef, decorators: [{
5220
+ type: Optional
5221
+ }] }, { type: i3.DynamicDialogConfig, decorators: [{
5222
+ type: Optional
5223
+ }] }, { type: MngViewContainerComponentService, decorators: [{
5224
+ type: Optional
5225
+ }] }]; }, propDecorators: { action: [{
4738
5226
  type: Input
4739
5227
  }], itemId: [{
4740
5228
  type: Input
@@ -4744,6 +5232,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4744
5232
  type: Input
4745
5233
  }], dataProvider: [{
4746
5234
  type: Input
5235
+ }], viewContainerInit: [{
5236
+ type: Input,
5237
+ args: ['viewContainer']
5238
+ }], actionRunEventEmitter: [{
5239
+ type: Output,
5240
+ args: ['actionSubmit']
4747
5241
  }], templates: [{
4748
5242
  type: ContentChildren,
4749
5243
  args: [MngTemplateDirective]
@@ -4762,10 +5256,10 @@ class MngFormlyFieldAutocompleteComponent extends FieldType {
4762
5256
  }
4763
5257
  }
4764
5258
  MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4765
- 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 });
5259
+ 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 });
4766
5260
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
4767
5261
  type: Component,
4768
- 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" }]
5262
+ 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" }]
4769
5263
  }] });
4770
5264
 
4771
5265
  class MngFormlyFieldInputComponent extends FieldType {
@@ -4779,10 +5273,10 @@ class MngFormlyFieldInputComponent extends FieldType {
4779
5273
  }
4780
5274
  }
4781
5275
  MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4782
- 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 });
5276
+ 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 });
4783
5277
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
4784
5278
  type: Component,
4785
- 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" }]
5279
+ 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" }]
4786
5280
  }] });
4787
5281
 
4788
5282
  class MngFormlyFieldDropdownComponent extends FieldType {
@@ -4792,10 +5286,10 @@ class MngFormlyFieldDropdownComponent extends FieldType {
4792
5286
  }
4793
5287
  }
4794
5288
  MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4795
- 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 });
5289
+ 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 });
4796
5290
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
4797
5291
  type: Component,
4798
- 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" }]
5292
+ 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" }]
4799
5293
  }] });
4800
5294
 
4801
5295
  class MngTableLoadEvent {
@@ -4878,12 +5372,12 @@ class MngTableColumnFilterComponent {
4878
5372
  }
4879
5373
  }
4880
5374
  }
4881
- 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 });
4882
- 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 } });
5375
+ MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
5376
+ 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 } });
4883
5377
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
4884
5378
  type: Component,
4885
5379
  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" }]
4886
- }], ctorParameters: function () { return [{ type: i2$1.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
5380
+ }], ctorParameters: function () { return [{ type: i2.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
4887
5381
  type: Input
4888
5382
  }], display: [{
4889
5383
  type: Input
@@ -4924,9 +5418,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4924
5418
  }] });
4925
5419
 
4926
5420
  class MngBooleanPipe {
4927
- transform(value) {
5421
+ transform(value, yes, no, icon = false) {
4928
5422
  if (typeof value === 'boolean') {
4929
- return value ? 'general.yes' : 'general.no';
5423
+ if (icon) {
5424
+ return value ? yes ?? 'pi pi-check' : no ?? 'pi pi-times';
5425
+ }
5426
+ else {
5427
+ return value ? yes ?? 'general.yes' : no ?? 'general.no';
5428
+ }
4930
5429
  }
4931
5430
  else {
4932
5431
  return value;
@@ -4972,10 +5471,10 @@ class MngTableColumnValueComponent {
4972
5471
  }
4973
5472
  }
4974
5473
  MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4975
- 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 });
5474
+ 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 });
4976
5475
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
4977
5476
  type: Component,
4978
- 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" }]
5477
+ 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" }]
4979
5478
  }], propDecorators: { descriptor: [{
4980
5479
  type: Input
4981
5480
  }], item: [{
@@ -5000,18 +5499,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5000
5499
  var TypeEnum = FilterDescriptor.TypeEnum;
5001
5500
  var PaginationModeEnum = TableDescriptor.PaginationModeEnum;
5002
5501
  class MngTableComponent {
5003
- constructor(injector, router, activatedRoute, translate, tableviewService) {
5502
+ constructor(injector, router, activatedRoute, translate, viewContainerService) {
5004
5503
  this.injector = injector;
5005
5504
  this.router = router;
5006
5505
  this.activatedRoute = activatedRoute;
5007
5506
  this.translate = translate;
5008
- this.tableviewService = tableviewService;
5507
+ this.viewContainerService = viewContainerService;
5009
5508
  this.filterDisplayRow = TableDescriptor.FilterDisplayEnum.Row;
5010
5509
  this.filterDisplayMenu = TableDescriptor.FilterDisplayEnum.Menu;
5011
5510
  this.useQueryParams = false;
5012
5511
  // extra features input
5013
5512
  this.selectionMode = 'multiple';
5014
5513
  this.selectionEnabled = false;
5514
+ // visual
5515
+ this.isColumnClickable = true;
5015
5516
  // event outputs
5016
5517
  this.loadEventEmitter = new EventEmitter();
5017
5518
  this.cellClickEventEmitter = new EventEmitter();
@@ -5189,7 +5690,7 @@ class MngTableComponent {
5189
5690
  this.isSortChanged = false;
5190
5691
  this.dataProviderLoadingSubject.next(false);
5191
5692
  }, err => {
5192
- ToastUtil.tableNotificationError(this.translate, this.descriptor, err, this.tableviewService);
5693
+ ToastUtil.tableNotificationError(this.translate, this.descriptor, err, this.viewContainerService ?? undefined);
5193
5694
  const emptyQueryResult = new MediusQueryResult();
5194
5695
  emptyQueryResult.pageData = [];
5195
5696
  emptyQueryResult.allDataCount = 0;
@@ -5254,12 +5755,12 @@ class MngTableComponent {
5254
5755
  }
5255
5756
  }
5256
5757
  }
5257
- 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 });
5258
- 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 });
5758
+ 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 });
5759
+ 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 });
5259
5760
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, decorators: [{
5260
5761
  type: Component,
5261
- 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" }]
5262
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i3.TranslateService }, { type: TableviewComponentService, decorators: [{
5762
+ 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" }]
5763
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i3$1.TranslateService }, { type: MngViewContainerComponentService, decorators: [{
5263
5764
  type: Optional
5264
5765
  }] }]; }, propDecorators: { descriptor: [{
5265
5766
  type: Input
@@ -5277,6 +5778,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5277
5778
  type: Input
5278
5779
  }], selectionEnabled: [{
5279
5780
  type: Input
5781
+ }], isColumnClickable: [{
5782
+ type: Input
5280
5783
  }], captionComponent: [{
5281
5784
  type: Input
5282
5785
  }], columnActionComponent: [{
@@ -5308,14 +5811,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5308
5811
  }] } });
5309
5812
 
5310
5813
  class MngTableviewComponent {
5311
- constructor(route, messageService, translateService, dialogService, confirmationService, actionService, tableviewService) {
5814
+ constructor(route, messageService, translateService, dialogService, confirmationService, actionExecutor, viewContainerService) {
5312
5815
  this.route = route;
5313
5816
  this.messageService = messageService;
5314
5817
  this.translateService = translateService;
5315
5818
  this.dialogService = dialogService;
5316
5819
  this.confirmationService = confirmationService;
5317
- this.actionService = actionService;
5318
- this.tableviewService = tableviewService;
5820
+ this.actionExecutor = actionExecutor;
5821
+ this.viewContainerService = viewContainerService;
5319
5822
  this.actions = [];
5320
5823
  this.tableComponent = null;
5321
5824
  this.rowClickActions = [];
@@ -5325,10 +5828,11 @@ class MngTableviewComponent {
5325
5828
  this.subscriptions = [];
5326
5829
  }
5327
5830
  ngOnInit() {
5328
- this.tableviewService.actions = this.actions;
5329
- this.tableviewService.dataProvider = this.dataProvider;
5330
- this.tableviewService.messageService = this.messageService;
5331
- const reloadTableSubscription = this.tableviewService.reloadTable$.subscribe(() => {
5831
+ this.viewContainerService.actions = this.actions;
5832
+ if (this.dataProvider) {
5833
+ this.viewContainerService.dataProvider = this.dataProvider;
5834
+ }
5835
+ const reloadTableSubscription = this.viewContainerService.reloadTable$.subscribe(() => {
5332
5836
  this.reloadTable();
5333
5837
  });
5334
5838
  this.subscriptions.push(reloadTableSubscription);
@@ -5348,27 +5852,34 @@ class MngTableviewComponent {
5348
5852
  break;
5349
5853
  }
5350
5854
  }
5855
+ this.toolbarRightActions = this.toolbarRightActions.reverse();
5351
5856
  }
5352
5857
  ngOnDestroy() {
5353
5858
  this.subscriptions.forEach(s => s.unsubscribe());
5354
5859
  }
5860
+ getMessageService() {
5861
+ return this.messageService;
5862
+ }
5863
+ getDataProvider() {
5864
+ return this.dataProvider;
5865
+ }
5355
5866
  reloadTable() {
5356
5867
  this.tableComponent?.reload();
5357
5868
  }
5358
5869
  onTableCellClick(event) {
5359
5870
  if (this.rowClickActions.length) {
5360
5871
  for (const action of this.rowClickActions) {
5361
- this.actionService.triggerRowClickAction(action, event, this.route);
5872
+ this.actionExecutor.triggerRowClickAction(action, event, this.route);
5362
5873
  }
5363
5874
  }
5364
5875
  }
5365
5876
  }
5366
- 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 });
5367
- 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 } });
5877
+ 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 });
5878
+ 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 } });
5368
5879
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, decorators: [{
5369
5880
  type: Component,
5370
- 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" }]
5371
- }], 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: [{
5881
+ 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" }]
5882
+ }], 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: [{
5372
5883
  type: Input
5373
5884
  }], dataProvider: [{
5374
5885
  type: Input
@@ -5418,7 +5929,7 @@ class MngTableviewRouteComponent extends AMngTableviewRouteComponent {
5418
5929
  return this.route.snapshot.data['tableviewData'].dataProvider;
5419
5930
  }
5420
5931
  createActionDescriptors() {
5421
- return this.route.snapshot.data['tableviewData'].actions ?? super.createActionDescriptors();
5932
+ return this.route.snapshot.data['tableviewData'].fieldActions ?? super.createActionDescriptors();
5422
5933
  }
5423
5934
  }
5424
5935
  MngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewRouteComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
@@ -5578,36 +6089,52 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
5578
6089
  }
5579
6090
  }
5580
6091
  MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
5581
- 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 });
6092
+ 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 });
5582
6093
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
5583
6094
  type: Component,
5584
- 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" }]
6095
+ 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" }]
5585
6096
  }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
5586
6097
  type: ViewChild,
5587
6098
  args: [MngTableComponent]
5588
6099
  }] } });
5589
6100
 
6101
+ var SizeEnum = ActionDescriptor.SizeEnum;
5590
6102
  class MngFormlyFieldTableDialogFormComponent extends FieldType {
5591
- constructor() {
5592
- super(...arguments);
6103
+ constructor(actionExecutor) {
6104
+ super();
6105
+ this.actionExecutor = actionExecutor;
5593
6106
  this.itemsSubject = new ReplaySubject(1);
5594
6107
  this.items$ = this.itemsSubject.asObservable();
5595
- this.toolbarActions = [];
5596
- this.rowActions = [];
6108
+ this.toolbarRightActions = [];
6109
+ this.rowClickActions = [];
6110
+ this.rowInlineActions = [];
5597
6111
  this.subscriptions = [];
5598
6112
  this.isDisabledSubject = new BehaviorSubject(false);
5599
6113
  this.isEnabled$ = this.isDisabledSubject.asObservable().pipe(distinctUntilChanged(), map(e => !e));
5600
6114
  }
5601
6115
  ngOnInit() {
5602
6116
  this.descriptor = this.to['descriptor'];
5603
- const hasAddAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Add);
5604
- const hasEditAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Edit);
5605
- const hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Delete);
6117
+ const hasViewAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.View);
6118
+ const hasAddAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Add);
6119
+ const hasEditAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Edit);
6120
+ const hasDeleteAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Delete);
6121
+ if (hasViewAction) {
6122
+ const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)
6123
+ .withPosition(ActionPositionEnum.RowClick)
6124
+ .withTitle(null)
6125
+ .withIcon('pi pi-search')
6126
+ .withClassName('mng-formly-field-table-form-dialog')
6127
+ .withSize(SizeEnum.ExtraSmall);
6128
+ viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
6129
+ this.rowClickActions.push(viewAction);
6130
+ }
5606
6131
  if (hasAddAction) {
5607
6132
  const addAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.addEditor, 'add', this.descriptor.editor.model.type, this.descriptor.property)
6133
+ .withPosition(ActionPositionEnum.ToolbarRight)
5608
6134
  .withTitle(null)
5609
6135
  .withIcon('pi pi-plus')
5610
6136
  .withClassName('mng-formly-field-table-form-dialog')
6137
+ .withSize(SizeEnum.ExtraSmall)
5611
6138
  .withSubmitFunction(ctx => {
5612
6139
  if (!ctx.data?.item) {
5613
6140
  throw new Error(`No item was provided in context, edit cannot be done.`);
@@ -5620,13 +6147,14 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5620
6147
  })
5621
6148
  .withIsVisibleFunction(() => of(!this.options?.formState.disabled))
5622
6149
  .withIsEnabledFunction(() => this.isEnabled$);
5623
- this.toolbarActions.push(addAction);
6150
+ this.toolbarRightActions.push(addAction);
5624
6151
  }
5625
6152
  if (hasEditAction) {
5626
6153
  const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)
5627
6154
  .withTitle(null)
5628
6155
  .withIcon('pi pi-pencil')
5629
6156
  .withClassName('mng-formly-field-table-form-dialog')
6157
+ .withSize(SizeEnum.ExtraSmall)
5630
6158
  .withSubmitFunction(ctx => {
5631
6159
  if (!ctx.data?.item) {
5632
6160
  throw new Error(`No item was provided in context, edit cannot be done.`);
@@ -5639,13 +6167,14 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5639
6167
  })
5640
6168
  .withIsVisibleFunction(() => of(!this.formControl?.disabled))
5641
6169
  .withIsEnabledFunction(() => this.isEnabled$);
5642
- this.rowActions.push(editAction);
6170
+ this.rowInlineActions.push(editAction);
5643
6171
  }
5644
6172
  if (hasDeleteAction) {
5645
6173
  const deleteAction = new ActionDescriptor(this.descriptor.tableviewDescriptor.model, 'delete', this.descriptor.editor.model.type, this.descriptor.property)
5646
6174
  .withLevel(ActionLevelEnum.Danger)
5647
6175
  .withTitle(null)
5648
6176
  .withIcon('pi pi-trash')
6177
+ .withSize(SizeEnum.ExtraSmall)
5649
6178
  .withRunFunction(ctx => {
5650
6179
  if (!ctx.data?.item) {
5651
6180
  throw new Error(`No item was provided in context, delete cannot be done.`);
@@ -5667,7 +6196,20 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5667
6196
  })
5668
6197
  .withIsVisibleFunction(() => of(!this.options?.formState.disabled))
5669
6198
  .withIsEnabledFunction(() => this.isEnabled$);
5670
- this.rowActions.push(deleteAction);
6199
+ this.rowInlineActions.push(deleteAction);
6200
+ }
6201
+ for (const action of this.descriptor.actions) {
6202
+ switch (action.position) {
6203
+ case ActionPositionEnum.ToolbarRight:
6204
+ this.toolbarRightActions.push(action);
6205
+ break;
6206
+ case ActionPositionEnum.RowInline:
6207
+ this.rowInlineActions.push(action);
6208
+ break;
6209
+ case ActionPositionEnum.RowClick:
6210
+ // this.footerRightActions.push(action);
6211
+ break;
6212
+ }
5671
6213
  }
5672
6214
  // init values
5673
6215
  if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
@@ -5691,13 +6233,21 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
5691
6233
  ngOnDestroy() {
5692
6234
  this.subscriptions.forEach(s => s.unsubscribe());
5693
6235
  }
6236
+ onTableCellClick(event) {
6237
+ console.log(event);
6238
+ if (this.rowClickActions.length) {
6239
+ for (const action of this.rowClickActions) {
6240
+ this.actionExecutor.triggerRowClickAction(action, event);
6241
+ }
6242
+ }
6243
+ }
5694
6244
  }
5695
- MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5696
- 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 });
6245
+ MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: MngActionExecutorService }], target: i0.ɵɵFactoryTarget.Component });
6246
+ 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 });
5697
6247
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
5698
6248
  type: Component,
5699
- 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"] }]
5700
- }] });
6249
+ 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"] }]
6250
+ }], ctorParameters: function () { return [{ type: MngActionExecutorService }]; } });
5701
6251
 
5702
6252
  class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
5703
6253
  constructor(injector) {
@@ -5804,16 +6354,16 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
5804
6354
  }
5805
6355
  }
5806
6356
  MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
5807
- 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 });
6357
+ 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 });
5808
6358
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
5809
6359
  type: Component,
5810
- 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" }]
6360
+ 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" }]
5811
6361
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
5812
6362
 
5813
6363
  class MngFormlyFieldTabsComponent extends FieldType {
5814
6364
  }
5815
6365
  MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5816
- 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 });
6366
+ 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 });
5817
6367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
5818
6368
  type: Component,
5819
6369
  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" }]
@@ -5822,7 +6372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5822
6372
  class MngFormlyFieldFieldsetComponent extends FieldType {
5823
6373
  }
5824
6374
  MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5825
- 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 });
6375
+ 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 });
5826
6376
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
5827
6377
  type: Component,
5828
6378
  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" }]
@@ -5831,19 +6381,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
5831
6381
  class MngFormlyFieldWrapperComponent extends FieldWrapper {
5832
6382
  }
5833
6383
  MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5834
- 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 });
6384
+ 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 });
5835
6385
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, decorators: [{
5836
6386
  type: Component,
5837
- 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" }]
6387
+ 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" }]
5838
6388
  }] });
5839
6389
 
5840
6390
  class MngFormlyTableWrapperComponent extends FieldWrapper {
5841
6391
  }
5842
6392
  MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5843
- 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 });
6393
+ 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 });
5844
6394
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
5845
6395
  type: Component,
5846
- 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" }]
6396
+ 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" }]
5847
6397
  }] });
5848
6398
 
5849
6399
  class MngBreadcrumbComponent {
@@ -5852,7 +6402,7 @@ class MngBreadcrumbComponent {
5852
6402
  }
5853
6403
  }
5854
6404
  MngBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngBreadcrumbComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
5855
- 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 });
6405
+ 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 });
5856
6406
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngBreadcrumbComponent, decorators: [{
5857
6407
  type: Component,
5858
6408
  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" }]
@@ -5865,7 +6415,7 @@ class MngFooterComponent {
5865
6415
  }
5866
6416
  }
5867
6417
  MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
5868
- 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 });
6418
+ 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 });
5869
6419
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, decorators: [{
5870
6420
  type: Component,
5871
6421
  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" }]
@@ -6201,7 +6751,7 @@ class MngMenuItemComponent {
6201
6751
  }
6202
6752
  }
6203
6753
  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 });
6204
- 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: [
6754
+ 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: [
6205
6755
  trigger('children', [
6206
6756
  state('void', style({
6207
6757
  height: '0px'
@@ -6271,7 +6821,7 @@ class MngMenuComponent {
6271
6821
  }
6272
6822
  }
6273
6823
  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 });
6274
- 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 });
6824
+ 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 });
6275
6825
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMenuComponent, decorators: [{
6276
6826
  type: Component,
6277
6827
  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" }]
@@ -6313,7 +6863,7 @@ class MngTopbarComponent {
6313
6863
  }
6314
6864
  }
6315
6865
  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 });
6316
- 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 });
6866
+ 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 });
6317
6867
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, decorators: [{
6318
6868
  type: Component,
6319
6869
  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" }]
@@ -6350,7 +6900,7 @@ class MngMainLayoutComponent {
6350
6900
  }
6351
6901
  }
6352
6902
  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 });
6353
- 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 });
6903
+ 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 });
6354
6904
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMainLayoutComponent, decorators: [{
6355
6905
  type: Component,
6356
6906
  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" }]
@@ -6647,7 +7197,7 @@ const declarations = [
6647
7197
  // editor components
6648
7198
  MngFormEditorComponent,
6649
7199
  MngActionComponent,
6650
- MngActionDialogComponent,
7200
+ MngActionEditorComponent,
6651
7201
  MngActionRouteComponent
6652
7202
  ];
6653
7203
  class MngCommonsModule {
@@ -6659,12 +7209,12 @@ class MngCommonsModule {
6659
7209
  DialogService,
6660
7210
  MessageService,
6661
7211
  ConfirmationService,
6662
- MngActionService,
7212
+ MngActionExecutorService,
6663
7213
  MngNavigationService,
6664
7214
  MngCommonsService,
6665
7215
  // component service
6666
7216
  MngMainLayoutComponentService,
6667
- TableviewComponentService,
7217
+ MngViewContainerComponentService,
6668
7218
  {
6669
7219
  provide: MNG_MODULE_CONFIG_IT,
6670
7220
  useValue: config
@@ -6695,6 +7245,14 @@ class MngCommonsModule {
6695
7245
  multi: true,
6696
7246
  useFactory: mngFormlyConfigProvider,
6697
7247
  deps: [TranslateService, MNG_MODULE_CONFIG_IT]
7248
+ },
7249
+ {
7250
+ provide: ACTION_EDITOR_DIALOG_COMPONENT_SETTING,
7251
+ useValue: MngActionEditorComponent
7252
+ },
7253
+ {
7254
+ provide: MngErrorMapperService,
7255
+ useClass: DefaultMngErrorMapperService
6698
7256
  }
6699
7257
  ]
6700
7258
  };
@@ -6741,13 +7299,13 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
6741
7299
  // editor components
6742
7300
  MngFormEditorComponent,
6743
7301
  MngActionComponent,
6744
- MngActionDialogComponent,
7302
+ MngActionEditorComponent,
6745
7303
  MngActionRouteComponent], imports: [
6746
7304
  // angular modules
6747
7305
  CommonModule,
6748
7306
  RouterModule,
6749
7307
  HttpClientModule,
6750
- ReactiveFormsModule, i3.TranslateModule, i3$1.FormlyModule, AutoCompleteModule,
7308
+ ReactiveFormsModule, i3$1.TranslateModule, i3$2.FormlyModule, AutoCompleteModule,
6751
7309
  BreadcrumbModule,
6752
7310
  ButtonModule,
6753
7311
  CalendarModule,
@@ -6853,7 +7411,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
6853
7411
  // editor components
6854
7412
  MngFormEditorComponent,
6855
7413
  MngActionComponent,
6856
- MngActionDialogComponent,
7414
+ MngActionEditorComponent,
6857
7415
  MngActionRouteComponent] });
6858
7416
  MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsModule, imports: [[
6859
7417
  // angular modules
@@ -6930,7 +7488,7 @@ class AMngCrudApiService {
6930
7488
  this.objectSerializer = ObjectSerializer.get();
6931
7489
  }
6932
7490
  createPost(item, params) {
6933
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getCreatePostPath()}`;
7491
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getCreatePostPath()}`;
6934
7492
  return this.http
6935
7493
  .post(url, this.objectSerializer.serializeClass(item, this.type), {
6936
7494
  withCredentials: true,
@@ -6941,7 +7499,7 @@ class AMngCrudApiService {
6941
7499
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.type)));
6942
7500
  }
6943
7501
  getAllPost(queryParamBody, params) {
6944
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getGetAllPostPath()}`;
7502
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getGetAllPostPath()}`;
6945
7503
  return this.http
6946
7504
  .post(url, this.objectSerializer.serialize(queryParamBody, 'QueryParam'), {
6947
7505
  withCredentials: true,
@@ -6952,7 +7510,7 @@ class AMngCrudApiService {
6952
7510
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.queryResultType)));
6953
7511
  }
6954
7512
  getByIdGet(id, params) {
6955
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getGetByIdGetPath(id)}`;
7513
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getGetByIdGetPath(id)}`;
6956
7514
  return this.http
6957
7515
  .get(url, {
6958
7516
  withCredentials: true,
@@ -6963,7 +7521,7 @@ class AMngCrudApiService {
6963
7521
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.type)));
6964
7522
  }
6965
7523
  updatePut(id, item, params) {
6966
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getUpdatePutPath(id, item)}`;
7524
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getUpdatePutPath(id, item)}`;
6967
7525
  return this.http
6968
7526
  .put(url, this.objectSerializer.serializeClass(item, this.type), {
6969
7527
  withCredentials: true,
@@ -6974,7 +7532,7 @@ class AMngCrudApiService {
6974
7532
  .pipe(map(res => this.objectSerializer.deserializeClass(res, this.type)));
6975
7533
  }
6976
7534
  removeDelete(id, item, params) {
6977
- const url = `${this.getBasePath()}/${this.getServiceBasePath()}${this.getRemoveDeletePath(id, item)}`;
7535
+ const url = `${this.getBasePath()}${this.getServiceBasePath()}${this.getRemoveDeletePath(id, item)}`;
6978
7536
  return this.http
6979
7537
  .request('delete', url, {
6980
7538
  withCredentials: true,
@@ -7458,5 +8016,5 @@ class RouteDataBuilder {
7458
8016
  * Generated bundle index. Do not edit.
7459
8017
  */
7460
8018
 
7461
- 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 };
8019
+ 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 };
7462
8020
  //# sourceMappingURL=mediusinc-mng-commons.mjs.map