@mediusinc/mng-commons 5.0.0-rc.1 → 5.0.0-rc.2
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/router/route-builder.d.ts +149 -26
- package/core/router/routes-builder.d.ts +28 -13
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +3 -3
- package/esm2022/core/components/pages/error/error.page.component.mjs +3 -3
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +3 -3
- package/esm2022/core/directives/component.directive.mjs +3 -3
- package/esm2022/core/directives/dialog-keydown-handler.directive.mjs +3 -3
- package/esm2022/core/directives/template.directive.mjs +3 -3
- package/esm2022/core/pipes/boolean.pipe.mjs +3 -3
- package/esm2022/core/pipes/class-map.pipe.mjs +3 -3
- package/esm2022/core/pipes/enum.pipe.mjs +3 -3
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +3 -3
- package/esm2022/core/pipes/enumerate.pipe.mjs +3 -3
- package/esm2022/core/pipes/getter.pipe.mjs +3 -3
- package/esm2022/core/pipes/i18n-property.pipe.mjs +3 -3
- package/esm2022/core/pipes/json-path.pipe.mjs +3 -3
- package/esm2022/core/pipes/parametrize.pipe.mjs +3 -3
- package/esm2022/core/pipes/template.pipe.mjs +3 -3
- package/esm2022/core/router/route-builder.mjs +211 -84
- package/esm2022/core/router/routes-builder.mjs +41 -43
- package/esm2022/core/security/permission.service.mjs +3 -3
- package/esm2022/core/services/commons-init.service.mjs +3 -3
- package/esm2022/core/services/commons-router.service.mjs +3 -3
- package/esm2022/core/services/commons.service.mjs +3 -3
- package/esm2022/core/services/local-storage-config.service.mjs +3 -3
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +36 -42
- package/esm2022/form/components/date-range/date-range.component.mjs +3 -3
- package/esm2022/form/components/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/form/directives/input-trim.directive.mjs +3 -3
- package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +3 -3
- package/esm2022/table/components/column-value/column-value.component.mjs +3 -3
- package/esm2022/table/components/table/table.component.mjs +3 -3
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +3 -3
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +3 -3
- package/esm2022/table/services/data-list.service.mjs +3 -3
- package/esm2022/tableview/action/components/action/action.component.mjs +3 -3
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +3 -3
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +20 -19
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +3 -3
- package/esm2022/tableview/action/components/route/action-route.component.mjs +6 -5
- package/esm2022/tableview/action/components/table/action-table.component.mjs +3 -3
- package/esm2022/tableview/action/models/execution/action-instance.model.mjs +1 -1
- package/esm2022/tableview/action/services/action-executor.service.mjs +2 -2
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/navigation.service.mjs +3 -3
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/view-container.service.mjs +3 -3
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +9 -1
- package/esm2022/tableview/api/action/models/execution/action-instance.model.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +18 -29
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-group.descriptor.mjs +3 -3
- package/esm2022/tableview/api/editor/descriptors/field-validation.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +36 -7
- package/esm2022/tableview/api/editor/helpers/field-validators.mjs +15 -25
- package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/field.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.event.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +3 -3
- package/esm2022/tableview/api/editor/models/formly-field.model.mjs +1 -1
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +12 -19
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +157 -137
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +5 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +103 -0
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +5 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +33 -50
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +5 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +6 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +14 -13
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +62 -54
- package/esm2022/tableview/editor/helpers/formly-config.mjs +5 -3
- package/esm2022/tableview/editor/models/formly-config.model.mjs +1 -1
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +10 -10
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +26 -43
- package/esm2022/tableview/tableview/router/tableview-route-builder.mjs +17 -43
- package/fesm2022/mediusinc-mng-commons-core.mjs +311 -186
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +46 -51
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +18 -18
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +89 -80
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +497 -435
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/form/components/autocomplete/autocomplete.component.d.ts +8 -7
- package/package.json +1 -1
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +1 -3
- package/tableview/action/components/route/action-route.component.d.ts +1 -1
- package/tableview/action/models/execution/action-instance.model.d.ts +2 -1
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +8 -0
- package/tableview/api/action/models/execution/action-instance.model.d.ts +2 -1
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +14 -19
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +24 -24
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +5 -5
- package/tableview/api/editor/descriptors/field-validation.descriptor.d.ts +10 -13
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +15 -0
- package/tableview/api/editor/helpers/field-validators.d.ts +6 -2
- package/tableview/api/editor/models/editor-fields.model.d.ts +6 -4
- package/tableview/api/editor/models/field.model.d.ts +16 -7
- package/tableview/api/editor/models/form-editor.event.d.ts +6 -4
- package/tableview/api/editor/models/form-editor.interface.d.ts +37 -8
- package/tableview/api/editor/models/formly-custom-field.model.d.ts +1 -1
- package/tableview/api/editor/models/formly-field.model.d.ts +9 -7
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +6 -7
- package/tableview/editor/components/editor/form-editor.component.d.ts +51 -35
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +22 -0
- package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +5 -7
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +0 -1
- package/tableview/editor/helpers/editor-formly.d.ts +11 -10
- package/tableview/editor/models/formly-config.model.d.ts +1 -1
- package/tableview/tableview/components/route/tableview-route.component.d.ts +2 -2
- package/tableview/tableview/components/tableview/tableview.component.d.ts +11 -10
- package/tableview/tableview/router/tableview-route-builder.d.ts +7 -13
- package/version-info.json +11 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { AsyncPipe, NgTemplateOutlet, JsonPipe, NgStyle, DatePipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, Injectable, inject, Injector, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, ViewChild,
|
|
4
|
+
import { InjectionToken, Injectable, inject, Injector, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, ViewChild, DestroyRef, input, output, viewChild, signal, effect, HostListener, contentChildren, computed, ViewChildren, LOCALE_ID } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/router';
|
|
6
6
|
import { NavigationEnd, Router, ActivatedRoute, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, RouterOutlet } from '@angular/router';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
8
8
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
9
9
|
import * as i4 from 'primeng/button';
|
|
10
10
|
import { ButtonModule } from 'primeng/button';
|
|
@@ -16,27 +16,27 @@ import * as i9 from 'primeng/splitbutton';
|
|
|
16
16
|
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
17
17
|
import * as i8 from 'primeng/tooltip';
|
|
18
18
|
import { TooltipModule } from 'primeng/tooltip';
|
|
19
|
-
import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest,
|
|
20
|
-
import * as i1$
|
|
21
|
-
import { getI18n, getI18nAsync, toastMessage, getI18nForError, LoggerService, CommonsService, ParametrizePipe, escapeHtmlAny, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, Permissions, boolean$Attribute, ComponentDirective, objectDeepCopy,
|
|
22
|
-
import { ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptor, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionDescriptor, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories,
|
|
19
|
+
import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest, debounceTime, isObservable, throwError, filter as filter$1 } from 'rxjs';
|
|
20
|
+
import * as i1$2 from '@mediusinc/mng-commons/core';
|
|
21
|
+
import { getI18n, getI18nAsync, toastMessage, getI18nForError, LoggerService, CommonsService, ParametrizePipe, escapeHtmlAny, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, Permissions, boolean$Attribute, ComponentDirective, objectDeepCopy, DialogKeydownHandlerDirective, Styles, TemplateDirective, findTemplateByName, fromSubscribeError, getErrorLogLevel, StyleLevelEnum, getObjectPropertyByPath, FilterMatchMode, COMMONS_MODULE_CONFIG_IT, dateToIsoString, RouteBuilder, createLazyRoute, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
|
|
22
|
+
import { ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptor, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionDescriptor, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
|
|
23
23
|
import { mergeMap, map, filter, startWith, catchError, first, take as take$1 } from 'rxjs/operators';
|
|
24
24
|
import { getI18nModelParams, getI18nModelParamsAsync, type } from '@mediusinc/mng-commons/model';
|
|
25
25
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
26
|
-
import * as i2$
|
|
26
|
+
import * as i2$3 from 'primeng/api';
|
|
27
27
|
import { MessageService, ConfirmationService, SharedModule } from 'primeng/api';
|
|
28
28
|
import { DialogService, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
29
29
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
30
30
|
import * as i1$3 from 'primeng/progressspinner';
|
|
31
31
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
32
|
-
import * as i2$
|
|
32
|
+
import * as i2$2 from 'primeng/toolbar';
|
|
33
33
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
34
34
|
import { ZIndexUtils } from 'primeng/utils';
|
|
35
|
-
import * as
|
|
36
|
-
import { FormGroup, FormArray, ReactiveFormsModule, FormsModule, Validators, FormControl } from '@angular/forms';
|
|
37
|
-
import * as i2$
|
|
38
|
-
import { FormlyModule, FieldType, FieldWrapper, FORMLY_CONFIG } from '@ngx-formly/core';
|
|
39
|
-
import * as i3 from 'primeng/messages';
|
|
35
|
+
import * as i3 from '@angular/forms';
|
|
36
|
+
import { UntypedFormGroup, FormGroup, FormArray, ReactiveFormsModule, FormsModule, FormBuilder, Validators, FormControl } from '@angular/forms';
|
|
37
|
+
import * as i2$1 from '@ngx-formly/core';
|
|
38
|
+
import { FormlyConfig, FormlyModule, FieldType, FieldWrapper, FORMLY_CONFIG } from '@ngx-formly/core';
|
|
39
|
+
import * as i3$1 from 'primeng/messages';
|
|
40
40
|
import { MessagesModule } from 'primeng/messages';
|
|
41
41
|
import { DropdownComponent, AutocompleteComponent, InputTrimDirective } from '@mediusinc/mng-commons/form';
|
|
42
42
|
import { LookupDataProvider, ActionButtonDescriptor, ButtonStyleBuilder } from '@mediusinc/mng-commons/form/api';
|
|
@@ -46,29 +46,29 @@ import * as i5 from 'primeng/message';
|
|
|
46
46
|
import { MessageModule } from 'primeng/message';
|
|
47
47
|
import * as i1$4 from 'primeng/fieldset';
|
|
48
48
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
49
|
-
import * as
|
|
50
|
-
import { CalendarModule } from 'primeng/calendar';
|
|
51
|
-
import * as i11 from 'primeng/fileupload';
|
|
49
|
+
import * as i9$1 from 'primeng/fileupload';
|
|
52
50
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
53
51
|
import { TimesIcon } from 'primeng/icons/times';
|
|
54
|
-
import * as
|
|
52
|
+
import * as i11 from 'primeng/image';
|
|
55
53
|
import { ImageModule } from 'primeng/image';
|
|
56
|
-
import * as
|
|
54
|
+
import * as i8$1 from 'primeng/inputmask';
|
|
57
55
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
58
|
-
import * as
|
|
56
|
+
import * as i1$5 from 'primeng/inputnumber';
|
|
59
57
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
60
58
|
import * as i6 from 'primeng/inputswitch';
|
|
61
59
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
62
|
-
import * as
|
|
60
|
+
import * as i13 from 'primeng/inputtext';
|
|
63
61
|
import { InputTextModule } from 'primeng/inputtext';
|
|
64
|
-
import * as
|
|
62
|
+
import * as i12 from 'primeng/inputtextarea';
|
|
65
63
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
66
64
|
import * as i7$1 from 'primeng/radiobutton';
|
|
67
65
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
68
66
|
import * as i7$2 from 'primeng/dialog';
|
|
69
67
|
import { DialogModule } from 'primeng/dialog';
|
|
70
|
-
import * as i1$
|
|
68
|
+
import * as i1$6 from 'primeng/tabview';
|
|
71
69
|
import { TabViewModule } from 'primeng/tabview';
|
|
70
|
+
import * as i3$2 from 'primeng/calendar';
|
|
71
|
+
import { CalendarModule } from 'primeng/calendar';
|
|
72
72
|
|
|
73
73
|
function getI18nForAction(translate, action, actionPathKeys, customKey, item, fallbackKey, params, missingTranslationStrategy = 'returnFirstKey') {
|
|
74
74
|
const keys = getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);
|
|
@@ -476,10 +476,10 @@ class NavigationService {
|
|
|
476
476
|
this.router.navigateByUrl('/');
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
480
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
479
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NavigationService, deps: [{ token: i1.Router }, { token: i2.Location }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
480
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NavigationService }); }
|
|
481
481
|
}
|
|
482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NavigationService, decorators: [{
|
|
483
483
|
type: Injectable
|
|
484
484
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.Location }] });
|
|
485
485
|
|
|
@@ -531,10 +531,10 @@ class ViewContainer {
|
|
|
531
531
|
set routeTriggeredActionInstance(instance) {
|
|
532
532
|
this._routeTriggeredActionInstance = instance;
|
|
533
533
|
}
|
|
534
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
535
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ViewContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
535
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ViewContainer }); }
|
|
536
536
|
}
|
|
537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ViewContainer, decorators: [{
|
|
538
538
|
type: Injectable
|
|
539
539
|
}] });
|
|
540
540
|
|
|
@@ -1113,7 +1113,7 @@ class ActionExecutorService {
|
|
|
1113
1113
|
// must skip initialization from view container, because it would only get old instance.
|
|
1114
1114
|
// we need new instance before we can set new one on the view container.
|
|
1115
1115
|
const newInstance = this.getOrCreateInstance(undefined, instance.action, undefined, newInstanceStatus, true);
|
|
1116
|
-
newInstance.
|
|
1116
|
+
newInstance.reactivationPreviousInstance = instance;
|
|
1117
1117
|
// copy some additional settings
|
|
1118
1118
|
newInstance.activationDialogRef = instance.activationDialogRef;
|
|
1119
1119
|
newInstance.triggerParameters = instance.triggerParameters;
|
|
@@ -1293,10 +1293,10 @@ class RootActionExecutorService extends ActionExecutorService {
|
|
|
1293
1293
|
get instances() {
|
|
1294
1294
|
return this._instances;
|
|
1295
1295
|
}
|
|
1296
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
1297
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
1296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: RootActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1297
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: RootActionExecutorService }); }
|
|
1298
1298
|
}
|
|
1299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
1299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: RootActionExecutorService, decorators: [{
|
|
1300
1300
|
type: Injectable
|
|
1301
1301
|
}] });
|
|
1302
1302
|
|
|
@@ -1308,10 +1308,10 @@ class ComponentActionExecutorService extends ActionExecutorService {
|
|
|
1308
1308
|
get instances() {
|
|
1309
1309
|
return this.rootActionExecutorService.instances;
|
|
1310
1310
|
}
|
|
1311
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
1312
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
1311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ComponentActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1312
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ComponentActionExecutorService }); }
|
|
1313
1313
|
}
|
|
1314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
1314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ComponentActionExecutorService, decorators: [{
|
|
1315
1315
|
type: Injectable
|
|
1316
1316
|
}] });
|
|
1317
1317
|
|
|
@@ -1570,13 +1570,13 @@ class ActionComponent {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
this.subactions = this.processSubactions();
|
|
1572
1572
|
}
|
|
1573
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
1574
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
1573
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1$1.TranslateService }, { token: i1$2.PermissionService }, { token: ActionExecutorService }, { token: ViewContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1574
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ActionComponent, isStandalone: true, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataListParams: "dataListParams", dataProvider: "dataProvider", hostComponent: "hostComponent", routeInit: ["route", "routeInit"], inputDisabled: ["disabled", "inputDisabled", boolean$Attribute], inputLoading: ["loading", "inputLoading", boolean$Attribute], selectedItems: "selectedItems" }, outputs: { finishEventEmitter: "finish" }, host: { properties: { "class": "this.hostClass", "class.m-0": "this.isHostHidden" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "subactionsMenu", first: true, predicate: ["subactionsMenu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (($isVisible | async) && ($isPermitted | async)) {\n @if (actionLink && actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | mngParametrize: itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (actionLink) {\n <a\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? 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 | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\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]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\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]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\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: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.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", "nodeInjector"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: SplitButtonModule }, { kind: "component", type: i9.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps"], outputs: ["onClick", "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: i10.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 }); }
|
|
1575
1575
|
}
|
|
1576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
1576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionComponent, decorators: [{
|
|
1577
1577
|
type: Component,
|
|
1578
1578
|
args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, ButtonModule, RippleModule, TooltipModule, ParametrizePipe, ComponentDirective, SplitButtonModule, MenuModule], providers: [provideActionExecutor()], template: "@if (($isVisible | async) && ($isPermitted | async)) {\n @if (actionLink && actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | mngParametrize: itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (actionLink) {\n <a\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? 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 | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\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]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\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]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\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"] }]
|
|
1579
|
-
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type:
|
|
1579
|
+
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: i1$2.PermissionService }, { type: ActionExecutorService }, { type: ViewContainer, decorators: [{
|
|
1580
1580
|
type: Optional
|
|
1581
1581
|
}] }], propDecorators: { hostClass: [{
|
|
1582
1582
|
type: HostBinding,
|
|
@@ -1618,17 +1618,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
1618
1618
|
args: ['subactionsMenu']
|
|
1619
1619
|
}] } });
|
|
1620
1620
|
|
|
1621
|
-
function createFormlyConfigFromDescriptor(descriptor, formEditorComponent) {
|
|
1621
|
+
function createFormlyConfigFromDescriptor(descriptor, formlyConfig, formEditorComponent) {
|
|
1622
1622
|
const fields = [];
|
|
1623
1623
|
if (descriptor.isLocalized) {
|
|
1624
1624
|
descriptor = createFormlyLocalizationsTab(descriptor);
|
|
1625
1625
|
}
|
|
1626
1626
|
if (!descriptor.isLocalized && descriptor.tabs.length === 1 && descriptor.tabs[0].default) {
|
|
1627
1627
|
// dont use tabs
|
|
1628
|
-
fields.push(...createFormlyGroupType(descriptor.tabs[0].fields, formEditorComponent));
|
|
1628
|
+
fields.push(...createFormlyGroupType(descriptor.tabs[0].fields, formlyConfig, formEditorComponent));
|
|
1629
1629
|
}
|
|
1630
1630
|
else {
|
|
1631
|
-
fields.push(...createFormlyTabType(descriptor.tabs, formEditorComponent));
|
|
1631
|
+
fields.push(...createFormlyTabType(descriptor.tabs, formlyConfig, formEditorComponent));
|
|
1632
1632
|
}
|
|
1633
1633
|
return fields;
|
|
1634
1634
|
}
|
|
@@ -1660,12 +1660,12 @@ function createFormlyLocalizationsTab(descriptor) {
|
|
|
1660
1660
|
if (!descriptor.localizationLocalizationProperty) {
|
|
1661
1661
|
throw new CommonsInternalError('Localization localization property must be defined');
|
|
1662
1662
|
}
|
|
1663
|
-
descriptorWithLocalizations.
|
|
1663
|
+
descriptorWithLocalizations.addFieldManyEditorUnsafe(descriptor.localizationLocalizationProperty, localizationsTableViewDescriptor);
|
|
1664
1664
|
return descriptorWithLocalizations;
|
|
1665
1665
|
}
|
|
1666
1666
|
return descriptor;
|
|
1667
1667
|
}
|
|
1668
|
-
function createFormlyTabType(tabGroups, formEditorComponent) {
|
|
1668
|
+
function createFormlyTabType(tabGroups, formlyConfig, formEditorComponent) {
|
|
1669
1669
|
const tabsField = {
|
|
1670
1670
|
type: 'tabs',
|
|
1671
1671
|
fieldGroup: [],
|
|
@@ -1685,15 +1685,15 @@ function createFormlyTabType(tabGroups, formEditorComponent) {
|
|
|
1685
1685
|
if (tab.title) {
|
|
1686
1686
|
tabField.props.label = tab.title;
|
|
1687
1687
|
}
|
|
1688
|
-
tabField.fieldGroup.push(...createFormlyGroupType(tab.fields, formEditorComponent));
|
|
1688
|
+
tabField.fieldGroup.push(...createFormlyGroupType(tab.fields, formlyConfig, formEditorComponent));
|
|
1689
1689
|
tabsField.fieldGroup.push(tabField);
|
|
1690
1690
|
}
|
|
1691
1691
|
return [tabsField];
|
|
1692
1692
|
}
|
|
1693
|
-
function createFormlyGroupType(groups, formEditorComponent) {
|
|
1693
|
+
function createFormlyGroupType(groups, formlyConfig, formEditorComponent) {
|
|
1694
1694
|
if (groups.length === 1 && groups[0].default) {
|
|
1695
1695
|
// dont use fieldset, just create fields
|
|
1696
|
-
return createFormlyFields(groups[0], formEditorComponent);
|
|
1696
|
+
return createFormlyFields(groups[0], formlyConfig, formEditorComponent);
|
|
1697
1697
|
}
|
|
1698
1698
|
else {
|
|
1699
1699
|
const groupsField = {
|
|
@@ -1716,26 +1716,27 @@ function createFormlyGroupType(groups, formEditorComponent) {
|
|
|
1716
1716
|
if (group.title) {
|
|
1717
1717
|
groupField.props.label = group.title;
|
|
1718
1718
|
}
|
|
1719
|
-
groupField.fieldGroup.push(...createFormlyFields(group, formEditorComponent));
|
|
1719
|
+
groupField.fieldGroup.push(...createFormlyFields(group, formlyConfig, formEditorComponent));
|
|
1720
1720
|
groupsField.fieldGroup.push(groupField);
|
|
1721
1721
|
}
|
|
1722
1722
|
return [groupsField];
|
|
1723
1723
|
}
|
|
1724
1724
|
}
|
|
1725
|
-
function createFormlyFields(descriptor, formEditorComponent) {
|
|
1725
|
+
function createFormlyFields(descriptor, formlyConfig, formEditorComponent) {
|
|
1726
1726
|
const fields = [];
|
|
1727
1727
|
for (const descriptorField of descriptor.fields) {
|
|
1728
|
-
fields.push(createFormlyField(descriptorField, formEditorComponent));
|
|
1728
|
+
fields.push(createFormlyField(descriptorField, formlyConfig, formEditorComponent));
|
|
1729
1729
|
}
|
|
1730
1730
|
// wrap in group to be able to use flex grid
|
|
1731
1731
|
const wrapperGroup = {
|
|
1732
1732
|
fieldGroupClassName: 'p-fluid formgrid grid',
|
|
1733
|
-
fieldGroup: fields
|
|
1733
|
+
fieldGroup: fields,
|
|
1734
|
+
props: {}
|
|
1734
1735
|
};
|
|
1735
|
-
addValidationsToFormlyField(wrapperGroup, descriptor.validations);
|
|
1736
|
+
addValidationsToFormlyField(wrapperGroup, descriptor.validations, formlyConfig);
|
|
1736
1737
|
return [wrapperGroup];
|
|
1737
1738
|
}
|
|
1738
|
-
function createFormlyField(descriptor, formEditorComponent) {
|
|
1739
|
+
function createFormlyField(descriptor, formlyConfig, formEditorComponent) {
|
|
1739
1740
|
const field = {
|
|
1740
1741
|
key: descriptor.property,
|
|
1741
1742
|
modelOptions: {
|
|
@@ -1891,60 +1892,68 @@ function createFormlyField(descriptor, formEditorComponent) {
|
|
|
1891
1892
|
if (typeof descriptor.defaultValue !== 'undefined') {
|
|
1892
1893
|
field.defaultValue = descriptor.defaultValue;
|
|
1893
1894
|
}
|
|
1894
|
-
addValidationsToFormlyField(field, descriptor.validations);
|
|
1895
|
-
addAsyncValidationsToFormlyField(field, descriptor.asyncValidations);
|
|
1895
|
+
addValidationsToFormlyField(field, descriptor.validations, formlyConfig);
|
|
1896
|
+
addAsyncValidationsToFormlyField(field, descriptor.asyncValidations, formlyConfig);
|
|
1896
1897
|
return field;
|
|
1897
1898
|
}
|
|
1898
|
-
function addValidationsToFormlyField(config, validations) {
|
|
1899
|
+
function addValidationsToFormlyField(config, validations, formlyConfig) {
|
|
1899
1900
|
if (!config.validators) {
|
|
1900
1901
|
config.validators = {};
|
|
1901
1902
|
}
|
|
1902
1903
|
for (const validation of validations) {
|
|
1903
|
-
|
|
1904
|
-
config.validators[validation.name] = {
|
|
1905
|
-
expression: (control, field, options) => {
|
|
1906
|
-
const validatorRes = validation.validator(control, field, options);
|
|
1907
|
-
// formly validator only excepts true/false for validation
|
|
1908
|
-
// map possible angular validator result to true/false
|
|
1909
|
-
return typeof validatorRes === 'boolean' ? validatorRes : validatorRes === null;
|
|
1910
|
-
}
|
|
1911
|
-
};
|
|
1912
|
-
if (typeof validation.message === 'function') {
|
|
1913
|
-
config.validators[validation.name].message = validation.message;
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
else {
|
|
1917
|
-
if (!Array.isArray(config.validators.validation)) {
|
|
1918
|
-
config.validators.validation = [];
|
|
1919
|
-
}
|
|
1920
|
-
config.validators.validation.push(validation.name);
|
|
1921
|
-
}
|
|
1904
|
+
createFormlyValidation(config.validators, validation, formlyConfig);
|
|
1922
1905
|
}
|
|
1923
1906
|
}
|
|
1924
|
-
function addAsyncValidationsToFormlyField(config, asyncValidations) {
|
|
1907
|
+
function addAsyncValidationsToFormlyField(config, asyncValidations, formlyConfig) {
|
|
1925
1908
|
if (!config.asyncValidators) {
|
|
1926
1909
|
config.asyncValidators = {};
|
|
1927
1910
|
}
|
|
1928
1911
|
for (const validation of asyncValidations) {
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
}
|
|
1939
|
-
if (
|
|
1940
|
-
|
|
1912
|
+
createFormlyValidation(config.asyncValidators, validation, formlyConfig);
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
function createFormlyValidation(config, validation, formlyConfig) {
|
|
1916
|
+
if (typeof validation.validator === 'function') {
|
|
1917
|
+
if (validation.options?.errorPath && validation.message != null) {
|
|
1918
|
+
// if this is used, the validator and message must be registered globally
|
|
1919
|
+
if (!formlyConfig.getValidatorMessage(validation.name)) {
|
|
1920
|
+
formlyConfig.addValidatorMessage(validation.name, validation.message);
|
|
1921
|
+
}
|
|
1922
|
+
if (!formlyConfig.validators[validation.name]) {
|
|
1923
|
+
formlyConfig.setValidator({
|
|
1924
|
+
name: validation.name,
|
|
1925
|
+
validation: (control, field, options) => validation.validator(control, field, options) ? null : { [validation.name]: true }
|
|
1926
|
+
});
|
|
1941
1927
|
}
|
|
1928
|
+
if (!Array.isArray(config.validation)) {
|
|
1929
|
+
config.validation = [];
|
|
1930
|
+
}
|
|
1931
|
+
config.validation.push({
|
|
1932
|
+
name: validation.name,
|
|
1933
|
+
options: { errorPath: validation.options.errorPath }
|
|
1934
|
+
});
|
|
1942
1935
|
}
|
|
1943
1936
|
else {
|
|
1944
|
-
|
|
1945
|
-
|
|
1937
|
+
config[validation.name] = {
|
|
1938
|
+
expression: validation.validator
|
|
1939
|
+
};
|
|
1940
|
+
if (validation.message != null) {
|
|
1941
|
+
config[validation.name].message = validation.message;
|
|
1946
1942
|
}
|
|
1947
|
-
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
else {
|
|
1946
|
+
if (!Array.isArray(config.validation)) {
|
|
1947
|
+
config.validation = [];
|
|
1948
|
+
}
|
|
1949
|
+
if (validation.options?.errorPath) {
|
|
1950
|
+
config.validation.push({
|
|
1951
|
+
name: validation.name,
|
|
1952
|
+
options: { errorPath: validation.options.errorPath }
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
else {
|
|
1956
|
+
config.validation.push(validation.name);
|
|
1948
1957
|
}
|
|
1949
1958
|
}
|
|
1950
1959
|
}
|
|
@@ -1961,109 +1970,151 @@ function getFormEditorWarningMessage(translate, title, message) {
|
|
|
1961
1970
|
}
|
|
1962
1971
|
|
|
1963
1972
|
class FormEditorComponent {
|
|
1973
|
+
get form() {
|
|
1974
|
+
return this._form;
|
|
1975
|
+
}
|
|
1976
|
+
get formUnsafe() {
|
|
1977
|
+
return this._form;
|
|
1978
|
+
}
|
|
1979
|
+
get formlyOptions() {
|
|
1980
|
+
return this._formlyOptions;
|
|
1981
|
+
}
|
|
1982
|
+
get formlyFields() {
|
|
1983
|
+
return this._formlyFields;
|
|
1984
|
+
}
|
|
1985
|
+
/**
|
|
1986
|
+
* Only used for form initialization. Further changes should be done using {resetFormModel}.
|
|
1987
|
+
*/
|
|
1988
|
+
get formlyInitialItem() {
|
|
1989
|
+
return this._formlyInitialItem;
|
|
1990
|
+
}
|
|
1964
1991
|
constructor() {
|
|
1992
|
+
this.formlyConfig = inject(FormlyConfig);
|
|
1965
1993
|
this.translateService = inject(TranslateService);
|
|
1966
1994
|
this.commons = inject(CommonsService);
|
|
1967
1995
|
this.logger = inject(LoggerService).create('FormEditorComponent');
|
|
1968
|
-
this.
|
|
1969
|
-
this.
|
|
1970
|
-
|
|
1971
|
-
this.
|
|
1996
|
+
this.destroyRef = inject(DestroyRef);
|
|
1997
|
+
this.descriptor = input.required();
|
|
1998
|
+
this.submitLoading = input(false);
|
|
1999
|
+
this.item = input(undefined);
|
|
2000
|
+
this.isFormDisabled = input(false);
|
|
1972
2001
|
// event outputs
|
|
1973
|
-
this.
|
|
1974
|
-
|
|
1975
|
-
this.
|
|
2002
|
+
this.formSubmit = output();
|
|
2003
|
+
// content and view queries
|
|
2004
|
+
this.submitButtonElementRef = viewChild('submitButton');
|
|
2005
|
+
// formly specifics
|
|
2006
|
+
this._form = new UntypedFormGroup({});
|
|
2007
|
+
this._formlyOptions = {
|
|
1976
2008
|
formState: {
|
|
1977
2009
|
add: false,
|
|
1978
2010
|
edit: false,
|
|
1979
2011
|
disabled: false
|
|
1980
2012
|
}
|
|
1981
2013
|
};
|
|
1982
|
-
this.
|
|
1983
|
-
this.
|
|
1984
|
-
this.
|
|
2014
|
+
this._formlyFields = []; // initialized in ngOnInit, should not be changed after
|
|
2015
|
+
this._formlyInitialItem = {}; // initialized in ngOnInit, should not be changed after
|
|
2016
|
+
this.formMessages = signal([]);
|
|
2017
|
+
effect(() => {
|
|
2018
|
+
const item = this.item();
|
|
2019
|
+
if (item !== this.initialItemInput) {
|
|
2020
|
+
// new item is different from the one the form was initialized with. Must trigger reset of form model.
|
|
2021
|
+
this.resetFormModel(item);
|
|
2022
|
+
}
|
|
2023
|
+
},
|
|
2024
|
+
// resetModel uses signal like concept
|
|
2025
|
+
{ allowSignalWrites: true });
|
|
2026
|
+
effect(() => {
|
|
2027
|
+
this._formlyOptions.formState.disabled = this.isFormDisabled() || this._formlyOptions.formState.descriptor?.disabled === true || this._formlyOptions.formState.details;
|
|
2028
|
+
});
|
|
1985
2029
|
}
|
|
1986
2030
|
ngOnInit() {
|
|
1987
|
-
|
|
1988
|
-
this.
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
this.
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2031
|
+
// init form state
|
|
2032
|
+
if (this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Add) {
|
|
2033
|
+
this._formlyOptions.formState.add = true;
|
|
2034
|
+
}
|
|
2035
|
+
else if (this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Edit) {
|
|
2036
|
+
this._formlyOptions.formState.edit = true;
|
|
2037
|
+
}
|
|
2038
|
+
else if (this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Details) {
|
|
2039
|
+
this._formlyOptions.formState.details = true;
|
|
2040
|
+
}
|
|
2041
|
+
this._formlyOptions.formState.descriptor = this.descriptor();
|
|
2042
|
+
// init fields for formly
|
|
2043
|
+
this._formlyFields = createFormlyConfigFromDescriptor(this.descriptor(), this.formlyConfig, this);
|
|
2044
|
+
// int form model (only initial, no further changes to formModel should be allowed!)
|
|
2045
|
+
this.initialItemInput = this.item();
|
|
2046
|
+
this._formlyInitialItem = this.getFormModelFromItem(this.item());
|
|
2047
|
+
// handle localizations edit/add message
|
|
2048
|
+
if (this.descriptor().isLocalized &&
|
|
2049
|
+
(this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Add || this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Edit)) {
|
|
2050
|
+
this.formMessages.set([
|
|
2051
|
+
...this.formMessages(),
|
|
2052
|
+
getFormEditorInfoMessage(this.translateService, 'mngEditor.localizations.addInDefaultLanguageTitle', 'mngEditor.localizations.addInDefaultLanguageDescription', {
|
|
2053
|
+
defaultLanguage: this.commons.defaultDataLanguage
|
|
2054
|
+
})
|
|
2055
|
+
]);
|
|
1999
2056
|
}
|
|
2000
2057
|
// emit lifecycle event
|
|
2001
|
-
this.descriptor
|
|
2058
|
+
this.descriptor().nextEvent(FormEventTypeEnum.ComponentLifecycle, FormEditorComponent, this, {
|
|
2002
2059
|
eventSubtype: FormFieldEventComponentSubtype.ON_INIT
|
|
2003
2060
|
});
|
|
2004
|
-
this.
|
|
2005
|
-
this.descriptor
|
|
2061
|
+
this._form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(250), distinctUntilChanged()).subscribe(v => {
|
|
2062
|
+
this.descriptor().nextEvent(FormEventTypeEnum.ValueChange, FormEditorComponent, this, {
|
|
2006
2063
|
value: v,
|
|
2007
2064
|
formValue: () => this.getFormValue()
|
|
2008
2065
|
});
|
|
2009
|
-
})
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
}
|
|
2015
|
-
if (changes['item'] && !changes['item'].firstChange) {
|
|
2016
|
-
this.resetFormModel(this.item);
|
|
2017
|
-
}
|
|
2066
|
+
});
|
|
2067
|
+
// mark form as pristine, should be done in next event hook to allow formly to initialize first
|
|
2068
|
+
setTimeout(() => {
|
|
2069
|
+
this._form.markAsPristine();
|
|
2070
|
+
});
|
|
2018
2071
|
}
|
|
2019
2072
|
ngOnDestroy() {
|
|
2020
|
-
this.subscriptions.forEach(s => s.unsubscribe());
|
|
2021
2073
|
// emit lifecycle event
|
|
2022
|
-
this.descriptor
|
|
2074
|
+
this.descriptor().nextEvent(FormEventTypeEnum.ComponentLifecycle, FormEditorComponent, this, {
|
|
2023
2075
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
2024
2076
|
});
|
|
2025
|
-
// complete emitting events
|
|
2026
|
-
this.descriptor?.completeEvents();
|
|
2027
2077
|
}
|
|
2028
2078
|
submit() {
|
|
2029
|
-
this.submitButtonElementRef?.nativeElement.click();
|
|
2079
|
+
this.submitButtonElementRef()?.nativeElement.click();
|
|
2030
2080
|
}
|
|
2031
2081
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2032
2082
|
onSubmit(event) {
|
|
2033
|
-
this.
|
|
2034
|
-
this.formMessages
|
|
2083
|
+
this._formlyOptions.formState.submittedOn = Date.now();
|
|
2084
|
+
this.formMessages.set([]);
|
|
2035
2085
|
const formSubmitItem = this.getFormValue();
|
|
2036
|
-
if (this.
|
|
2037
|
-
this.
|
|
2086
|
+
if (this._form.valid) {
|
|
2087
|
+
this.formSubmit.emit({
|
|
2038
2088
|
success: true,
|
|
2039
2089
|
formItem: formSubmitItem
|
|
2040
2090
|
});
|
|
2041
|
-
this.descriptor
|
|
2091
|
+
this.descriptor().nextEvent(FormEventTypeEnum.Submit, FormEditorComponent, this, {
|
|
2042
2092
|
submitValid: true,
|
|
2043
2093
|
submitValue: formSubmitItem
|
|
2044
2094
|
});
|
|
2045
2095
|
}
|
|
2046
2096
|
else {
|
|
2047
2097
|
// find and mark invalid tabs
|
|
2048
|
-
|
|
2049
|
-
|
|
2098
|
+
const formFields = this._formlyFields;
|
|
2099
|
+
if (formFields[0].type === 'tabs' && formFields[0].fieldGroup) {
|
|
2100
|
+
for (const tab of formFields[0].fieldGroup) {
|
|
2050
2101
|
const isInvalid = this.isAnyFieldInvalid(tab.fieldGroup);
|
|
2051
|
-
this.
|
|
2102
|
+
this._formlyOptions.formState['tab_' + (tab.id ? tab.id : tab.props.props.label) + '_invalid'] = isInvalid;
|
|
2052
2103
|
}
|
|
2053
2104
|
}
|
|
2054
2105
|
const event = { success: false, formItem: formSubmitItem };
|
|
2055
2106
|
event.success = false;
|
|
2056
|
-
this.formMessages.push(getFormEditorWarningMessage(this.translateService, 'mngEditor.invalidFormToastTitle', 'mngEditor.invalidFormToastMessage'));
|
|
2057
|
-
this.
|
|
2058
|
-
this.descriptor
|
|
2107
|
+
this.formMessages().push(getFormEditorWarningMessage(this.translateService, 'mngEditor.invalidFormToastTitle', 'mngEditor.invalidFormToastMessage'));
|
|
2108
|
+
this.formSubmit.emit(event);
|
|
2109
|
+
this.descriptor().nextEvent(FormEventTypeEnum.Submit, FormEditorComponent, this, {
|
|
2059
2110
|
submitValid: false,
|
|
2060
2111
|
submitValue: formSubmitItem
|
|
2061
2112
|
});
|
|
2062
2113
|
}
|
|
2063
2114
|
}
|
|
2064
2115
|
getFormValue() {
|
|
2065
|
-
const formValue = objectDeepCopy(this.
|
|
2066
|
-
this.descriptor
|
|
2116
|
+
const formValue = objectDeepCopy(this._form.getRawValue(), { mapGettersToProperties: true });
|
|
2117
|
+
this.descriptor().fields.forEach(field => {
|
|
2067
2118
|
if (field && field.setter) {
|
|
2068
2119
|
const splitPath = field.property.split('.');
|
|
2069
2120
|
let fieldValue = formValue;
|
|
@@ -2080,43 +2131,26 @@ class FormEditorComponent {
|
|
|
2080
2131
|
});
|
|
2081
2132
|
return formValue;
|
|
2082
2133
|
}
|
|
2083
|
-
resetFormModel(item,
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
const splitPath = field.property.split('.');
|
|
2091
|
-
let currentObject = formModel;
|
|
2092
|
-
for (let i = 0; i < splitPath.length; i++) {
|
|
2093
|
-
const currentSubPath = splitPath[i];
|
|
2094
|
-
if (i === splitPath.length - 1) {
|
|
2095
|
-
currentObject[currentSubPath] = field.getter(item?.[field.property], item);
|
|
2096
|
-
}
|
|
2097
|
-
else {
|
|
2098
|
-
if (typeof currentObject[currentSubPath] !== 'object') {
|
|
2099
|
-
currentObject[currentSubPath] = {};
|
|
2100
|
-
}
|
|
2101
|
-
currentObject = currentObject[currentSubPath];
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
});
|
|
2106
|
-
if (typeof this.formOptions.resetModel === 'function') {
|
|
2107
|
-
// could not be initiated yet
|
|
2108
|
-
this.formOptions.resetModel(this.formModel);
|
|
2109
|
-
}
|
|
2110
|
-
this.formModel = formModel;
|
|
2111
|
-
if (markAsPristine) {
|
|
2112
|
-
this.form.markAsPristine();
|
|
2134
|
+
resetFormModel(item, opts) {
|
|
2135
|
+
this._formlyOptions.resetModel?.(this.getFormModelFromItem(item));
|
|
2136
|
+
if (opts?.markAsPristine !== false) {
|
|
2137
|
+
// mark form as pristine, should be done in next event hook to allow formly to initialize first
|
|
2138
|
+
setTimeout(() => {
|
|
2139
|
+
this._form.markAsPristine();
|
|
2140
|
+
});
|
|
2113
2141
|
}
|
|
2114
2142
|
}
|
|
2115
|
-
|
|
2116
|
-
return this.
|
|
2143
|
+
getField(key) {
|
|
2144
|
+
return this.getFieldUnsafe(key);
|
|
2145
|
+
}
|
|
2146
|
+
getFieldUnsafe(key) {
|
|
2147
|
+
return this.findFormField(this._form, key.split('.'));
|
|
2117
2148
|
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2149
|
+
setFieldValue(key, value) {
|
|
2150
|
+
return this.setFieldValueUnsafe(key, value);
|
|
2151
|
+
}
|
|
2152
|
+
setFieldValueUnsafe(key, value) {
|
|
2153
|
+
const control = this.getFieldUnsafe(key);
|
|
2120
2154
|
if (control) {
|
|
2121
2155
|
control.setValue(value);
|
|
2122
2156
|
return true;
|
|
@@ -2126,8 +2160,11 @@ class FormEditorComponent {
|
|
|
2126
2160
|
return false;
|
|
2127
2161
|
}
|
|
2128
2162
|
}
|
|
2129
|
-
|
|
2130
|
-
|
|
2163
|
+
patchFieldValue(key, value) {
|
|
2164
|
+
return this.patchFieldValueUnsafe(key, value);
|
|
2165
|
+
}
|
|
2166
|
+
patchFieldValueUnsafe(key, value) {
|
|
2167
|
+
const control = this.getFieldUnsafe(key);
|
|
2131
2168
|
if (control) {
|
|
2132
2169
|
control.patchValue(value);
|
|
2133
2170
|
return true;
|
|
@@ -2137,8 +2174,11 @@ class FormEditorComponent {
|
|
|
2137
2174
|
return false;
|
|
2138
2175
|
}
|
|
2139
2176
|
}
|
|
2140
|
-
|
|
2141
|
-
|
|
2177
|
+
resetFieldValue(key, value) {
|
|
2178
|
+
return this.resetFieldValueUnsafe(key, value);
|
|
2179
|
+
}
|
|
2180
|
+
resetFieldValueUnsafe(key, value) {
|
|
2181
|
+
const control = this.getFieldUnsafe(key);
|
|
2142
2182
|
if (control) {
|
|
2143
2183
|
control.reset(value);
|
|
2144
2184
|
return true;
|
|
@@ -2148,6 +2188,29 @@ class FormEditorComponent {
|
|
|
2148
2188
|
return false;
|
|
2149
2189
|
}
|
|
2150
2190
|
}
|
|
2191
|
+
getFormModelFromItem(item) {
|
|
2192
|
+
const formModel = objectDeepCopy(item, { mapGettersToProperties: true }) ?? {};
|
|
2193
|
+
const descriptor = this.descriptor();
|
|
2194
|
+
descriptor.fields.forEach(field => {
|
|
2195
|
+
if (field.getter && item) {
|
|
2196
|
+
const splitPath = field.property.split('.');
|
|
2197
|
+
let currentObject = formModel;
|
|
2198
|
+
for (let i = 0; i < splitPath.length; i++) {
|
|
2199
|
+
const currentSubPath = splitPath[i];
|
|
2200
|
+
if (i === splitPath.length - 1) {
|
|
2201
|
+
currentObject[currentSubPath] = field.getter(item?.[field.property], item);
|
|
2202
|
+
}
|
|
2203
|
+
else {
|
|
2204
|
+
if (typeof currentObject[currentSubPath] !== 'object') {
|
|
2205
|
+
currentObject[currentSubPath] = {};
|
|
2206
|
+
}
|
|
2207
|
+
currentObject = currentObject[currentSubPath];
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
});
|
|
2212
|
+
return formModel;
|
|
2213
|
+
}
|
|
2151
2214
|
findFormField(control, keyPath) {
|
|
2152
2215
|
if (keyPath.length === 0) {
|
|
2153
2216
|
return control;
|
|
@@ -2185,47 +2248,13 @@ class FormEditorComponent {
|
|
|
2185
2248
|
}
|
|
2186
2249
|
return false;
|
|
2187
2250
|
}
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
this.formOptions.formState.disabled = isDisabled;
|
|
2191
|
-
}
|
|
2192
|
-
/**
|
|
2193
|
-
* @private Sets form state based on editor descriptor type.
|
|
2194
|
-
* Possible options are: disabled, add or edit.
|
|
2195
|
-
*/
|
|
2196
|
-
setInitialFormState() {
|
|
2197
|
-
if (this.descriptor?.tableviewEditorType === TableviewEditorTypeEnum.Add) {
|
|
2198
|
-
this.formOptions.formState.add = true;
|
|
2199
|
-
}
|
|
2200
|
-
else if (this.descriptor?.tableviewEditorType === TableviewEditorTypeEnum.Edit) {
|
|
2201
|
-
this.formOptions.formState.edit = true;
|
|
2202
|
-
}
|
|
2203
|
-
this.updateFormState();
|
|
2204
|
-
}
|
|
2205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2206
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button\n #submitButton\n pButton\n type=\"submit\"\n class=\"hidden\"\n [disabled]=\"form.disabled\"\n [loading]=\"(submitLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\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$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.4", 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 } }, outputs: { formSubmit: "formSubmit" }, viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2207
2253
|
}
|
|
2208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
2254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2209
2255
|
type: Component,
|
|
2210
|
-
args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"
|
|
2211
|
-
}],
|
|
2212
|
-
type: Input
|
|
2213
|
-
}], submitLoading: [{
|
|
2214
|
-
type: Input
|
|
2215
|
-
}], item: [{
|
|
2216
|
-
type: Input
|
|
2217
|
-
}], isFormDisabled: [{
|
|
2218
|
-
type: Input
|
|
2219
|
-
}], formSubmitEventEmitter: [{
|
|
2220
|
-
type: Output,
|
|
2221
|
-
args: ['formSubmit']
|
|
2222
|
-
}], templates: [{
|
|
2223
|
-
type: ContentChildren,
|
|
2224
|
-
args: [TemplateDirective]
|
|
2225
|
-
}], submitButtonElementRef: [{
|
|
2226
|
-
type: ViewChild,
|
|
2227
|
-
args: ['submitButton']
|
|
2228
|
-
}] } });
|
|
2256
|
+
args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<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" }]
|
|
2257
|
+
}], ctorParameters: () => [] });
|
|
2229
2258
|
|
|
2230
2259
|
class ActionEditorInjectorContextComponent {
|
|
2231
2260
|
constructor() {
|
|
@@ -2294,7 +2323,7 @@ class ActionEditorInjectorContextComponent {
|
|
|
2294
2323
|
}
|
|
2295
2324
|
else if (e.fields) {
|
|
2296
2325
|
for (const key in e.fields) {
|
|
2297
|
-
this.formEditorCmp?.
|
|
2326
|
+
this.formEditorCmp?.resetFieldValue(key, e.fields[key]);
|
|
2298
2327
|
}
|
|
2299
2328
|
}
|
|
2300
2329
|
}
|
|
@@ -2317,7 +2346,6 @@ class ActionEditorInjectorContextComponent {
|
|
|
2317
2346
|
throw new CommonsInternalError(`Action is not instantiated in action editor for action ${this.data.descriptor.actionName}.`);
|
|
2318
2347
|
}
|
|
2319
2348
|
if (event.success) {
|
|
2320
|
-
this.instanceSubmitFormItem = event.formItem;
|
|
2321
2349
|
// prepare parameters
|
|
2322
2350
|
const actionParameters = {
|
|
2323
2351
|
itemId: this.itemId(),
|
|
@@ -2336,7 +2364,6 @@ class ActionEditorInjectorContextComponent {
|
|
|
2336
2364
|
this.updateItemId(res[this.data.descriptor.model.idProperty]);
|
|
2337
2365
|
}
|
|
2338
2366
|
this.actionRunEventEmitter.next(res);
|
|
2339
|
-
this.instanceSubmitResult = res;
|
|
2340
2367
|
}
|
|
2341
2368
|
});
|
|
2342
2369
|
this.actionExecutor.run(context);
|
|
@@ -2512,6 +2539,9 @@ class ActionEditorInjectorContextComponent {
|
|
|
2512
2539
|
break;
|
|
2513
2540
|
case ActionInstanceStateEnum.FinishSuccessReactivateFinal:
|
|
2514
2541
|
this.setEditorEnabled(false);
|
|
2542
|
+
// make copy of item and update title to be on the latest
|
|
2543
|
+
this.item.set(objectDeepCopy(this.item()));
|
|
2544
|
+
this.updateTitle();
|
|
2515
2545
|
// should also unsetInstance, but let this for reactivationInstance$ listener to not interfere
|
|
2516
2546
|
break;
|
|
2517
2547
|
}
|
|
@@ -2539,6 +2569,17 @@ class ActionEditorInjectorContextComponent {
|
|
|
2539
2569
|
parseInt(this.dialogService.dialogComponentRefMap.get(this.instance?.activationDialogRef)?.instance.container?.style.zIndex ?? '') === ZIndexUtils.getCurrent())
|
|
2540
2570
|
this.closeWithUnsavedChangesConfirmation();
|
|
2541
2571
|
}
|
|
2572
|
+
closeWithUnsavedChangesConfirmation(callFromGuard = false) {
|
|
2573
|
+
if (this.formEditorCmp?.form.pristine === false && this.data.descriptor.unsavedChangesConfirmation) {
|
|
2574
|
+
return this.showUnsavedChangesConfirmationDialog(callFromGuard);
|
|
2575
|
+
}
|
|
2576
|
+
else {
|
|
2577
|
+
if (!callFromGuard) {
|
|
2578
|
+
this.cancel();
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
return of(true);
|
|
2582
|
+
}
|
|
2542
2583
|
showUnsavedChangesConfirmationDialog(callFromGuard) {
|
|
2543
2584
|
const subject = new Subject();
|
|
2544
2585
|
this.confirmationService.confirm({
|
|
@@ -2561,21 +2602,10 @@ class ActionEditorInjectorContextComponent {
|
|
|
2561
2602
|
});
|
|
2562
2603
|
return subject.asObservable();
|
|
2563
2604
|
}
|
|
2564
|
-
|
|
2565
|
-
if (this.
|
|
2566
|
-
return this.showUnsavedChangesConfirmationDialog(callFromGuard);
|
|
2567
|
-
}
|
|
2568
|
-
else {
|
|
2569
|
-
if (!callFromGuard) {
|
|
2570
|
-
this.cancel();
|
|
2571
|
-
}
|
|
2572
|
-
}
|
|
2573
|
-
return of(true);
|
|
2574
|
-
}
|
|
2575
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2576
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: "data" }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true }], ngImport: i0, template: "@if (!data.isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data.isDialog && data.descriptor.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]=\"item()\"\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]=\"item()\"\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 (data.descriptor.editorDescriptor && !loading()) {\n <mng-form-editor [descriptor]=\"data.descriptor.editorDescriptor\" [item]=\"item()\" [isFormDisabled]=\"isFormDisabled()\" (formSubmit)=\"onSubmit($event)\"> </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between 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]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\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]=\"item()\"\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$3.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled"], outputs: ["formSubmit"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2605
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2606
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: "data" }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true }], ngImport: i0, template: "@if (!data.isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data.isDialog && data.descriptor.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]=\"item()\"\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]=\"item()\"\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 (data.descriptor.editorDescriptor && !loading()) {\n <mng-form-editor [descriptor]=\"data.descriptor.editorDescriptor\" [item]=\"item()\" [isFormDisabled]=\"isFormDisabled()\" (formSubmit)=\"onSubmit($event)\"> </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between 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]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\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]=\"item()\"\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$3.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled"], outputs: ["formSubmit"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2577
2607
|
}
|
|
2578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
2608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
|
|
2579
2609
|
type: Component,
|
|
2580
2610
|
args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent, ComponentDirective, ToolbarModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "@if (!data.isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data.isDialog && data.descriptor.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]=\"item()\"\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]=\"item()\"\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 (data.descriptor.editorDescriptor && !loading()) {\n <mng-form-editor [descriptor]=\"data.descriptor.editorDescriptor\" [item]=\"item()\" [isFormDisabled]=\"isFormDisabled()\" (formSubmit)=\"onSubmit($event)\"> </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between 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]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\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]=\"item()\"\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"] }]
|
|
2581
2611
|
}], ctorParameters: () => [], propDecorators: { data: [{
|
|
@@ -2663,10 +2693,10 @@ class ActionEditorComponent {
|
|
|
2663
2693
|
triggerSubmit() {
|
|
2664
2694
|
this.actionEditorWInjContextCmp?.triggerSubmit();
|
|
2665
2695
|
}
|
|
2666
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
2667
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.
|
|
2696
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2697
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: "action", itemIdInput: ["itemId", "itemIdInput"], itemInput: ["item", "itemInput"], actionData: "actionData", dataProvider: "dataProvider" }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, usesOnChanges: true, hostDirectives: [{ directive: i1$2.DialogKeydownHandlerDirective }], ngImport: i0, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData\n }\"\n [nodeInjector]=\"injector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n", dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2668
2698
|
}
|
|
2669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
2699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorComponent, decorators: [{
|
|
2670
2700
|
type: Component,
|
|
2671
2701
|
args: [{ standalone: true, selector: 'mng-action-editor', imports: [ComponentDirective], hostDirectives: [DialogKeydownHandlerDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData\n }\"\n [nodeInjector]=\"injector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n" }]
|
|
2672
2702
|
}], propDecorators: { action: [{
|
|
@@ -2701,13 +2731,13 @@ class DataLanguageDropdownComponent {
|
|
|
2701
2731
|
this.commons.appDataLanguage = dataLang;
|
|
2702
2732
|
this.viewContainer?.reloadTable({});
|
|
2703
2733
|
}
|
|
2704
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
2705
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.
|
|
2734
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DataLanguageDropdownComponent, deps: [{ token: i1$2.CommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2735
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: DataLanguageDropdownComponent, isStandalone: true, selector: "mng-data-language-dropdown", inputs: { action: "action", actionData: "actionData", item: "item", itemId: "itemId", enabled: "enabled", loading: "loading" }, outputs: { triggerActionEventEmitter: "triggerActionEventEmitter" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true }], ngImport: i0, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider\" [ngModel]=\"commons.appDataLanguage\" [showClear]=\"false\" (valueChange)=\"updateDataLanguage($event)\"></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"], outputs: ["valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
2706
2736
|
}
|
|
2707
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
2737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DataLanguageDropdownComponent, decorators: [{
|
|
2708
2738
|
type: Component,
|
|
2709
2739
|
args: [{ standalone: true, selector: 'mng-data-language-dropdown', imports: [DropdownComponent, FormsModule], template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider\" [ngModel]=\"commons.appDataLanguage\" [showClear]=\"false\" (valueChange)=\"updateDataLanguage($event)\"></mng-dropdown>\n" }]
|
|
2710
|
-
}], ctorParameters: () => [{ type: i1$
|
|
2740
|
+
}], ctorParameters: () => [{ type: i1$2.CommonsService }], propDecorators: { action: [{
|
|
2711
2741
|
type: Input,
|
|
2712
2742
|
args: [{ required: true }]
|
|
2713
2743
|
}], actionData: [{
|
|
@@ -2840,6 +2870,7 @@ class ActionRouteComponent {
|
|
|
2840
2870
|
this.viewContainer?.reloadTable(); // reload only if no error in action and
|
|
2841
2871
|
this.untriggerAction();
|
|
2842
2872
|
break;
|
|
2873
|
+
case ActionInstanceStateEnum.FinishErrorFinal:
|
|
2843
2874
|
case ActionInstanceStateEnum.FinishDismissedFinal:
|
|
2844
2875
|
this.untriggerAction();
|
|
2845
2876
|
break;
|
|
@@ -2861,16 +2892,21 @@ class ActionRouteComponent {
|
|
|
2861
2892
|
this.instanceStateSubscription?.unsubscribe();
|
|
2862
2893
|
this.instanceReactivationSubscription?.unsubscribe();
|
|
2863
2894
|
}
|
|
2864
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
2865
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.
|
|
2895
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionRouteComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: ActionExecutorService }, { token: ViewContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2896
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ActionRouteComponent, isStandalone: true, selector: "mng-action-route", providers: [provideActionExecutor()], ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2866
2897
|
}
|
|
2867
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
2898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionRouteComponent, decorators: [{
|
|
2868
2899
|
type: Component,
|
|
2869
2900
|
args: [{ standalone: true, selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "" }]
|
|
2870
2901
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: ActionExecutorService }, { type: ViewContainer, decorators: [{
|
|
2871
2902
|
type: Optional
|
|
2872
2903
|
}] }] });
|
|
2873
2904
|
|
|
2905
|
+
var actionRoute_component = /*#__PURE__*/Object.freeze({
|
|
2906
|
+
__proto__: null,
|
|
2907
|
+
default: ActionRouteComponent
|
|
2908
|
+
});
|
|
2909
|
+
|
|
2874
2910
|
function calculateTableColumnActionWidth(table, actions) {
|
|
2875
2911
|
const buttonsWidth = actions.reduce((acc, action) => acc + getActionButtonRoundedWidth(action) + 2 * Styles.ACTION_BUTTON_MARGIN_X, 0);
|
|
2876
2912
|
const tablePadding = getTableCellPaddingX(table);
|
|
@@ -2977,10 +3013,10 @@ class ActionTableComponent {
|
|
|
2977
3013
|
this.reload();
|
|
2978
3014
|
}
|
|
2979
3015
|
}
|
|
2980
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
2981
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
3016
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3017
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ActionTableComponent, isStandalone: true, selector: "mng-action-table", inputs: { descriptor: "descriptor", items: "items", result: ["result", "result", (value) => (isObservable(value) ? value : of(value))], loading: ["loading", "loading", boolean$Attribute], dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", globalFilterFields: "globalFilterFields", actions: "actions", captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth" }, outputs: { loadEventEmitter: "tableLoad", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, providers: [provideActionExecutor()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }, { propertyName: "components", predicate: ComponentDirective, descendants: true }], ngImport: i0, template: "<mng-table\n [descriptor]=\"descriptor\"\n [items]=\"items\"\n [result]=\"result\"\n [loading]=\"loading\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"useQueryParams\"\n [selectionMode]=\"selectionMode\"\n [selectionEnabled]=\"selectionEnabled\"\n [globalFilterFields]=\"globalFilterFields\"\n [captionComponent]=\"captionComponent\"\n [columnCustomLastComponent]=\"columnActionComponent\"\n [columnLastMinWidth]=\"columnActionMinWidth\"\n (tableLoad)=\"loadEventEmitter.next($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionCmpInstEventEmitter.next($event)\"\n (columnCustomLastComponentInstance)=\"columnActionCmpInstEventEmitter.next($event)\">\n @if (!columnActionComponent && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor.model.idProperty ? item[descriptor.model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()\"></ng-container>\n </ng-template>\n }\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 @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-table>\n", dependencies: [{ kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2982
3018
|
}
|
|
2983
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionTableComponent, decorators: [{
|
|
2984
3020
|
type: Component,
|
|
2985
3021
|
args: [{ standalone: true, selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TemplateDirective, NgTemplateOutlet], providers: [provideActionExecutor()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table\n [descriptor]=\"descriptor\"\n [items]=\"items\"\n [result]=\"result\"\n [loading]=\"loading\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"useQueryParams\"\n [selectionMode]=\"selectionMode\"\n [selectionEnabled]=\"selectionEnabled\"\n [globalFilterFields]=\"globalFilterFields\"\n [captionComponent]=\"captionComponent\"\n [columnCustomLastComponent]=\"columnActionComponent\"\n [columnLastMinWidth]=\"columnActionMinWidth\"\n (tableLoad)=\"loadEventEmitter.next($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionCmpInstEventEmitter.next($event)\"\n (columnCustomLastComponentInstance)=\"columnActionCmpInstEventEmitter.next($event)\">\n @if (!columnActionComponent && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor.model.idProperty ? item[descriptor.model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()\"></ng-container>\n </ng-template>\n }\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 @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-table>\n" }]
|
|
2986
3022
|
}], ctorParameters: () => [], propDecorators: { descriptor: [{
|
|
@@ -3067,10 +3103,10 @@ class DefaultDataProviderExecutor extends DataProviderExecutor {
|
|
|
3067
3103
|
runDelete(ctx, fallback) {
|
|
3068
3104
|
return fallback ? runFnFromDataProviderOrFallback(ctx, runDeleteFromDataProvider, fallback) : runDeleteFromDataProvider(ctx);
|
|
3069
3105
|
}
|
|
3070
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3071
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
3106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DefaultDataProviderExecutor, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3107
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DefaultDataProviderExecutor }); }
|
|
3072
3108
|
}
|
|
3073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DefaultDataProviderExecutor, decorators: [{
|
|
3074
3110
|
type: Injectable
|
|
3075
3111
|
}] });
|
|
3076
3112
|
|
|
@@ -3112,10 +3148,10 @@ class FormlyFieldActionComponent extends FieldType {
|
|
|
3112
3148
|
this.actionMessage = res.message;
|
|
3113
3149
|
}
|
|
3114
3150
|
}
|
|
3115
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
3151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", 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: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.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.UIMessage, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3117
3153
|
}
|
|
3118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldActionComponent, decorators: [{
|
|
3119
3155
|
type: Component,
|
|
3120
3156
|
args: [{ standalone: true, selector: 'mng-formly-field-action', imports: [ButtonModule, RippleModule, TranslateModule, TooltipModule, JsonPipe, 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" }]
|
|
3121
3157
|
}] });
|
|
@@ -3137,9 +3173,7 @@ class FormlyFieldAutocompleteComponent extends FieldType {
|
|
|
3137
3173
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldAutocompleteComponent, this, {
|
|
3138
3174
|
value: v
|
|
3139
3175
|
});
|
|
3140
|
-
|
|
3141
|
-
this.props['onValueChange'](this.field, v);
|
|
3142
|
-
}
|
|
3176
|
+
this.props.onValueChange?.(this.field, v);
|
|
3143
3177
|
});
|
|
3144
3178
|
this.subscriptions.push(subscription);
|
|
3145
3179
|
}
|
|
@@ -3156,10 +3190,10 @@ class FormlyFieldAutocompleteComponent extends FieldType {
|
|
|
3156
3190
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3157
3191
|
});
|
|
3158
3192
|
}
|
|
3159
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3160
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.
|
|
3193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3194
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\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</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"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3161
3195
|
}
|
|
3162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
|
|
3163
3197
|
type: Component,
|
|
3164
3198
|
args: [{ standalone: true, selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\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</mng-autocomplete>\n" }]
|
|
3165
3199
|
}] });
|
|
@@ -3185,10 +3219,10 @@ class FormlyFieldCustomComponent extends FieldType {
|
|
|
3185
3219
|
...this.descriptor.customComponentInputs
|
|
3186
3220
|
};
|
|
3187
3221
|
}
|
|
3188
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3189
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.
|
|
3222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3223
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldCustomComponent, isStandalone: true, selector: "mng-formly-field-custom", usesInheritance: true, ngImport: i0, template: ` <ng-container [mngComponent]="descriptor.customComponentType!" [inputs]="inputs"></ng-container> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3190
3224
|
}
|
|
3191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldCustomComponent, decorators: [{
|
|
3192
3226
|
type: Component,
|
|
3193
3227
|
args: [{
|
|
3194
3228
|
standalone: true,
|
|
@@ -3216,9 +3250,7 @@ class FormlyFieldDropdownComponent extends FieldType {
|
|
|
3216
3250
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldDropdownComponent, this, {
|
|
3217
3251
|
value: v
|
|
3218
3252
|
});
|
|
3219
|
-
|
|
3220
|
-
this.props['onValueChange'](this.field, v);
|
|
3221
|
-
}
|
|
3253
|
+
this.props.onValueChange?.(this.field, v);
|
|
3222
3254
|
});
|
|
3223
3255
|
this.subscriptions.push(subscription);
|
|
3224
3256
|
}
|
|
@@ -3230,10 +3262,10 @@ class FormlyFieldDropdownComponent extends FieldType {
|
|
|
3230
3262
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3231
3263
|
});
|
|
3232
3264
|
}
|
|
3233
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3234
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.
|
|
3265
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3266
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [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\">\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"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3235
3267
|
}
|
|
3236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
|
|
3237
3269
|
type: Component,
|
|
3238
3270
|
args: [{ standalone: true, selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [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\">\n</mng-dropdown>\n" }]
|
|
3239
3271
|
}] });
|
|
@@ -3248,43 +3280,42 @@ class FormlyFieldFieldsetComponent extends FieldType {
|
|
|
3248
3280
|
this.descriptor = this.props.descriptor;
|
|
3249
3281
|
this.props.fieldComponent = this;
|
|
3250
3282
|
}
|
|
3251
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3252
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
3283
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3284
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of field.fieldGroup; track group) {\n @switch (group?.props?.['descriptor']?.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$4.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3253
3285
|
}
|
|
3254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
|
|
3255
3287
|
type: Component,
|
|
3256
3288
|
args: [{ standalone: true, selector: 'mng-formly-field-fieldset', imports: [FieldsetModule, FormlyModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (group of field.fieldGroup; track group) {\n @switch (group?.props?.['descriptor']?.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group\"></formly-field>\n }\n }\n}\n" }]
|
|
3257
3289
|
}] });
|
|
3258
3290
|
|
|
3259
3291
|
class FormlyFieldInputComponent extends FieldType {
|
|
3260
|
-
constructor(
|
|
3261
|
-
super();
|
|
3262
|
-
this.applicationLocale = applicationLocale;
|
|
3263
|
-
this.formBuilder = formBuilder;
|
|
3264
|
-
this.translateService = translateService;
|
|
3292
|
+
constructor() {
|
|
3293
|
+
super(...arguments);
|
|
3265
3294
|
this.NUMBER_MIN_SAFE = Number.MIN_SAFE_INTEGER;
|
|
3266
3295
|
this.NUMBER_MAX_SAFE = Number.MAX_SAFE_INTEGER;
|
|
3267
3296
|
this.DESC_INPUT_TYPE_IMAGE_FILE = FieldInputTypeEnum.ImageFile;
|
|
3297
|
+
this.applicationLocale = inject(LOCALE_ID);
|
|
3298
|
+
this.destroyRef = inject(DestroyRef);
|
|
3299
|
+
this.formBuilder = inject(FormBuilder);
|
|
3300
|
+
this.translateService = inject(TranslateService);
|
|
3268
3301
|
this.numberFieldMode = 'decimal';
|
|
3269
3302
|
this.files = [];
|
|
3270
|
-
this.
|
|
3303
|
+
this.imageFormArray = this.formBuilder.array([]);
|
|
3271
3304
|
}
|
|
3272
3305
|
ngOnInit() {
|
|
3273
3306
|
this.iFormControl = this.formControl;
|
|
3274
3307
|
this.descriptor = this.props.descriptor;
|
|
3275
3308
|
this.props.fieldComponent = this;
|
|
3276
3309
|
this.formEditorComponent = this.props.formEditorComponent;
|
|
3277
|
-
this.imageFormArray = this.formBuilder.array([]);
|
|
3278
3310
|
if (this.descriptor.fieldType === FieldInputTypeEnum.Currency) {
|
|
3279
3311
|
this.numberFieldMode = 'currency';
|
|
3280
3312
|
if (this.descriptor.currencyFromProperty) {
|
|
3281
|
-
|
|
3313
|
+
this.iFormControl
|
|
3282
3314
|
.get(this.descriptor.currencyFromProperty)
|
|
3283
|
-
.valueChanges.pipe(startWith(this.model[this.descriptor.currencyFromProperty]), distinctUntilChanged())
|
|
3315
|
+
.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(this.model[this.descriptor.currencyFromProperty]), distinctUntilChanged())
|
|
3284
3316
|
.subscribe(c => {
|
|
3285
3317
|
this.currency = c;
|
|
3286
3318
|
});
|
|
3287
|
-
this.subscriptions.push(currencyFromPropSubscription);
|
|
3288
3319
|
}
|
|
3289
3320
|
else {
|
|
3290
3321
|
this.currency = this.descriptor.currency ?? 'EUR';
|
|
@@ -3294,21 +3325,12 @@ class FormlyFieldInputComponent extends FieldType {
|
|
|
3294
3325
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldInputComponent, this, {
|
|
3295
3326
|
eventSubtype: FormFieldEventComponentSubtype.ON_INIT
|
|
3296
3327
|
});
|
|
3297
|
-
|
|
3298
|
-
if (this.props.type === 'datepicker' && typeof this.iFormControl.value === 'string') {
|
|
3299
|
-
const dateObject = new Date(this.iFormControl.value);
|
|
3300
|
-
this.iFormControl.setValue(dateObject);
|
|
3301
|
-
this.iFormControl.markAsPristine();
|
|
3302
|
-
}
|
|
3303
|
-
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
3328
|
+
this.formControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
3304
3329
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldInputComponent, this, {
|
|
3305
3330
|
value: v
|
|
3306
3331
|
});
|
|
3307
|
-
|
|
3308
|
-
this.props['onValueChange'](this.field, v);
|
|
3309
|
-
}
|
|
3332
|
+
this.props.onValueChange?.(this.field, v);
|
|
3310
3333
|
});
|
|
3311
|
-
this.subscriptions.push(subscription);
|
|
3312
3334
|
if (this.props.type === 'imageUrl') {
|
|
3313
3335
|
const startValue = this.iFormControl.value;
|
|
3314
3336
|
if (this.descriptor.fileMultiple) {
|
|
@@ -3330,17 +3352,15 @@ class FormlyFieldInputComponent extends FieldType {
|
|
|
3330
3352
|
this.addImageUrl();
|
|
3331
3353
|
}
|
|
3332
3354
|
}
|
|
3333
|
-
|
|
3355
|
+
this.imageFormArray.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), distinctUntilChanged()).subscribe(v => {
|
|
3334
3356
|
const fcv = v.filter((i) => !!i && typeof i === 'string' && i.length > 0);
|
|
3335
3357
|
this.iFormControl.setValue(fcv.length > 0 ? (this.descriptor.fileMultiple ? fcv : fcv[0]) : undefined);
|
|
3336
3358
|
this.iFormControl.updateValueAndValidity();
|
|
3337
3359
|
});
|
|
3338
|
-
this.subscriptions.push(subscription);
|
|
3339
3360
|
}
|
|
3340
3361
|
}
|
|
3341
3362
|
ngOnDestroy() {
|
|
3342
3363
|
// warning: formly calls on destroy before on init
|
|
3343
|
-
this.subscriptions.forEach(s => s.unsubscribe());
|
|
3344
3364
|
// emit lifecycle event
|
|
3345
3365
|
this.descriptor?.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldInputComponent, this, {
|
|
3346
3366
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
@@ -3378,7 +3398,7 @@ class FormlyFieldInputComponent extends FieldType {
|
|
|
3378
3398
|
onImageUrlLoadError() {
|
|
3379
3399
|
if (this.formEditorComponent) {
|
|
3380
3400
|
const message = getFormEditorWarningMessage(this.translateService, 'general.error', 'mngEditor.imageLoadError');
|
|
3381
|
-
this.formEditorComponent.formMessages
|
|
3401
|
+
this.formEditorComponent.formMessages.set([...this.formEditorComponent.formMessages(), message]);
|
|
3382
3402
|
}
|
|
3383
3403
|
}
|
|
3384
3404
|
updateFileFormControl() {
|
|
@@ -3413,10 +3433,10 @@ class FormlyFieldInputComponent extends FieldType {
|
|
|
3413
3433
|
return 'pi-file';
|
|
3414
3434
|
}
|
|
3415
3435
|
}
|
|
3416
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3417
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", 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\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></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]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\n </textarea>\n }\n @case ('datepicker') {\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n }\n @case ('mask') {\n <p-inputMask\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\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 (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\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 <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 pi-ban\"></i>\n </div>\n </span>\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 mt-1\">\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 mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3$1.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", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.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: i2$1.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"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i8$1.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", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "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: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i10$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i11.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"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i12.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: i13.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i14.InputText, selector: "[pInputText]" }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3436
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3437
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", 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\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></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\"></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 [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\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\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\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 (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\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 <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 pi-ban\"></i>\n </div>\n </span>\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 mt-1\">\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 mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i1$5.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", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "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: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.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: i1$1.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"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], 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", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "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"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { 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"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3418
3438
|
}
|
|
3419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
|
|
3420
3440
|
type: Component,
|
|
3421
3441
|
args: [{ standalone: true, selector: 'mng-formly-field-input', imports: [
|
|
3422
3442
|
InputNumberModule,
|
|
@@ -3425,7 +3445,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
3425
3445
|
TranslateModule,
|
|
3426
3446
|
InputSwitchModule,
|
|
3427
3447
|
RadioButtonModule,
|
|
3428
|
-
CalendarModule,
|
|
3429
3448
|
InputMaskModule,
|
|
3430
3449
|
FileUploadModule,
|
|
3431
3450
|
ImageModule,
|
|
@@ -3434,11 +3453,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
3434
3453
|
RippleModule,
|
|
3435
3454
|
TimesIcon,
|
|
3436
3455
|
InputTrimDirective
|
|
3437
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, 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\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></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]=\"
|
|
3438
|
-
}]
|
|
3439
|
-
type: Inject,
|
|
3440
|
-
args: [LOCALE_ID]
|
|
3441
|
-
}] }, { type: i1$2.FormBuilder }, { type: i2$1.TranslateService }] });
|
|
3456
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, 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\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></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\"></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 [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\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\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\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 (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\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 <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 pi-ban\"></i>\n </div>\n </span>\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 mt-1\">\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 mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n" }]
|
|
3457
|
+
}] });
|
|
3442
3458
|
|
|
3443
3459
|
class FormlyFieldLabelComponent extends FieldType {
|
|
3444
3460
|
constructor() {
|
|
@@ -3450,10 +3466,10 @@ class FormlyFieldLabelComponent extends FieldType {
|
|
|
3450
3466
|
this.props.fieldComponent = this;
|
|
3451
3467
|
this.formControl?.patchValue(this.descriptor.label);
|
|
3452
3468
|
}
|
|
3453
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3454
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.
|
|
3469
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3470
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldLabelComponent, isStandalone: true, selector: "mng-formly-field-label", host: { properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3455
3471
|
}
|
|
3456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLabelComponent, decorators: [{
|
|
3457
3473
|
type: Component,
|
|
3458
3474
|
args: [{ standalone: true, selector: 'mng-formly-field-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
|
|
3459
3475
|
}], propDecorators: { className: [{
|
|
@@ -3506,9 +3522,7 @@ class FormlyFieldLookupDialogComponent extends FieldType {
|
|
|
3506
3522
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldLookupDialogComponent, this, {
|
|
3507
3523
|
value: v
|
|
3508
3524
|
});
|
|
3509
|
-
|
|
3510
|
-
this.props['onValueChange'](this.field, v);
|
|
3511
|
-
}
|
|
3525
|
+
this.props.onValueChange?.(this.field, v);
|
|
3512
3526
|
});
|
|
3513
3527
|
this.subscriptions.push(subscription);
|
|
3514
3528
|
}
|
|
@@ -3627,10 +3641,10 @@ class FormlyFieldLookupDialogComponent extends FieldType {
|
|
|
3627
3641
|
this.fieldLabelFormControl.setValue(value);
|
|
3628
3642
|
}
|
|
3629
3643
|
}
|
|
3630
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3631
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
3644
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3645
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", 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 [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n @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]=\"addItemsAsync\"\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)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\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: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.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: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.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]" }, { kind: "directive", type: DialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3632
3646
|
}
|
|
3633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
|
|
3634
3648
|
type: Component,
|
|
3635
3649
|
args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [
|
|
3636
3650
|
TranslateModule,
|
|
@@ -3804,14 +3818,12 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
3804
3818
|
eventSubtype: FormFieldEventComponentSubtype.ON_INIT
|
|
3805
3819
|
});
|
|
3806
3820
|
let subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value)).subscribe(v => {
|
|
3807
|
-
this.itemsSubject.next(v);
|
|
3821
|
+
this.itemsSubject.next(v ?? []);
|
|
3808
3822
|
// emit lifecycle event
|
|
3809
3823
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldTableDialogFormComponent, this, {
|
|
3810
3824
|
value: v
|
|
3811
3825
|
});
|
|
3812
|
-
|
|
3813
|
-
this.props['onValueChange'](this.field, v);
|
|
3814
|
-
}
|
|
3826
|
+
this.props.onValueChange?.(this.field, v);
|
|
3815
3827
|
});
|
|
3816
3828
|
this.subscriptions.push(subscription);
|
|
3817
3829
|
this.isDisabledSubject.next(this.formControl.disabled);
|
|
@@ -3846,10 +3858,10 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
3846
3858
|
}
|
|
3847
3859
|
return false;
|
|
3848
3860
|
}
|
|
3849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
3850
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
3861
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3862
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", 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\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\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: i1$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", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3851
3863
|
}
|
|
3852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
3864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
|
|
3853
3865
|
type: Component,
|
|
3854
3866
|
args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, ActionComponent, ActionTableComponent, TemplateDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
3855
3867
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
@@ -3863,7 +3875,6 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
3863
3875
|
this.itemsAsync = this.itemsSubject.asObservable();
|
|
3864
3876
|
this.addItemsSubject = new ReplaySubject(1);
|
|
3865
3877
|
this.addItemsAsync = this.addItemsSubject.asObservable();
|
|
3866
|
-
this.dialogUseDataProvider = false;
|
|
3867
3878
|
this.dialogDataProviderService = null;
|
|
3868
3879
|
this.dialogIsLoadingSubject = new ReplaySubject(1);
|
|
3869
3880
|
this.isDialogVisible = false;
|
|
@@ -3879,8 +3890,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
3879
3890
|
this.descriptor = this.props.descriptor;
|
|
3880
3891
|
this.props.fieldComponent = this;
|
|
3881
3892
|
this.dialogIsLoadingSubject.next(false);
|
|
3882
|
-
if (this.descriptor.lookupTableDataProvider
|
|
3883
|
-
this.dialogUseDataProvider = true;
|
|
3893
|
+
if (this.descriptor.lookupTableDataProvider.serviceType) {
|
|
3884
3894
|
this.dialogDataProviderService = this.injector.get(this.descriptor.lookupTableDataProvider.serviceType);
|
|
3885
3895
|
}
|
|
3886
3896
|
this.hasAddAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorActionEnum.Add);
|
|
@@ -3899,9 +3909,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
3899
3909
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldTableDialogMultiselectComponent, this, {
|
|
3900
3910
|
value: v ?? []
|
|
3901
3911
|
});
|
|
3902
|
-
|
|
3903
|
-
this.props['onValueChange'](this.field, v ?? []);
|
|
3904
|
-
}
|
|
3912
|
+
this.props.onValueChange?.(this.field, v);
|
|
3905
3913
|
});
|
|
3906
3914
|
this.subscriptions.push(this.searchDebounceSubject.pipe(debounceTime(200), distinctUntilChanged()).subscribe(query => {
|
|
3907
3915
|
this.addTableComponent?.primeTable.filterGlobal(query, 'contains');
|
|
@@ -3926,7 +3934,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
3926
3934
|
openAddDialog() {
|
|
3927
3935
|
this.dialogSelectedAddItems = [];
|
|
3928
3936
|
this.isDialogVisible = true;
|
|
3929
|
-
if (!this.dialogAreItemsLoaded
|
|
3937
|
+
if (!this.dialogAreItemsLoaded) {
|
|
3930
3938
|
// wrapped in request animation frame due to primeng bug: https://github.com/primefaces/primeng/issues/12980
|
|
3931
3939
|
requestAnimationFrame(() => {
|
|
3932
3940
|
this.dialogIsLoadingSubject.next(true);
|
|
@@ -3941,7 +3949,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
3941
3949
|
}
|
|
3942
3950
|
});
|
|
3943
3951
|
}
|
|
3944
|
-
if (this.descriptor.hasLookupExcludeValues) {
|
|
3952
|
+
if (this.descriptor.hasLookupExcludeValues && this.descriptor.lookupTableDataProvider.isLazy) {
|
|
3945
3953
|
const filterValues = this.formControl.value.map((i) => getObjectPropertyByPath(i, this.descriptor.excludeValueProperty));
|
|
3946
3954
|
params.filters = {
|
|
3947
3955
|
[this.descriptor.excludeFilterProperty]: {
|
|
@@ -3952,6 +3960,11 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
3952
3960
|
}
|
|
3953
3961
|
this.lookupDataProviderSubscription = toObservable(this.descriptor.lookupTableDataProvider?.getAll(params, this.dialogDataProviderService)).subscribe({
|
|
3954
3962
|
next: res => {
|
|
3963
|
+
if (this.descriptor.hasLookupExcludeValues && !this.descriptor.lookupTableDataProvider.isLazy && res && Array.isArray(res.data) && res.data.length > 0) {
|
|
3964
|
+
const filterValues = this.formControl.value.map((i) => getObjectPropertyByPath(i, this.descriptor.excludeValueProperty));
|
|
3965
|
+
res.data = res.data.filter(i => filterValues.indexOf(i[this.descriptor.excludeFilterProperty]) < 0);
|
|
3966
|
+
res.totalCount = res.data.length;
|
|
3967
|
+
}
|
|
3955
3968
|
this.addItemsSubject.next(res);
|
|
3956
3969
|
this.dialogAreItemsLoaded = true;
|
|
3957
3970
|
this.dialogIsLoadingSubject.next(false);
|
|
@@ -4018,22 +4031,22 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
4018
4031
|
const query = event.target.value;
|
|
4019
4032
|
this.searchDebounceSubject.next(query);
|
|
4020
4033
|
}
|
|
4021
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
4022
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
4034
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4035
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", 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]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\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 </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 [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\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)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\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: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.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: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: DialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4023
4036
|
}
|
|
4024
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
4037
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
4025
4038
|
type: Component,
|
|
4026
|
-
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle, DialogKeydownHandlerDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\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 </ng-template>\n <ng-template mngTemplate=\"
|
|
4039
|
+
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle, DialogKeydownHandlerDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\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 </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 [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\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)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\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"] }]
|
|
4027
4040
|
}], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { addTableComponent: [{
|
|
4028
4041
|
type: ViewChild,
|
|
4029
4042
|
args: ['addTableComponent']
|
|
4030
4043
|
}] } });
|
|
4031
4044
|
|
|
4032
4045
|
class FormlyFieldTabsComponent extends FieldType {
|
|
4033
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
4034
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
4046
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4047
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of field.fieldGroup; track tab) {\n <p-tabPanel [header]=\"tab.props?.label! | translate\" [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\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.props?.label!) + '_invalid']\">{{\n tab.props?.label! | 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$6.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$6.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: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4035
4048
|
}
|
|
4036
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
4049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
|
|
4037
4050
|
type: Component,
|
|
4038
4051
|
args: [{ standalone: true, selector: 'mng-formly-field-tabs', imports: [TabViewModule, TranslateModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of field.fieldGroup; track tab) {\n <p-tabPanel [header]=\"tab.props?.label! | translate\" [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\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.props?.label!) + '_invalid']\">{{\n tab.props?.label! | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n" }]
|
|
4039
4052
|
}] });
|
|
@@ -4057,10 +4070,10 @@ class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
|
4057
4070
|
}
|
|
4058
4071
|
return field;
|
|
4059
4072
|
}
|
|
4060
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
4061
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
4073
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4074
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", 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$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4062
4075
|
}
|
|
4063
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
4076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, decorators: [{
|
|
4064
4077
|
type: Component,
|
|
4065
4078
|
args: [{ standalone: true, selector: 'mng-formly-field-no-label-wrapper', imports: [FormlyModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
4066
4079
|
}] });
|
|
@@ -4081,14 +4094,104 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
|
4081
4094
|
this.props?.['descriptor']?.withHelpText('');
|
|
4082
4095
|
}
|
|
4083
4096
|
}
|
|
4084
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
4085
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
4097
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4098
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldWrapperComponent, isStandalone: true, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field'\">\n <div class=\"grid mt-0\">\n @if (props.label) {\n <label [for]=\"key\" class=\"col\" [class]=\"props['descriptor']?.['labelClassName'] ?? ''\"\n >{{ props!.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | 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: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4086
4099
|
}
|
|
4087
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
4100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldWrapperComponent, decorators: [{
|
|
4088
4101
|
type: Component,
|
|
4089
4102
|
args: [{ standalone: true, selector: 'mng-formly-field-wrapper', imports: [TranslateModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field'\">\n <div class=\"grid mt-0\">\n @if (props.label) {\n <label [for]=\"key\" class=\"col\" [class]=\"props['descriptor']?.['labelClassName'] ?? ''\"\n >{{ props!.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | 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" }]
|
|
4090
4103
|
}] });
|
|
4091
4104
|
|
|
4105
|
+
class FormlyFieldDatepickerComponent extends FieldType {
|
|
4106
|
+
constructor() {
|
|
4107
|
+
super(...arguments);
|
|
4108
|
+
this.dpFormControl = new FormControl();
|
|
4109
|
+
this.styleClass = signal('');
|
|
4110
|
+
this.moduleConfig = inject(COMMONS_MODULE_CONFIG_IT, { optional: true });
|
|
4111
|
+
this.destroyRef = inject(DestroyRef);
|
|
4112
|
+
this.dateTimeInUtc = this.moduleConfig?.serialization?.dateTimeInUtc ?? false;
|
|
4113
|
+
this.dateTimeWithTimezone = this.moduleConfig?.serialization?.dateTimeWithTimezone ?? true;
|
|
4114
|
+
this.dateTimeWithMillis = this.moduleConfig?.serialization?.dateTimeWithMillis ?? true;
|
|
4115
|
+
}
|
|
4116
|
+
ngOnInit() {
|
|
4117
|
+
this.descriptor = this.props.descriptor;
|
|
4118
|
+
this.props.fieldComponent = this;
|
|
4119
|
+
// emit lifecycle event
|
|
4120
|
+
this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldDatepickerComponent, this, {
|
|
4121
|
+
eventSubtype: FormFieldEventComponentSubtype.ON_INIT
|
|
4122
|
+
});
|
|
4123
|
+
// init status changes
|
|
4124
|
+
this.formControl.statusChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(this.formControl.status)).subscribe(status => {
|
|
4125
|
+
if (status === 'INVALID') {
|
|
4126
|
+
this.styleClass.set('ng-invalid');
|
|
4127
|
+
}
|
|
4128
|
+
else {
|
|
4129
|
+
this.styleClass.set('ng-valid');
|
|
4130
|
+
}
|
|
4131
|
+
if (status === 'DISABLED' && this.dpFormControl.enabled) {
|
|
4132
|
+
this.dpFormControl.disable({ emitEvent: false });
|
|
4133
|
+
}
|
|
4134
|
+
else if (status !== 'DISABLED' && this.dpFormControl.disabled) {
|
|
4135
|
+
this.dpFormControl.enable({ emitEvent: false });
|
|
4136
|
+
}
|
|
4137
|
+
});
|
|
4138
|
+
// init values from form to datepicker
|
|
4139
|
+
if (typeof this.formControl?.value === 'string' || typeof this.formControl?.value === 'number') {
|
|
4140
|
+
this.dpFormControl.setValue(new Date(this.formControl.value));
|
|
4141
|
+
this.dpFormControl.markAsPristine(); // mark as pristine only on component initialization
|
|
4142
|
+
}
|
|
4143
|
+
this.formControl.valueChanges
|
|
4144
|
+
.pipe(takeUntilDestroyed(this.destroyRef), filter$1(formValue => !this.areDateValuesEqual(formValue, this.dpFormControl.value)))
|
|
4145
|
+
.subscribe(v => {
|
|
4146
|
+
this.dpFormControl.setValue(new Date(v), { emitEvent: false }); // do not emit event, because it can trigger infinite loop
|
|
4147
|
+
});
|
|
4148
|
+
// listen for changes from datepicker to form
|
|
4149
|
+
this.dpFormControl.valueChanges
|
|
4150
|
+
.pipe(takeUntilDestroyed(this.destroyRef), filter$1(value => !this.areDateValuesEqual(value, this.formControl.value)))
|
|
4151
|
+
.subscribe(v => {
|
|
4152
|
+
v = this.convertDateValue(v);
|
|
4153
|
+
this.formControl.setValue(v);
|
|
4154
|
+
this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldDatepickerComponent, this, {
|
|
4155
|
+
value: v
|
|
4156
|
+
});
|
|
4157
|
+
this.props.onValueChange?.(this.field, v);
|
|
4158
|
+
});
|
|
4159
|
+
}
|
|
4160
|
+
onBlur() {
|
|
4161
|
+
this.formControl.markAsTouched();
|
|
4162
|
+
}
|
|
4163
|
+
convertDateValue(value) {
|
|
4164
|
+
const convertDateType = this.descriptor.datePickerValueNoTime || !this.descriptor.datePickerShowTime ? 'date' : 'date-time';
|
|
4165
|
+
const convertDateTimeOpts = {
|
|
4166
|
+
utc: this.descriptor.datePickerValueUtc ?? this.dateTimeInUtc,
|
|
4167
|
+
noMillis: !this.dateTimeWithMillis,
|
|
4168
|
+
noTimezone: this.descriptor.datePickerValueNoTimezone ?? !this.dateTimeWithTimezone
|
|
4169
|
+
};
|
|
4170
|
+
if (!this.descriptor.datePickerValueAsDateObj) {
|
|
4171
|
+
return dateToIsoString(value, convertDateType, convertDateTimeOpts);
|
|
4172
|
+
}
|
|
4173
|
+
return value;
|
|
4174
|
+
}
|
|
4175
|
+
areDateValuesEqual(val1, val2) {
|
|
4176
|
+
const date1 = this.convertDateValue(val1);
|
|
4177
|
+
const date2 = this.convertDateValue(val2);
|
|
4178
|
+
return (date1 instanceof Date && date2 instanceof Date && date1.toISOString() === date2.toISOString()) || date1 === date2;
|
|
4179
|
+
}
|
|
4180
|
+
ngOnDestroy() {
|
|
4181
|
+
// warning: formly calls on destroy before on init
|
|
4182
|
+
// emit lifecycle event
|
|
4183
|
+
this.descriptor?.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldDatepickerComponent, this, {
|
|
4184
|
+
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
4185
|
+
});
|
|
4186
|
+
}
|
|
4187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4188
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", 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(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.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: "ngmodule", type: CalendarModule }, { kind: "component", type: i3$2.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", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4189
|
+
}
|
|
4190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDatepickerComponent, decorators: [{
|
|
4191
|
+
type: Component,
|
|
4192
|
+
args: [{ standalone: true, selector: 'mng-formly-field-datepicker', imports: [ReactiveFormsModule, FormlyModule, CalendarModule], changeDetection: ChangeDetectionStrategy.OnPush, 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(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n" }]
|
|
4193
|
+
}] });
|
|
4194
|
+
|
|
4092
4195
|
const formlyWrappersConfig = [
|
|
4093
4196
|
{ name: 'field', component: FormlyFieldWrapperComponent },
|
|
4094
4197
|
{ name: 'field-no-label', component: FormlyFieldNoLabelWrapperComponent }
|
|
@@ -4161,12 +4264,13 @@ const formlyTypesConfig = [
|
|
|
4161
4264
|
},
|
|
4162
4265
|
{
|
|
4163
4266
|
name: 'datepicker',
|
|
4164
|
-
|
|
4267
|
+
component: FormlyFieldDatepickerComponent,
|
|
4165
4268
|
defaultOptions: {
|
|
4166
4269
|
props: {
|
|
4167
4270
|
type: 'datepicker'
|
|
4168
4271
|
}
|
|
4169
|
-
}
|
|
4272
|
+
},
|
|
4273
|
+
wrappers: ['field']
|
|
4170
4274
|
},
|
|
4171
4275
|
{
|
|
4172
4276
|
name: 'mask',
|
|
@@ -4369,77 +4473,60 @@ function commonsFormlyConfigProvider(translate, datePipe, config = {}) {
|
|
|
4369
4473
|
class TableviewComponent {
|
|
4370
4474
|
constructor() {
|
|
4371
4475
|
this.viewContainer = inject(ViewContainer, { optional: true });
|
|
4372
|
-
this.
|
|
4373
|
-
this.
|
|
4374
|
-
this.
|
|
4375
|
-
this.
|
|
4376
|
-
this.
|
|
4377
|
-
this.
|
|
4476
|
+
this.descriptor = input.required();
|
|
4477
|
+
this.dataProvider = input();
|
|
4478
|
+
this.actions = input([]);
|
|
4479
|
+
this.toolbarLeftActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarLeft]));
|
|
4480
|
+
this.toolbarRightActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarRight]).reverse());
|
|
4481
|
+
this.tableActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.TableHeader, ActionPositionEnum.RowInline, ActionPositionEnum.RowClick]));
|
|
4482
|
+
this.tableParams = signal(undefined);
|
|
4483
|
+
this.hasItemSelectionAction = computed(() => [...this.toolbarLeftActions(), ...this.toolbarRightActions()].some(e => e.hasItemsSelection));
|
|
4484
|
+
this.selectedItems = signal([]);
|
|
4378
4485
|
this.templates = contentChildren(TemplateDirective);
|
|
4379
4486
|
this.footerTemplate = computed(() => findTemplateByName([...this.templates()], 'footer'));
|
|
4380
4487
|
this.rowExpandTemplate = computed(() => findTemplateByName([...this.templates()], 'rowExpandContent'));
|
|
4381
4488
|
}
|
|
4382
4489
|
ngOnInit() {
|
|
4383
4490
|
if (this.viewContainer) {
|
|
4384
|
-
this.viewContainer.actions = this.actions;
|
|
4491
|
+
this.viewContainer.actions = this.actions();
|
|
4385
4492
|
}
|
|
4386
|
-
|
|
4387
|
-
|
|
4493
|
+
const dataProvider = this.dataProvider();
|
|
4494
|
+
if (this.viewContainer && dataProvider) {
|
|
4495
|
+
this.viewContainer.dataProvider = dataProvider;
|
|
4388
4496
|
}
|
|
4389
|
-
for (const action of this.actions.filter(value => value.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true)) {
|
|
4390
|
-
switch (action.position) {
|
|
4391
|
-
case ActionPositionEnum.ToolbarLeft:
|
|
4392
|
-
this.toolbarLeftActions.push(action);
|
|
4393
|
-
break;
|
|
4394
|
-
case ActionPositionEnum.ToolbarRight:
|
|
4395
|
-
this.toolbarRightActions.push(action);
|
|
4396
|
-
break;
|
|
4397
|
-
case ActionPositionEnum.TableHeader:
|
|
4398
|
-
case ActionPositionEnum.RowInline:
|
|
4399
|
-
case ActionPositionEnum.RowClick:
|
|
4400
|
-
this.tableActions.push(action);
|
|
4401
|
-
break;
|
|
4402
|
-
}
|
|
4403
|
-
}
|
|
4404
|
-
this.toolbarRightActions = this.toolbarRightActions.reverse();
|
|
4405
|
-
this.hasItemSelectionAction = [...this.toolbarLeftActions, ...this.toolbarRightActions].some(e => e.hasItemsSelection);
|
|
4406
4497
|
}
|
|
4407
4498
|
onTableLoad(event) {
|
|
4408
|
-
this.tableParams
|
|
4499
|
+
this.tableParams.set(event.params);
|
|
4409
4500
|
}
|
|
4410
4501
|
selectionChange(selectedItems) {
|
|
4411
|
-
this.selectedItems
|
|
4502
|
+
this.selectedItems.set(selectedItems);
|
|
4412
4503
|
}
|
|
4413
|
-
|
|
4414
|
-
|
|
4504
|
+
filterActionsByPositions(actions, actionPositions) {
|
|
4505
|
+
return actions.filter(action => (action.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true) && actionPositions.includes(action.position));
|
|
4506
|
+
}
|
|
4507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4508
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", 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 <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor().tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n @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$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { 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", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { 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 }); }
|
|
4415
4509
|
}
|
|
4416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
4510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewComponent, decorators: [{
|
|
4417
4511
|
type: Component,
|
|
4418
|
-
args: [{ standalone: true, selector: 'mng-tableview', imports: [ToolbarModule, SharedModule, TranslateModule, NgTemplateOutlet, ActionComponent, ActionTableComponent, TemplateDirective, RouterOutlet], providers: [provideViewContainer()], 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 <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n @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" }]
|
|
4419
|
-
}]
|
|
4420
|
-
type: Input,
|
|
4421
|
-
args: [{ required: true }]
|
|
4422
|
-
}], dataProvider: [{
|
|
4423
|
-
type: Input
|
|
4424
|
-
}], actions: [{
|
|
4425
|
-
type: Input
|
|
4426
|
-
}] } });
|
|
4512
|
+
args: [{ standalone: true, selector: 'mng-tableview', imports: [ToolbarModule, SharedModule, TranslateModule, NgTemplateOutlet, ActionComponent, ActionTableComponent, TemplateDirective, RouterOutlet], providers: [provideViewContainer()], changeDetection: ChangeDetectionStrategy.OnPush, 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 <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor().tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n @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" }]
|
|
4513
|
+
}] });
|
|
4427
4514
|
|
|
4428
4515
|
class TableviewRouteComponent {
|
|
4429
|
-
|
|
4430
|
-
|
|
4516
|
+
constructor() {
|
|
4517
|
+
this.tableview = input.required();
|
|
4518
|
+
}
|
|
4519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4520
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.4", type: TableviewRouteComponent, isStandalone: true, selector: "mng-tableview-route", inputs: { tableview: { classPropertyName: "tableview", publicName: "tableview", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mng-tableview [descriptor]=\"tableview().descriptor\" [dataProvider]=\"tableview().dataProvider\" [actions]=\"tableview().actions\"> </mng-tableview>\n", dependencies: [{ kind: "component", type: TableviewComponent, selector: "mng-tableview", inputs: ["descriptor", "dataProvider", "actions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4431
4521
|
}
|
|
4432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
4522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewRouteComponent, decorators: [{
|
|
4433
4523
|
type: Component,
|
|
4434
|
-
args: [{ standalone: true, selector: 'mng-tableview-route', imports: [TableviewComponent], template: "<mng-tableview [descriptor]=\"tableview.descriptor\" [dataProvider]=\"tableview.dataProvider\" [actions]=\"tableview.actions\"> </mng-tableview>\n" }]
|
|
4435
|
-
}]
|
|
4436
|
-
type: Input,
|
|
4437
|
-
args: [{ required: true }]
|
|
4438
|
-
}] } });
|
|
4524
|
+
args: [{ standalone: true, selector: 'mng-tableview-route', imports: [TableviewComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-tableview [descriptor]=\"tableview().descriptor\" [dataProvider]=\"tableview().dataProvider\" [actions]=\"tableview().actions\"> </mng-tableview>\n" }]
|
|
4525
|
+
}] });
|
|
4439
4526
|
|
|
4440
|
-
class
|
|
4441
|
-
constructor(path,
|
|
4442
|
-
super({ path: path, component
|
|
4527
|
+
class TableviewRouteBuilder extends RouteBuilder {
|
|
4528
|
+
constructor(path, component, loadComponent) {
|
|
4529
|
+
super({ path: path, component, loadComponent });
|
|
4443
4530
|
this.path = path;
|
|
4444
4531
|
this.isFromComponent = true;
|
|
4445
4532
|
this.routeData = { breadcrumb: null };
|
|
@@ -4450,28 +4537,6 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
|
4450
4537
|
this.hasAdd = true;
|
|
4451
4538
|
this.addPath = 'add';
|
|
4452
4539
|
this.hasDelete = true;
|
|
4453
|
-
if (!options.component) {
|
|
4454
|
-
this.isFromComponent = false;
|
|
4455
|
-
this.descriptor = options.descriptor;
|
|
4456
|
-
this.dataProvider = options.dataProvider;
|
|
4457
|
-
this.actions = options.actions;
|
|
4458
|
-
this.hasDetails = false;
|
|
4459
|
-
this.hasAdd = false;
|
|
4460
|
-
this.hasEdit = false;
|
|
4461
|
-
if (this.actions) {
|
|
4462
|
-
for (const action of this.actions) {
|
|
4463
|
-
if (action instanceof ActionEditorDetailsDescriptorInst) {
|
|
4464
|
-
this.hasDetails = true;
|
|
4465
|
-
}
|
|
4466
|
-
else if (action instanceof ActionEditorAddDescriptorInst) {
|
|
4467
|
-
this.hasAdd = true;
|
|
4468
|
-
}
|
|
4469
|
-
else if (action instanceof ActionEditorEditDescriptorInst) {
|
|
4470
|
-
this.hasEdit = true;
|
|
4471
|
-
}
|
|
4472
|
-
}
|
|
4473
|
-
}
|
|
4474
|
-
}
|
|
4475
4540
|
}
|
|
4476
4541
|
withReadOnly(permissions) {
|
|
4477
4542
|
if (permissions) {
|
|
@@ -4577,12 +4642,11 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
|
4577
4642
|
// copy route data for children, reset breadcrumbs menu items and permission
|
|
4578
4643
|
const childrenRouteData = {
|
|
4579
4644
|
...this.routeData,
|
|
4580
|
-
breadcrumb: null
|
|
4581
|
-
menuItems: undefined,
|
|
4582
|
-
permissions: undefined
|
|
4645
|
+
breadcrumb: null
|
|
4583
4646
|
};
|
|
4647
|
+
const loadActionRoute = () => Promise.resolve().then(function () { return actionRoute_component; });
|
|
4584
4648
|
// list route
|
|
4585
|
-
const rootChildRouteBuilder =
|
|
4649
|
+
const rootChildRouteBuilder = createLazyRoute('', loadActionRoute);
|
|
4586
4650
|
rootChildRouteBuilder.withData({ ...childrenRouteData });
|
|
4587
4651
|
if (this.tableviewPermissions?.[TableviewActionDefaultCategories.READ]) {
|
|
4588
4652
|
rootChildRouteBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.READ]);
|
|
@@ -4590,7 +4654,7 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
|
4590
4654
|
this.addChildBuilder(rootChildRouteBuilder);
|
|
4591
4655
|
// add route
|
|
4592
4656
|
if (this.hasAdd) {
|
|
4593
|
-
const routeBuilder =
|
|
4657
|
+
const routeBuilder = createLazyRoute(this.addPath, loadActionRoute);
|
|
4594
4658
|
routeBuilder.withData({ ...childrenRouteData });
|
|
4595
4659
|
if (this.tableviewPermissions?.[TableviewActionDefaultCategories.ADD]) {
|
|
4596
4660
|
routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.ADD]);
|
|
@@ -4599,7 +4663,7 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
|
4599
4663
|
routeBuilder.withCanDeactivate(unsavedChangesGuard);
|
|
4600
4664
|
}
|
|
4601
4665
|
if (this.hasDetails) {
|
|
4602
|
-
const routeBuilder =
|
|
4666
|
+
const routeBuilder = createLazyRoute(this.detailsPath, loadActionRoute);
|
|
4603
4667
|
routeBuilder.withData({ ...childrenRouteData });
|
|
4604
4668
|
if (this.tableviewPermissions?.[TableviewActionDefaultCategories.DETAILS]) {
|
|
4605
4669
|
routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.DETAILS]);
|
|
@@ -4607,7 +4671,7 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
|
4607
4671
|
this.addChildBuilder(routeBuilder);
|
|
4608
4672
|
}
|
|
4609
4673
|
if (this.hasEdit) {
|
|
4610
|
-
const routeBuilder =
|
|
4674
|
+
const routeBuilder = createLazyRoute(this.editPath, loadActionRoute);
|
|
4611
4675
|
routeBuilder.withData({ ...childrenRouteData });
|
|
4612
4676
|
if (this.tableviewPermissions?.[TableviewActionDefaultCategories.EDIT]) {
|
|
4613
4677
|
routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.EDIT]);
|
|
@@ -4625,13 +4689,11 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
|
4625
4689
|
return menuItemPermission;
|
|
4626
4690
|
}
|
|
4627
4691
|
}
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
return new TableviewRouteBuilderInternal(path, { descriptor, dataProvider, actions });
|
|
4634
|
-
}
|
|
4692
|
+
function createTableviewRoute(path, component) {
|
|
4693
|
+
return new TableviewRouteBuilder(path, component);
|
|
4694
|
+
}
|
|
4695
|
+
function createTableviewLazyRoute(path, loadComponent) {
|
|
4696
|
+
return new TableviewRouteBuilder(path, undefined, loadComponent);
|
|
4635
4697
|
}
|
|
4636
4698
|
|
|
4637
4699
|
/**
|
|
@@ -4687,5 +4749,5 @@ function withTableview(config) {
|
|
|
4687
4749
|
* Generated bundle index. Do not edit.
|
|
4688
4750
|
*/
|
|
4689
4751
|
|
|
4690
|
-
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionInstanceStateEnum,
|
|
4752
|
+
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionInstanceStateEnum, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, FormEditorComponent, 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, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getI18nActionEditorTitleAsync, getI18nActionParams, getI18nActionParamsAsync, getI18nActionTitleAsync, getI18nForAction, getI18nForActionAsync, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, populateI18nActionParams, provideActionExecutor, provideViewContainer, unsavedChangesGuard, withTableview };
|
|
4691
4753
|
//# sourceMappingURL=mediusinc-mng-commons-tableview.mjs.map
|