@mediusinc/mng-commons 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/i18n/sl.json +15 -15
- package/esm2020/lib/components/action/action.component.mjs +32 -18
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +182 -0
- package/esm2020/lib/components/action/index.mjs +2 -2
- package/esm2020/lib/components/action/models/action-execution.model.mjs +3 -3
- package/esm2020/lib/components/action/route/action-route.component.mjs +17 -12
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +2 -2
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +7 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +4 -3
- package/esm2020/lib/components/form/models/form-editor.event.mjs +1 -1
- package/esm2020/lib/components/tableview/table/table.component.mjs +9 -9
- package/esm2020/lib/components/tableview/tableview.component.mjs +22 -15
- package/esm2020/lib/data-providers/table.data-provider.mjs +1 -1
- package/esm2020/lib/descriptors/action.descriptor.mjs +112 -1
- package/esm2020/lib/descriptors/editor.descriptor.mjs +53 -11
- package/esm2020/lib/mng-commons.module.mjs +14 -10
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/models/view-container.model.mjs +2 -0
- package/esm2020/lib/services/action-executor.service.mjs +291 -0
- package/esm2020/lib/services/index.mjs +2 -2
- package/esm2020/lib/services/mng-view-container-component.service.mjs +35 -0
- package/esm2020/lib/services/tokens/default-setting.token.mjs +3 -0
- package/esm2020/lib/services/tokens/index.mjs +2 -1
- package/esm2020/lib/utils/toast.util.mjs +15 -7
- package/esm2020/public-api.mjs +1 -2
- package/fesm2015/mediusinc-mng-commons.mjs +944 -677
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +914 -657
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/action/action.component.d.ts +12 -7
- package/lib/components/action/{dialog/action-dialog.component.d.ts → editor/action-editor.component.d.ts} +18 -12
- package/lib/components/action/index.d.ts +1 -1
- package/lib/components/action/models/action-execution.model.d.ts +3 -3
- package/lib/components/action/route/action-route.component.d.ts +6 -6
- package/lib/components/tableview/table/table.component.d.ts +3 -3
- package/lib/components/tableview/tableview.component.d.ts +10 -7
- package/lib/descriptors/action.descriptor.d.ts +41 -5
- package/lib/descriptors/editor.descriptor.d.ts +23 -4
- package/lib/mng-commons.module.d.ts +2 -2
- package/lib/models/index.d.ts +1 -0
- package/lib/models/view-container.model.d.ts +6 -0
- package/lib/services/{action.service.d.ts → action-executor.service.d.ts} +19 -18
- package/lib/services/index.d.ts +1 -1
- package/lib/services/mng-view-container-component.service.d.ts +22 -0
- package/lib/services/tokens/default-setting.token.d.ts +2 -0
- package/lib/services/tokens/index.d.ts +1 -0
- package/lib/utils/toast.util.d.ts +5 -4
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/scss/mng-overrides/_layout_forms.scss +2 -0
- package/scss/mng-overrides/_mixins.scss +7 -0
- package/scss/mng-overrides/_theme_button.scss +58 -0
- package/scss/mng-overrides/_theme_styles.scss +1 -0
- package/scss/mng-overrides/_variables.scss +2 -0
- package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +0 -151
- package/esm2020/lib/components/tableview/services/index.mjs +0 -2
- package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +0 -21
- package/esm2020/lib/services/action.service.mjs +0 -273
- package/lib/components/tableview/services/index.d.ts +0 -1
- package/lib/components/tableview/services/tableview.component.service.d.ts +0 -14
|
@@ -2,24 +2,24 @@ import * as i4$1 from '@angular/common';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import {
|
|
5
|
+
import { InjectionToken, Injectable, Inject, Component, ChangeDetectionStrategy, Optional, Input, EventEmitter, Directive, Output, 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$
|
|
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
|
|
15
|
-
import {
|
|
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$
|
|
18
|
+
import * as i2$3 from 'primeng/breadcrumb';
|
|
19
19
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
20
20
|
import * as i8 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';
|
|
@@ -31,7 +31,7 @@ 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
|
|
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,27 +40,27 @@ 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$
|
|
43
|
+
import * as i2$2 from 'primeng/inputswitch';
|
|
44
44
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
45
45
|
import * as i10$1 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$
|
|
49
|
+
import * as i3$3 from 'primeng/messages';
|
|
50
50
|
import { MessagesModule } from 'primeng/messages';
|
|
51
|
-
import * as i2$
|
|
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
|
|
54
|
+
import * as i5 from 'primeng/progressspinner';
|
|
55
55
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
56
|
-
import * as i4$
|
|
56
|
+
import * as i4$3 from 'primeng/radiobutton';
|
|
57
57
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
58
58
|
import * as i9 from 'primeng/ripple';
|
|
59
59
|
import { RippleModule } from 'primeng/ripple';
|
|
60
60
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
61
61
|
import * as i7 from 'primeng/skeleton';
|
|
62
62
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
63
|
-
import * as i4$
|
|
63
|
+
import * as i4$4 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';
|
|
@@ -72,447 +72,74 @@ import * as i8$1 from 'primeng/toolbar';
|
|
|
72
72
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
73
73
|
import * as i10 from 'primeng/tooltip';
|
|
74
74
|
import { TooltipModule } from 'primeng/tooltip';
|
|
75
|
-
import {
|
|
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
78
|
import * as i4 from '@angular/platform-browser';
|
|
79
79
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
80
80
|
|
|
81
|
-
class
|
|
82
|
-
constructor(
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
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
|
-
|
|
195
|
-
this.
|
|
196
|
-
return this;
|
|
86
|
+
get serviceType() {
|
|
87
|
+
return this._serviceType;
|
|
197
88
|
}
|
|
198
|
-
|
|
199
|
-
this.
|
|
200
|
-
return this;
|
|
89
|
+
get modelType() {
|
|
90
|
+
return this._modelType;
|
|
201
91
|
}
|
|
202
|
-
|
|
203
|
-
this.
|
|
92
|
+
withServiceType(type) {
|
|
93
|
+
this._serviceType = type;
|
|
204
94
|
return this;
|
|
205
95
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
-
|
|
212
|
-
this.
|
|
213
|
-
return this;
|
|
103
|
+
get fetch() {
|
|
104
|
+
return this._fetch;
|
|
214
105
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
*/
|
|
218
|
-
withModelTitle() {
|
|
219
|
-
this._title = `${this._i18nModelActionBaseKey}.title`;
|
|
220
|
-
return this;
|
|
106
|
+
get create() {
|
|
107
|
+
return this._create;
|
|
221
108
|
}
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
231
|
-
this.
|
|
232
|
-
return this;
|
|
112
|
+
get delete() {
|
|
113
|
+
return this._delete;
|
|
233
114
|
}
|
|
234
|
-
|
|
235
|
-
this.
|
|
115
|
+
withFetch(fetch) {
|
|
116
|
+
this._fetch = fetch;
|
|
236
117
|
return this;
|
|
237
118
|
}
|
|
238
|
-
|
|
239
|
-
this.
|
|
119
|
+
withCreate(create) {
|
|
120
|
+
this._create = create;
|
|
240
121
|
return this;
|
|
241
122
|
}
|
|
242
|
-
|
|
243
|
-
this.
|
|
123
|
+
withUpdate(update) {
|
|
124
|
+
this._update = update;
|
|
244
125
|
return this;
|
|
245
126
|
}
|
|
246
|
-
|
|
247
|
-
this.
|
|
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
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
this.
|
|
271
|
-
this._type = ActionTypeEnum.Editor;
|
|
272
|
-
this._editorDescriptor = editorDescriptor;
|
|
273
|
-
}
|
|
274
|
-
get editorTitle() {
|
|
275
|
-
return this._editorTitle;
|
|
276
|
-
}
|
|
277
|
-
get editorDescriptor() {
|
|
278
|
-
return this._editorDescriptor;
|
|
279
|
-
}
|
|
280
|
-
get hasFetchNotificationSuccess() {
|
|
281
|
-
return this._hasFetchNotificationSuccess;
|
|
282
|
-
}
|
|
283
|
-
get fetchNotificationSuccessTitle() {
|
|
284
|
-
return this._fetchNotificationSuccessTitle;
|
|
285
|
-
}
|
|
286
|
-
get fetchNotificationSuccessMessage() {
|
|
287
|
-
return this._fetchNotificationSuccessMessage;
|
|
288
|
-
}
|
|
289
|
-
get runFunction() {
|
|
290
|
-
throw new Error('Run function cannot be used in editor action. Use submit function instead!');
|
|
291
|
-
}
|
|
292
|
-
get fetchFunction() {
|
|
293
|
-
if (!this._fetchFunction) {
|
|
294
|
-
return ctx => {
|
|
295
|
-
var _a, _b;
|
|
296
|
-
console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, (_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item);
|
|
297
|
-
return of(((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item) ? ctx.data.item : {});
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
return this._fetchFunction;
|
|
301
|
-
}
|
|
302
|
-
get submitFunction() {
|
|
303
|
-
return this._submitFunction;
|
|
304
|
-
}
|
|
305
|
-
withEditorTitle(title) {
|
|
306
|
-
this._editorTitle = title;
|
|
307
|
-
return this;
|
|
132
|
+
|
|
133
|
+
class LookupDataProvider extends DataProvider {
|
|
134
|
+
constructor(modelType, serviceType) {
|
|
135
|
+
super(modelType, serviceType);
|
|
136
|
+
this._lookup = () => of([]);
|
|
308
137
|
}
|
|
309
|
-
|
|
310
|
-
return this.
|
|
138
|
+
get lookup() {
|
|
139
|
+
return this._lookup;
|
|
311
140
|
}
|
|
312
|
-
|
|
313
|
-
this.
|
|
314
|
-
return this;
|
|
315
|
-
}
|
|
316
|
-
withSubmitFunction(fn) {
|
|
317
|
-
this._submitFunction = fn;
|
|
318
|
-
return this;
|
|
319
|
-
}
|
|
320
|
-
withFetchNotificationError(title, message, hasNotification = true) {
|
|
321
|
-
this._hasFetchNotificationSuccess = hasNotification;
|
|
322
|
-
this._fetchNotificationSuccessTitle = title;
|
|
323
|
-
this._fetchNotificationSuccessMessage = message;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
|
|
327
|
-
constructor(editorDescriptor) {
|
|
328
|
-
super(editorDescriptor, 'details');
|
|
329
|
-
this.withPosition(ActionPositionEnum.RowClick);
|
|
330
|
-
this.withRouteTrigger(':itemId');
|
|
331
|
-
this.withFetchFunction(ctx => {
|
|
332
|
-
var _a, _b, _c, _d;
|
|
333
|
-
return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
|
|
334
|
-
? ctx.dataProvider.fetch((_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId, ctx.serviceInstance)
|
|
335
|
-
: throwError(new Error(`Data provider fetch function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
|
|
336
|
-
});
|
|
337
|
-
this.withClassName('mng-details-dynamic-dialog');
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
class ActionEditorAddDescriptor extends ActionEditorDescriptor {
|
|
341
|
-
constructor(editorDescriptor) {
|
|
342
|
-
super(editorDescriptor, 'add');
|
|
343
|
-
this.withPosition(ActionPositionEnum.ToolbarLeft);
|
|
344
|
-
this.withRouteTrigger('add');
|
|
345
|
-
this.withSubmitFunction(ctx => { var _a, _b; return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.create) ? ctx.dataProvider.create((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)); });
|
|
346
|
-
this.withLevel(ActionLevelEnum.Success);
|
|
347
|
-
this.withIcon('pi pi-plus');
|
|
348
|
-
this.withClassName('mng-details-dynamic-dialog');
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
class ActionEditorEditDescriptor extends ActionEditorDescriptor {
|
|
352
|
-
constructor(editorDescriptor) {
|
|
353
|
-
super(editorDescriptor, 'edit');
|
|
354
|
-
this.withPosition(ActionPositionEnum.RowInline);
|
|
355
|
-
this.withTitle(null);
|
|
356
|
-
this.withRouteTrigger(':itemId/edit');
|
|
357
|
-
this.withFetchFunction(ctx => {
|
|
358
|
-
var _a, _b, _c;
|
|
359
|
-
return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
|
|
360
|
-
? ctx.dataProvider.fetch(ctx.data.itemId, ctx.serviceInstance)
|
|
361
|
-
: throwError(new Error(`Data provider fetch function or item id ${(_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId} is missing.`));
|
|
362
|
-
});
|
|
363
|
-
this.withSubmitFunction(ctx => {
|
|
364
|
-
var _a, _b, _c, _d;
|
|
365
|
-
return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.update) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
|
|
366
|
-
? ctx.dataProvider.update(ctx.data.itemId, (_c = ctx.data) === null || _c === void 0 ? void 0 : _c.item, ctx.serviceInstance)
|
|
367
|
-
: throwError(new Error(`Data provider update function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
|
|
368
|
-
});
|
|
369
|
-
this.withIcon('pi pi-pencil');
|
|
370
|
-
this.withClassName('mng-details-dynamic-dialog');
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
class ActionDeleteDescriptor extends ActionDescriptor {
|
|
374
|
-
constructor(model) {
|
|
375
|
-
super(model, 'delete');
|
|
376
|
-
this.withPosition(ActionPositionEnum.RowInline);
|
|
377
|
-
this.withTitle(null);
|
|
378
|
-
this.withRunFunction(ctx => {
|
|
379
|
-
var _a, _b;
|
|
380
|
-
const editorDataProvider = ctx.dataProvider;
|
|
381
|
-
return (editorDataProvider === null || editorDataProvider === void 0 ? void 0 : editorDataProvider.delete) && ((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.itemId)
|
|
382
|
-
? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance)
|
|
383
|
-
: throwError(new Error(`Data provider delete function or item id ${(_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId} is missing.`));
|
|
384
|
-
});
|
|
385
|
-
this.withLevel(ActionLevelEnum.Danger);
|
|
386
|
-
this.withIcon('pi pi-trash');
|
|
387
|
-
this.withRunConfirmation(undefined);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
var ActionPositionEnum;
|
|
391
|
-
(function (ActionPositionEnum) {
|
|
392
|
-
ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
|
|
393
|
-
ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
|
|
394
|
-
ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
|
|
395
|
-
ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
|
|
396
|
-
ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
|
|
397
|
-
})(ActionPositionEnum || (ActionPositionEnum = {}));
|
|
398
|
-
var ActionActivationTriggerEnum;
|
|
399
|
-
(function (ActionActivationTriggerEnum) {
|
|
400
|
-
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
|
|
401
|
-
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
|
|
402
|
-
})(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
|
|
403
|
-
var ActionTypeEnum;
|
|
404
|
-
(function (ActionTypeEnum) {
|
|
405
|
-
ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
|
|
406
|
-
ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
|
|
407
|
-
})(ActionTypeEnum || (ActionTypeEnum = {}));
|
|
408
|
-
var ActionLevelEnum;
|
|
409
|
-
(function (ActionLevelEnum) {
|
|
410
|
-
ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
|
|
411
|
-
ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
|
|
412
|
-
ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
|
|
413
|
-
ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
|
|
414
|
-
ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
|
|
415
|
-
ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
|
|
416
|
-
ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
|
|
417
|
-
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
418
|
-
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
419
|
-
|
|
420
|
-
class MngFormEditorSubmitEvent {
|
|
421
|
-
constructor(formItem) {
|
|
422
|
-
this.formItem = formItem;
|
|
423
|
-
this.success = true;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
var MngFormFieldEventTypeEnum;
|
|
427
|
-
(function (MngFormFieldEventTypeEnum) {
|
|
428
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
|
|
429
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
|
|
430
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
|
|
431
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
|
|
432
|
-
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
|
|
433
|
-
})(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
|
|
434
|
-
class MngFormFieldEventComponentSubtype {
|
|
435
|
-
}
|
|
436
|
-
MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
|
|
437
|
-
MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
|
|
438
|
-
MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
|
|
439
|
-
MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
|
|
440
|
-
class MngFormFieldEventDialogSubtype {
|
|
441
|
-
}
|
|
442
|
-
MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
|
|
443
|
-
MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
|
|
444
|
-
MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
|
|
445
|
-
class MngFormFieldEvent {
|
|
446
|
-
constructor(type, componentType, componentInstance, data = {}) {
|
|
447
|
-
this.type = type;
|
|
448
|
-
this.componentType = componentType;
|
|
449
|
-
this.componentInstance = componentInstance;
|
|
450
|
-
this.data = data;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
class DataProvider {
|
|
455
|
-
constructor(modelType, serviceType) {
|
|
456
|
-
this._modelType = modelType;
|
|
457
|
-
this._serviceType = serviceType;
|
|
458
|
-
}
|
|
459
|
-
get serviceType() {
|
|
460
|
-
return this._serviceType;
|
|
461
|
-
}
|
|
462
|
-
get modelType() {
|
|
463
|
-
return this._modelType;
|
|
464
|
-
}
|
|
465
|
-
withServiceType(type) {
|
|
466
|
-
this._serviceType = type;
|
|
467
|
-
return this;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
class EditorDataProvider extends DataProvider {
|
|
472
|
-
constructor(modelType, serviceType) {
|
|
473
|
-
super(modelType, serviceType);
|
|
474
|
-
this._fetch = id => throwError(`No fetch function provided for id ${id}.`);
|
|
475
|
-
}
|
|
476
|
-
get fetch() {
|
|
477
|
-
return this._fetch;
|
|
478
|
-
}
|
|
479
|
-
get create() {
|
|
480
|
-
return this._create;
|
|
481
|
-
}
|
|
482
|
-
get update() {
|
|
483
|
-
return this._update;
|
|
484
|
-
}
|
|
485
|
-
get delete() {
|
|
486
|
-
return this._delete;
|
|
487
|
-
}
|
|
488
|
-
withFetch(fetch) {
|
|
489
|
-
this._fetch = fetch;
|
|
490
|
-
return this;
|
|
491
|
-
}
|
|
492
|
-
withCreate(create) {
|
|
493
|
-
this._create = create;
|
|
494
|
-
return this;
|
|
495
|
-
}
|
|
496
|
-
withUpdate(update) {
|
|
497
|
-
this._update = update;
|
|
498
|
-
return this;
|
|
499
|
-
}
|
|
500
|
-
withDelete(deleteFn) {
|
|
501
|
-
this._delete = deleteFn;
|
|
502
|
-
return this;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
class LookupDataProvider extends DataProvider {
|
|
507
|
-
constructor(modelType, serviceType) {
|
|
508
|
-
super(modelType, serviceType);
|
|
509
|
-
this._lookup = () => of([]);
|
|
510
|
-
}
|
|
511
|
-
get lookup() {
|
|
512
|
-
return this._lookup;
|
|
513
|
-
}
|
|
514
|
-
withLookup(lookup) {
|
|
515
|
-
this._lookup = lookup;
|
|
141
|
+
withLookup(lookup) {
|
|
142
|
+
this._lookup = lookup;
|
|
516
143
|
return this;
|
|
517
144
|
}
|
|
518
145
|
}
|
|
@@ -728,72 +355,555 @@ class MediusQueryParamBuilder {
|
|
|
728
355
|
this.queryParam.itemsOffset = itemsOffset;
|
|
729
356
|
return this;
|
|
730
357
|
}
|
|
731
|
-
withSort(property, asc = true) {
|
|
732
|
-
if (!this.queryParam.sortProperty || !this.queryParam.sortAsc) {
|
|
733
|
-
this.queryParam.sortProperty = [];
|
|
734
|
-
this.queryParam.sortAsc = [];
|
|
735
|
-
}
|
|
736
|
-
this.queryParam.sortProperty.push(property);
|
|
737
|
-
this.queryParam.sortAsc.push(asc);
|
|
738
|
-
return this;
|
|
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 runFunction() {
|
|
491
|
+
if (!this._runFunction) {
|
|
492
|
+
throw new Error('Run function is not defined and cannot be invoked');
|
|
493
|
+
}
|
|
494
|
+
return this._runFunction;
|
|
495
|
+
}
|
|
496
|
+
get isVisibleFunction() {
|
|
497
|
+
return this._isVisibleFunction;
|
|
498
|
+
}
|
|
499
|
+
get isEnabledFunction() {
|
|
500
|
+
return this._isEnabledFunction;
|
|
501
|
+
}
|
|
502
|
+
get actionName() {
|
|
503
|
+
return this._actionName;
|
|
504
|
+
}
|
|
505
|
+
get className() {
|
|
506
|
+
return this._className;
|
|
507
|
+
}
|
|
508
|
+
get size() {
|
|
509
|
+
return this._size;
|
|
510
|
+
}
|
|
511
|
+
get isSizeExtraSmall() {
|
|
512
|
+
return this._size === ActionDescriptor.SizeEnum.ExtraSmall;
|
|
513
|
+
}
|
|
514
|
+
get isSizeSmall() {
|
|
515
|
+
return this._size === ActionDescriptor.SizeEnum.Small;
|
|
516
|
+
}
|
|
517
|
+
get isSizeLarge() {
|
|
518
|
+
return this._size === ActionDescriptor.SizeEnum.Large;
|
|
519
|
+
}
|
|
520
|
+
get isSizeExtraLarge() {
|
|
521
|
+
return this._size === ActionDescriptor.SizeEnum.ExtraLarge;
|
|
522
|
+
}
|
|
523
|
+
get hasRunConfirmation() {
|
|
524
|
+
return this._hasRunConfirmation;
|
|
525
|
+
}
|
|
526
|
+
get runConfirmationIcon() {
|
|
527
|
+
return this._runConfirmationIcon;
|
|
528
|
+
}
|
|
529
|
+
get runConfirmationTitle() {
|
|
530
|
+
return this._runConfirmationTitle;
|
|
531
|
+
}
|
|
532
|
+
get runConfirmationMessage() {
|
|
533
|
+
return this._runConfirmationMessage;
|
|
534
|
+
}
|
|
535
|
+
get runConfirmationAcceptTitle() {
|
|
536
|
+
return this._runConfirmationAcceptTitle;
|
|
537
|
+
}
|
|
538
|
+
get runConfirmationRejectTitle() {
|
|
539
|
+
return this._runConfirmationRejectTitle;
|
|
540
|
+
}
|
|
541
|
+
get hasRunNotificationSuccess() {
|
|
542
|
+
return this._hasRunNotificationSuccess;
|
|
543
|
+
}
|
|
544
|
+
get runNotificationSuccessTitle() {
|
|
545
|
+
return this._runNotificationSuccessTitle;
|
|
546
|
+
}
|
|
547
|
+
get runNotificationSuccessMessage() {
|
|
548
|
+
return this._runNotificationSuccessMessage;
|
|
549
|
+
}
|
|
550
|
+
get hasRunNotificationError() {
|
|
551
|
+
return this._hasRunNotificationError;
|
|
552
|
+
}
|
|
553
|
+
get runNotificationErrorTitle() {
|
|
554
|
+
return this._runNotificationErrorTitle;
|
|
555
|
+
}
|
|
556
|
+
get runNotificationErrorMessage() {
|
|
557
|
+
return this._runNotificationErrorMessage;
|
|
558
|
+
}
|
|
559
|
+
withDataProvider(dataProvider) {
|
|
560
|
+
this._dataProvider = dataProvider;
|
|
561
|
+
return this;
|
|
562
|
+
}
|
|
563
|
+
withServiceType(serviceType) {
|
|
564
|
+
this._dataProvider = new DataProvider(this._model.type, serviceType);
|
|
565
|
+
return this;
|
|
566
|
+
}
|
|
567
|
+
withRunFunction(fn) {
|
|
568
|
+
this._runFunction = fn;
|
|
569
|
+
return this;
|
|
570
|
+
}
|
|
571
|
+
withIsVisibleFunction(fn) {
|
|
572
|
+
this._isVisibleFunction = fn;
|
|
573
|
+
return this;
|
|
574
|
+
}
|
|
575
|
+
withIsEnabledFunction(fn) {
|
|
576
|
+
this._isEnabledFunction = fn;
|
|
577
|
+
return this;
|
|
578
|
+
}
|
|
579
|
+
withRouteTrigger(routeUrl) {
|
|
580
|
+
this._activationTrigger = ActionActivationTriggerEnum.OnRoute;
|
|
581
|
+
this._routeUrl = routeUrl;
|
|
582
|
+
return this;
|
|
583
|
+
}
|
|
584
|
+
withLevel(level) {
|
|
585
|
+
this._level = level;
|
|
586
|
+
return this;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Overrides default title key with model action key (${model.typeName}.actions.${actionName}). Not relevant if parentType name is provided.
|
|
590
|
+
*/
|
|
591
|
+
withModelTitle() {
|
|
592
|
+
this._title = `${this._i18nModelActionBaseKey}.title`;
|
|
593
|
+
return this;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Overrides default title key (${actionName}.title). If null, no title will be shown.
|
|
597
|
+
* @param title Title i18n key or title.
|
|
598
|
+
*/
|
|
599
|
+
withTitle(title) {
|
|
600
|
+
this._title = title;
|
|
601
|
+
return this;
|
|
602
|
+
}
|
|
603
|
+
withIcon(icon) {
|
|
604
|
+
this._icon = icon;
|
|
605
|
+
return this;
|
|
606
|
+
}
|
|
607
|
+
withTooltip(tooltip) {
|
|
608
|
+
this._title = tooltip;
|
|
609
|
+
return this;
|
|
610
|
+
}
|
|
611
|
+
withClassName(className) {
|
|
612
|
+
this._className = className;
|
|
613
|
+
return this;
|
|
614
|
+
}
|
|
615
|
+
withSize(size = ActionDescriptor.SizeEnum.Normal) {
|
|
616
|
+
this._size = size;
|
|
617
|
+
return this;
|
|
618
|
+
}
|
|
619
|
+
withPosition(position) {
|
|
620
|
+
this._position = position;
|
|
621
|
+
return this;
|
|
622
|
+
}
|
|
623
|
+
withRunConfirmation(icon = 'pi pi-exclamation-triangle', title, message, acceptTitle, rejectTitle) {
|
|
624
|
+
this._hasRunConfirmation = true;
|
|
625
|
+
this._runConfirmationIcon = icon;
|
|
626
|
+
this._runConfirmationTitle = title;
|
|
627
|
+
this._runConfirmationMessage = message;
|
|
628
|
+
this._runConfirmationAcceptTitle = acceptTitle;
|
|
629
|
+
this._runConfirmationRejectTitle = rejectTitle;
|
|
630
|
+
return this;
|
|
631
|
+
}
|
|
632
|
+
withRunNotificationSuccess(title, message, hasNotification = true) {
|
|
633
|
+
this._hasRunNotificationSuccess = hasNotification;
|
|
634
|
+
this._runNotificationSuccessTitle = title;
|
|
635
|
+
this._runNotificationSuccessMessage = message;
|
|
636
|
+
}
|
|
637
|
+
withRunNotificationError(title, message, hasNotification = true) {
|
|
638
|
+
this._hasRunNotificationError = hasNotification;
|
|
639
|
+
this._runNotificationErrorTitle = title;
|
|
640
|
+
this._runNotificationErrorMessage = message;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
(function (ActionDescriptor) {
|
|
644
|
+
let SizeEnum;
|
|
645
|
+
(function (SizeEnum) {
|
|
646
|
+
SizeEnum[SizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
647
|
+
SizeEnum[SizeEnum["Small"] = 1] = "Small";
|
|
648
|
+
SizeEnum[SizeEnum["Normal"] = 2] = "Normal";
|
|
649
|
+
SizeEnum[SizeEnum["Large"] = 3] = "Large";
|
|
650
|
+
SizeEnum[SizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
651
|
+
})(SizeEnum = ActionDescriptor.SizeEnum || (ActionDescriptor.SizeEnum = {}));
|
|
652
|
+
})(ActionDescriptor || (ActionDescriptor = {}));
|
|
653
|
+
class ActionEditorDescriptor extends ActionDescriptor {
|
|
654
|
+
constructor(editorDescriptor, actionName, parentType, parentProperty) {
|
|
655
|
+
super(editorDescriptor.model, actionName, parentType, parentProperty);
|
|
656
|
+
this._editorTitle = undefined;
|
|
657
|
+
this._hasFetchNotificationSuccess = false;
|
|
658
|
+
this._type = ActionTypeEnum.Editor;
|
|
659
|
+
this._editorDescriptor = editorDescriptor;
|
|
660
|
+
}
|
|
661
|
+
get editorTitle() {
|
|
662
|
+
return this._editorTitle;
|
|
663
|
+
}
|
|
664
|
+
get editorDescriptor() {
|
|
665
|
+
return this._editorDescriptor;
|
|
666
|
+
}
|
|
667
|
+
get hasFetchNotificationSuccess() {
|
|
668
|
+
return this._hasFetchNotificationSuccess;
|
|
669
|
+
}
|
|
670
|
+
get fetchNotificationSuccessTitle() {
|
|
671
|
+
return this._fetchNotificationSuccessTitle;
|
|
672
|
+
}
|
|
673
|
+
get fetchNotificationSuccessMessage() {
|
|
674
|
+
return this._fetchNotificationSuccessMessage;
|
|
675
|
+
}
|
|
676
|
+
get dataProvider() {
|
|
677
|
+
return this._dataProvider;
|
|
678
|
+
}
|
|
679
|
+
get runFunction() {
|
|
680
|
+
throw new Error('Run function cannot be used in editor action. Use submit function instead!');
|
|
681
|
+
}
|
|
682
|
+
get fetchFunction() {
|
|
683
|
+
if (!this._fetchFunction) {
|
|
684
|
+
return ctx => {
|
|
685
|
+
var _a, _b;
|
|
686
|
+
console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, (_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item);
|
|
687
|
+
return of(((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item) ? ctx.data.item : {});
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
return this._fetchFunction;
|
|
691
|
+
}
|
|
692
|
+
get submitFunction() {
|
|
693
|
+
return this._submitFunction;
|
|
694
|
+
}
|
|
695
|
+
get editorComponent() {
|
|
696
|
+
return this._editorComponent;
|
|
697
|
+
}
|
|
698
|
+
withEditorTitle(title) {
|
|
699
|
+
this._editorTitle = title;
|
|
700
|
+
return this;
|
|
701
|
+
}
|
|
702
|
+
withDataProvider(dataProvider) {
|
|
703
|
+
this._dataProvider = dataProvider;
|
|
704
|
+
return this;
|
|
705
|
+
}
|
|
706
|
+
withServiceType(serviceType) {
|
|
707
|
+
this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
708
|
+
return this;
|
|
709
|
+
}
|
|
710
|
+
withRunFunction(fn) {
|
|
711
|
+
return this.withSubmitFunction(fn);
|
|
712
|
+
}
|
|
713
|
+
withFetchFunction(fn) {
|
|
714
|
+
this._fetchFunction = fn;
|
|
715
|
+
return this;
|
|
716
|
+
}
|
|
717
|
+
withSubmitFunction(fn) {
|
|
718
|
+
this._submitFunction = fn;
|
|
719
|
+
return this;
|
|
720
|
+
}
|
|
721
|
+
withFetchNotificationError(title, message, hasNotification = true) {
|
|
722
|
+
this._hasFetchNotificationSuccess = hasNotification;
|
|
723
|
+
this._fetchNotificationSuccessTitle = title;
|
|
724
|
+
this._fetchNotificationSuccessMessage = message;
|
|
725
|
+
return this;
|
|
726
|
+
}
|
|
727
|
+
withEditorComponent(editorComponent) {
|
|
728
|
+
this._editorComponent = editorComponent;
|
|
729
|
+
return this;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
|
|
733
|
+
constructor(editorDescriptor) {
|
|
734
|
+
super(editorDescriptor, 'details');
|
|
735
|
+
this.withPosition(ActionPositionEnum.RowClick);
|
|
736
|
+
this.withRouteTrigger(':itemId');
|
|
737
|
+
this.withFetchFunction(ctx => {
|
|
738
|
+
var _a, _b, _c, _d;
|
|
739
|
+
return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
|
|
740
|
+
? ctx.dataProvider.fetch((_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId, ctx.serviceInstance)
|
|
741
|
+
: throwError(new Error(`Data provider fetch function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
|
|
742
|
+
});
|
|
743
|
+
this.withClassName('mng-details-dynamic-dialog');
|
|
744
|
+
}
|
|
745
|
+
withServiceType(serviceType) {
|
|
746
|
+
return this.withServiceFetchFunction(serviceType);
|
|
747
|
+
}
|
|
748
|
+
withServiceFetchFunction(serviceType, fetchFn) {
|
|
749
|
+
const dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
750
|
+
if (fetchFn) {
|
|
751
|
+
dataProvider.withFetch(fetchFn);
|
|
752
|
+
}
|
|
753
|
+
this._dataProvider = dataProvider;
|
|
754
|
+
return this;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
class ActionEditorAddDescriptor extends ActionEditorDescriptor {
|
|
758
|
+
constructor(editorDescriptor) {
|
|
759
|
+
super(editorDescriptor, 'add');
|
|
760
|
+
this.withPosition(ActionPositionEnum.ToolbarLeft);
|
|
761
|
+
this.withRouteTrigger('add');
|
|
762
|
+
this.withSubmitFunction(ctx => { var _a, _b; return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.create) ? ctx.dataProvider.create((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)); });
|
|
763
|
+
this.withLevel(ActionLevelEnum.Success);
|
|
764
|
+
this.withIcon('pi pi-plus');
|
|
765
|
+
this.withClassName('mng-details-dynamic-dialog');
|
|
766
|
+
}
|
|
767
|
+
withServiceType(serviceType) {
|
|
768
|
+
return this.withServiceSubmitFunction(serviceType);
|
|
769
|
+
}
|
|
770
|
+
withServiceSubmitFunction(serviceType, createFn, fetchFn) {
|
|
771
|
+
const dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
772
|
+
if (createFn) {
|
|
773
|
+
dataProvider.withCreate(createFn);
|
|
774
|
+
}
|
|
775
|
+
if (fetchFn) {
|
|
776
|
+
dataProvider.withFetch(fetchFn);
|
|
777
|
+
}
|
|
778
|
+
this._dataProvider = dataProvider;
|
|
779
|
+
return this;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
class ActionEditorEditDescriptor extends ActionEditorDescriptor {
|
|
783
|
+
constructor(editorDescriptor) {
|
|
784
|
+
super(editorDescriptor, 'edit');
|
|
785
|
+
this.withPosition(ActionPositionEnum.RowInline);
|
|
786
|
+
this.withTitle(null);
|
|
787
|
+
this.withRouteTrigger(':itemId/edit');
|
|
788
|
+
this.withFetchFunction(ctx => {
|
|
789
|
+
var _a, _b, _c;
|
|
790
|
+
return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.fetch) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
|
|
791
|
+
? ctx.dataProvider.fetch(ctx.data.itemId, ctx.serviceInstance)
|
|
792
|
+
: throwError(new Error(`Data provider fetch function or item id ${(_c = ctx.data) === null || _c === void 0 ? void 0 : _c.itemId} is missing.`));
|
|
793
|
+
});
|
|
794
|
+
this.withSubmitFunction(ctx => {
|
|
795
|
+
var _a, _b, _c, _d;
|
|
796
|
+
return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.update) && ((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId)
|
|
797
|
+
? ctx.dataProvider.update(ctx.data.itemId, (_c = ctx.data) === null || _c === void 0 ? void 0 : _c.item, ctx.serviceInstance)
|
|
798
|
+
: throwError(new Error(`Data provider update function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
|
|
799
|
+
});
|
|
800
|
+
this.withIcon('pi pi-pencil');
|
|
801
|
+
this.withClassName('mng-details-dynamic-dialog');
|
|
802
|
+
}
|
|
803
|
+
withServiceType(serviceType) {
|
|
804
|
+
return this.withServiceSubmitFunction(serviceType);
|
|
739
805
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
806
|
+
withServiceSubmitFunction(serviceType, updateFn, fetchFn) {
|
|
807
|
+
const dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
808
|
+
if (updateFn) {
|
|
809
|
+
dataProvider.withUpdate(updateFn);
|
|
743
810
|
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
filterParam.filterMatchType = matchType;
|
|
749
|
-
filterParam.filterMatchCaseSensitive = matchCaseSensitive;
|
|
750
|
-
this.queryParam.filterParams.push(filterParam);
|
|
811
|
+
if (fetchFn) {
|
|
812
|
+
dataProvider.withFetch(fetchFn);
|
|
813
|
+
}
|
|
814
|
+
this._dataProvider = dataProvider;
|
|
751
815
|
return this;
|
|
752
816
|
}
|
|
753
|
-
build() {
|
|
754
|
-
const queryParam = this.queryParam;
|
|
755
|
-
this.queryParam = new MediusQueryParam();
|
|
756
|
-
return queryParam;
|
|
757
|
-
}
|
|
758
817
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
};
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
super(modelType, serviceType);
|
|
775
|
-
this._getAll = () => of(new MediusQueryResult());
|
|
818
|
+
class ActionDeleteDescriptor extends ActionDescriptor {
|
|
819
|
+
constructor(model) {
|
|
820
|
+
super(model, 'delete');
|
|
821
|
+
this.withPosition(ActionPositionEnum.RowInline);
|
|
822
|
+
this.withTitle(null);
|
|
823
|
+
this.withRunFunction(ctx => {
|
|
824
|
+
var _a, _b;
|
|
825
|
+
const editorDataProvider = ctx.dataProvider;
|
|
826
|
+
return (editorDataProvider === null || editorDataProvider === void 0 ? void 0 : editorDataProvider.delete) && ((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.itemId)
|
|
827
|
+
? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance)
|
|
828
|
+
: throwError(new Error(`Data provider delete function or item id ${(_b = ctx.data) === null || _b === void 0 ? void 0 : _b.itemId} is missing.`));
|
|
829
|
+
});
|
|
830
|
+
this.withLevel(ActionLevelEnum.Danger);
|
|
831
|
+
this.withIcon('pi pi-trash');
|
|
832
|
+
this.withRunConfirmation(undefined);
|
|
776
833
|
}
|
|
777
|
-
|
|
778
|
-
return this.
|
|
834
|
+
withServiceType(serviceType) {
|
|
835
|
+
return this.withServiceDeleteFunction(serviceType);
|
|
779
836
|
}
|
|
780
|
-
|
|
781
|
-
this.
|
|
837
|
+
withServiceDeleteFunction(serviceType, deleteFn) {
|
|
838
|
+
const dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
839
|
+
if (deleteFn) {
|
|
840
|
+
dataProvider.withDelete(deleteFn);
|
|
841
|
+
}
|
|
842
|
+
this._dataProvider = dataProvider;
|
|
782
843
|
return this;
|
|
783
844
|
}
|
|
784
845
|
}
|
|
846
|
+
var ActionPositionEnum;
|
|
847
|
+
(function (ActionPositionEnum) {
|
|
848
|
+
ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
|
|
849
|
+
ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
|
|
850
|
+
ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
|
|
851
|
+
ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
|
|
852
|
+
ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
|
|
853
|
+
})(ActionPositionEnum || (ActionPositionEnum = {}));
|
|
854
|
+
var ActionActivationTriggerEnum;
|
|
855
|
+
(function (ActionActivationTriggerEnum) {
|
|
856
|
+
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
|
|
857
|
+
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
|
|
858
|
+
})(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
|
|
859
|
+
var ActionTypeEnum;
|
|
860
|
+
(function (ActionTypeEnum) {
|
|
861
|
+
ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
|
|
862
|
+
ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
|
|
863
|
+
})(ActionTypeEnum || (ActionTypeEnum = {}));
|
|
864
|
+
var ActionLevelEnum;
|
|
865
|
+
(function (ActionLevelEnum) {
|
|
866
|
+
ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
|
|
867
|
+
ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
|
|
868
|
+
ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
|
|
869
|
+
ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
|
|
870
|
+
ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
|
|
871
|
+
ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
|
|
872
|
+
ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
|
|
873
|
+
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
874
|
+
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
785
875
|
|
|
786
|
-
class
|
|
787
|
-
constructor(
|
|
788
|
-
|
|
789
|
-
this.
|
|
790
|
-
}
|
|
791
|
-
get getAll() {
|
|
792
|
-
return this._getAll;
|
|
876
|
+
class MngFormEditorSubmitEvent {
|
|
877
|
+
constructor(formItem) {
|
|
878
|
+
this.formItem = formItem;
|
|
879
|
+
this.success = true;
|
|
793
880
|
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
881
|
+
}
|
|
882
|
+
var MngFormFieldEventTypeEnum;
|
|
883
|
+
(function (MngFormFieldEventTypeEnum) {
|
|
884
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Component"] = 0] = "Component";
|
|
885
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["ValueChange"] = 1] = "ValueChange";
|
|
886
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["DataProvider"] = 2] = "DataProvider";
|
|
887
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Dialog"] = 3] = "Dialog";
|
|
888
|
+
MngFormFieldEventTypeEnum[MngFormFieldEventTypeEnum["Other"] = 4] = "Other";
|
|
889
|
+
})(MngFormFieldEventTypeEnum || (MngFormFieldEventTypeEnum = {}));
|
|
890
|
+
class MngFormFieldEventComponentSubtype {
|
|
891
|
+
}
|
|
892
|
+
MngFormFieldEventComponentSubtype.ON_INIT = 'Component.OnInit';
|
|
893
|
+
MngFormFieldEventComponentSubtype.ON_VIEW_INIT = 'Component.OnViewInit';
|
|
894
|
+
MngFormFieldEventComponentSubtype.ON_CONTENT_INIT = 'Component.OnContentInit';
|
|
895
|
+
MngFormFieldEventComponentSubtype.ON_DESTROY = 'Component.OnDestroy';
|
|
896
|
+
class MngFormFieldEventDialogSubtype {
|
|
897
|
+
}
|
|
898
|
+
MngFormFieldEventDialogSubtype.VISIBILITY = 'Dialog.Visibility';
|
|
899
|
+
MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';
|
|
900
|
+
MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';
|
|
901
|
+
class MngFormFieldEvent {
|
|
902
|
+
constructor(type, componentType, componentInstance, data = {}) {
|
|
903
|
+
this.type = type;
|
|
904
|
+
this.componentType = componentType;
|
|
905
|
+
this.componentInstance = componentInstance;
|
|
906
|
+
this.data = data;
|
|
797
907
|
}
|
|
798
908
|
}
|
|
799
909
|
|
|
@@ -961,12 +1071,18 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
961
1071
|
super(editor);
|
|
962
1072
|
this._required = false;
|
|
963
1073
|
this._disabled = false;
|
|
964
|
-
this._className = '';
|
|
965
1074
|
this._validators = [];
|
|
1075
|
+
this._className = '';
|
|
1076
|
+
this._labelClassName = '';
|
|
1077
|
+
this._inputClassName = '';
|
|
1078
|
+
this._size = FieldDescriptor.SizeEnum.Normal;
|
|
966
1079
|
this._eventsSubject = new Subject();
|
|
967
1080
|
this._property = property;
|
|
968
1081
|
this._label = I18nUtil.getModelPropertyKey(this._editor.model, property);
|
|
969
1082
|
}
|
|
1083
|
+
get property() {
|
|
1084
|
+
return this._property;
|
|
1085
|
+
}
|
|
970
1086
|
get group() {
|
|
971
1087
|
return this._group;
|
|
972
1088
|
}
|
|
@@ -976,6 +1092,9 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
976
1092
|
get placeholder() {
|
|
977
1093
|
return this._placeholder;
|
|
978
1094
|
}
|
|
1095
|
+
get helpText() {
|
|
1096
|
+
return this._helpText;
|
|
1097
|
+
}
|
|
979
1098
|
get required() {
|
|
980
1099
|
return this._required;
|
|
981
1100
|
}
|
|
@@ -985,9 +1104,6 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
985
1104
|
get defaultValue() {
|
|
986
1105
|
return this._defaultValue;
|
|
987
1106
|
}
|
|
988
|
-
get className() {
|
|
989
|
-
return this._className;
|
|
990
|
-
}
|
|
991
1107
|
get getter() {
|
|
992
1108
|
return this._getter;
|
|
993
1109
|
}
|
|
@@ -1006,8 +1122,23 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1006
1122
|
get hiddenExpression() {
|
|
1007
1123
|
return this._hiddenExpression;
|
|
1008
1124
|
}
|
|
1009
|
-
get
|
|
1010
|
-
return this.
|
|
1125
|
+
get className() {
|
|
1126
|
+
return this._className;
|
|
1127
|
+
}
|
|
1128
|
+
get labelClassName() {
|
|
1129
|
+
return this._labelClassName;
|
|
1130
|
+
}
|
|
1131
|
+
get inputClassName() {
|
|
1132
|
+
return this._inputClassName;
|
|
1133
|
+
}
|
|
1134
|
+
get size() {
|
|
1135
|
+
return this._size;
|
|
1136
|
+
}
|
|
1137
|
+
get isSizeSmall() {
|
|
1138
|
+
return this._size === FieldDescriptor.SizeEnum.Small;
|
|
1139
|
+
}
|
|
1140
|
+
get isSizeLarge() {
|
|
1141
|
+
return this._size === FieldDescriptor.SizeEnum.Large;
|
|
1011
1142
|
}
|
|
1012
1143
|
withLabel(label) {
|
|
1013
1144
|
this._label = label;
|
|
@@ -1017,6 +1148,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1017
1148
|
this._placeholder = placeholder;
|
|
1018
1149
|
return this;
|
|
1019
1150
|
}
|
|
1151
|
+
withHelpText(helpText) {
|
|
1152
|
+
this._helpText = helpText;
|
|
1153
|
+
return this;
|
|
1154
|
+
}
|
|
1020
1155
|
withRequired(required = true, requiredExpression) {
|
|
1021
1156
|
this._required = required;
|
|
1022
1157
|
if (requiredExpression) {
|
|
@@ -1039,10 +1174,6 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1039
1174
|
this._defaultValue = defaultValue;
|
|
1040
1175
|
return this;
|
|
1041
1176
|
}
|
|
1042
|
-
withClassName(className) {
|
|
1043
|
-
this._className = className;
|
|
1044
|
-
return this;
|
|
1045
|
-
}
|
|
1046
1177
|
withGetter(getter) {
|
|
1047
1178
|
this._getter = getter;
|
|
1048
1179
|
return this;
|
|
@@ -1055,6 +1186,16 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1055
1186
|
this._validators.push(new FieldValidator(name, expression, message));
|
|
1056
1187
|
return this;
|
|
1057
1188
|
}
|
|
1189
|
+
withClassName(className, labelClassName = '', inputClassName = '') {
|
|
1190
|
+
this._className = className;
|
|
1191
|
+
this._labelClassName = labelClassName;
|
|
1192
|
+
this._inputClassName = inputClassName;
|
|
1193
|
+
return this;
|
|
1194
|
+
}
|
|
1195
|
+
withSize(size = FieldDescriptor.SizeEnum.Normal) {
|
|
1196
|
+
this._size = size;
|
|
1197
|
+
return this;
|
|
1198
|
+
}
|
|
1058
1199
|
nextEvent(type, cmpType, cmpInstance, data) {
|
|
1059
1200
|
this._eventsSubject.next(new MngFormFieldEvent(type, cmpType, cmpInstance, data));
|
|
1060
1201
|
}
|
|
@@ -1064,6 +1205,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1064
1205
|
copyFieldsTo(obj) {
|
|
1065
1206
|
obj._label = this._label;
|
|
1066
1207
|
obj._placeholder = this._placeholder;
|
|
1208
|
+
obj._helpText = this._helpText;
|
|
1067
1209
|
obj._required = this._required;
|
|
1068
1210
|
obj._disabled = this._disabled;
|
|
1069
1211
|
obj._defaultValue = this._defaultValue;
|
|
@@ -1071,11 +1213,21 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1071
1213
|
obj._hiddenExpression = this._hiddenExpression;
|
|
1072
1214
|
obj._disabledExpression = this._disabledExpression;
|
|
1073
1215
|
obj._className = this._className;
|
|
1216
|
+
obj._size = this.size;
|
|
1074
1217
|
obj._getter = this._getter;
|
|
1075
1218
|
obj._setter = this._setter;
|
|
1076
1219
|
obj._validators = this._validators;
|
|
1077
1220
|
}
|
|
1078
1221
|
}
|
|
1222
|
+
var FieldDescriptor;
|
|
1223
|
+
(function (FieldDescriptor) {
|
|
1224
|
+
let SizeEnum;
|
|
1225
|
+
(function (SizeEnum) {
|
|
1226
|
+
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
1227
|
+
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
1228
|
+
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
1229
|
+
})(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
|
|
1230
|
+
})(FieldDescriptor || (FieldDescriptor = {}));
|
|
1079
1231
|
class FieldInputDescriptor extends AFieldDescriptor {
|
|
1080
1232
|
constructor(editor, property) {
|
|
1081
1233
|
super(editor, property);
|
|
@@ -2742,8 +2894,16 @@ class ModelUtil {
|
|
|
2742
2894
|
}
|
|
2743
2895
|
|
|
2744
2896
|
class ToastUtil {
|
|
2745
|
-
static
|
|
2746
|
-
|
|
2897
|
+
static notification(viewContainer, title, message, severity = 'success') {
|
|
2898
|
+
const messageService = viewContainer === null || viewContainer === void 0 ? void 0 : viewContainer.getMessageService();
|
|
2899
|
+
if (!messageService) {
|
|
2900
|
+
console.warn(`No message service was provided through view container, message will not be displayed.`);
|
|
2901
|
+
return;
|
|
2902
|
+
}
|
|
2903
|
+
messageService.add({ severity: severity, summary: title, detail: message });
|
|
2904
|
+
}
|
|
2905
|
+
static tableNotificationError(translationService, table, error, viewContainer) {
|
|
2906
|
+
var _a, _b;
|
|
2747
2907
|
const params = {};
|
|
2748
2908
|
if (error === null || error === void 0 ? void 0 : error.message) {
|
|
2749
2909
|
params.errorMessage = `: ${error.message}`;
|
|
@@ -2754,16 +2914,16 @@ class ToastUtil {
|
|
|
2754
2914
|
console.log(params);
|
|
2755
2915
|
const tableErrorTitle = (_a = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.title', undefined, undefined, 'general.error', params)) !== null && _a !== void 0 ? _a : undefined;
|
|
2756
2916
|
const tableErrorMessage = (_b = I18nUtil.instantModelTranslation(translationService, table.model, 'table.error.message', undefined, undefined, 'general.errorMessage', params)) !== null && _b !== void 0 ? _b : undefined;
|
|
2757
|
-
|
|
2917
|
+
ToastUtil.notification(viewContainer, tableErrorTitle, tableErrorMessage, 'error');
|
|
2758
2918
|
}
|
|
2759
|
-
static actionNotificationSuccess(translationService, action, functionName, customTitleKey, customMessageKey,
|
|
2760
|
-
var _a, _b
|
|
2919
|
+
static actionNotificationSuccess(translationService, action, functionName, customTitleKey, customMessageKey, viewContainer, item) {
|
|
2920
|
+
var _a, _b;
|
|
2761
2921
|
const actionSuccessTitle = (_a = I18nUtil.instantActionTranslation(translationService, action, 'success.title', customTitleKey, item, 'general.success', functionName)) !== null && _a !== void 0 ? _a : undefined;
|
|
2762
2922
|
const actionSuccessMessage = (_b = I18nUtil.instantActionTranslation(translationService, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName)) !== null && _b !== void 0 ? _b : undefined;
|
|
2763
|
-
|
|
2923
|
+
ToastUtil.notification(viewContainer, actionSuccessTitle, actionSuccessMessage);
|
|
2764
2924
|
}
|
|
2765
|
-
static actionNotificationError(translationService, action, error, functionName,
|
|
2766
|
-
var _a, _b
|
|
2925
|
+
static actionNotificationError(translationService, action, error, functionName, viewContainer, item) {
|
|
2926
|
+
var _a, _b;
|
|
2767
2927
|
const params = {};
|
|
2768
2928
|
if (error === null || error === void 0 ? void 0 : error.message) {
|
|
2769
2929
|
params.errorMessage = `: ${error.message}`;
|
|
@@ -2773,7 +2933,7 @@ class ToastUtil {
|
|
|
2773
2933
|
}
|
|
2774
2934
|
const actionErrorTitle = (_a = I18nUtil.instantActionTranslation(translationService, action, 'error.title', action.runNotificationErrorTitle, item, 'general.error', functionName, params)) !== null && _a !== void 0 ? _a : undefined;
|
|
2775
2935
|
const actionErrorMessage = (_b = I18nUtil.instantActionTranslation(translationService, action, 'error.message', action.runNotificationErrorMessage, item, 'general.errorMessage', functionName, params)) !== null && _b !== void 0 ? _b : undefined;
|
|
2776
|
-
|
|
2936
|
+
ToastUtil.notification(viewContainer, actionErrorTitle, actionErrorMessage, 'error');
|
|
2777
2937
|
}
|
|
2778
2938
|
static getFormEditorWarningMessage(translationService, title, message) {
|
|
2779
2939
|
var _a, _b;
|
|
@@ -3228,12 +3388,12 @@ MediusRestUtil.matchModeMapping = [
|
|
|
3228
3388
|
];
|
|
3229
3389
|
|
|
3230
3390
|
class ActionExecContext {
|
|
3231
|
-
constructor(dataProvider, serviceInstance, data, sourceComponent = null,
|
|
3391
|
+
constructor(dataProvider, serviceInstance, data, sourceComponent = null, viewContainer = null) {
|
|
3232
3392
|
this.dataProvider = dataProvider;
|
|
3233
3393
|
this.serviceInstance = serviceInstance;
|
|
3234
3394
|
this.data = data;
|
|
3235
3395
|
this.sourceComponent = sourceComponent;
|
|
3236
|
-
this.
|
|
3396
|
+
this.viewContainer = viewContainer;
|
|
3237
3397
|
}
|
|
3238
3398
|
}
|
|
3239
3399
|
class ActionError {
|
|
@@ -3285,25 +3445,35 @@ class ActionTriggerResult {
|
|
|
3285
3445
|
}
|
|
3286
3446
|
}
|
|
3287
3447
|
|
|
3288
|
-
|
|
3289
|
-
|
|
3448
|
+
const MNG_BROWSER_STORAGE_IT = new InjectionToken('Browser storage', {
|
|
3449
|
+
providedIn: 'root',
|
|
3450
|
+
factory: () => localStorage
|
|
3451
|
+
});
|
|
3452
|
+
|
|
3453
|
+
const ACTION_EDITOR_DIALOG_COMPONENT_SETTING = new InjectionToken('ACTION_EDITOR_DIALOG_COMPONENT_SETTING');
|
|
3454
|
+
|
|
3455
|
+
const MNG_MODULE_CONFIG_IT = new InjectionToken('MngModuleConfig');
|
|
3456
|
+
|
|
3457
|
+
class MngActionExecutorService {
|
|
3458
|
+
constructor(injector, router, dialogService, confirmationService, translate, defaultEditorDialogComponent) {
|
|
3290
3459
|
this.injector = injector;
|
|
3291
3460
|
this.router = router;
|
|
3292
3461
|
this.dialogService = dialogService;
|
|
3293
3462
|
this.confirmationService = confirmationService;
|
|
3294
3463
|
this.translate = translate;
|
|
3464
|
+
this.defaultEditorDialogComponent = defaultEditorDialogComponent;
|
|
3295
3465
|
}
|
|
3296
|
-
|
|
3297
|
-
var _a;
|
|
3298
|
-
return new ActionExecContext(dataProvider, (
|
|
3466
|
+
prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData) {
|
|
3467
|
+
var _a, _b;
|
|
3468
|
+
return new ActionExecContext((_a = dataProvider !== null && dataProvider !== void 0 ? dataProvider : action.dataProvider) !== null && _a !== void 0 ? _a : viewContainer === null || viewContainer === void 0 ? void 0 : viewContainer.getDataProvider(), (_b = this.getDataProviderService(dataProvider)) !== null && _b !== void 0 ? _b : undefined, {
|
|
3299
3469
|
item,
|
|
3300
3470
|
itemId,
|
|
3301
3471
|
actionData
|
|
3302
|
-
}, sourceComponent,
|
|
3472
|
+
}, sourceComponent, viewContainer);
|
|
3303
3473
|
}
|
|
3304
|
-
runAction(action, itemId, item, dataProvider, sourceComponent,
|
|
3474
|
+
runAction(action, itemId, item, dataProvider, sourceComponent, viewContainer, actionData) {
|
|
3305
3475
|
var _a, _b, _c, _d;
|
|
3306
|
-
const context = this.
|
|
3476
|
+
const context = this.prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData);
|
|
3307
3477
|
if (action.hasRunConfirmation) {
|
|
3308
3478
|
if (typeof (sourceComponent === null || sourceComponent === void 0 ? void 0 : sourceComponent.getConfirmationService) !== 'function' || typeof (sourceComponent === null || sourceComponent === void 0 ? void 0 : sourceComponent.getConfirmationServiceInstanceKey) !== 'function') {
|
|
3309
3479
|
throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);
|
|
@@ -3341,12 +3511,12 @@ class MngActionService {
|
|
|
3341
3511
|
.runFunction(context)
|
|
3342
3512
|
.pipe(first(), map(res => new ActionRunResult(context, res)), map(value => {
|
|
3343
3513
|
if (action.hasRunNotificationSuccess) {
|
|
3344
|
-
ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage,
|
|
3514
|
+
ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, item);
|
|
3345
3515
|
}
|
|
3346
3516
|
return value;
|
|
3347
3517
|
}), catchError(err => {
|
|
3348
3518
|
if (action.hasRunNotificationError) {
|
|
3349
|
-
ToastUtil.actionNotificationError(this.translate, action, err, 'run',
|
|
3519
|
+
ToastUtil.actionNotificationError(this.translate, action, err, 'run', viewContainer, item);
|
|
3350
3520
|
}
|
|
3351
3521
|
throw err;
|
|
3352
3522
|
}))
|
|
@@ -3364,12 +3534,12 @@ class MngActionService {
|
|
|
3364
3534
|
else {
|
|
3365
3535
|
return action.runFunction(context).pipe(map(res => new ActionRunResult(context, res)), map(value => {
|
|
3366
3536
|
if (action.hasRunNotificationSuccess) {
|
|
3367
|
-
ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage,
|
|
3537
|
+
ToastUtil.actionNotificationSuccess(this.translate, action, 'run', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, item);
|
|
3368
3538
|
}
|
|
3369
3539
|
return value;
|
|
3370
3540
|
}), catchError(err => {
|
|
3371
3541
|
if (action.hasRunNotificationError) {
|
|
3372
|
-
ToastUtil.actionNotificationError(this.translate, action, err, 'run',
|
|
3542
|
+
ToastUtil.actionNotificationError(this.translate, action, err, 'run', viewContainer, item);
|
|
3373
3543
|
}
|
|
3374
3544
|
throw err;
|
|
3375
3545
|
}));
|
|
@@ -3383,22 +3553,22 @@ class MngActionService {
|
|
|
3383
3553
|
* @param formItem Item instance (from form).
|
|
3384
3554
|
* @param dataProvider Data provider
|
|
3385
3555
|
* @param sourceComponent Source component from where the fetch function was called.
|
|
3386
|
-
* @param
|
|
3556
|
+
* @param viewContainer View container/service.
|
|
3387
3557
|
* @param actionData Additional action data.
|
|
3388
3558
|
*/
|
|
3389
|
-
runEditorSave(action, itemId, formItem, dataProvider, sourceComponent,
|
|
3390
|
-
const context = this.
|
|
3559
|
+
runEditorSave(action, itemId, formItem, dataProvider, sourceComponent, viewContainer, actionData) {
|
|
3560
|
+
const context = this.prepareExecContextForEditor(action, formItem, itemId, dataProvider, sourceComponent, viewContainer, actionData);
|
|
3391
3561
|
if (typeof action.submitFunction !== 'function') {
|
|
3392
3562
|
throw new Error(`Submit function for action ${action.actionName} cannot be invoked.`);
|
|
3393
3563
|
}
|
|
3394
3564
|
return action.submitFunction(context).pipe(map(res => new ActionRunResult(context, res)), map(value => {
|
|
3395
3565
|
if (action.hasRunNotificationSuccess) {
|
|
3396
|
-
ToastUtil.actionNotificationSuccess(this.translate, action, 'submit', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage,
|
|
3566
|
+
ToastUtil.actionNotificationSuccess(this.translate, action, 'submit', action.runNotificationSuccessTitle, action.runNotificationSuccessMessage, viewContainer, formItem);
|
|
3397
3567
|
}
|
|
3398
3568
|
return value;
|
|
3399
3569
|
}), catchError(err => {
|
|
3400
3570
|
if (action.hasRunNotificationError) {
|
|
3401
|
-
ToastUtil.actionNotificationError(this.translate, action, err, 'submit',
|
|
3571
|
+
ToastUtil.actionNotificationError(this.translate, action, err, 'submit', viewContainer, formItem);
|
|
3402
3572
|
}
|
|
3403
3573
|
throw err;
|
|
3404
3574
|
}));
|
|
@@ -3410,31 +3580,41 @@ class MngActionService {
|
|
|
3410
3580
|
* @param itemId Item id.
|
|
3411
3581
|
* @param dataProvider Data provider
|
|
3412
3582
|
* @param sourceComponent Source component from where the fetch function was called.
|
|
3413
|
-
* @param
|
|
3583
|
+
* @param viewContainer View container/service. Tableview component.
|
|
3414
3584
|
* @param actionData Additional action data.
|
|
3415
3585
|
*/
|
|
3416
|
-
runEditorFetch(action, itemId, dataProvider, sourceComponent,
|
|
3417
|
-
const context = this.
|
|
3586
|
+
runEditorFetch(action, itemId, dataProvider, sourceComponent, viewContainer, actionData) {
|
|
3587
|
+
const context = this.prepareExecContextForEditor(action, undefined, itemId, dataProvider, sourceComponent, viewContainer, actionData);
|
|
3418
3588
|
return action.fetchFunction(context).pipe(map(res => new ActionRunResult(context, res)));
|
|
3419
3589
|
// TODO: error handling
|
|
3420
3590
|
}
|
|
3421
3591
|
/**
|
|
3422
|
-
* Prepares action
|
|
3592
|
+
* Prepares action exec context for action of type editor.
|
|
3423
3593
|
*
|
|
3424
3594
|
* @param item Item instance (if exists).
|
|
3425
3595
|
* @param itemId Item id (if exists).
|
|
3426
3596
|
* @param dataProvider Data provider.
|
|
3427
3597
|
* @param sourceComponent Source component from where the context preparation was called.
|
|
3428
|
-
* @param
|
|
3598
|
+
* @param viewContainer View container/service.
|
|
3429
3599
|
* @param actionData Additional action data.
|
|
3430
3600
|
*/
|
|
3431
|
-
|
|
3601
|
+
prepareExecContextForEditor(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData) {
|
|
3432
3602
|
var _a;
|
|
3433
|
-
|
|
3603
|
+
let ctxDataProvider = dataProvider;
|
|
3604
|
+
if (!ctxDataProvider && action.dataProvider) {
|
|
3605
|
+
ctxDataProvider = action.dataProvider;
|
|
3606
|
+
}
|
|
3607
|
+
if (!ctxDataProvider) {
|
|
3608
|
+
const viewContainerDataProvider = viewContainer === null || viewContainer === void 0 ? void 0 : viewContainer.getDataProvider();
|
|
3609
|
+
if (viewContainerDataProvider) {
|
|
3610
|
+
ctxDataProvider = action.dataProvider;
|
|
3611
|
+
}
|
|
3612
|
+
}
|
|
3613
|
+
const context = new ActionExecContext(ctxDataProvider, (_a = this.getDataProviderService(ctxDataProvider)) !== null && _a !== void 0 ? _a : undefined, {
|
|
3434
3614
|
item,
|
|
3435
3615
|
itemId,
|
|
3436
3616
|
actionData
|
|
3437
|
-
}, sourceComponent,
|
|
3617
|
+
}, sourceComponent, viewContainer);
|
|
3438
3618
|
return context;
|
|
3439
3619
|
}
|
|
3440
3620
|
/**
|
|
@@ -3457,12 +3637,15 @@ class MngActionService {
|
|
|
3457
3637
|
* @param item Item instance (if exists).
|
|
3458
3638
|
* @param itemId Item id (if exists).
|
|
3459
3639
|
* @param actionData Optional additional action data.
|
|
3460
|
-
* @param
|
|
3640
|
+
* @param viewContainer View container component/service.
|
|
3461
3641
|
* @param sourceComponent Source activation component.
|
|
3462
3642
|
*/
|
|
3463
|
-
activateAction(action, itemId, item, actionData,
|
|
3464
|
-
var _a;
|
|
3643
|
+
activateAction(action, itemId, item, actionData, viewContainer, sourceComponent) {
|
|
3465
3644
|
if (action.type === ActionTypeEnum.Editor) {
|
|
3645
|
+
let dialogComponent = this.defaultEditorDialogComponent;
|
|
3646
|
+
if (action instanceof ActionEditorDescriptor && action.editorComponent) {
|
|
3647
|
+
dialogComponent = action.editorComponent;
|
|
3648
|
+
}
|
|
3466
3649
|
const dialogConfig = {
|
|
3467
3650
|
data: {
|
|
3468
3651
|
action
|
|
@@ -3478,18 +3661,18 @@ class MngActionService {
|
|
|
3478
3661
|
if (actionData) {
|
|
3479
3662
|
dialogConfig.data.actionData = actionData;
|
|
3480
3663
|
}
|
|
3481
|
-
if (
|
|
3482
|
-
dialogConfig.data.
|
|
3664
|
+
if (viewContainer) {
|
|
3665
|
+
dialogConfig.data.viewContainer = viewContainer;
|
|
3483
3666
|
}
|
|
3484
3667
|
if (sourceComponent) {
|
|
3485
3668
|
dialogConfig.data.sourceComponent = sourceComponent;
|
|
3486
3669
|
}
|
|
3487
|
-
const dialogRef = this.dialogService.open(
|
|
3670
|
+
const dialogRef = this.dialogService.open(dialogComponent, dialogConfig);
|
|
3488
3671
|
return of(new ActionActivationResult(undefined, dialogRef));
|
|
3489
3672
|
}
|
|
3490
3673
|
else {
|
|
3491
3674
|
// directly execute action
|
|
3492
|
-
return this.runAction(action, itemId, item,
|
|
3675
|
+
return this.runAction(action, itemId, item, undefined, sourceComponent, viewContainer, actionData).pipe(map(res => new ActionActivationResult(res)));
|
|
3493
3676
|
}
|
|
3494
3677
|
}
|
|
3495
3678
|
/**
|
|
@@ -3513,7 +3696,7 @@ class MngActionService {
|
|
|
3513
3696
|
* @param actionData Optional action data.
|
|
3514
3697
|
* @param route Optional activated route.
|
|
3515
3698
|
*/
|
|
3516
|
-
triggerAction(action, itemId, item, actionData, route,
|
|
3699
|
+
triggerAction(action, itemId, item, actionData, route, viewContainer, sourceComponent) {
|
|
3517
3700
|
var _a;
|
|
3518
3701
|
if (action.activationTrigger === ActionActivationTriggerEnum.OnRoute) {
|
|
3519
3702
|
const baseUrl = this.router.url.split('?')[0];
|
|
@@ -3542,15 +3725,20 @@ class MngActionService {
|
|
|
3542
3725
|
return of(new ActionTriggerResult(undefined, from(this.router.navigate([baseUrl, ...actionUrlSegments], { relativeTo: route, queryParams: parsedUrl.queryParams }))));
|
|
3543
3726
|
}
|
|
3544
3727
|
else {
|
|
3545
|
-
return this.activateAction(action, itemId, item, actionData,
|
|
3728
|
+
return this.activateAction(action, itemId, item, actionData, viewContainer, sourceComponent).pipe(map(res => new ActionTriggerResult(res)));
|
|
3546
3729
|
}
|
|
3547
3730
|
}
|
|
3548
3731
|
}
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type:
|
|
3732
|
+
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: ACTION_EDITOR_DIALOG_COMPONENT_SETTING }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3733
|
+
MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService });
|
|
3734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionExecutorService, decorators: [{
|
|
3552
3735
|
type: Injectable
|
|
3553
|
-
}], ctorParameters: function () {
|
|
3736
|
+
}], ctorParameters: function () {
|
|
3737
|
+
return [{ type: i0.Injector }, { type: i1.Router }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: i3$1.TranslateService }, { type: i0.Type, decorators: [{
|
|
3738
|
+
type: Inject,
|
|
3739
|
+
args: [ACTION_EDITOR_DIALOG_COMPONENT_SETTING]
|
|
3740
|
+
}] }];
|
|
3741
|
+
} });
|
|
3554
3742
|
|
|
3555
3743
|
class MngConfigurationService {
|
|
3556
3744
|
constructor(http) {
|
|
@@ -3628,13 +3816,6 @@ class MngConfigurationService {
|
|
|
3628
3816
|
}
|
|
3629
3817
|
MngConfigurationService._instance = null;
|
|
3630
3818
|
|
|
3631
|
-
const MNG_BROWSER_STORAGE_IT = new InjectionToken('Browser storage', {
|
|
3632
|
-
providedIn: 'root',
|
|
3633
|
-
factory: () => localStorage
|
|
3634
|
-
});
|
|
3635
|
-
|
|
3636
|
-
const MNG_MODULE_CONFIG_IT = new InjectionToken('MngModuleConfig');
|
|
3637
|
-
|
|
3638
3819
|
class MngCommonsService {
|
|
3639
3820
|
constructor(router, primengConfig, translate, titleService, configurationService, moduleConfig, localStorage) {
|
|
3640
3821
|
this.router = router;
|
|
@@ -3966,12 +4147,12 @@ class MngCommonsService {
|
|
|
3966
4147
|
return titlePieces.join(' - ');
|
|
3967
4148
|
}
|
|
3968
4149
|
}
|
|
3969
|
-
MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, deps: [{ token: i1.Router }, { token: i2
|
|
4150
|
+
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.Title }, { token: MngConfigurationService }, { token: MNG_MODULE_CONFIG_IT }, { token: MNG_BROWSER_STORAGE_IT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3970
4151
|
MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService });
|
|
3971
4152
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsService, decorators: [{
|
|
3972
4153
|
type: Injectable
|
|
3973
4154
|
}], ctorParameters: function () {
|
|
3974
|
-
return [{ type: i1.Router }, { type: i2
|
|
4155
|
+
return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i3$1.TranslateService }, { type: i4.Title }, { type: MngConfigurationService }, { type: undefined, decorators: [{
|
|
3975
4156
|
type: Inject,
|
|
3976
4157
|
args: [MNG_MODULE_CONFIG_IT]
|
|
3977
4158
|
}] }, { type: Storage, decorators: [{
|
|
@@ -4023,54 +4204,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4023
4204
|
type: Injectable
|
|
4024
4205
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i4$1.Location }]; } });
|
|
4025
4206
|
|
|
4026
|
-
|
|
4027
|
-
|
|
4207
|
+
/**
|
|
4208
|
+
* Should be used with providers defined within component.
|
|
4209
|
+
*/
|
|
4210
|
+
class MngViewContainerComponentService {
|
|
4211
|
+
constructor(messageService) {
|
|
4212
|
+
this.messageService = messageService;
|
|
4028
4213
|
this.actions = [];
|
|
4029
4214
|
this._reloadTableSubject = new Subject();
|
|
4030
4215
|
}
|
|
4216
|
+
set dataProvider(dataProvider) {
|
|
4217
|
+
this._dataProvider = dataProvider;
|
|
4218
|
+
}
|
|
4031
4219
|
get reloadTable$() {
|
|
4032
4220
|
return this._reloadTableSubject.asObservable();
|
|
4033
4221
|
}
|
|
4034
4222
|
triggerTableReload(event) {
|
|
4035
4223
|
this._reloadTableSubject.next(event);
|
|
4036
4224
|
}
|
|
4225
|
+
getMessageService() {
|
|
4226
|
+
return this.messageService;
|
|
4227
|
+
}
|
|
4228
|
+
getDataProvider() {
|
|
4229
|
+
return this._dataProvider;
|
|
4230
|
+
}
|
|
4037
4231
|
}
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type:
|
|
4232
|
+
MngViewContainerComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService, deps: [{ token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4233
|
+
MngViewContainerComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService });
|
|
4234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngViewContainerComponentService, decorators: [{
|
|
4041
4235
|
type: Injectable
|
|
4042
|
-
}] });
|
|
4236
|
+
}], ctorParameters: function () { return [{ type: i2.MessageService }]; } });
|
|
4043
4237
|
|
|
4044
4238
|
class MngActionComponent {
|
|
4045
|
-
constructor(route, translate,
|
|
4239
|
+
constructor(route, translate, actionExecutor, confirmationService, viewContainerService) {
|
|
4046
4240
|
this.route = route;
|
|
4047
4241
|
this.translate = translate;
|
|
4048
|
-
this.
|
|
4242
|
+
this.actionExecutor = actionExecutor;
|
|
4049
4243
|
this.confirmationService = confirmationService;
|
|
4050
|
-
this.
|
|
4244
|
+
this.viewContainerService = viewContainerService;
|
|
4051
4245
|
this.loadingSubject = new ReplaySubject(1);
|
|
4052
4246
|
this.$loading = this.loadingSubject.asObservable();
|
|
4053
4247
|
this.cmpId = Math.random().toString(36).substring(2);
|
|
4054
4248
|
this.loadingSubject.next(false);
|
|
4055
4249
|
}
|
|
4056
4250
|
ngOnInit() {
|
|
4057
|
-
var _a, _b, _c, _d, _e, _f;
|
|
4058
|
-
|
|
4251
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4252
|
+
this.viewContainer = (_b = (_a = this.viewContainerInit) !== null && _a !== void 0 ? _a : this.viewContainerService) !== null && _b !== void 0 ? _b : undefined;
|
|
4253
|
+
const context = this.actionExecutor.prepareActionExecContext(this.action, this.itemId, this.item, this.dataProvider, (_c = this.viewContainer) !== null && _c !== void 0 ? _c : undefined, this, this.actionData);
|
|
4059
4254
|
this.$isVisible = typeof this.action.isVisibleFunction === 'function' ? this.action.isVisibleFunction(context) : of(true);
|
|
4060
4255
|
this.$isEnabled = typeof this.action.isEnabledFunction === 'function' ? this.action.isEnabledFunction(context) : of(true);
|
|
4061
|
-
this.$label = I18nUtil.streamActionTranslation(this.translate, this.action, 'title', (
|
|
4062
|
-
this.$tooltip = I18nUtil.streamActionTranslation(this.translate, this.action, 'tooltip', (
|
|
4256
|
+
this.$label = I18nUtil.streamActionTranslation(this.translate, this.action, 'title', (_e = (_d = this.action) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : undefined, this.item);
|
|
4257
|
+
this.$tooltip = I18nUtil.streamActionTranslation(this.translate, this.action, 'tooltip', (_g = (_f = this.action) === null || _f === void 0 ? void 0 : _f.tooltip) !== null && _g !== void 0 ? _g : undefined, this.item);
|
|
4063
4258
|
}
|
|
4064
4259
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4065
4260
|
triggerAction(event) {
|
|
4066
4261
|
this.loadingSubject.next(true);
|
|
4067
4262
|
const actionData = this.actionData ? this.actionData : {};
|
|
4068
4263
|
actionData['cmpId'] = this.cmpId;
|
|
4069
|
-
this.
|
|
4070
|
-
.triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.
|
|
4071
|
-
.pipe(first()
|
|
4072
|
-
|
|
4073
|
-
|
|
4264
|
+
this.actionExecutor
|
|
4265
|
+
.triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.viewContainer, this)
|
|
4266
|
+
.pipe(first())
|
|
4267
|
+
.subscribe({
|
|
4268
|
+
next: () => {
|
|
4269
|
+
this.loadingSubject.next(false);
|
|
4270
|
+
},
|
|
4271
|
+
error: err => {
|
|
4272
|
+
console.error(`Error occurred while executing action ${this.action.actionName}.`, err);
|
|
4273
|
+
}
|
|
4274
|
+
});
|
|
4074
4275
|
}
|
|
4075
4276
|
getConfirmationService() {
|
|
4076
4277
|
return this.confirmationService;
|
|
@@ -4079,12 +4280,16 @@ class MngActionComponent {
|
|
|
4079
4280
|
return `${action.actionName}_${this.cmpId}`;
|
|
4080
4281
|
}
|
|
4081
4282
|
}
|
|
4082
|
-
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i3.TranslateService }, { token:
|
|
4083
|
-
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionComponent, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData" }, providers: [
|
|
4283
|
+
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 });
|
|
4284
|
+
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", viewContainerInit: ["viewContainer", "viewContainerInit"] }, 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\"\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.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\"\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-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: 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 });
|
|
4084
4285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
4085
4286
|
type: Component,
|
|
4086
|
-
args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
4087
|
-
}], ctorParameters: function () {
|
|
4287
|
+
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\"\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.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\"\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-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" }]
|
|
4288
|
+
}], ctorParameters: function () {
|
|
4289
|
+
return [{ type: i1.ActivatedRoute }, { type: i3$1.TranslateService }, { type: MngActionExecutorService }, { type: i2.ConfirmationService }, { type: MngViewContainerComponentService, decorators: [{
|
|
4290
|
+
type: Optional
|
|
4291
|
+
}] }];
|
|
4292
|
+
}, propDecorators: { action: [{
|
|
4088
4293
|
type: Input
|
|
4089
4294
|
}], item: [{
|
|
4090
4295
|
type: Input
|
|
@@ -4092,23 +4297,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4092
4297
|
type: Input
|
|
4093
4298
|
}], actionData: [{
|
|
4094
4299
|
type: Input
|
|
4300
|
+
}], dataProvider: [{
|
|
4301
|
+
type: Input
|
|
4302
|
+
}], viewContainerInit: [{
|
|
4303
|
+
type: Input,
|
|
4304
|
+
args: ['viewContainer']
|
|
4095
4305
|
}] } });
|
|
4096
4306
|
|
|
4097
4307
|
class MngActionRouteComponent {
|
|
4098
|
-
constructor(router, route, confirmationService, navigationService,
|
|
4308
|
+
constructor(router, route, confirmationService, navigationService, actionExecutor, viewContainerService) {
|
|
4099
4309
|
this.router = router;
|
|
4100
4310
|
this.route = route;
|
|
4101
4311
|
this.confirmationService = confirmationService;
|
|
4102
4312
|
this.navigationService = navigationService;
|
|
4103
|
-
this.
|
|
4104
|
-
this.
|
|
4313
|
+
this.actionExecutor = actionExecutor;
|
|
4314
|
+
this.viewContainerService = viewContainerService;
|
|
4105
4315
|
this.cmpId = Math.random().toString(36).substring(2);
|
|
4106
4316
|
this.actions = [];
|
|
4107
4317
|
this.subscriptions = [];
|
|
4108
4318
|
}
|
|
4109
4319
|
ngOnInit() {
|
|
4110
4320
|
var _a, _b;
|
|
4111
|
-
this.actions = (_b = (_a = this.
|
|
4321
|
+
this.actions = (_b = (_a = this.viewContainerService) === null || _a === void 0 ? void 0 : _a.actions.filter(a => a.activationTrigger === ActionActivationTriggerEnum.OnRoute)) !== null && _b !== void 0 ? _b : [];
|
|
4112
4322
|
const subscription = this.route.params.subscribe(p => {
|
|
4113
4323
|
const action = this.findActiveAction(p);
|
|
4114
4324
|
if (action) {
|
|
@@ -4131,6 +4341,7 @@ class MngActionRouteComponent {
|
|
|
4131
4341
|
return `actionRoute_${this.cmpId}`;
|
|
4132
4342
|
}
|
|
4133
4343
|
activateAction(action, p, qp) {
|
|
4344
|
+
var _a;
|
|
4134
4345
|
this.activeAction = action;
|
|
4135
4346
|
const itemId = p['itemId'];
|
|
4136
4347
|
const actionData = {};
|
|
@@ -4143,18 +4354,21 @@ class MngActionRouteComponent {
|
|
|
4143
4354
|
for (const key in qp) {
|
|
4144
4355
|
actionData[key] = p[key];
|
|
4145
4356
|
}
|
|
4146
|
-
this.
|
|
4147
|
-
.activateAction(action, itemId, undefined, actionData, this.
|
|
4357
|
+
this.actionExecutor
|
|
4358
|
+
.activateAction(action, itemId, undefined, actionData, (_a = this.viewContainerService) !== null && _a !== void 0 ? _a : undefined, this)
|
|
4148
4359
|
.pipe(first())
|
|
4149
4360
|
.subscribe(res => {
|
|
4150
4361
|
var _a;
|
|
4151
4362
|
if (res.dialogRef) {
|
|
4152
4363
|
this.dialogRef = res.dialogRef;
|
|
4153
4364
|
this.dialogCloseSubscription = (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.onClose.subscribe(e => {
|
|
4154
|
-
var _a;
|
|
4365
|
+
var _a, _b;
|
|
4155
4366
|
const actionEv = e;
|
|
4156
4367
|
if (!(actionEv === null || actionEv === void 0 ? void 0 : actionEv.error) || !((_a = actionEv === null || actionEv === void 0 ? void 0 : actionEv.error) === null || _a === void 0 ? void 0 : _a.dismissed)) {
|
|
4157
|
-
this.
|
|
4368
|
+
if (!this.viewContainerService) {
|
|
4369
|
+
console.warn(`View container service could not be found, table reload will not be triggered.`);
|
|
4370
|
+
}
|
|
4371
|
+
(_b = this.viewContainerService) === null || _b === void 0 ? void 0 : _b.triggerTableReload(actionEv); // reload only if no error in action and
|
|
4158
4372
|
}
|
|
4159
4373
|
this.deactivateAction();
|
|
4160
4374
|
});
|
|
@@ -4228,12 +4442,16 @@ class MngActionRouteComponent {
|
|
|
4228
4442
|
return null;
|
|
4229
4443
|
}
|
|
4230
4444
|
}
|
|
4231
|
-
MngActionRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionRouteComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2
|
|
4445
|
+
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 });
|
|
4232
4446
|
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 });
|
|
4233
4447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionRouteComponent, decorators: [{
|
|
4234
4448
|
type: Component,
|
|
4235
4449
|
args: [{ selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [MessageService, ConfirmationService], template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n" }]
|
|
4236
|
-
}], ctorParameters: function () {
|
|
4450
|
+
}], ctorParameters: function () {
|
|
4451
|
+
return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.ConfirmationService }, { type: MngNavigationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService, decorators: [{
|
|
4452
|
+
type: Optional
|
|
4453
|
+
}] }];
|
|
4454
|
+
} });
|
|
4237
4455
|
|
|
4238
4456
|
class MngComponentDirective {
|
|
4239
4457
|
constructor(viewContainerRef) {
|
|
@@ -4393,7 +4611,7 @@ class MngFormEditorComponent {
|
|
|
4393
4611
|
}
|
|
4394
4612
|
let nextControl = null;
|
|
4395
4613
|
if (control instanceof FormGroup) {
|
|
4396
|
-
|
|
4614
|
+
nextControl = control.get(keyPath[0]);
|
|
4397
4615
|
}
|
|
4398
4616
|
else if (control instanceof FormArray) {
|
|
4399
4617
|
const idx = +keyPath[0];
|
|
@@ -4441,12 +4659,12 @@ class MngFormEditorComponent {
|
|
|
4441
4659
|
this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;
|
|
4442
4660
|
}
|
|
4443
4661
|
}
|
|
4444
|
-
MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, deps: [{ token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4445
|
-
MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isSubmitButtonVisible: "isSubmitButtonVisible", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", components: [{ type: i3$
|
|
4662
|
+
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 });
|
|
4663
|
+
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: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4446
4664
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormEditorComponent, decorators: [{
|
|
4447
4665
|
type: Component,
|
|
4448
4666
|
args: [{ selector: 'mng-form-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n" }]
|
|
4449
|
-
}], ctorParameters: function () { return [{ type: i3.TranslateService }]; }, propDecorators: { descriptor: [{
|
|
4667
|
+
}], ctorParameters: function () { return [{ type: i3$1.TranslateService }]; }, propDecorators: { descriptor: [{
|
|
4450
4668
|
type: Input
|
|
4451
4669
|
}], submitLoading: [{
|
|
4452
4670
|
type: Input
|
|
@@ -4548,7 +4766,7 @@ class MngAutocompleteComponent {
|
|
|
4548
4766
|
}
|
|
4549
4767
|
}
|
|
4550
4768
|
MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
4551
|
-
MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelProperty: "itemsLabelProperty", multiselect: "multiselect", placeholder: "placeholder", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-autoComplete\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", components: [{ type: i1$1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4769
|
+
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$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4552
4770
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngAutocompleteComponent, decorators: [{
|
|
4553
4771
|
type: Component,
|
|
4554
4772
|
args: [{ selector: 'mng-autocomplete', providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
|
|
@@ -4644,7 +4862,7 @@ class MngDropdownComponent {
|
|
|
4644
4862
|
}
|
|
4645
4863
|
}
|
|
4646
4864
|
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
4647
|
-
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngDropdownComponent, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelProperty: "itemsLabelProperty", itemsValueProperty: "itemsValueProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n", components: [{ type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i2$
|
|
4865
|
+
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$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$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 });
|
|
4648
4866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngDropdownComponent, decorators: [{
|
|
4649
4867
|
type: Component,
|
|
4650
4868
|
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" }]
|
|
@@ -4676,15 +4894,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4676
4894
|
args: [Dropdown]
|
|
4677
4895
|
}] } });
|
|
4678
4896
|
|
|
4679
|
-
class
|
|
4680
|
-
constructor(injector, translate, dialogRef, dialogConfig,
|
|
4897
|
+
class MngActionEditorComponent {
|
|
4898
|
+
constructor(injector, translate, actionExecutor, mngCommonsService, dialogRef, dialogConfig, viewContainerService) {
|
|
4681
4899
|
this.injector = injector;
|
|
4682
4900
|
this.translate = translate;
|
|
4901
|
+
this.actionExecutor = actionExecutor;
|
|
4902
|
+
this.mngCommonsService = mngCommonsService;
|
|
4683
4903
|
this.dialogRef = dialogRef;
|
|
4684
4904
|
this.dialogConfig = dialogConfig;
|
|
4685
|
-
this.
|
|
4686
|
-
this.mngCommonsService = mngCommonsService;
|
|
4905
|
+
this.viewContainerService = viewContainerService;
|
|
4687
4906
|
this.cmpId = Math.random().toString(36).substring(2);
|
|
4907
|
+
this.isDialog = true;
|
|
4688
4908
|
this.isSaveButton = true;
|
|
4689
4909
|
this.loadingSubject = new ReplaySubject(1);
|
|
4690
4910
|
this.loading$ = this.loadingSubject.asObservable();
|
|
@@ -4694,8 +4914,8 @@ class MngActionDialogComponent {
|
|
|
4694
4914
|
this.subscriptions = [];
|
|
4695
4915
|
}
|
|
4696
4916
|
ngOnInit() {
|
|
4697
|
-
var _a;
|
|
4698
|
-
if (this.dialogConfig.data) {
|
|
4917
|
+
var _a, _b, _c;
|
|
4918
|
+
if ((_a = this.dialogConfig) === null || _a === void 0 ? void 0 : _a.data) {
|
|
4699
4919
|
if (this.dialogConfig.data.action) {
|
|
4700
4920
|
this.action = this.dialogConfig.data.action;
|
|
4701
4921
|
}
|
|
@@ -4708,18 +4928,25 @@ class MngActionDialogComponent {
|
|
|
4708
4928
|
if (this.dialogConfig.data.actionData) {
|
|
4709
4929
|
this.actionData = this.dialogConfig.data.actionData;
|
|
4710
4930
|
}
|
|
4711
|
-
if (this.dialogConfig.data.
|
|
4712
|
-
this.
|
|
4713
|
-
if (!this.dataProvider &&
|
|
4714
|
-
|
|
4931
|
+
if (this.dialogConfig.data.viewContainer) {
|
|
4932
|
+
this.viewContainer = this.dialogConfig.data.viewContainer;
|
|
4933
|
+
if (!this.dataProvider && this.viewContainer) {
|
|
4934
|
+
const dataProvider = this.viewContainer.getDataProvider();
|
|
4935
|
+
if (dataProvider && typeof dataProvider['fetch'] === 'function') {
|
|
4936
|
+
this.dataProvider = dataProvider;
|
|
4937
|
+
}
|
|
4715
4938
|
}
|
|
4716
4939
|
}
|
|
4717
4940
|
if (this.dialogConfig.data.sourceComponent) {
|
|
4718
4941
|
this.sourceComponent = this.dialogConfig.data.sourceComponent;
|
|
4719
4942
|
}
|
|
4720
4943
|
}
|
|
4944
|
+
else {
|
|
4945
|
+
this.isDialog = false;
|
|
4946
|
+
this.viewContainer = (_c = (_b = this.viewContainerInit) !== null && _b !== void 0 ? _b : this.viewContainerService) !== null && _c !== void 0 ? _c : undefined;
|
|
4947
|
+
}
|
|
4721
4948
|
this.isSaveButton = typeof this.action.submitFunction === 'function';
|
|
4722
|
-
this.
|
|
4949
|
+
this.setTitle();
|
|
4723
4950
|
this.loadItemWithDataProvider();
|
|
4724
4951
|
}
|
|
4725
4952
|
ngOnDestroy() {
|
|
@@ -4731,16 +4958,23 @@ class MngActionDialogComponent {
|
|
|
4731
4958
|
return;
|
|
4732
4959
|
}
|
|
4733
4960
|
this.submitLoadingSubject.next(true);
|
|
4734
|
-
this.
|
|
4735
|
-
.runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.
|
|
4736
|
-
.pipe(first()
|
|
4737
|
-
.subscribe(
|
|
4738
|
-
|
|
4961
|
+
this.actionExecutor
|
|
4962
|
+
.runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.viewContainer, this.actionData)
|
|
4963
|
+
.pipe(first())
|
|
4964
|
+
.subscribe({
|
|
4965
|
+
next: res => {
|
|
4966
|
+
this.submitLoadingSubject.next(false);
|
|
4967
|
+
this.closeDialog(res);
|
|
4968
|
+
},
|
|
4969
|
+
error: () => {
|
|
4970
|
+
this.submitLoadingSubject.next(false);
|
|
4971
|
+
}
|
|
4739
4972
|
});
|
|
4740
4973
|
}
|
|
4741
4974
|
}
|
|
4742
4975
|
closeDialog(result) {
|
|
4743
|
-
|
|
4976
|
+
var _a;
|
|
4977
|
+
(_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.close(result ? result : new ActionRunResult(undefined, undefined, new ActionError(null, true)));
|
|
4744
4978
|
}
|
|
4745
4979
|
saveItem() {
|
|
4746
4980
|
this.editorComponent.submit();
|
|
@@ -4750,48 +4984,62 @@ class MngActionDialogComponent {
|
|
|
4750
4984
|
return;
|
|
4751
4985
|
}
|
|
4752
4986
|
this.loadingSubject.next(true);
|
|
4753
|
-
this.
|
|
4754
|
-
.runEditorFetch(this.action, this.itemId, this.dataProvider, this.sourceComponent, this.
|
|
4987
|
+
this.actionExecutor
|
|
4988
|
+
.runEditorFetch(this.action, this.itemId, this.dataProvider, this.sourceComponent, this.viewContainer)
|
|
4755
4989
|
.pipe(first(), catchError(err => {
|
|
4756
4990
|
if (this.action.hasRunNotificationError) {
|
|
4757
|
-
ToastUtil.actionNotificationError(this.translate, this.action, err, 'fetch', this.
|
|
4991
|
+
ToastUtil.actionNotificationError(this.translate, this.action, err, 'fetch', this.viewContainer, this.item);
|
|
4758
4992
|
}
|
|
4759
4993
|
throw err;
|
|
4760
4994
|
}), finalize(() => this.loadingSubject.next(false)))
|
|
4761
4995
|
.subscribe(res => {
|
|
4762
4996
|
this.item = res.result;
|
|
4763
4997
|
if (this.action.hasFetchNotificationSuccess) {
|
|
4764
|
-
ToastUtil.actionNotificationSuccess(this.translate, this.action, 'fetch', this.action.fetchNotificationSuccessTitle, this.action.fetchNotificationSuccessMessage, this.
|
|
4998
|
+
ToastUtil.actionNotificationSuccess(this.translate, this.action, 'fetch', this.action.fetchNotificationSuccessTitle, this.action.fetchNotificationSuccessMessage, this.viewContainer, this.item);
|
|
4765
4999
|
}
|
|
4766
|
-
this.
|
|
5000
|
+
this.setTitle();
|
|
4767
5001
|
});
|
|
4768
5002
|
}
|
|
4769
|
-
|
|
5003
|
+
setTitle() {
|
|
4770
5004
|
if (this.action.editorTitle === null) {
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
5005
|
+
this.title = undefined;
|
|
5006
|
+
if (this.dialogConfig) {
|
|
5007
|
+
requestAnimationFrame(() => {
|
|
5008
|
+
this.dialogConfig.header = undefined;
|
|
5009
|
+
});
|
|
5010
|
+
return;
|
|
5011
|
+
}
|
|
4775
5012
|
}
|
|
4776
5013
|
const subscription = I18nUtil.streamActionTranslation(this.translate, this.action, 'dialog.title', undefined, this.item)
|
|
4777
5014
|
.pipe(mergeMap(i18nDialogTitle => i18nDialogTitle === null
|
|
4778
5015
|
? I18nUtil.getActionTranslation(this.translate, this.action, 'title', this.action.editorTitle, this.item)
|
|
4779
5016
|
: of(i18nDialogTitle)))
|
|
4780
5017
|
.subscribe(t => {
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
5018
|
+
this.title = t !== null && t !== void 0 ? t : undefined;
|
|
5019
|
+
if (this.dialogConfig) {
|
|
5020
|
+
requestAnimationFrame(() => {
|
|
5021
|
+
this.dialogConfig.header = t !== null && t !== void 0 ? t : undefined;
|
|
5022
|
+
this.mngCommonsService.setPageTitle(t !== null && t !== void 0 ? t : undefined);
|
|
5023
|
+
});
|
|
5024
|
+
}
|
|
4785
5025
|
});
|
|
4786
5026
|
this.subscriptions.push(subscription);
|
|
4787
5027
|
}
|
|
4788
5028
|
}
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type:
|
|
5029
|
+
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: i3.DynamicDialogRef, optional: true }, { token: i3.DynamicDialogConfig, optional: true }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
5030
|
+
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"] }, 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: "<h1 *ngIf=\"!isDialog && title\">{{ title }}</h1>\n<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: i5.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$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionEditorComponent, decorators: [{
|
|
4792
5032
|
type: Component,
|
|
4793
|
-
args: [{ selector: 'mng-action-
|
|
4794
|
-
}], ctorParameters: function () {
|
|
5033
|
+
args: [{ selector: 'mng-action-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h1 *ngIf=\"!isDialog && title\">{{ title }}</h1>\n<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" }]
|
|
5034
|
+
}], ctorParameters: function () {
|
|
5035
|
+
return [{ type: i0.Injector }, { type: i3$1.TranslateService }, { type: MngActionExecutorService }, { type: MngCommonsService }, { type: i3.DynamicDialogRef, decorators: [{
|
|
5036
|
+
type: Optional
|
|
5037
|
+
}] }, { type: i3.DynamicDialogConfig, decorators: [{
|
|
5038
|
+
type: Optional
|
|
5039
|
+
}] }, { type: MngViewContainerComponentService, decorators: [{
|
|
5040
|
+
type: Optional
|
|
5041
|
+
}] }];
|
|
5042
|
+
}, propDecorators: { action: [{
|
|
4795
5043
|
type: Input
|
|
4796
5044
|
}], itemId: [{
|
|
4797
5045
|
type: Input
|
|
@@ -4801,6 +5049,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4801
5049
|
type: Input
|
|
4802
5050
|
}], dataProvider: [{
|
|
4803
5051
|
type: Input
|
|
5052
|
+
}], viewContainerInit: [{
|
|
5053
|
+
type: Input,
|
|
5054
|
+
args: ['viewContainer']
|
|
4804
5055
|
}], templates: [{
|
|
4805
5056
|
type: ContentChildren,
|
|
4806
5057
|
args: [MngTemplateDirective]
|
|
@@ -4819,10 +5070,10 @@ class MngFormlyFieldAutocompleteComponent extends FieldType {
|
|
|
4819
5070
|
}
|
|
4820
5071
|
}
|
|
4821
5072
|
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4822
|
-
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$
|
|
5073
|
+
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4823
5074
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
|
|
4824
5075
|
type: Component,
|
|
4825
|
-
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\">\n</mng-autocomplete>\n" }]
|
|
5076
|
+
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
|
|
4826
5077
|
}] });
|
|
4827
5078
|
|
|
4828
5079
|
class MngFormlyFieldInputComponent extends FieldType {
|
|
@@ -4836,10 +5087,10 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
4836
5087
|
}
|
|
4837
5088
|
}
|
|
4838
5089
|
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4839
|
-
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton
|
|
5090
|
+
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$3.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$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$2.ɵ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$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4840
5091
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
4841
5092
|
type: Component,
|
|
4842
|
-
args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton
|
|
5093
|
+
args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
4843
5094
|
}] });
|
|
4844
5095
|
|
|
4845
5096
|
class MngFormlyFieldDropdownComponent extends FieldType {
|
|
@@ -4849,10 +5100,10 @@ class MngFormlyFieldDropdownComponent extends FieldType {
|
|
|
4849
5100
|
}
|
|
4850
5101
|
}
|
|
4851
5102
|
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4852
|
-
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [showClear]=\"!to.required\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsValueProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$
|
|
5103
|
+
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 [className]=\"descriptor.inputClassName\">\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$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4853
5104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
|
|
4854
5105
|
type: Component,
|
|
4855
|
-
args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [showClear]=\"!to.required\">\n</mng-dropdown>\n" }]
|
|
5106
|
+
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 [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
|
|
4856
5107
|
}] });
|
|
4857
5108
|
|
|
4858
5109
|
class MngTableLoadEvent {
|
|
@@ -4936,12 +5187,12 @@ class MngTableColumnFilterComponent {
|
|
|
4936
5187
|
}
|
|
4937
5188
|
}
|
|
4938
5189
|
}
|
|
4939
|
-
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2
|
|
4940
|
-
MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: { descriptor: "descriptor", display: "display" }, ngImport: i0, template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"filterCallback($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n", components: [{ type: i4$
|
|
5190
|
+
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
5191
|
+
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$4.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.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$1.TranslatePipe } });
|
|
4941
5192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
|
|
4942
5193
|
type: Component,
|
|
4943
5194
|
args: [{ selector: 'mng-table-column-filter', template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"filterCallback($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n" }]
|
|
4944
|
-
}], ctorParameters: function () { return [{ type: i2
|
|
5195
|
+
}], ctorParameters: function () { return [{ type: i2.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
|
|
4945
5196
|
type: Input
|
|
4946
5197
|
}], display: [{
|
|
4947
5198
|
type: Input
|
|
@@ -5030,7 +5281,7 @@ class MngTableColumnValueComponent {
|
|
|
5030
5281
|
}
|
|
5031
5282
|
}
|
|
5032
5283
|
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5033
|
-
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property] }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n {{ (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property]) | boolean }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{\n (descriptor.displayPropertyPath ? (item | propertyPath: descriptor.displayPropertyPath) : item[descriptor.property])\n | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue\n | translate\n }}\n </ng-container>\n</ng-container>\n", directives: [{ type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "propertyPath": MngPropertyPathPipe, "number": i4$1.DecimalPipe, "date": i4$1.DatePipe, "boolean": MngBooleanPipe, "translate": i3.TranslatePipe, "enum": MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5284
|
+
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$1.TranslatePipe, "enum": MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5034
5285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
5035
5286
|
type: Component,
|
|
5036
5287
|
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" }]
|
|
@@ -5058,12 +5309,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
5058
5309
|
var TypeEnum = FilterDescriptor.TypeEnum;
|
|
5059
5310
|
var PaginationModeEnum = TableDescriptor.PaginationModeEnum;
|
|
5060
5311
|
class MngTableComponent {
|
|
5061
|
-
constructor(injector, router, activatedRoute, translate,
|
|
5312
|
+
constructor(injector, router, activatedRoute, translate, viewContainerService) {
|
|
5062
5313
|
this.injector = injector;
|
|
5063
5314
|
this.router = router;
|
|
5064
5315
|
this.activatedRoute = activatedRoute;
|
|
5065
5316
|
this.translate = translate;
|
|
5066
|
-
this.
|
|
5317
|
+
this.viewContainerService = viewContainerService;
|
|
5067
5318
|
this.filterDisplayRow = TableDescriptor.FilterDisplayEnum.Row;
|
|
5068
5319
|
this.filterDisplayMenu = TableDescriptor.FilterDisplayEnum.Menu;
|
|
5069
5320
|
this.useQueryParams = false;
|
|
@@ -5251,7 +5502,8 @@ class MngTableComponent {
|
|
|
5251
5502
|
this.isSortChanged = false;
|
|
5252
5503
|
this.dataProviderLoadingSubject.next(false);
|
|
5253
5504
|
}, err => {
|
|
5254
|
-
|
|
5505
|
+
var _a;
|
|
5506
|
+
ToastUtil.tableNotificationError(this.translate, this.descriptor, err, (_a = this.viewContainerService) !== null && _a !== void 0 ? _a : undefined);
|
|
5255
5507
|
const emptyQueryResult = new MediusQueryResult();
|
|
5256
5508
|
emptyQueryResult.pageData = [];
|
|
5257
5509
|
emptyQueryResult.allDataCount = 0;
|
|
@@ -5318,13 +5570,13 @@ class MngTableComponent {
|
|
|
5318
5570
|
}
|
|
5319
5571
|
}
|
|
5320
5572
|
}
|
|
5321
|
-
MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i3.TranslateService }, { token:
|
|
5322
|
-
MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableComponent, selector: "mng-table", inputs: { descriptor: "descriptor", items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", captionComponent: "captionComponent", columnActionComponent: "columnActionComponent" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], ngImport: i0, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", components: [{ type: i4$5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$5.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$5.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$5.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5573
|
+
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 });
|
|
5574
|
+
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-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\">\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$4.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$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$4.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.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$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3$1.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5323
5575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableComponent, decorators: [{
|
|
5324
5576
|
type: Component,
|
|
5325
|
-
args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.property | i18nProperty: descriptor.model | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" class=\"clickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
|
|
5577
|
+
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\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
|
|
5326
5578
|
}], ctorParameters: function () {
|
|
5327
|
-
return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i3.TranslateService }, { type:
|
|
5579
|
+
return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i3$1.TranslateService }, { type: MngViewContainerComponentService, decorators: [{
|
|
5328
5580
|
type: Optional
|
|
5329
5581
|
}] }];
|
|
5330
5582
|
}, propDecorators: { descriptor: [{
|
|
@@ -5374,14 +5626,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
5374
5626
|
}] } });
|
|
5375
5627
|
|
|
5376
5628
|
class MngTableviewComponent {
|
|
5377
|
-
constructor(route, messageService, translateService, dialogService, confirmationService,
|
|
5629
|
+
constructor(route, messageService, translateService, dialogService, confirmationService, actionExecutor, viewContainerService) {
|
|
5378
5630
|
this.route = route;
|
|
5379
5631
|
this.messageService = messageService;
|
|
5380
5632
|
this.translateService = translateService;
|
|
5381
5633
|
this.dialogService = dialogService;
|
|
5382
5634
|
this.confirmationService = confirmationService;
|
|
5383
|
-
this.
|
|
5384
|
-
this.
|
|
5635
|
+
this.actionExecutor = actionExecutor;
|
|
5636
|
+
this.viewContainerService = viewContainerService;
|
|
5385
5637
|
this.actions = [];
|
|
5386
5638
|
this.tableComponent = null;
|
|
5387
5639
|
this.rowClickActions = [];
|
|
@@ -5391,10 +5643,11 @@ class MngTableviewComponent {
|
|
|
5391
5643
|
this.subscriptions = [];
|
|
5392
5644
|
}
|
|
5393
5645
|
ngOnInit() {
|
|
5394
|
-
this.
|
|
5395
|
-
this.
|
|
5396
|
-
|
|
5397
|
-
|
|
5646
|
+
this.viewContainerService.actions = this.actions;
|
|
5647
|
+
if (this.dataProvider) {
|
|
5648
|
+
this.viewContainerService.dataProvider = this.dataProvider;
|
|
5649
|
+
}
|
|
5650
|
+
const reloadTableSubscription = this.viewContainerService.reloadTable$.subscribe(() => {
|
|
5398
5651
|
this.reloadTable();
|
|
5399
5652
|
});
|
|
5400
5653
|
this.subscriptions.push(reloadTableSubscription);
|
|
@@ -5418,6 +5671,12 @@ class MngTableviewComponent {
|
|
|
5418
5671
|
ngOnDestroy() {
|
|
5419
5672
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
5420
5673
|
}
|
|
5674
|
+
getMessageService() {
|
|
5675
|
+
return this.messageService;
|
|
5676
|
+
}
|
|
5677
|
+
getDataProvider() {
|
|
5678
|
+
return this.dataProvider;
|
|
5679
|
+
}
|
|
5421
5680
|
reloadTable() {
|
|
5422
5681
|
var _a;
|
|
5423
5682
|
(_a = this.tableComponent) === null || _a === void 0 ? void 0 : _a.reload();
|
|
@@ -5425,17 +5684,17 @@ class MngTableviewComponent {
|
|
|
5425
5684
|
onTableCellClick(event) {
|
|
5426
5685
|
if (this.rowClickActions.length) {
|
|
5427
5686
|
for (const action of this.rowClickActions) {
|
|
5428
|
-
this.
|
|
5687
|
+
this.actionExecutor.triggerRowClickAction(action, event, this.route);
|
|
5429
5688
|
}
|
|
5430
5689
|
}
|
|
5431
5690
|
}
|
|
5432
5691
|
}
|
|
5433
|
-
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2
|
|
5434
|
-
MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableviewComponent, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService,
|
|
5692
|
+
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 });
|
|
5693
|
+
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 [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-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: 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", "dataProvider", "viewContainer"] }, { 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.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$1.TranslatePipe } });
|
|
5435
5694
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
5436
5695
|
type: Component,
|
|
5437
|
-
args: [{ selector: 'mng-tableview', providers: [MessageService, ConfirmationService,
|
|
5438
|
-
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2
|
|
5696
|
+
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 [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-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" }]
|
|
5697
|
+
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.MessageService }, { type: i3$1.TranslateService }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
|
|
5439
5698
|
type: Input
|
|
5440
5699
|
}], dataProvider: [{
|
|
5441
5700
|
type: Input
|
|
@@ -5651,15 +5910,16 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
5651
5910
|
}
|
|
5652
5911
|
}
|
|
5653
5912
|
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
5654
|
-
MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldLookupDialogComponent, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"p-inputgroup mng-dropdown-dialog\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value\"></i>\n <button pButton pRipple class=\"mng-dropdown-dialog-search-button\" type=\"button\" [label]=\"'general.search' | translate: {item: ''}\" (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.lookupTableDescriptor!\"\n [dataProvider]=\"descriptor.lookupTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: i1$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i3$
|
|
5913
|
+
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", "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$1.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$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.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3$1.TranslatePipe, "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5655
5914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
5656
5915
|
type: Component,
|
|
5657
|
-
args: [{ selector: 'mng-formly-field-lookup-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"p-inputgroup mng-dropdown-dialog\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value\"></i>\n <button pButton pRipple class=\"mng-dropdown-dialog-search-button\" type=\"button\" [label]=\"'general.search' | translate: {item: ''}\" (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.lookupTableDescriptor!\"\n [dataProvider]=\"descriptor.lookupTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
5916
|
+
args: [{ selector: 'mng-formly-field-lookup-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value\"></i>\n <button pButton pRipple class=\"mng-dropdown-dialog-search-button\" type=\"button\" [label]=\"'general.search' | translate: {item: ''}\" (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.lookupTableDescriptor!\"\n [dataProvider]=\"descriptor.lookupTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
5658
5917
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
|
|
5659
5918
|
type: ViewChild,
|
|
5660
5919
|
args: [MngTableComponent]
|
|
5661
5920
|
}] } });
|
|
5662
5921
|
|
|
5922
|
+
var SizeEnum = ActionDescriptor.SizeEnum;
|
|
5663
5923
|
class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
5664
5924
|
constructor() {
|
|
5665
5925
|
super(...arguments);
|
|
@@ -5681,6 +5941,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
5681
5941
|
.withTitle(null)
|
|
5682
5942
|
.withIcon('pi pi-plus')
|
|
5683
5943
|
.withClassName('mng-formly-field-table-form-dialog')
|
|
5944
|
+
.withSize(SizeEnum.ExtraSmall)
|
|
5684
5945
|
.withSubmitFunction(ctx => {
|
|
5685
5946
|
var _a;
|
|
5686
5947
|
if (!((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item)) {
|
|
@@ -5701,6 +5962,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
5701
5962
|
.withTitle(null)
|
|
5702
5963
|
.withIcon('pi pi-pencil')
|
|
5703
5964
|
.withClassName('mng-formly-field-table-form-dialog')
|
|
5965
|
+
.withSize(SizeEnum.ExtraSmall)
|
|
5704
5966
|
.withSubmitFunction(ctx => {
|
|
5705
5967
|
var _a, _b;
|
|
5706
5968
|
if (!((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item)) {
|
|
@@ -5721,6 +5983,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
5721
5983
|
.withLevel(ActionLevelEnum.Danger)
|
|
5722
5984
|
.withTitle(null)
|
|
5723
5985
|
.withIcon('pi pi-trash')
|
|
5986
|
+
.withSize(SizeEnum.ExtraSmall)
|
|
5724
5987
|
.withRunFunction(ctx => {
|
|
5725
5988
|
var _a;
|
|
5726
5989
|
if (!((_a = ctx.data) === null || _a === void 0 ? void 0 : _a.item)) {
|
|
@@ -5769,10 +6032,10 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
5769
6032
|
}
|
|
5770
6033
|
}
|
|
5771
6034
|
MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5772
|
-
MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6035
|
+
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 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 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", "dataProvider", "viewContainer"] }], 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$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5773
6036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
|
|
5774
6037
|
type: Component,
|
|
5775
|
-
args: [{ selector: 'mng-formly-table-dialog-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
6038
|
+
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 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 toolbarActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
5776
6039
|
}] });
|
|
5777
6040
|
|
|
5778
6041
|
class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
@@ -5883,16 +6146,16 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
5883
6146
|
}
|
|
5884
6147
|
}
|
|
5885
6148
|
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
5886
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$
|
|
6149
|
+
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", "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$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.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3$1.TranslatePipe, "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5887
6150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
5888
6151
|
type: Component,
|
|
5889
|
-
args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end table-header\">\n <label class=\"mng-datatable-form-label p-m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
6152
|
+
args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
5890
6153
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
5891
6154
|
|
|
5892
6155
|
class MngFormlyFieldTabsComponent extends FieldType {
|
|
5893
6156
|
}
|
|
5894
6157
|
MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5895
|
-
MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$5.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$5.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3$
|
|
6158
|
+
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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5896
6159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
|
|
5897
6160
|
type: Component,
|
|
5898
6161
|
args: [{ selector: 'mng-formly-field-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n" }]
|
|
@@ -5901,7 +6164,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
5901
6164
|
class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
5902
6165
|
}
|
|
5903
6166
|
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5904
|
-
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n", components: [{ type: i1$6.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { type: i3$
|
|
6167
|
+
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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5905
6168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
|
|
5906
6169
|
type: Component,
|
|
5907
6170
|
args: [{ selector: 'mng-formly-field-fieldset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *ngIf=\"!group.templateOptions?.['descriptor']?.default; else defaultSet\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <ng-template #defaultSet>\n <formly-field [field]=\"group\"></formly-field>\n </ng-template>\n</ng-container>\n" }]
|
|
@@ -5910,19 +6173,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
5910
6173
|
class MngFormlyFieldWrapperComponent extends FieldWrapper {
|
|
5911
6174
|
}
|
|
5912
6175
|
MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5913
|
-
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldWrapperComponent, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n <label [for]=\"key\">{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$
|
|
6176
|
+
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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5914
6177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
5915
6178
|
type: Component,
|
|
5916
|
-
args: [{ selector: 'mng-formly-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field\">\n <label [for]=\"key\">{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
6179
|
+
args: [{ selector: 'mng-formly-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
5917
6180
|
}] });
|
|
5918
6181
|
|
|
5919
6182
|
class MngFormlyTableWrapperComponent extends FieldWrapper {
|
|
5920
6183
|
}
|
|
5921
6184
|
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5922
|
-
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$
|
|
6185
|
+
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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5923
6186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
|
|
5924
6187
|
type: Component,
|
|
5925
|
-
args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
6188
|
+
args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
5926
6189
|
}] });
|
|
5927
6190
|
|
|
5928
6191
|
class MngBreadcrumbComponent {
|
|
@@ -5931,7 +6194,7 @@ class MngBreadcrumbComponent {
|
|
|
5931
6194
|
}
|
|
5932
6195
|
}
|
|
5933
6196
|
MngBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngBreadcrumbComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5934
|
-
MngBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngBreadcrumbComponent, selector: "mng-breadcrumb", ngImport: i0, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n", components: [{ type: i2$
|
|
6197
|
+
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$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5935
6198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngBreadcrumbComponent, decorators: [{
|
|
5936
6199
|
type: Component,
|
|
5937
6200
|
args: [{ selector: 'mng-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n" }]
|
|
@@ -5944,7 +6207,7 @@ class MngFooterComponent {
|
|
|
5944
6207
|
}
|
|
5945
6208
|
}
|
|
5946
6209
|
MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5947
|
-
MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFooterComponent, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6210
|
+
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\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5948
6211
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFooterComponent, decorators: [{
|
|
5949
6212
|
type: Component,
|
|
5950
6213
|
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\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n" }]
|
|
@@ -6282,7 +6545,7 @@ class MngMenuItemComponent {
|
|
|
6282
6545
|
}
|
|
6283
6546
|
}
|
|
6284
6547
|
MngMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngMenuItemComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6285
|
-
MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active" } }, ngImport: i0, template: "<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i9.Ripple, selector: "[pRipple]" }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe }, animations: [
|
|
6548
|
+
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$1.TranslatePipe }, animations: [
|
|
6286
6549
|
trigger('children', [
|
|
6287
6550
|
state('void', style({
|
|
6288
6551
|
height: '0px'
|
|
@@ -6394,7 +6657,7 @@ class MngTopbarComponent {
|
|
|
6394
6657
|
}
|
|
6395
6658
|
}
|
|
6396
6659
|
MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6397
|
-
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTopbarComponent, selector: "mng-topbar", viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", components: [{ type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent"], outputs: ["instanceCreated"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6660
|
+
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$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6398
6661
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
6399
6662
|
type: Component,
|
|
6400
6663
|
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" }]
|
|
@@ -6737,7 +7000,7 @@ const declarations = [
|
|
|
6737
7000
|
// editor components
|
|
6738
7001
|
MngFormEditorComponent,
|
|
6739
7002
|
MngActionComponent,
|
|
6740
|
-
|
|
7003
|
+
MngActionEditorComponent,
|
|
6741
7004
|
MngActionRouteComponent
|
|
6742
7005
|
];
|
|
6743
7006
|
class MngCommonsModule {
|
|
@@ -6749,12 +7012,12 @@ class MngCommonsModule {
|
|
|
6749
7012
|
DialogService,
|
|
6750
7013
|
MessageService,
|
|
6751
7014
|
ConfirmationService,
|
|
6752
|
-
|
|
7015
|
+
MngActionExecutorService,
|
|
6753
7016
|
MngNavigationService,
|
|
6754
7017
|
MngCommonsService,
|
|
6755
7018
|
// component service
|
|
6756
7019
|
MngMainLayoutComponentService,
|
|
6757
|
-
|
|
7020
|
+
MngViewContainerComponentService,
|
|
6758
7021
|
{
|
|
6759
7022
|
provide: MNG_MODULE_CONFIG_IT,
|
|
6760
7023
|
useValue: config
|
|
@@ -6785,6 +7048,10 @@ class MngCommonsModule {
|
|
|
6785
7048
|
multi: true,
|
|
6786
7049
|
useFactory: mngFormlyConfigProvider,
|
|
6787
7050
|
deps: [TranslateService, MNG_MODULE_CONFIG_IT]
|
|
7051
|
+
},
|
|
7052
|
+
{
|
|
7053
|
+
provide: ACTION_EDITOR_DIALOG_COMPONENT_SETTING,
|
|
7054
|
+
useValue: MngActionEditorComponent
|
|
6788
7055
|
}
|
|
6789
7056
|
]
|
|
6790
7057
|
};
|
|
@@ -6831,14 +7098,14 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
6831
7098
|
// editor components
|
|
6832
7099
|
MngFormEditorComponent,
|
|
6833
7100
|
MngActionComponent,
|
|
6834
|
-
|
|
7101
|
+
MngActionEditorComponent,
|
|
6835
7102
|
MngActionRouteComponent
|
|
6836
7103
|
], imports: [
|
|
6837
7104
|
// angular modules
|
|
6838
7105
|
CommonModule,
|
|
6839
7106
|
RouterModule,
|
|
6840
7107
|
HttpClientModule,
|
|
6841
|
-
ReactiveFormsModule, i3.TranslateModule, i3$
|
|
7108
|
+
ReactiveFormsModule, i3$1.TranslateModule, i3$2.FormlyModule, AutoCompleteModule,
|
|
6842
7109
|
BreadcrumbModule,
|
|
6843
7110
|
ButtonModule,
|
|
6844
7111
|
CalendarModule,
|
|
@@ -6945,7 +7212,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
6945
7212
|
// editor components
|
|
6946
7213
|
MngFormEditorComponent,
|
|
6947
7214
|
MngActionComponent,
|
|
6948
|
-
|
|
7215
|
+
MngActionEditorComponent,
|
|
6949
7216
|
MngActionRouteComponent] });
|
|
6950
7217
|
MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngCommonsModule, imports: [[
|
|
6951
7218
|
// angular modules
|
|
@@ -7552,5 +7819,5 @@ class RouteDataBuilder {
|
|
|
7552
7819
|
* Generated bundle index. Do not edit.
|
|
7553
7820
|
*/
|
|
7554
7821
|
|
|
7555
|
-
export { AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngCrudApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionPositionEnum, ActionRunResult, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtil, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusQueryResultBase, MediusQueryResultWithObject, MediusRestUtil, MngActionComponent,
|
|
7822
|
+
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, 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, 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, TableviewDataProvider, TableviewDescriptor, ToastUtil, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngCommonsInitializerProvider, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
|
|
7556
7823
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|