@mediusinc/mng-commons 6.0.0-rc.2 → 6.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/helpers/notification.d.ts +17 -1
- package/core/i18n/i18n-error.d.ts +2 -3
- package/core/router/route-builder.d.ts +1 -1
- package/esm2022/core/helpers/notification.mjs +19 -4
- package/esm2022/core/i18n/i18n-error.mjs +10 -8
- package/esm2022/core/router/route-builder.mjs +2 -2
- package/esm2022/form/api/descriptors/action-button.descriptor.mjs +5 -17
- package/esm2022/form/api/descriptors/button-style.builder.mjs +80 -101
- package/esm2022/form/api/index.mjs +2 -1
- package/esm2022/form/api/models/button.model.mjs +2 -0
- package/esm2022/model/helpers/i18n.mjs +14 -9
- package/esm2022/table/components/column-value/column-value.component.mjs +4 -3
- package/esm2022/table/components/table/table.component.mjs +12 -11
- package/esm2022/table/helpers/notification.mjs +19 -13
- package/esm2022/tableview/action/components/action/action.component.mjs +41 -37
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +13 -8
- package/esm2022/tableview/action/helpers/i18n.mjs +50 -30
- package/esm2022/tableview/action/helpers/notification.mjs +73 -12
- package/esm2022/tableview/action/helpers/styles.mjs +2 -2
- package/esm2022/tableview/action/services/action-executor.service.mjs +83 -66
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +34 -21
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +4 -4
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +49 -67
- package/esm2022/tableview/api/action/models/action-confirmation.model.mjs +2 -0
- package/esm2022/tableview/api/action/models/action-descriptor.types.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-action.descriptor.mjs +14 -8
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +1 -1
- package/esm2022/tableview/api/index.mjs +2 -2
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +67 -37
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +5 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +29 -18
- package/esm2022/tableview/provide.mjs +44 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs +29 -12
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs +137 -169
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs +13 -8
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +32 -24
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +165 -215
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +358 -197
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/form/api/descriptors/action-button.descriptor.d.ts +11 -13
- package/form/api/descriptors/button-style.builder.d.ts +30 -44
- package/form/api/index.d.ts +1 -0
- package/form/api/models/button.model.d.ts +19 -0
- package/i18n/sl.json +56 -6
- package/model/helpers/i18n.d.ts +8 -3
- package/package.json +13 -13
- package/table/components/column-value/column-value.component.d.ts +1 -0
- package/table/components/table/table.component.d.ts +0 -1
- package/table/helpers/notification.d.ts +10 -1
- package/tableview/action/components/action/action.component.d.ts +8 -11
- package/tableview/action/helpers/i18n.d.ts +36 -11
- package/tableview/action/helpers/notification.d.ts +37 -3
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +18 -8
- package/tableview/api/action/descriptors/action.descriptor.d.ts +22 -31
- package/tableview/api/action/models/action-confirmation.model.d.ts +14 -0
- package/tableview/api/action/models/action-descriptor.types.d.ts +4 -0
- package/tableview/api/editor/descriptors/field-action.descriptor.d.ts +5 -5
- package/tableview/api/index.d.ts +1 -1
- package/tableview/api/tableview/helpers/tableview-default-actions.d.ts +1 -1
- package/tableview/provide.d.ts +7 -0
- package/version-info.json +6 -6
- package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +0 -88
- package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +0 -37
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import * as i2 from '@angular/common';
|
|
2
|
-
import { AsyncPipe, DatePipe, NgTemplateOutlet, JsonPipe, NgClass } from '@angular/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, Injectable, signal, inject, Injector, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy,
|
|
2
|
+
import { InjectionToken, Injectable, signal, inject, Injector, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy, DestroyRef, ElementRef, model, untracked, afterNextRender, HostListener, contentChildren, viewChildren, QueryList, ChangeDetectorRef, Directive, Pipe, LOCALE_ID, HostBinding, ViewChild } from '@angular/core';
|
|
5
3
|
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
|
|
6
4
|
import * as i1 from '@angular/router';
|
|
7
5
|
import { NavigationEnd, Router, ActivatedRoute, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, RouterOutlet } from '@angular/router';
|
|
8
|
-
import * as i3 from '@ngx-translate/core';
|
|
6
|
+
import * as i3$1 from '@ngx-translate/core';
|
|
9
7
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
10
8
|
import * as i5 from 'primeng/button';
|
|
11
9
|
import { ButtonModule } from 'primeng/button';
|
|
12
|
-
import * as
|
|
10
|
+
import * as i6 from 'primeng/menu';
|
|
13
11
|
import { Menu, MenuModule } from 'primeng/menu';
|
|
14
|
-
import * as
|
|
12
|
+
import * as i2$1 from 'primeng/ripple';
|
|
15
13
|
import { RippleModule } from 'primeng/ripple';
|
|
16
|
-
import * as
|
|
14
|
+
import * as i4 from 'primeng/splitbutton';
|
|
17
15
|
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
18
|
-
import * as
|
|
16
|
+
import * as i3 from 'primeng/tooltip';
|
|
19
17
|
import { TooltipModule } from 'primeng/tooltip';
|
|
20
18
|
import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest, debounceTime, delay, tap, combineLatestWith, NEVER, isObservable, throwError, filter as filter$1 } from 'rxjs';
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import { ActionInstanceStateEnum, ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, TableviewActionDefaultCategories,
|
|
19
|
+
import { getI18n, getI18nAsync, LoggerService, toastMessage, getI18nForError, getI18nErrorParams, CommonsService, ParametrizePipe, escapeHtmlAny, StyleLevelEnum, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, PermissionService, Permissions, ComponentDirective, CommonsStorageService, objectDeepCopy, effectWithDeps, Styles, TemplateDirective, findTemplateByName, getI18nTypePropertyKey, getI18nTypeGroupKey, getI18nTypeTabKey, fromSubscribeError, getErrorLogLevel, getObjectPropertyByPath, FilterMatchMode, COMMONS_MODULE_CONFIG_IT, dateToIsoString, RouteBuilder, createLazyRoute, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
|
|
20
|
+
import { ButtonStyleBuilder, LookupDataProviderInst, lookupDataProvider } from '@mediusinc/mng-commons/form/api';
|
|
21
|
+
import { ActionEditorDescriptorInst, ActionInstanceStateEnum, ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, TableviewActionDefaultCategories, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptorInst, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FieldValidationDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, AFieldDescriptor, AFieldGroupDescriptor, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, actionEditor, actionEditorCancel, action, FieldManyToManyEditorActionEnum, EditorDescriptorNestedObjectWrapper, fieldLookupGetProviderCfgObj, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
|
|
24
22
|
import { mergeMap, map, filter, startWith, catchError, first, take as take$1 } from 'rxjs/operators';
|
|
25
23
|
import { getI18nModelParams, getI18nModelParamsAsync } from '@mediusinc/mng-commons/model';
|
|
26
24
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
27
|
-
import * as i2$
|
|
25
|
+
import * as i2$3 from 'primeng/api';
|
|
28
26
|
import { MessageService, ConfirmationService, SharedModule } from 'primeng/api';
|
|
29
27
|
import { DialogService, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
28
|
+
import * as i2 from '@angular/common';
|
|
29
|
+
import { DatePipe, NgTemplateOutlet, NgClass } from '@angular/common';
|
|
30
30
|
import * as i1$2 from 'primeng/progressspinner';
|
|
31
31
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
32
|
-
import * as i2$
|
|
32
|
+
import * as i2$4 from 'primeng/toolbar';
|
|
33
33
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
34
34
|
import { ZIndexUtils } from 'primeng/utils';
|
|
35
35
|
import * as i1$1 from '@angular/forms';
|
|
36
36
|
import { Validators, UntypedFormGroup, FormGroup, FormArray, ReactiveFormsModule, FormsModule, FormBuilder, FormControl } from '@angular/forms';
|
|
37
|
-
import * as i2$
|
|
37
|
+
import * as i2$2 from '@ngx-formly/core';
|
|
38
38
|
import { FormlyConfig, FormlyModule, FieldType, FieldWrapper, FORMLY_CONFIG } from '@ngx-formly/core';
|
|
39
39
|
import * as i3$2 from 'primeng/messages';
|
|
40
40
|
import { MessagesModule } from 'primeng/messages';
|
|
41
|
-
import { LookupDataProviderInst, ButtonStyleBuilder, ButtonStyleRoundedEnum, lookupDataProvider, ActionButtonDescriptor } from '@mediusinc/mng-commons/form/api';
|
|
42
41
|
import { DropdownComponent, AutocompleteComponent, InputTrimDirective } from '@mediusinc/mng-commons/form';
|
|
43
42
|
import { TableComponent } from '@mediusinc/mng-commons/table';
|
|
44
43
|
import { TableSizeEnum } from '@mediusinc/mng-commons/table/api';
|
|
@@ -46,51 +45,68 @@ import * as i5$1 from 'primeng/message';
|
|
|
46
45
|
import { MessageModule } from 'primeng/message';
|
|
47
46
|
import * as i1$3 from 'primeng/fieldset';
|
|
48
47
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
49
|
-
import * as i9
|
|
48
|
+
import * as i9 from 'primeng/fileupload';
|
|
50
49
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
51
50
|
import { TimesIcon } from 'primeng/icons/times';
|
|
52
51
|
import * as i11 from 'primeng/image';
|
|
53
52
|
import { ImageModule } from 'primeng/image';
|
|
54
|
-
import * as i8
|
|
53
|
+
import * as i8 from 'primeng/inputmask';
|
|
55
54
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
56
55
|
import * as i1$4 from 'primeng/inputnumber';
|
|
57
56
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
58
|
-
import * as i6 from 'primeng/inputswitch';
|
|
57
|
+
import * as i6$1 from 'primeng/inputswitch';
|
|
59
58
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
60
59
|
import * as i13 from 'primeng/inputtext';
|
|
61
60
|
import { InputTextModule } from 'primeng/inputtext';
|
|
62
61
|
import * as i12 from 'primeng/inputtextarea';
|
|
63
62
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
64
|
-
import * as i7
|
|
63
|
+
import * as i7 from 'primeng/radiobutton';
|
|
65
64
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
66
|
-
import * as i7$
|
|
65
|
+
import * as i7$1 from 'primeng/dialog';
|
|
67
66
|
import { DialogModule } from 'primeng/dialog';
|
|
68
67
|
import * as i1$5 from 'primeng/tabview';
|
|
69
68
|
import { TabViewModule } from 'primeng/tabview';
|
|
70
69
|
import * as i3$3 from 'primeng/calendar';
|
|
71
70
|
import { CalendarModule } from 'primeng/calendar';
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Asynchronously retrieves internationalized text for a specified action.
|
|
74
|
+
*
|
|
75
|
+
* If no translation is found for actionPathKeys, the fallback is used (if provided).
|
|
76
|
+
* If custom key is provided, no other key will be used.
|
|
77
|
+
* Item can be interpolated under itemTitle, itemId (if specified in action model) or under item.* (JSON-like path to property).
|
|
78
|
+
* Params are interpolated in translation.
|
|
79
|
+
*
|
|
80
|
+
* @param {TranslateService} translate - The translation service used for retrieving localized strings.
|
|
81
|
+
* @param {ActionDescriptorInst<any>} action - The action descriptor that provides context for localization keys and parameters.
|
|
82
|
+
* @param {string | Array<string>} pathKeys - A string or array of strings representing the priority order of localization keys to look up for the action.
|
|
83
|
+
* @param {ActionI18nOptsType} [opts] - Optional settings to customize the localization behavior, including custom keys, fallback keys, parameters, and missing translation strategies.
|
|
84
|
+
* @return {Observable<string | null>} An observable that emits the localized string for the action or null if no appropriate translation is found.
|
|
85
|
+
*/
|
|
86
|
+
function getI18nForAction(translate, action, pathKeys, opts) {
|
|
87
|
+
const keys = getKeysByPriority$1(action, pathKeys, opts?.customKey, opts?.fallbackKey);
|
|
88
|
+
const i18nParams = getI18nActionParams(translate, action, opts?.item, opts?.params);
|
|
76
89
|
const i18nValue = getI18n(translate, i18nParams, ...keys);
|
|
77
|
-
return getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey });
|
|
90
|
+
return getTranslationDependingOnStrategy(opts?.missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey: opts?.fallbackKey });
|
|
78
91
|
}
|
|
79
92
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* @param
|
|
88
|
-
* @param
|
|
93
|
+
* Asynchronously retrieves internationalized text for a specified action.
|
|
94
|
+
*
|
|
95
|
+
* If no translation is found for actionPathKeys, the fallback is used (if provided).
|
|
96
|
+
* If custom key is provided, no other key will be used.
|
|
97
|
+
* Item can be interpolated under itemTitle, itemId (if specified in action model) or under item.* (JSON-like path to property).
|
|
98
|
+
* Params are interpolated in translation.
|
|
99
|
+
*
|
|
100
|
+
* @param {TranslateService} translate - The translation service used for retrieving localized strings.
|
|
101
|
+
* @param {ActionDescriptorInst<any>} action - The action descriptor that provides context for localization keys and parameters.
|
|
102
|
+
* @param {string | Array<string>} pathKeys - A string or array of strings representing the priority order of localization keys to look up for the action.
|
|
103
|
+
* @param {ActionI18nOptsType} [opts] - Optional settings to customize the localization behavior, including custom keys, fallback keys, parameters, and missing translation strategies.
|
|
104
|
+
* @return {Observable<string | null>} An observable that emits the localized string for the action or null if no appropriate translation is found.
|
|
89
105
|
*/
|
|
90
|
-
function getI18nForActionAsync(translate, action,
|
|
91
|
-
return getI18nActionParamsAsync(translate, action, item, params).pipe(mergeMap(i18nParams => {
|
|
92
|
-
const keys = getKeysByPriority(action,
|
|
93
|
-
return getI18nAsync(translate, i18nParams, ...keys).pipe(map(i18nValue => getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey })));
|
|
106
|
+
function getI18nForActionAsync(translate, action, pathKeys, opts) {
|
|
107
|
+
return getI18nActionParamsAsync(translate, action, opts?.item, opts?.params).pipe(mergeMap(i18nParams => {
|
|
108
|
+
const keys = getKeysByPriority$1(action, pathKeys, opts?.customKey, opts?.fallbackKey);
|
|
109
|
+
return getI18nAsync(translate, i18nParams, ...keys).pipe(map(i18nValue => getTranslationDependingOnStrategy(opts?.missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey: opts?.fallbackKey })));
|
|
94
110
|
}));
|
|
95
111
|
}
|
|
96
112
|
/**
|
|
@@ -109,15 +125,16 @@ function getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nVal
|
|
|
109
125
|
case 'returnFallbackKey':
|
|
110
126
|
return fallbackKey ?? null;
|
|
111
127
|
case 'returnFirstKey':
|
|
128
|
+
default:
|
|
112
129
|
return firstKey ?? null;
|
|
113
130
|
}
|
|
114
131
|
}
|
|
115
132
|
}
|
|
116
133
|
function getI18nActionTitleAsync(translate, action, item) {
|
|
117
|
-
return getI18nForActionAsync(translate, action, 'title',
|
|
134
|
+
return getI18nForActionAsync(translate, action, 'title', { item });
|
|
118
135
|
}
|
|
119
136
|
function getI18nActionEditorTitleAsync(translate, action, item) {
|
|
120
|
-
return getI18nForActionAsync(translate, action, ['editor.title', 'title'], action.editorTitle ?? undefined, item,
|
|
137
|
+
return getI18nForActionAsync(translate, action, ['editor.title', 'title'], { customKey: action.editorTitle ?? undefined, item, params: action.editorTitleParams });
|
|
121
138
|
}
|
|
122
139
|
function getI18nActionParams(translate, action, item, params = {}) {
|
|
123
140
|
const i18nParams = getI18nModelParams(translate, action.model ?? undefined, item, params);
|
|
@@ -130,21 +147,23 @@ function populateI18nActionParams(params = {}) {
|
|
|
130
147
|
params = { ...params };
|
|
131
148
|
return params;
|
|
132
149
|
}
|
|
133
|
-
function getKeysByPriority(action, actionPathKeys, customKey, fallbackKey) {
|
|
150
|
+
function getKeysByPriority$1(action, actionPathKeys, customKey, fallbackKey) {
|
|
134
151
|
const keys = [];
|
|
135
152
|
if (customKey) {
|
|
136
153
|
keys.push(customKey);
|
|
137
154
|
}
|
|
138
|
-
|
|
139
|
-
actionPathKeys
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
155
|
+
else {
|
|
156
|
+
if (!Array.isArray(actionPathKeys)) {
|
|
157
|
+
actionPathKeys = [actionPathKeys];
|
|
158
|
+
}
|
|
159
|
+
actionPathKeys.forEach(k => {
|
|
160
|
+
if (action.i18nModelActionBaseKey)
|
|
161
|
+
keys.push(`${action.i18nModelActionBaseKey}.${k}`);
|
|
162
|
+
keys.push(`${action.actionName}.${k}`);
|
|
163
|
+
});
|
|
164
|
+
if (fallbackKey) {
|
|
165
|
+
keys.push(fallbackKey);
|
|
166
|
+
}
|
|
148
167
|
}
|
|
149
168
|
return keys;
|
|
150
169
|
}
|
|
@@ -237,19 +256,79 @@ function actionExecutionSelectDataProvider(action, dataProvider, viewContainer)
|
|
|
237
256
|
};
|
|
238
257
|
}
|
|
239
258
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
259
|
+
/**
|
|
260
|
+
* Executes a notification success action for a given operation, translating
|
|
261
|
+
* and displaying a success message using the specified translation and message services.
|
|
262
|
+
*
|
|
263
|
+
* Provide title or message for custom titles (unrelated to model/action base paths for i18n).
|
|
264
|
+
* Item is interpolated as itemId, itemTitle or item.* for accessing desired properties.
|
|
265
|
+
* Set functionName in order to get specific translations for executing function (run, fetch, submit).
|
|
266
|
+
*
|
|
267
|
+
* @param {TranslateService} translate - The translation service used to retrieve localized messages.
|
|
268
|
+
* @param {MessageService} messageService - The message service responsible for displaying notifications.
|
|
269
|
+
* @param {ActionDescriptorInst<any>} action - The action descriptor instance that defines the operation.
|
|
270
|
+
* @param {ActionNotificationOptsType} [opts] - Optional configuration for customizing the success notification.
|
|
271
|
+
* @return {Message | undefined} The generated message object if a success message is found, otherwise undefined.
|
|
272
|
+
*/
|
|
273
|
+
function actionNotificationSuccess(translate, messageService, action, opts) {
|
|
274
|
+
const functionName = opts?.functionName ?? 'run';
|
|
275
|
+
const actionSuccessTitle = getI18nForAction(translate, action, getKeysByPriority(action, functionName, 'success', 'title'), {
|
|
276
|
+
customKey: opts?.title,
|
|
277
|
+
item: opts?.item,
|
|
278
|
+
fallbackKey: 'general.success'
|
|
279
|
+
}) ?? undefined;
|
|
280
|
+
const actionSuccessMessage = getI18nForAction(translate, action, getKeysByPriority(action, functionName, 'success', 'message'), {
|
|
281
|
+
customKey: opts?.message,
|
|
282
|
+
item: opts?.item,
|
|
283
|
+
fallbackKey: 'general.successMessage'
|
|
284
|
+
}) ?? undefined;
|
|
285
|
+
if (!actionSuccessMessage) {
|
|
286
|
+
return undefined;
|
|
287
|
+
}
|
|
288
|
+
return toastMessage(actionSuccessMessage, undefined, { messageService: messageService, title: actionSuccessTitle });
|
|
244
289
|
}
|
|
245
|
-
|
|
290
|
+
/**
|
|
291
|
+
* Displays a notification for an error that occurred during an action execution.
|
|
292
|
+
*
|
|
293
|
+
* Provide title or message for custom titles (unrelated to model/action base paths for i18n).
|
|
294
|
+
* Item is interpolated as itemId, itemTitle or item.* for accessing desired properties.
|
|
295
|
+
* Set functionName in order to get specific translations for executing function (run, fetch, submit).
|
|
296
|
+
*
|
|
297
|
+
* @param {TranslateService} translate - The service used for translations.
|
|
298
|
+
* @param {MessageService} messageService - The service used for displaying messages.
|
|
299
|
+
* @param {ActionDescriptorInst<any>} action - The action descriptor instance related to the error.
|
|
300
|
+
* @param {ICommonsError} error - The error object containing details about the error.
|
|
301
|
+
* @param {'warn' | 'error'} [severity='error'] - The severity level of the notification (either 'warn' or 'error').
|
|
302
|
+
* @param {ActionNotificationOptsType} [opts] - Optional parameters for customizing the notification, such as title, message, or function name.
|
|
303
|
+
* @return {Message} - The message object created and displayed as a notification.
|
|
304
|
+
*/
|
|
305
|
+
function actionNotificationError(translate, messageService, action, error, severity = 'error', opts) {
|
|
246
306
|
const params = {
|
|
247
|
-
errorMessage: getI18nForError(translate, error) ?? error.message
|
|
307
|
+
errorMessage: getI18nForError(translate, error) ?? error.message,
|
|
308
|
+
...getI18nErrorParams(error)
|
|
248
309
|
};
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
|
|
310
|
+
const functionName = opts?.functionName ?? 'run';
|
|
311
|
+
const actionErrorTitle = getI18nForAction(translate, action, getKeysByPriority(action, functionName, 'error', 'title'), {
|
|
312
|
+
customKey: opts?.title,
|
|
313
|
+
item: opts?.item,
|
|
314
|
+
fallbackKey: 'general.error',
|
|
315
|
+
params
|
|
316
|
+
}) ?? undefined;
|
|
317
|
+
const actionErrorMessage = getI18nForAction(translate, action, getKeysByPriority(action, functionName, 'error', 'message'), {
|
|
318
|
+
customKey: opts?.message,
|
|
319
|
+
item: opts?.item,
|
|
320
|
+
fallbackKey: 'general.errorMessage',
|
|
321
|
+
params
|
|
322
|
+
});
|
|
323
|
+
return toastMessage(actionErrorMessage ?? error.message, severity, { messageService: messageService, icon: 'pi-exclamation-triangle', title: actionErrorTitle });
|
|
324
|
+
}
|
|
325
|
+
function getKeysByPriority(action, functionName, prefix, suffix) {
|
|
326
|
+
const keys = [functionName];
|
|
327
|
+
if (action instanceof ActionEditorDescriptorInst && (functionName === 'run' || functionName === 'submit')) {
|
|
328
|
+
keys.pop();
|
|
329
|
+
keys.push(`submit`, `run`);
|
|
330
|
+
}
|
|
331
|
+
return keys.map(key => `${prefix}.${key}.${suffix}`).concat(`${prefix}.${suffix}`);
|
|
253
332
|
}
|
|
254
333
|
|
|
255
334
|
/**
|
|
@@ -565,61 +644,52 @@ class ActionExecutorService {
|
|
|
565
644
|
*/
|
|
566
645
|
run(ctx) {
|
|
567
646
|
const isMainRunFn = ctx.functionName === 'submit' || ctx.functionName === 'run';
|
|
568
|
-
|
|
569
|
-
if (isMainRunFn && ctx.instance.action.hasRunConfirmation) {
|
|
647
|
+
if (isMainRunFn && ctx.instance.action.runConfirmation != null) {
|
|
570
648
|
// only direct action can be configured with run confirmation
|
|
571
649
|
// if editor, then run confirmation is mapped to submit action and ignored as editor run
|
|
572
|
-
const confirmationDescriptor = ctx.instance.action.
|
|
650
|
+
const confirmationDescriptor = ctx.instance.action.runConfirmation;
|
|
573
651
|
const item = ctx.parameters.item;
|
|
652
|
+
const escapedItem = escapeHtmlAny(item);
|
|
653
|
+
const getTranslationOrUndefined = (label, defLabel, fallback, escapeItem = false) => label !== null
|
|
654
|
+
? (getI18nForAction(this.translate, ctx.instance.action, defLabel, {
|
|
655
|
+
customKey: label,
|
|
656
|
+
item: escapeItem ? escapedItem : item,
|
|
657
|
+
fallbackKey: fallback
|
|
658
|
+
}) ?? undefined)
|
|
659
|
+
: undefined;
|
|
660
|
+
const getButtonStyle = (style, def) => (style instanceof ButtonStyleBuilder ? style : ButtonStyleBuilder.from({ ...def, ...style } ?? def)).build();
|
|
574
661
|
let confirmParams = {
|
|
575
|
-
icon: confirmationDescriptor.icon,
|
|
662
|
+
icon: confirmationDescriptor.icon !== null ? (confirmationDescriptor.icon ?? 'pi pi-exclamation-triangle') : undefined,
|
|
663
|
+
header: getTranslationOrUndefined(confirmationDescriptor.title, 'confirm.title', 'general.confirmation'),
|
|
664
|
+
message: getTranslationOrUndefined(confirmationDescriptor.title, 'confirm.message', 'general.confirmation'),
|
|
576
665
|
acceptVisible: true,
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
if (confirmationDescriptor.rejectButton?.icon !== null) {
|
|
601
|
-
confirmParams.rejectIcon = confirmationDescriptor.rejectButton?.icon;
|
|
602
|
-
}
|
|
603
|
-
if (confirmationDescriptor.rejectButton?.label !== null) {
|
|
604
|
-
confirmParams.rejectLabel =
|
|
605
|
-
getI18nForAction(this.translate, ctx.instance.action, 'confirm.reject', confirmationDescriptor.rejectButton?.label, item, 'general.no') ?? undefined;
|
|
606
|
-
}
|
|
607
|
-
if (confirmationDescriptor.rejectButton == null || (confirmationDescriptor.rejectButton.label === null && confirmationDescriptor.rejectButton.icon === null)) {
|
|
608
|
-
confirmParams.rejectVisible = false;
|
|
609
|
-
}
|
|
610
|
-
confirmParams.accept = () => {
|
|
611
|
-
ctx.instance.state = ActionInstanceStateEnum.RunConfirmationEndAccept;
|
|
612
|
-
this.runWithoutConfirmation(ctx);
|
|
613
|
-
};
|
|
614
|
-
confirmParams.reject = () => {
|
|
615
|
-
ctx.instance.state = ActionInstanceStateEnum.RunConfirmationEndReject;
|
|
616
|
-
if (ctx.instance.action.type !== ActionTypeEnum.Editor) {
|
|
617
|
-
// if not editor, the it can be closed
|
|
618
|
-
this.finishAction(ctx.instance);
|
|
666
|
+
acceptLabel: getTranslationOrUndefined(confirmationDescriptor.title, 'confirm.accept', 'general.yes'),
|
|
667
|
+
acceptIcon: confirmationDescriptor.acceptButton?.icon !== null
|
|
668
|
+
? (confirmationDescriptor.acceptButton?.icon ?? ctx.instance.action.button?.icon ?? 'pi pi-check')
|
|
669
|
+
: undefined,
|
|
670
|
+
acceptButtonStyleClass: getButtonStyle(confirmationDescriptor.acceptButton?.style, { level: ctx.instance.action.button?.style?.level }),
|
|
671
|
+
rejectVisible: !(confirmationDescriptor.rejectButton === false ||
|
|
672
|
+
(confirmationDescriptor.rejectButton?.label === null && confirmationDescriptor.rejectButton?.icon === null)),
|
|
673
|
+
rejectLabel: getTranslationOrUndefined(confirmationDescriptor.title, 'confirm.reject', 'general.no'),
|
|
674
|
+
rejectIcon: confirmationDescriptor.rejectButton !== false && confirmationDescriptor.rejectButton?.icon !== null
|
|
675
|
+
? (confirmationDescriptor.rejectButton?.icon ?? 'pi pi-times')
|
|
676
|
+
: undefined,
|
|
677
|
+
rejectButtonStyleClass: confirmationDescriptor.rejectButton !== false ? getButtonStyle(confirmationDescriptor.rejectButton?.style, { level: StyleLevelEnum.Secondary }) : undefined,
|
|
678
|
+
closeOnEscape: confirmationDescriptor.closeOnEscape,
|
|
679
|
+
accept: () => {
|
|
680
|
+
ctx.instance.state = ActionInstanceStateEnum.RunConfirmationEndAccept;
|
|
681
|
+
this.runWithoutConfirmation(ctx);
|
|
682
|
+
},
|
|
683
|
+
reject: () => {
|
|
684
|
+
ctx.instance.state = ActionInstanceStateEnum.RunConfirmationEndReject;
|
|
685
|
+
if (ctx.instance.action.type !== ActionTypeEnum.Editor) {
|
|
686
|
+
// if not editor, the it can be closed
|
|
687
|
+
this.finishAction(ctx.instance);
|
|
688
|
+
}
|
|
619
689
|
}
|
|
620
690
|
};
|
|
621
|
-
if (confirmationDescriptor.
|
|
622
|
-
confirmParams = confirmationDescriptor.
|
|
691
|
+
if (confirmationDescriptor.configMapFn) {
|
|
692
|
+
confirmParams = confirmationDescriptor.configMapFn(ctx, confirmParams);
|
|
623
693
|
}
|
|
624
694
|
ctx.confirmation = confirmParams;
|
|
625
695
|
ctx.instance.state = ActionInstanceStateEnum.RunConfirmationStart;
|
|
@@ -719,6 +789,27 @@ class ActionExecutorService {
|
|
|
719
789
|
ctx.executionStart();
|
|
720
790
|
return toObservable(fnObs(ctx));
|
|
721
791
|
}), mergeMap$1(runResult => {
|
|
792
|
+
// handle notifications
|
|
793
|
+
const notificationItem = {
|
|
794
|
+
...ctx.parameters?.item,
|
|
795
|
+
...ctx.parameters?.formItem,
|
|
796
|
+
...ctx.parameters?.submitResult,
|
|
797
|
+
...runResult
|
|
798
|
+
};
|
|
799
|
+
if (isMainRunFn && (ctx.instance.action.runNotificationOnSuccess ?? true)) {
|
|
800
|
+
ctx.notification = actionNotificationSuccess(this.translate, this.messageService, ctx.instance.action, {
|
|
801
|
+
functionName: ctx.functionName,
|
|
802
|
+
item: notificationItem,
|
|
803
|
+
...(typeof ctx.instance.action.runNotificationOnSuccess === 'object' ? ctx.instance.action.runNotificationOnSuccess : {})
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
else if (!isMainRunFn && (actionEditor.fetchNotificationOnSuccess ?? false)) {
|
|
807
|
+
ctx.notification = actionNotificationSuccess(this.translate, this.messageService, actionEditor, {
|
|
808
|
+
functionName: ctx.functionName,
|
|
809
|
+
item: notificationItem,
|
|
810
|
+
...(typeof actionEditor.fetchNotificationOnSuccess === 'object' ? actionEditor.fetchNotificationOnSuccess : {})
|
|
811
|
+
});
|
|
812
|
+
}
|
|
722
813
|
// set next state depending on run
|
|
723
814
|
ctx.instance.state = isMainRunFn ? ActionInstanceStateEnum.RunEnd : ActionInstanceStateEnum.FetchEnd;
|
|
724
815
|
// set execution result
|
|
@@ -727,13 +818,6 @@ class ActionExecutorService {
|
|
|
727
818
|
// set instance final result on main run execution
|
|
728
819
|
ctx.instance.result = runResult;
|
|
729
820
|
ctx.instance.isRunLoadingSubject.next(false);
|
|
730
|
-
// handle notification
|
|
731
|
-
if (ctx.instance.action.hasRunNotificationSuccess) {
|
|
732
|
-
ctx.notification = actionNotificationSuccess(this.translate, ctx.instance.action, ctx.functionName, this.messageService, ctx.instance.action.runNotificationSuccessTitle, ctx.instance.action.runNotificationSuccessMessage, {
|
|
733
|
-
...ctx.parameters?.item,
|
|
734
|
-
...runResult
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
821
|
// handle possible after run action
|
|
738
822
|
if (ctx.instance.action.afterRunAction) {
|
|
739
823
|
// mark new state for next action start
|
|
@@ -755,11 +839,6 @@ class ActionExecutorService {
|
|
|
755
839
|
}));
|
|
756
840
|
}
|
|
757
841
|
}
|
|
758
|
-
else {
|
|
759
|
-
if (actionEditor.hasFetchNotificationSuccess) {
|
|
760
|
-
actionNotificationSuccess(this.translate, actionEditor, 'fetch', this.messageService, actionEditor.fetchNotificationSuccessTitle, actionEditor.fetchNotificationSuccessMessage, ctx.parameters.item);
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
842
|
return of(runResult);
|
|
764
843
|
}), map(runResult => {
|
|
765
844
|
if (isMainRunFn) {
|
|
@@ -774,14 +853,19 @@ class ActionExecutorService {
|
|
|
774
853
|
ctx.instance.state = isMainRunFn ? ActionInstanceStateEnum.RunError : ActionInstanceStateEnum.FetchError;
|
|
775
854
|
// mark execution error on context
|
|
776
855
|
ctx.executionError(actionError);
|
|
777
|
-
if (ctx.instance.action.hasRunNotificationError) {
|
|
778
|
-
actionError.notification = actionNotificationError(this.translate, ctx.instance.action, actionError, 'fetch', this.messageService, ctx.parameters.item);
|
|
779
|
-
actionError.notificationEmitSource = ActionExecutorService.className;
|
|
780
|
-
}
|
|
781
856
|
let errorObs = of(void 0);
|
|
782
857
|
if (isMainRunFn) {
|
|
783
858
|
ctx.instance.error = err;
|
|
784
859
|
ctx.instance.isRunLoadingSubject.next(false);
|
|
860
|
+
if (ctx.instance.action.runNotificationOnError ?? true) {
|
|
861
|
+
actionError.notification = actionNotificationError(this.translate, this.messageService, ctx.instance.action, actionError, undefined, {
|
|
862
|
+
functionName: ctx.functionName,
|
|
863
|
+
item: ctx.parameters.item,
|
|
864
|
+
...(typeof ctx.instance.action.runNotificationOnError === 'object' ? ctx.instance.action.runNotificationOnError : {})
|
|
865
|
+
});
|
|
866
|
+
actionError.notificationEmitSource = ActionExecutorService.className;
|
|
867
|
+
ctx.notification = actionError.notification;
|
|
868
|
+
}
|
|
785
869
|
// handle possible error action if run
|
|
786
870
|
if (isMainRunFn && ctx.instance.action.onRunErrorAction) {
|
|
787
871
|
const onRunErrorAction = typeof ctx.instance.action.onRunErrorAction === 'function' ? ctx.instance.action.onRunErrorAction(ctx) : ctx.instance.action.onRunErrorAction;
|
|
@@ -802,6 +886,17 @@ class ActionExecutorService {
|
|
|
802
886
|
}));
|
|
803
887
|
}
|
|
804
888
|
}
|
|
889
|
+
else if (actionEditor.fetchNotificationOnError ?? true) {
|
|
890
|
+
ctx.notification = actionNotificationError(this.translate, this.messageService, actionEditor, actionError, undefined, {
|
|
891
|
+
functionName: ctx.functionName,
|
|
892
|
+
item: {
|
|
893
|
+
...ctx.parameters.item
|
|
894
|
+
},
|
|
895
|
+
...(typeof actionEditor.fetchNotificationOnError === 'object' ? actionEditor.fetchNotificationOnError : {})
|
|
896
|
+
});
|
|
897
|
+
actionError.notificationEmitSource = ActionExecutorService.className;
|
|
898
|
+
ctx.notification = actionError.notification;
|
|
899
|
+
}
|
|
805
900
|
// list and map only to mark instance state as finished error state
|
|
806
901
|
return errorObs.pipe(map(() => {
|
|
807
902
|
// deactivate action only if critical (fetch on editor or run on button actions)
|
|
@@ -1300,12 +1395,12 @@ function provideActionExecutor() {
|
|
|
1300
1395
|
}
|
|
1301
1396
|
|
|
1302
1397
|
class ActionComponent {
|
|
1303
|
-
constructor(
|
|
1304
|
-
this.routeService =
|
|
1305
|
-
this.translate =
|
|
1306
|
-
this.authorization =
|
|
1307
|
-
this.actionExecutor =
|
|
1308
|
-
this.viewContainer =
|
|
1398
|
+
constructor() {
|
|
1399
|
+
this.routeService = inject(ActivatedRoute);
|
|
1400
|
+
this.translate = inject(TranslateService);
|
|
1401
|
+
this.authorization = inject(PermissionService);
|
|
1402
|
+
this.actionExecutor = inject(ActionExecutorService);
|
|
1403
|
+
this.viewContainer = inject((ViewContainer), { optional: true });
|
|
1309
1404
|
// metadata and editor mode input
|
|
1310
1405
|
this.action = input.required();
|
|
1311
1406
|
this.item = input();
|
|
@@ -1320,7 +1415,7 @@ class ActionComponent {
|
|
|
1320
1415
|
this.selectedItems = input([]);
|
|
1321
1416
|
this.finish = output();
|
|
1322
1417
|
this.subactionsMenu = viewChild(Menu);
|
|
1323
|
-
this.hostClass = computed(() => this.action().
|
|
1418
|
+
this.hostClass = computed(() => this.action().button?.style?.class ?? 'mng-action-button');
|
|
1324
1419
|
this.isHostHidden = computed(() => !this.isVisible() || !this.isPermitted());
|
|
1325
1420
|
this.loading = signal(false);
|
|
1326
1421
|
this.isVisible = signal(true);
|
|
@@ -1332,7 +1427,7 @@ class ActionComponent {
|
|
|
1332
1427
|
const action = this.action();
|
|
1333
1428
|
return action instanceof ActionLinkDescriptorInst ? action : undefined;
|
|
1334
1429
|
});
|
|
1335
|
-
this.hasNoTitle = computed(() => this.action().button
|
|
1430
|
+
this.hasNoTitle = computed(() => this.action().button?.label === null);
|
|
1336
1431
|
this.route = computed(() => this.routeInit() ?? this.routeService);
|
|
1337
1432
|
this.routeData = toSignal(this.route().data);
|
|
1338
1433
|
this.routePermissions = computed(() => {
|
|
@@ -1346,7 +1441,10 @@ class ActionComponent {
|
|
|
1346
1441
|
}
|
|
1347
1442
|
return undefined;
|
|
1348
1443
|
});
|
|
1349
|
-
this.buttonClass = computed(() =>
|
|
1444
|
+
this.buttonClass = computed(() => {
|
|
1445
|
+
const action = this.action();
|
|
1446
|
+
return (action.button?.style instanceof ButtonStyleBuilder ? action.button.style : ButtonStyleBuilder.from(action.button?.style)).build(this.hasNoTitle());
|
|
1447
|
+
});
|
|
1350
1448
|
this.subactions = signal([]);
|
|
1351
1449
|
this.subactionSubscriptions = [];
|
|
1352
1450
|
effect(() => this.processSubscriptions(), { allowSignalWrites: true });
|
|
@@ -1475,14 +1573,20 @@ class ActionComponent {
|
|
|
1475
1573
|
}
|
|
1476
1574
|
if (!this.hasNoTitle()) {
|
|
1477
1575
|
this.labelSubscription?.unsubscribe();
|
|
1478
|
-
this.labelSubscription = getI18nForActionAsync(this.translate, action, 'title', action.button
|
|
1576
|
+
this.labelSubscription = getI18nForActionAsync(this.translate, action, 'title', { customKey: action.button?.label ?? undefined, item: this.item() }).subscribe({
|
|
1479
1577
|
next: i18n => this.label.set(i18n ?? '')
|
|
1480
1578
|
});
|
|
1481
1579
|
}
|
|
1482
1580
|
this.tooltipSubscription?.unsubscribe();
|
|
1483
|
-
if (action.button.tooltip) {
|
|
1484
|
-
this.tooltipSubscription = getI18nForActionAsync(this.translate, action, 'tooltip',
|
|
1485
|
-
|
|
1581
|
+
if (action.button?.tooltip !== null && (action.button?.tooltip ?? true)) {
|
|
1582
|
+
this.tooltipSubscription = getI18nForActionAsync(this.translate, action, 'tooltip', {
|
|
1583
|
+
customKey: action.button?.tooltip,
|
|
1584
|
+
item: this.item(),
|
|
1585
|
+
missingTranslationStrategy: 'returnNull'
|
|
1586
|
+
}).subscribe({
|
|
1587
|
+
next: i18n => {
|
|
1588
|
+
this.tooltip.set(i18n ?? action.button?.tooltip ?? '');
|
|
1589
|
+
}
|
|
1486
1590
|
});
|
|
1487
1591
|
}
|
|
1488
1592
|
this.subactions.set(this.processSubactions());
|
|
@@ -1493,12 +1597,12 @@ class ActionComponent {
|
|
|
1493
1597
|
const menuItems = [];
|
|
1494
1598
|
for (const subaction of this.action().subactions) {
|
|
1495
1599
|
const menuItem = {};
|
|
1496
|
-
menuItem.icon = subaction.button
|
|
1497
|
-
this.subactionSubscriptions.push(getI18nForActionAsync(this.translate, subaction, 'title', subaction.button
|
|
1498
|
-
next: res => (menuItem.label = res)
|
|
1600
|
+
menuItem.icon = subaction.button?.icon ?? undefined;
|
|
1601
|
+
this.subactionSubscriptions.push(getI18nForActionAsync(this.translate, subaction, 'title', { customKey: subaction.button?.label ?? undefined, item: this.item() }).subscribe({
|
|
1602
|
+
next: res => (menuItem.label = res ?? undefined)
|
|
1499
1603
|
}));
|
|
1500
|
-
this.subactionSubscriptions.push(getI18nForActionAsync(this.translate, subaction, 'tooltip',
|
|
1501
|
-
next: res => (menuItem.tooltip = res)
|
|
1604
|
+
this.subactionSubscriptions.push(getI18nForActionAsync(this.translate, subaction, 'tooltip', { customKey: subaction.button?.tooltip ?? undefined, item: this.item() }).subscribe({
|
|
1605
|
+
next: res => (menuItem.tooltip = res ?? undefined)
|
|
1502
1606
|
}));
|
|
1503
1607
|
const parameters = {
|
|
1504
1608
|
itemId: this.itemId(),
|
|
@@ -1535,15 +1639,13 @@ class ActionComponent {
|
|
|
1535
1639
|
}
|
|
1536
1640
|
return menuItems;
|
|
1537
1641
|
}
|
|
1538
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionComponent, deps: [
|
|
1539
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ActionComponent, isStandalone: true, selector: "mng-action", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: false, transformFunction: null }, dataListParams: { classPropertyName: "dataListParams", publicName: "dataListParams", isSignal: true, isRequired: false, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, hostComponent: { classPropertyName: "hostComponent", publicName: "hostComponent", isSignal: true, isRequired: false, transformFunction: null }, routeInit: { classPropertyName: "routeInit", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, inputDisabled: { classPropertyName: "inputDisabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputLoading: { classPropertyName: "inputLoading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { finish: "finish" }, host: { properties: { "class": "hostClass()", "class.m-0": "isHostHidden()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "subactionsMenu", first: true, predicate: Menu, descendants: true, isSignal: true }], ngImport: i0, template: "@if (isVisible() && isPermitted()) {\n @if (actionLink(); as actionLink) {\n @if (actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"label()\"\n [icon]=\"$any(action().button
|
|
1642
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1643
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ActionComponent, isStandalone: true, selector: "mng-action", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: false, transformFunction: null }, dataListParams: { classPropertyName: "dataListParams", publicName: "dataListParams", isSignal: true, isRequired: false, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, hostComponent: { classPropertyName: "hostComponent", publicName: "hostComponent", isSignal: true, isRequired: false, transformFunction: null }, routeInit: { classPropertyName: "routeInit", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, inputDisabled: { classPropertyName: "inputDisabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputLoading: { classPropertyName: "inputLoading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { finish: "finish" }, host: { properties: { "class": "hostClass()", "class.m-0": "isHostHidden()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "subactionsMenu", first: true, predicate: Menu, descendants: true, isSignal: true }], ngImport: i0, template: "@if (isVisible() && isPermitted()) {\n @if (actionLink(); as actionLink) {\n @if (actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"label()\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"$any(action().button?.iconPosition)\"\n [href]=\"!isEnabled() || inputDisabled() ? null : (actionLink.url | mngParametrize: itemId() : item() : actionData())\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [class]=\"buttonClass()\"></a>\n } @else {\n <a\n pButton\n pRipple\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"$any(action().button?.iconPosition ?? undefined)\"\n [label]=\"label()\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"!isEnabled() || inputDisabled() ? null : (actionLink.pathSegments | mngParametrize: itemId() : item() : actionData())\"\n [relativeTo]=\"route()\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId() : item() : actionData()\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [class]=\"buttonClass()\"></a>\n }\n } @else if (action().component || action().componentFromDi) {\n <ng-container\n [mngComponent]=\"action().component\"\n [injectionToken]=\"action().componentFromDi\"\n [inputs]=\"{\n action: action(),\n item: item(),\n itemId: itemId(),\n actionData: actionData(),\n enabled: isEnabled(),\n loading: loading()\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n } @else if (action().subactions.length > 0 && !action().subactionsAsMenu) {\n <p-splitButton\n [icon]=\"action().button?.icon ?? undefined\"\n [iconPos]=\"$any(action().button?.iconPosition)\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (onClick)=\"triggerAction(action())\"\n [class]=\"buttonClass()\"\n [model]=\"subactions()\">\n </p-splitButton>\n } @else {\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"$any(action().button?.iconPosition)\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [loading]=\"loading() || inputLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (click)=\"triggerAction(action(), undefined, $event)\"\n [class]=\"buttonClass()\"></button>\n <p-menu #subactionsMenu [model]=\"subactions()\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n}\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i2$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: ParametrizePipe, name: "mngParametrize" }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: SplitButtonModule }, { kind: "component", type: i4.SplitButton, selector: "p-splitButton", inputs: ["model", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "icon", "iconPos", "label", "tooltip", "tooltipOptions", "style", "styleClass", "menuStyle", "menuStyleClass", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps", "autofocus", "disabled", "tabindex", "menuButtonDisabled", "buttonDisabled"], outputs: ["onClick", "onMenuHide", "onMenuShow", "onDropdownClick"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i6.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1540
1644
|
}
|
|
1541
1645
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionComponent, decorators: [{
|
|
1542
1646
|
type: Component,
|
|
1543
|
-
args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1544
|
-
}], ctorParameters: () => [
|
|
1545
|
-
type: Optional
|
|
1546
|
-
}] }] });
|
|
1647
|
+
args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonModule, RippleModule, TooltipModule, ParametrizePipe, ComponentDirective, SplitButtonModule, MenuModule], providers: [provideActionExecutor()], host: { '[class]': 'hostClass()', '[class.m-0]': 'isHostHidden()' }, template: "@if (isVisible() && isPermitted()) {\n @if (actionLink(); as actionLink) {\n @if (actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"label()\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"$any(action().button?.iconPosition)\"\n [href]=\"!isEnabled() || inputDisabled() ? null : (actionLink.url | mngParametrize: itemId() : item() : actionData())\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [class]=\"buttonClass()\"></a>\n } @else {\n <a\n pButton\n pRipple\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"$any(action().button?.iconPosition ?? undefined)\"\n [label]=\"label()\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"!isEnabled() || inputDisabled() ? null : (actionLink.pathSegments | mngParametrize: itemId() : item() : actionData())\"\n [relativeTo]=\"route()\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId() : item() : actionData()\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [class]=\"buttonClass()\"></a>\n }\n } @else if (action().component || action().componentFromDi) {\n <ng-container\n [mngComponent]=\"action().component\"\n [injectionToken]=\"action().componentFromDi\"\n [inputs]=\"{\n action: action(),\n item: item(),\n itemId: itemId(),\n actionData: actionData(),\n enabled: isEnabled(),\n loading: loading()\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n } @else if (action().subactions.length > 0 && !action().subactionsAsMenu) {\n <p-splitButton\n [icon]=\"action().button?.icon ?? undefined\"\n [iconPos]=\"$any(action().button?.iconPosition)\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (onClick)=\"triggerAction(action())\"\n [class]=\"buttonClass()\"\n [model]=\"subactions()\">\n </p-splitButton>\n } @else {\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"$any(action().button?.iconPosition)\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [loading]=\"loading() || inputLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (click)=\"triggerAction(action(), undefined, $event)\"\n [class]=\"buttonClass()\"></button>\n <p-menu #subactionsMenu [model]=\"subactions()\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n}\n", styles: [":host{display:inline-block}\n"] }]
|
|
1648
|
+
}], ctorParameters: () => [] });
|
|
1547
1649
|
|
|
1548
1650
|
class EditorAutoSaveStatusComponent {
|
|
1549
1651
|
constructor() {
|
|
@@ -1599,7 +1701,7 @@ class EditorAutoSaveStatusComponent {
|
|
|
1599
1701
|
<span [innerHTML]="label | translate: {timestamp: status()?.timestamp | date: timestampDateFormat()}"></span>
|
|
1600
1702
|
}
|
|
1601
1703
|
</span>
|
|
1602
|
-
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1704
|
+
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1603
1705
|
}
|
|
1604
1706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EditorAutoSaveStatusComponent, decorators: [{
|
|
1605
1707
|
type: Component,
|
|
@@ -2249,12 +2351,9 @@ class FormEditorComponent {
|
|
|
2249
2351
|
this.setterFields = computed(() => this.descriptor().fields.filter(f => typeof f.setter === 'function'));
|
|
2250
2352
|
this.formMessages = signal([]);
|
|
2251
2353
|
// autosave
|
|
2252
|
-
this.restoreLocalStateButtonStyle = ButtonStyleBuilder.
|
|
2253
|
-
this.previewLocalStateButtonStyle = ButtonStyleBuilder.
|
|
2254
|
-
this.clearLocalStateButtonStyle = ButtonStyleBuilder.
|
|
2255
|
-
.withRoundedButton(ButtonStyleRoundedEnum.SQUARE)
|
|
2256
|
-
.withTextButton()
|
|
2257
|
-
.build();
|
|
2354
|
+
this.restoreLocalStateButtonStyle = ButtonStyleBuilder.from({ level: StyleLevelEnum.Success, size: StyleSizeEnum.Small }).build();
|
|
2355
|
+
this.previewLocalStateButtonStyle = ButtonStyleBuilder.from({ level: StyleLevelEnum.Info, size: StyleSizeEnum.Small }).build();
|
|
2356
|
+
this.clearLocalStateButtonStyle = ButtonStyleBuilder.from({ level: StyleLevelEnum.Danger, size: StyleSizeEnum.Small, rounded: false, textButton: true }).build();
|
|
2258
2357
|
this.autoSaveRestore = signal(null);
|
|
2259
2358
|
this.autoSave = toSignal(this.autoSaveStatusSubject);
|
|
2260
2359
|
this.autoSavePreviewButtonLabel = computed(() => {
|
|
@@ -2632,7 +2731,7 @@ class FormEditorComponent {
|
|
|
2632
2731
|
}
|
|
2633
2732
|
}
|
|
2634
2733
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2635
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null }, editorId: { classPropertyName: "editorId", publicName: "editorId", isSignal: true, isRequired: false, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, showAutoSaveStatus: { classPropertyName: "showAutoSaveStatus", publicName: "showAutoSaveStatus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { item: "itemChange", formSubmit: "formSubmit", valueChange: "valueChange", autoSaveStatus: "autoSaveStatus" }, providers: [provideFormComponent()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }, { propertyName: "focusThiefElRef", first: true, predicate: ["focusThiefInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$
|
|
2734
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null }, editorId: { classPropertyName: "editorId", publicName: "editorId", isSignal: true, isRequired: false, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, showAutoSaveStatus: { classPropertyName: "showAutoSaveStatus", publicName: "showAutoSaveStatus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { item: "itemChange", formSubmit: "formSubmit", valueChange: "valueChange", autoSaveStatus: "autoSaveStatus" }, providers: [provideFormComponent()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }, { propertyName: "focusThiefElRef", first: true, predicate: ["focusThiefInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2636
2735
|
}
|
|
2637
2736
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2638
2737
|
type: Component,
|
|
@@ -2669,14 +2768,19 @@ class ActionEditorInjectorContextComponent {
|
|
|
2669
2768
|
const actions = [];
|
|
2670
2769
|
for (const action of this.editorAction().editorActions) {
|
|
2671
2770
|
if (action instanceof ActionEditorSubmitDescriptorInst) {
|
|
2672
|
-
|
|
2673
|
-
action.button
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2771
|
+
action.withButtonOpts({
|
|
2772
|
+
...action.button,
|
|
2773
|
+
icon: action.button?.icon === undefined ? (action.submitType === ActionEditorSubmitTypeEnum.Submit ? 'pi pi-check' : 'pi pi-times') : action.button.icon,
|
|
2774
|
+
label: action.button?.label === undefined
|
|
2775
|
+
? action.submitType === ActionEditorSubmitTypeEnum.Submit
|
|
2776
|
+
? 'general.save'
|
|
2777
|
+
: this.data().isDialog
|
|
2778
|
+
? 'general.close'
|
|
2779
|
+
: 'general.cancel'
|
|
2780
|
+
: action.button.label
|
|
2781
|
+
});
|
|
2678
2782
|
// assign run operations
|
|
2679
|
-
action.
|
|
2783
|
+
action.withNotifications(false);
|
|
2680
2784
|
if (action.submitType === ActionEditorSubmitTypeEnum.Submit) {
|
|
2681
2785
|
action.withRunFunction(() => {
|
|
2682
2786
|
this.triggerSubmit();
|
|
@@ -3025,7 +3129,7 @@ class ActionEditorInjectorContextComponent {
|
|
|
3025
3129
|
}
|
|
3026
3130
|
}
|
|
3027
3131
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3028
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionRun: "actionRun", actionCancel: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [editorId]=\"editorAction().actionNameLong\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"\n [isFormDisabled]=\"isFormDisabled()\"\n showAutoSaveStatus=\"false\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\"\n (autoSaveStatus)=\"onAutoSave($event)\" />\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between align-items-center mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n @if (editorAction().editorDescriptor.autoSave) {\n <mng-editor-auto-save-status [status]=\"autoSaveStatus()\"></mng-editor-auto-save-status>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$2.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled", "editorId", "itemId", "showAutoSaveStatus"], outputs: ["itemChange", "formSubmit", "valueChange", "autoSaveStatus"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$
|
|
3132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionRun: "actionRun", actionCancel: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [editorId]=\"editorAction().actionNameLong\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"\n [isFormDisabled]=\"isFormDisabled()\"\n showAutoSaveStatus=\"false\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\"\n (autoSaveStatus)=\"onAutoSave($event)\" />\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between align-items-center mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n @if (editorAction().editorDescriptor.autoSave) {\n <mng-editor-auto-save-status [status]=\"autoSaveStatus()\"></mng-editor-auto-save-status>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$2.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled", "editorId", "itemId", "showAutoSaveStatus"], outputs: ["itemChange", "formSubmit", "valueChange", "autoSaveStatus"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$4.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3029
3133
|
}
|
|
3030
3134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
|
|
3031
3135
|
type: Component,
|
|
@@ -3301,7 +3405,7 @@ function getTableCellPaddingX(table) {
|
|
|
3301
3405
|
}
|
|
3302
3406
|
}
|
|
3303
3407
|
function getActionButtonRoundedWidth(action) {
|
|
3304
|
-
switch (action.button
|
|
3408
|
+
switch (action.button?.style?.size) {
|
|
3305
3409
|
case StyleSizeEnum.ExtraSmall:
|
|
3306
3410
|
return Styles.BUTTON_ROUNDED_WIDTH_XS;
|
|
3307
3411
|
case StyleSizeEnum.Small:
|
|
@@ -3506,7 +3610,9 @@ class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
|
|
|
3506
3610
|
}
|
|
3507
3611
|
ngOnInit() {
|
|
3508
3612
|
super.ngOnInit();
|
|
3509
|
-
|
|
3613
|
+
if (this.descriptor.button?.style) {
|
|
3614
|
+
this.buttonClass = (this.descriptor.button.style instanceof ButtonStyleBuilder ? this.descriptor.button.style : ButtonStyleBuilder.from(this.descriptor.button.style)).build();
|
|
3615
|
+
}
|
|
3510
3616
|
}
|
|
3511
3617
|
ngOnDestroy() {
|
|
3512
3618
|
this.resultSubscription?.unsubscribe();
|
|
@@ -3541,11 +3647,11 @@ class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
|
|
|
3541
3647
|
}
|
|
3542
3648
|
}
|
|
3543
3649
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3544
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button
|
|
3650
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button?.icon)\"\n [label]=\"$any(descriptor.button?.label === null ? null : descriptor.button?.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button?.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n @if (actionMessage) {\n <p-message [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i2$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i5$1.UIMessage, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3545
3651
|
}
|
|
3546
3652
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldActionComponent, decorators: [{
|
|
3547
3653
|
type: Component,
|
|
3548
|
-
args: [{ standalone: true, selector: 'mng-formly-field-action', imports: [ButtonModule, RippleModule, TranslateModule, TooltipModule,
|
|
3654
|
+
args: [{ standalone: true, selector: 'mng-formly-field-action', imports: [ButtonModule, RippleModule, TranslateModule, TooltipModule, MessageModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button?.icon)\"\n [label]=\"$any(descriptor.button?.label === null ? null : descriptor.button?.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button?.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n @if (actionMessage) {\n <p-message [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n }\n</div>\n" }]
|
|
3549
3655
|
}] });
|
|
3550
3656
|
|
|
3551
3657
|
class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
|
|
@@ -3574,7 +3680,7 @@ class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
|
|
|
3574
3680
|
});
|
|
3575
3681
|
}
|
|
3576
3682
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3577
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-autocomplete'\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n</mng-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "optionsTrackProperty", "optionsValueProperty", "optionsLabelProperty", "optionsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst", "searchTrim", "disabled"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$
|
|
3683
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-autocomplete'\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n</mng-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "optionsTrackProperty", "optionsValueProperty", "optionsLabelProperty", "optionsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst", "searchTrim", "disabled"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3578
3684
|
}
|
|
3579
3685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
|
|
3580
3686
|
type: Component,
|
|
@@ -3637,7 +3743,7 @@ class FormlyFieldDropdownComponent extends ACommonsFormlyFieldType {
|
|
|
3637
3743
|
});
|
|
3638
3744
|
}
|
|
3639
3745
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3640
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-dropdown'\">\n</mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur", "loading", "disabled", "allowInput", "appendTo", "inlineSearch", "searchTrim"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$
|
|
3746
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-dropdown'\">\n</mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur", "loading", "disabled", "allowInput", "appendTo", "inlineSearch", "searchTrim"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3641
3747
|
}
|
|
3642
3748
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
|
|
3643
3749
|
type: Component,
|
|
@@ -3713,7 +3819,7 @@ class FormlyFieldFieldsetComponent extends ACommonsFormlyFieldType {
|
|
|
3713
3819
|
})));
|
|
3714
3820
|
}
|
|
3715
3821
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3716
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset\n [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\"\n [hidden]=\"group.config.props['groupHidden']\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$3.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$
|
|
3822
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset\n [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\"\n [hidden]=\"group.config.props['groupHidden']\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$3.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3717
3823
|
}
|
|
3718
3824
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
|
|
3719
3825
|
type: Component,
|
|
@@ -3868,7 +3974,7 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
3868
3974
|
}
|
|
3869
3975
|
}
|
|
3870
3976
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3871
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? (descriptor.numberMin ?? NUMBER_MIN_SAFE) : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? (descriptor.numberMax ?? NUMBER_MAX_SAFE) : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"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 ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + (descriptor.labelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [id]=\"$any(key)\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.trimOption\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i1$4.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i8$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "variant", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autofocus", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i9$1.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i11.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i12.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3977
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? (descriptor.numberMin ?? NUMBER_MIN_SAFE) : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? (descriptor.numberMax ?? NUMBER_MAX_SAFE) : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"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 ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + (descriptor.labelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [id]=\"$any(key)\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.trimOption\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i1$4.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6$1.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i8.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "variant", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autofocus", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i9.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i11.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i12.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i2$1.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3872
3978
|
}
|
|
3873
3979
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
|
|
3874
3980
|
type: Component,
|
|
@@ -4071,7 +4177,7 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
4071
4177
|
}
|
|
4072
4178
|
}
|
|
4073
4179
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4074
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n [class]=\"'p-inputgroup mng-dropdown-dialog' + (descriptor.inputClassName ?? 'mng-formly-field-lookup-dialog')\"\n [class.p-inputtext-sm]=\"descriptor.isSizeSmall\"\n [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input\n pInputText\n type=\"text\"\n [id]=\"$any(key)\"\n [readonly]=\"true\"\n [formlyAttributes]=\"field\"\n [formControl]=\"fieldLabelFormControl\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"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)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$
|
|
4180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n [class]=\"'p-inputgroup mng-dropdown-dialog' + (descriptor.inputClassName ?? 'mng-formly-field-lookup-dialog')\"\n [class.p-inputtext-sm]=\"descriptor.isSizeSmall\"\n [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input\n pInputText\n type=\"text\"\n [id]=\"$any(key)\"\n [readonly]=\"true\"\n [formlyAttributes]=\"field\"\n [formControl]=\"fieldLabelFormControl\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"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)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i2$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "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"] }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4075
4181
|
}
|
|
4076
4182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
|
|
4077
4183
|
type: Component,
|
|
@@ -4113,7 +4219,6 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4113
4219
|
return of(ctx.parameters.item || {});
|
|
4114
4220
|
});
|
|
4115
4221
|
viewAction.withEditorActions([actionEditorCancel(viewAction)]);
|
|
4116
|
-
viewAction.button.withLabel(null);
|
|
4117
4222
|
this.actions.push(viewAction);
|
|
4118
4223
|
}
|
|
4119
4224
|
if (hasAddAction) {
|
|
@@ -4123,7 +4228,6 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4123
4228
|
})
|
|
4124
4229
|
.withPosition(ActionPositionEnum.ToolbarRight)
|
|
4125
4230
|
.withDialogSize(StyleSizeEnum.Small)
|
|
4126
|
-
.withButtonDescriptor(new ActionButtonDescriptor().withStyleClass(new ButtonStyleBuilder().withSize(StyleSizeEnum.ExtraSmall)))
|
|
4127
4231
|
.withFetchFunction(ctx => {
|
|
4128
4232
|
setTimeout(this.formControl.markAsTouched, 0);
|
|
4129
4233
|
return of(ctx.parameters.item || {});
|
|
@@ -4140,11 +4244,16 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4140
4244
|
this.formControl.markAsTouched();
|
|
4141
4245
|
return of(ctx.parameters.item);
|
|
4142
4246
|
})
|
|
4143
|
-
.
|
|
4144
|
-
.withRunNotificationError(undefined, undefined, false)
|
|
4247
|
+
.withNotifications(false)
|
|
4145
4248
|
.withIsVisibleFunction(() => this.formStateDisabled$.pipe(map(v => !v)))
|
|
4146
|
-
.withIsEnabledFunction(() => this.isEnabled$)
|
|
4147
|
-
|
|
4249
|
+
.withIsEnabledFunction(() => this.isEnabled$)
|
|
4250
|
+
.withButtonOpts({
|
|
4251
|
+
label: null,
|
|
4252
|
+
icon: 'pi pi-plus',
|
|
4253
|
+
style: {
|
|
4254
|
+
size: StyleSizeEnum.ExtraSmall
|
|
4255
|
+
}
|
|
4256
|
+
});
|
|
4148
4257
|
this.actions.push(addAction);
|
|
4149
4258
|
}
|
|
4150
4259
|
if (hasEditAction) {
|
|
@@ -4154,7 +4263,6 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4154
4263
|
})
|
|
4155
4264
|
.withPosition(ActionPositionEnum.RowInline)
|
|
4156
4265
|
.withDialogSize(StyleSizeEnum.Small)
|
|
4157
|
-
.withButtonDescriptor(new ActionButtonDescriptor().withStyleClass(new ButtonStyleBuilder().withSize(StyleSizeEnum.ExtraSmall)))
|
|
4158
4266
|
.withFetchFunction(ctx => {
|
|
4159
4267
|
this.formControl.markAsTouched();
|
|
4160
4268
|
return of(ctx.parameters.item || {});
|
|
@@ -4171,11 +4279,16 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4171
4279
|
this.formControl.markAsTouched();
|
|
4172
4280
|
return of(ctx.parameters.item);
|
|
4173
4281
|
})
|
|
4174
|
-
.
|
|
4175
|
-
.withRunNotificationError(undefined, undefined, false)
|
|
4282
|
+
.withNotifications(false)
|
|
4176
4283
|
.withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.formStateDisabled$.pipe(map(v => !v))))
|
|
4177
|
-
.withIsEnabledFunction(() => this.isEnabled$)
|
|
4178
|
-
|
|
4284
|
+
.withIsEnabledFunction(() => this.isEnabled$)
|
|
4285
|
+
.withButtonOpts({
|
|
4286
|
+
label: null,
|
|
4287
|
+
icon: 'pi pi-pencil',
|
|
4288
|
+
style: {
|
|
4289
|
+
size: StyleSizeEnum.ExtraSmall
|
|
4290
|
+
}
|
|
4291
|
+
});
|
|
4179
4292
|
this.actions.push(editAction);
|
|
4180
4293
|
}
|
|
4181
4294
|
if (hasDeleteAction) {
|
|
@@ -4185,7 +4298,6 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4185
4298
|
parentProperty: this.descriptor.property
|
|
4186
4299
|
})
|
|
4187
4300
|
.withPosition(ActionPositionEnum.RowInline)
|
|
4188
|
-
.withButtonDescriptor(new ActionButtonDescriptor().withStyleClass(new ButtonStyleBuilder(StyleLevelEnum.Danger).withSize(StyleSizeEnum.ExtraSmall)))
|
|
4189
4301
|
.withRunFunction(ctx => {
|
|
4190
4302
|
if (!ctx.parameters.item) {
|
|
4191
4303
|
return throwError(() => new CommonsInternalError(`No item was provided in context, delete cannot be done.`, { name: 'FormlyFieldTableDialogFormComponentError' }));
|
|
@@ -4213,11 +4325,17 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4213
4325
|
this.formControl.markAsTouched();
|
|
4214
4326
|
return of(ctxItem);
|
|
4215
4327
|
})
|
|
4216
|
-
.
|
|
4217
|
-
.withRunNotificationError(undefined, undefined, false)
|
|
4328
|
+
.withNotifications(true)
|
|
4218
4329
|
.withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.formStateDisabled$.pipe(map(v => !v))))
|
|
4219
|
-
.withIsEnabledFunction(() => this.isEnabled$)
|
|
4220
|
-
|
|
4330
|
+
.withIsEnabledFunction(() => this.isEnabled$)
|
|
4331
|
+
.withButtonOpts({
|
|
4332
|
+
label: null,
|
|
4333
|
+
icon: 'pi pi-trash',
|
|
4334
|
+
style: {
|
|
4335
|
+
level: StyleLevelEnum.Danger,
|
|
4336
|
+
size: StyleSizeEnum.ExtraSmall
|
|
4337
|
+
}
|
|
4338
|
+
});
|
|
4221
4339
|
this.actions.push(deleteAction);
|
|
4222
4340
|
}
|
|
4223
4341
|
this.actions.push(...this.descriptor.actions);
|
|
@@ -4285,7 +4403,7 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4285
4403
|
return false;
|
|
4286
4404
|
}
|
|
4287
4405
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4288
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n <div>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance", "rowReorder"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type:
|
|
4406
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n <div>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance", "rowReorder"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4289
4407
|
}
|
|
4290
4408
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
|
|
4291
4409
|
type: Component,
|
|
@@ -4462,7 +4580,7 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4462
4580
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.RowReorder, this, { dragIndex: event.dragIndex, dropIndex: event.dropIndex });
|
|
4463
4581
|
}
|
|
4464
4582
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4465
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\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 }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-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-primary\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$
|
|
4583
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\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 }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-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-primary\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "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"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i2$1.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4466
4584
|
}
|
|
4467
4585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
4468
4586
|
type: Component,
|
|
@@ -4482,7 +4600,7 @@ class FormlyFieldTabsComponent extends ACommonsFormlyFieldType {
|
|
|
4482
4600
|
this.fieldGroup.set(this.field.fieldGroup === undefined ? [] : this.field.fieldGroup);
|
|
4483
4601
|
}
|
|
4484
4602
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4485
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"(formControl!.valid ? 'p-tabview-title' : '') + (tab.props['groupHidden'] ? ' hidden' : '')\"\n [hidden]=\"tab.props['groupHidden']\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : (tab.key ?? '')) + '_invalid']\">{{\n tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$5.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$5.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2$
|
|
4603
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"(formControl!.valid ? 'p-tabview-title' : '') + (tab.props['groupHidden'] ? ' hidden' : '')\"\n [hidden]=\"tab.props['groupHidden']\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : (tab.key ?? '')) + '_invalid']\">{{\n tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$5.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$5.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4486
4604
|
}
|
|
4487
4605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
|
|
4488
4606
|
type: Component,
|
|
@@ -4509,7 +4627,7 @@ class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
|
4509
4627
|
return field;
|
|
4510
4628
|
}
|
|
4511
4629
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4512
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldNoLabelWrapperComponent, isStandalone: true, selector: "mng-formly-field-no-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block p-error\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$
|
|
4630
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldNoLabelWrapperComponent, isStandalone: true, selector: "mng-formly-field-no-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block p-error\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4513
4631
|
}
|
|
4514
4632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, decorators: [{
|
|
4515
4633
|
type: Component,
|
|
@@ -4554,7 +4672,7 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
|
4554
4672
|
}
|
|
4555
4673
|
}
|
|
4556
4674
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4557
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldWrapperComponent, isStandalone: true, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"'field ' + fieldClassName()\">\n <div class=\"grid mt-0\">\n @if (descriptor.label !== null) {\n <label [for]=\"key\" class=\"col\" [class]=\"descriptor.labelClassName\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$
|
|
4675
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldWrapperComponent, isStandalone: true, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"'field ' + fieldClassName()\">\n <div class=\"grid mt-0\">\n @if (descriptor.label !== null) {\n <label [for]=\"key\" class=\"col\" [class]=\"descriptor.labelClassName\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4558
4676
|
}
|
|
4559
4677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldWrapperComponent, decorators: [{
|
|
4560
4678
|
type: Component,
|
|
@@ -4703,7 +4821,7 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4703
4821
|
});
|
|
4704
4822
|
}
|
|
4705
4823
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4706
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldDatepickerComponent, isStandalone: true, selector: "mng-formly-field-datepicker", usesInheritance: true, ngImport: i0, template: "<p-calendar\n appendTo=\"body\"\n [class]=\"styleClass()\"\n [formControl]=\"dpFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(minDate())\"\n [maxDate]=\"$any(maxDate())\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n showIcon=\"true\"\n showButtonBar=\"true\"\n [showClear]=\"!props.required\"\n styleClass=\"mng-formly-field-datepicker\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-datepicker-input'\"\n [firstDayOfWeek]=\"1\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$
|
|
4824
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldDatepickerComponent, isStandalone: true, selector: "mng-formly-field-datepicker", usesInheritance: true, ngImport: i0, template: "<p-calendar\n appendTo=\"body\"\n [class]=\"styleClass()\"\n [formControl]=\"dpFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(minDate())\"\n [maxDate]=\"$any(maxDate())\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n showIcon=\"true\"\n showButtonBar=\"true\"\n [showClear]=\"!props.required\"\n styleClass=\"mng-formly-field-datepicker\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-datepicker-input'\"\n [firstDayOfWeek]=\"1\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i3$3.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4707
4825
|
}
|
|
4708
4826
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDatepickerComponent, decorators: [{
|
|
4709
4827
|
type: Component,
|
|
@@ -5042,7 +5160,7 @@ class TableviewComponent {
|
|
|
5042
5160
|
return actions.filter(action => (action.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true) && actionPositions.includes(action.position));
|
|
5043
5161
|
}
|
|
5044
5162
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5045
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideViewContainer()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-table\n [descriptor]=\"descriptor().table\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions()\"\n [selectionEnabled]=\"hasItemSelectionAction()\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$
|
|
5163
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideViewContainer()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-table\n [descriptor]=\"descriptor().table\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions()\"\n [selectionEnabled]=\"hasItemSelectionAction()\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$4.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance", "rowReorder"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5046
5164
|
}
|
|
5047
5165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TableviewComponent, decorators: [{
|
|
5048
5166
|
type: Component,
|
|
@@ -5279,6 +5397,49 @@ function withTableview(config) {
|
|
|
5279
5397
|
]
|
|
5280
5398
|
};
|
|
5281
5399
|
}
|
|
5400
|
+
/**
|
|
5401
|
+
* Prepares providers for usage of the tableview functionalities.
|
|
5402
|
+
*
|
|
5403
|
+
* @returns {CommonsFeature} The `CommonsFeature` object with the layout configuration.
|
|
5404
|
+
*/
|
|
5405
|
+
function provideTableviewChild(config) {
|
|
5406
|
+
return [
|
|
5407
|
+
DatePipe,
|
|
5408
|
+
NavigationService,
|
|
5409
|
+
{
|
|
5410
|
+
provide: COMMONS_TABLEVIEW_FEATURE_CONFIG_IT,
|
|
5411
|
+
useValue: config
|
|
5412
|
+
},
|
|
5413
|
+
{
|
|
5414
|
+
provide: FORMLY_CONFIG,
|
|
5415
|
+
multi: true,
|
|
5416
|
+
useFactory: commonsFormlyConfigProvider,
|
|
5417
|
+
deps: [TranslateService, DatePipe, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT]
|
|
5418
|
+
},
|
|
5419
|
+
{
|
|
5420
|
+
provide: ACTION_EDITOR_COMPONENT_IT,
|
|
5421
|
+
useValue: ActionEditorComponent
|
|
5422
|
+
},
|
|
5423
|
+
{
|
|
5424
|
+
provide: DATA_LANGUAGE_DROPDOWN_COMPONENT_IT,
|
|
5425
|
+
useValue: DataLanguageDropdownComponent
|
|
5426
|
+
},
|
|
5427
|
+
{
|
|
5428
|
+
provide: ActionErrorMapperService,
|
|
5429
|
+
useClass: DefaultActionErrorMapperService
|
|
5430
|
+
},
|
|
5431
|
+
RootActionExecutorService,
|
|
5432
|
+
{
|
|
5433
|
+
provide: ActionExecutorService,
|
|
5434
|
+
useExisting: RootActionExecutorService
|
|
5435
|
+
},
|
|
5436
|
+
DefaultDataProviderExecutor,
|
|
5437
|
+
{
|
|
5438
|
+
provide: DataProviderExecutor,
|
|
5439
|
+
useExisting: DefaultDataProviderExecutor
|
|
5440
|
+
}
|
|
5441
|
+
];
|
|
5442
|
+
}
|
|
5282
5443
|
|
|
5283
5444
|
// action components
|
|
5284
5445
|
|
|
@@ -5286,5 +5447,5 @@ function withTableview(config) {
|
|
|
5286
5447
|
* Generated bundle index. Do not edit.
|
|
5287
5448
|
*/
|
|
5288
5449
|
|
|
5289
|
-
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionDataProviderSource, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, EditorAutoSaveStatusComponent, FormEditorComponent, FormEditorService, FormlyFieldActionComponent, FormlyFieldAutocompleteComponent, FormlyFieldCustomComponent, FormlyFieldDropdownComponent, FormlyFieldFieldsetComponent, FormlyFieldInputComponent, FormlyFieldLabelComponent, FormlyFieldLookupDialogComponent, FormlyFieldNoLabelWrapperComponent, FormlyFieldTableDialogFormComponent, FormlyFieldTableDialogMultiselectComponent, FormlyFieldTabsComponent, FormlyFieldWrapperComponent, NavigationService, RootActionExecutorService, TableviewComponent, TableviewRouteBuilder, TableviewRouteComponent, ViewContainer, actionNotificationError, actionNotificationSuccess, addAsyncValidationsToFormlyField, addValidationsToFormlyField, calculateTableColumnActionWidth, commonsFormlyConfigProvider, createFormlyConfigFromDescriptor, createFormlyField, createFormlyFields, createFormlyGroupType, createFormlyLocalizationsTab, createFormlyTabType, createFormlyValidation, createTableviewLazyRoute, createTableviewRoute, emailValidationName, emailValidator, fieldLookupWithOptionsValueProperty, fieldProjectFieldToProperty, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEditorFieldLabel, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getI18nActionEditorTitleAsync, getI18nActionParams, getI18nActionParamsAsync, getI18nActionTitleAsync, getI18nForAction, getI18nForActionAsync, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, maxDateValidationName, maxDateValidator, minDateValidationName, minDateValidator, populateI18nActionParams, provideActionExecutor, provideFormComponent, provideViewContainer, unsavedChangesGuard, withTableview };
|
|
5450
|
+
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionDataProviderSource, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, EditorAutoSaveStatusComponent, FormEditorComponent, FormEditorService, FormlyFieldActionComponent, FormlyFieldAutocompleteComponent, FormlyFieldCustomComponent, FormlyFieldDropdownComponent, FormlyFieldFieldsetComponent, FormlyFieldInputComponent, FormlyFieldLabelComponent, FormlyFieldLookupDialogComponent, FormlyFieldNoLabelWrapperComponent, FormlyFieldTableDialogFormComponent, FormlyFieldTableDialogMultiselectComponent, FormlyFieldTabsComponent, FormlyFieldWrapperComponent, NavigationService, RootActionExecutorService, TableviewComponent, TableviewRouteBuilder, TableviewRouteComponent, ViewContainer, actionNotificationError, actionNotificationSuccess, addAsyncValidationsToFormlyField, addValidationsToFormlyField, calculateTableColumnActionWidth, commonsFormlyConfigProvider, createFormlyConfigFromDescriptor, createFormlyField, createFormlyFields, createFormlyGroupType, createFormlyLocalizationsTab, createFormlyTabType, createFormlyValidation, createTableviewLazyRoute, createTableviewRoute, emailValidationName, emailValidator, fieldLookupWithOptionsValueProperty, fieldProjectFieldToProperty, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEditorFieldLabel, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getI18nActionEditorTitleAsync, getI18nActionParams, getI18nActionParamsAsync, getI18nActionTitleAsync, getI18nForAction, getI18nForActionAsync, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, maxDateValidationName, maxDateValidator, minDateValidationName, minDateValidator, populateI18nActionParams, provideActionExecutor, provideFormComponent, provideTableviewChild, provideViewContainer, unsavedChangesGuard, withTableview };
|
|
5290
5451
|
//# sourceMappingURL=mediusinc-mng-commons-tableview.mjs.map
|