@mediusinc/mng-commons 5.4.0 → 5.5.0-rc.1
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/descriptors/table.descriptor.d.ts +4 -2
- package/core/directives/rerender.directive.d.ts +9 -0
- package/core/helpers/route.d.ts +25 -25
- package/core/index.d.ts +2 -0
- package/core/models/version.model.d.ts +16 -4
- package/core/reactivity/effect.d.ts +16 -0
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +4 -4
- package/esm2022/core/components/pages/error/error.page.component.mjs +4 -4
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +4 -4
- package/esm2022/core/data-list/data-list-params-helpers.mjs +18 -3
- package/esm2022/core/descriptors/table.descriptor.mjs +1 -1
- package/esm2022/core/directives/component.directive.mjs +4 -4
- package/esm2022/core/directives/rerender.directive.mjs +25 -0
- package/esm2022/core/directives/template.directive.mjs +4 -4
- package/esm2022/core/index.mjs +4 -1
- package/esm2022/core/models/version.model.mjs +1 -1
- package/esm2022/core/pipes/boolean.pipe.mjs +6 -6
- package/esm2022/core/pipes/class-map.pipe.mjs +4 -4
- package/esm2022/core/pipes/enum.pipe.mjs +4 -4
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +4 -4
- package/esm2022/core/pipes/enumerate.pipe.mjs +4 -4
- package/esm2022/core/pipes/getter.pipe.mjs +5 -5
- package/esm2022/core/pipes/i18n-property.pipe.mjs +4 -4
- package/esm2022/core/pipes/json-path.pipe.mjs +4 -4
- package/esm2022/core/pipes/parametrize.pipe.mjs +4 -4
- package/esm2022/core/pipes/template.pipe.mjs +4 -4
- package/esm2022/core/reactivity/effect.mjs +22 -0
- package/esm2022/core/security/permission.service.mjs +4 -4
- package/esm2022/core/services/commons-init.service.mjs +4 -4
- package/esm2022/core/services/commons-router.service.mjs +4 -4
- package/esm2022/core/services/commons-storage.service.mjs +4 -4
- package/esm2022/core/services/commons.service.mjs +8 -8
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +32 -25
- package/esm2022/filter/descriptors/filter.descriptor.mjs +53 -1
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +4 -4
- package/esm2022/form/components/date-range/date-range.component.mjs +4 -4
- package/esm2022/form/components/dropdown/dropdown.component.mjs +4 -4
- package/esm2022/form/components/number-range/number-range.component.mjs +4 -4
- package/esm2022/form/directives/input-trim.directive.mjs +4 -4
- package/esm2022/table/api/descriptors/sort.descriptor.mjs +2 -2
- package/esm2022/table/api/descriptors/table.descriptor.mjs +31 -7
- package/esm2022/table/components/column-filter/column-filter.component.mjs +33 -40
- package/esm2022/table/components/column-value/column-value.component.mjs +6 -6
- package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +7 -7
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +28 -35
- package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +44 -45
- package/esm2022/table/components/table/table.component.mjs +114 -430
- package/esm2022/table/helpers/filters.mjs +9 -25
- package/esm2022/table/helpers/table.mjs +24 -0
- package/esm2022/table/index.mjs +2 -2
- package/esm2022/table/models/column-preferences.model.mjs +1 -1
- package/esm2022/table/models/filter.model.mjs +1 -1
- package/esm2022/table/pipes/filter-value.pipe.mjs +4 -4
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +4 -4
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +4 -4
- package/esm2022/table/services/table-data.service.mjs +194 -0
- package/esm2022/table/services/table-metadata.service.mjs +136 -0
- package/esm2022/table/services/table-preferences.service.mjs +142 -0
- package/esm2022/tableview/action/components/action/action.component.mjs +6 -7
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +4 -4
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +69 -46
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +4 -4
- package/esm2022/tableview/action/components/route/action-route.component.mjs +5 -6
- package/esm2022/tableview/action/components/table/action-table.component.mjs +6 -6
- package/esm2022/tableview/action/helpers/action-execution.mjs +25 -0
- package/esm2022/tableview/action/models/execution/action-instance.model.mjs +2 -3
- package/esm2022/tableview/action/services/action-executor.service.mjs +12 -79
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/navigation.service.mjs +4 -4
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/view-container.service.mjs +4 -4
- package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +13 -1
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +67 -10
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +2 -2
- package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +17 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +32 -7
- package/esm2022/tableview/api/action/models/execution/action-instance-state.model.mjs +2 -2
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +2 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +4 -4
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +13 -5
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +3 -2
- package/esm2022/tableview/api/tableview/helpers/tableview-descriptor-helpers.mjs +2 -2
- package/esm2022/tableview/editor/components/editor/auto-save-status/auto-save-status.component.mjs +4 -4
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +31 -38
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +5 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +5 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +5 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +6 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +6 -5
- package/esm2022/tableview/editor/components/formly/pipes/formly-field-label.pipe.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +4 -4
- package/esm2022/tableview/editor/helpers/editor-autosave.mjs +2 -2
- package/esm2022/tableview/editor/services/form-editor.service.mjs +4 -4
- package/esm2022/tableview/index.mjs +1 -2
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +4 -4
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +4 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs +130 -71
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +83 -24
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +15 -15
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +31 -7
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +704 -606
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +146 -26
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +260 -317
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/filter/descriptors/filter-lookup.descriptor.d.ts +17 -20
- package/filter/descriptors/filter.descriptor.d.ts +32 -2
- package/form/components/date-range/date-range.component.d.ts +3 -3
- package/form/components/number-range/number-range.component.d.ts +2 -2
- package/package.json +4 -4
- package/table/api/descriptors/column.descriptor.d.ts +1 -1
- package/table/api/descriptors/sort.descriptor.d.ts +2 -2
- package/table/api/descriptors/table.descriptor.d.ts +20 -6
- package/table/components/column-filter/column-filter.component.d.ts +8 -14
- package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +5 -5
- package/table/components/filter/filter-form/filter-form.component.d.ts +10 -19
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +11 -13
- package/table/components/table/table.component.d.ts +20 -64
- package/table/helpers/filters.d.ts +4 -7
- package/table/helpers/table.d.ts +6 -0
- package/table/index.d.ts +1 -1
- package/table/models/column-preferences.model.d.ts +2 -2
- package/table/models/filter.model.d.ts +14 -2
- package/table/services/table-data.service.d.ts +36 -0
- package/table/services/table-metadata.service.d.ts +31 -0
- package/table/services/table-preferences.service.d.ts +25 -0
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +4 -7
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +1 -1
- package/tableview/action/helpers/action-execution.d.ts +7 -0
- package/tableview/action/models/execution/action-instance.model.d.ts +1 -2
- package/tableview/action/services/action-executor.service.d.ts +1 -2
- package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +1 -0
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +12 -4
- package/tableview/api/action/descriptors/action-link.descriptor.d.ts +1 -0
- package/tableview/api/action/descriptors/action.descriptor.d.ts +5 -3
- package/tableview/api/action/models/execution/action-instance-state.model.d.ts +1 -1
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +4 -10
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +1 -1
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +6 -4
- package/tableview/editor/components/editor/form-editor.component.d.ts +3 -2
- package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +1 -1
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +2 -1
- package/tableview/index.d.ts +0 -1
- package/version-info.json +6 -6
- package/esm2022/table/services/data-list.service.mjs +0 -29
- package/esm2022/tableview/action/models/execution/action-instance-state.model.mjs +0 -32
- package/table/services/data-list.service.d.ts +0 -19
- package/tableview/action/models/execution/action-instance-state.model.d.ts +0 -30
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
|
-
import { AsyncPipe, DatePipe, NgTemplateOutlet, JsonPipe
|
|
2
|
+
import { AsyncPipe, DatePipe, NgTemplateOutlet, JsonPipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, Injectable, signal, inject, Injector, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy, Optional, DestroyRef, ElementRef, model, untracked, afterNextRender, HostListener, contentChildren, viewChildren, QueryList, Directive, Pipe, LOCALE_ID, HostBinding, ViewChild } from '@angular/core';
|
|
4
|
+
import { InjectionToken, Injectable, signal, inject, Injector, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy, Optional, DestroyRef, ElementRef, model, untracked, afterNextRender, HostListener, contentChildren, viewChildren, QueryList, ChangeDetectorRef, Directive, Pipe, LOCALE_ID, HostBinding, ViewChild } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i1 from '@angular/router';
|
|
7
7
|
import { NavigationEnd, Router, ActivatedRoute, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, RouterOutlet } from '@angular/router';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i3 from '@ngx-translate/core';
|
|
9
9
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i5 from 'primeng/button';
|
|
11
11
|
import { ButtonModule } from 'primeng/button';
|
|
12
12
|
import * as i10 from 'primeng/menu';
|
|
13
13
|
import { Menu, MenuModule } from 'primeng/menu';
|
|
@@ -17,34 +17,34 @@ import * as i9 from 'primeng/splitbutton';
|
|
|
17
17
|
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
18
18
|
import * as i8 from 'primeng/tooltip';
|
|
19
19
|
import { TooltipModule } from 'primeng/tooltip';
|
|
20
|
-
import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest, debounceTime, tap, combineLatestWith, NEVER, isObservable, throwError, filter as filter$1 } from 'rxjs';
|
|
21
|
-
import * as i3 from '@mediusinc/mng-commons/core';
|
|
22
|
-
import { getI18n, getI18nAsync, toastMessage, getI18nForError,
|
|
23
|
-
import { ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorDetailsDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptorInst, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FieldValidationDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, AFieldDescriptor, AFieldGroupDescriptor, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, actionEditorCancel, ActionDescriptorInst, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
|
|
20
|
+
import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest, debounceTime, delay, tap, combineLatestWith, NEVER, isObservable, throwError, filter as filter$1 } from 'rxjs';
|
|
21
|
+
import * as i3$1 from '@mediusinc/mng-commons/core';
|
|
22
|
+
import { getI18n, getI18nAsync, LoggerService, toastMessage, getI18nForError, CommonsService, ParametrizePipe, escapeHtmlAny, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, Permissions, ComponentDirective, CommonsStorageService, StyleLevelEnum, objectDeepCopy, effectWithDeps, Styles, TemplateDirective, findTemplateByName, getI18nTypePropertyKey, getI18nTypeGroupKey, getI18nTypeTabKey, fromSubscribeError, getErrorLogLevel, getObjectPropertyByPath, FilterMatchMode, COMMONS_MODULE_CONFIG_IT, dateToIsoString, RouteBuilder, createLazyRoute, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
|
|
23
|
+
import { ActionInstanceStateEnum, ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorDetailsDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptorInst, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FieldValidationDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, AFieldDescriptor, AFieldGroupDescriptor, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, actionEditorCancel, ActionDescriptorInst, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
|
|
24
24
|
import { mergeMap, map, filter, startWith, catchError, first, take as take$1 } from 'rxjs/operators';
|
|
25
25
|
import { getI18nModelParams, getI18nModelParamsAsync, type } from '@mediusinc/mng-commons/model';
|
|
26
26
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
27
27
|
import * as i2$2 from 'primeng/api';
|
|
28
28
|
import { MessageService, ConfirmationService, SharedModule } from 'primeng/api';
|
|
29
29
|
import { DialogService, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
30
|
-
import * as i1$
|
|
30
|
+
import * as i1$2 from 'primeng/progressspinner';
|
|
31
31
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
32
32
|
import * as i2$3 from 'primeng/toolbar';
|
|
33
33
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
34
34
|
import { ZIndexUtils } from 'primeng/utils';
|
|
35
|
-
import * as i1$
|
|
35
|
+
import * as i1$1 from '@angular/forms';
|
|
36
36
|
import { Validators, UntypedFormGroup, FormGroup, FormArray, ReactiveFormsModule, FormsModule, FormBuilder, FormControl } from '@angular/forms';
|
|
37
37
|
import * as i2$1 from '@ngx-formly/core';
|
|
38
38
|
import { FormlyConfig, FormlyModule, FieldType, FieldWrapper, FORMLY_CONFIG } from '@ngx-formly/core';
|
|
39
|
-
import * as i3$
|
|
39
|
+
import * as i3$2 from 'primeng/messages';
|
|
40
40
|
import { MessagesModule } from 'primeng/messages';
|
|
41
41
|
import { ButtonStyleBuilder, ButtonStyleRoundedEnum, lookupDataProvider, ActionButtonDescriptor } from '@mediusinc/mng-commons/form/api';
|
|
42
42
|
import { DropdownComponent, AutocompleteComponent, InputTrimDirective } from '@mediusinc/mng-commons/form';
|
|
43
43
|
import { TableComponent } from '@mediusinc/mng-commons/table';
|
|
44
44
|
import { TableSizeEnum } from '@mediusinc/mng-commons/table/api';
|
|
45
|
-
import * as i5 from 'primeng/message';
|
|
45
|
+
import * as i5$1 from 'primeng/message';
|
|
46
46
|
import { MessageModule } from 'primeng/message';
|
|
47
|
-
import * as i1$
|
|
47
|
+
import * as i1$3 from 'primeng/fieldset';
|
|
48
48
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
49
49
|
import * as i9$1 from 'primeng/fileupload';
|
|
50
50
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
@@ -53,7 +53,7 @@ import * as i11 from 'primeng/image';
|
|
|
53
53
|
import { ImageModule } from 'primeng/image';
|
|
54
54
|
import * as i8$1 from 'primeng/inputmask';
|
|
55
55
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
56
|
-
import * as i1$
|
|
56
|
+
import * as i1$4 from 'primeng/inputnumber';
|
|
57
57
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
58
58
|
import * as i6 from 'primeng/inputswitch';
|
|
59
59
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
@@ -65,9 +65,9 @@ import * as i7$1 from 'primeng/radiobutton';
|
|
|
65
65
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
66
66
|
import * as i7$2 from 'primeng/dialog';
|
|
67
67
|
import { DialogModule } from 'primeng/dialog';
|
|
68
|
-
import * as i1$
|
|
68
|
+
import * as i1$5 from 'primeng/tabview';
|
|
69
69
|
import { TabViewModule } from 'primeng/tabview';
|
|
70
|
-
import * as i3$
|
|
70
|
+
import * as i3$3 from 'primeng/calendar';
|
|
71
71
|
import { CalendarModule } from 'primeng/calendar';
|
|
72
72
|
|
|
73
73
|
function getI18nForAction(translate, action, actionPathKeys, customKey, item, fallbackKey, params, missingTranslationStrategy = 'returnFirstKey') {
|
|
@@ -149,55 +149,8 @@ function getKeysByPriority(action, actionPathKeys, customKey, fallbackKey) {
|
|
|
149
149
|
return keys;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
/**
|
|
153
|
-
* States of action. Enums ending with `*Final` are supposed to be final.
|
|
154
|
-
*/
|
|
155
|
-
var ActionInstanceStateEnum;
|
|
156
|
-
(function (ActionInstanceStateEnum) {
|
|
157
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["TriggerStart"] = 0] = "TriggerStart";
|
|
158
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["TriggerEnd"] = 1] = "TriggerEnd";
|
|
159
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["ActivationStart"] = 2] = "ActivationStart";
|
|
160
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["ActivationEnd"] = 3] = "ActivationEnd";
|
|
161
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FetchStart"] = 4] = "FetchStart";
|
|
162
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FetchEnd"] = 5] = "FetchEnd";
|
|
163
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FetchError"] = 6] = "FetchError";
|
|
164
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["RunConfirmationStart"] = 7] = "RunConfirmationStart";
|
|
165
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["RunConfirmationEndAccept"] = 8] = "RunConfirmationEndAccept";
|
|
166
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["RunConfirmationEndReject"] = 9] = "RunConfirmationEndReject";
|
|
167
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["RunStart"] = 10] = "RunStart";
|
|
168
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["RunEnd"] = 11] = "RunEnd";
|
|
169
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["RunError"] = 12] = "RunError";
|
|
170
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["NextActionStart"] = 13] = "NextActionStart";
|
|
171
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["NextActionEnd"] = 14] = "NextActionEnd";
|
|
172
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["ErrorActionStart"] = 15] = "ErrorActionStart";
|
|
173
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["ErrorActionEnd"] = 16] = "ErrorActionEnd";
|
|
174
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishSuccessFinal"] = 17] = "FinishSuccessFinal";
|
|
175
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishErrorFinal"] = 18] = "FinishErrorFinal";
|
|
176
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishDismissedFinal"] = 19] = "FinishDismissedFinal";
|
|
177
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishSuccessReactivateFinal"] = 20] = "FinishSuccessReactivateFinal";
|
|
178
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishComponentDestroyFinal"] = 21] = "FinishComponentDestroyFinal";
|
|
179
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishRouteUntriggerStart"] = 22] = "FinishRouteUntriggerStart";
|
|
180
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishRouteUntriggerEndFinal"] = 23] = "FinishRouteUntriggerEndFinal";
|
|
181
|
-
ActionInstanceStateEnum[ActionInstanceStateEnum["FinishRouteUntriggerTimeoutFinal"] = 24] = "FinishRouteUntriggerTimeoutFinal";
|
|
182
|
-
})(ActionInstanceStateEnum || (ActionInstanceStateEnum = {}));
|
|
183
|
-
|
|
184
152
|
const COMMONS_TABLEVIEW_FEATURE_CONFIG_IT = new InjectionToken('COMMONS_TABLEVIEW_FEATURE_CONFIG');
|
|
185
153
|
|
|
186
|
-
function actionNotificationSuccess(translate, action, functionName, messageService, customTitleKey, customMessageKey, item) {
|
|
187
|
-
const actionSuccessTitle = getI18nForAction(translate, action, 'success.title', customTitleKey, item, 'general.success', functionName) ?? undefined;
|
|
188
|
-
const actionSuccessMessage = getI18nForAction(translate, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName) ?? undefined;
|
|
189
|
-
return toastMessage(messageService, actionSuccessTitle, actionSuccessMessage);
|
|
190
|
-
}
|
|
191
|
-
function actionNotificationError(translate, action, error, functionName, messageService, item, severity = 'error') {
|
|
192
|
-
const params = {
|
|
193
|
-
errorMessage: getI18nForError(translate, error) ?? error.message
|
|
194
|
-
};
|
|
195
|
-
const actionErrorTitle = getI18nForAction(translate, action, [`error.${functionName}.title`, 'error.title'], action.runNotificationErrorTitle, item, 'general.error', params) ?? undefined;
|
|
196
|
-
const actionErrorMessage = getI18nForAction(translate, action, [`error.${functionName}.message`, 'error.message'], action.runNotificationErrorMessage, item, 'general.errorMessage', params) ??
|
|
197
|
-
undefined;
|
|
198
|
-
return toastMessage(messageService, actionErrorTitle, actionErrorMessage, severity, 'pi-exclamation-triangle');
|
|
199
|
-
}
|
|
200
|
-
|
|
201
154
|
/**
|
|
202
155
|
* Class containing all main data for action to be executed in run/fetch/submit states.
|
|
203
156
|
*/
|
|
@@ -260,6 +213,45 @@ var ActionDataProviderSource;
|
|
|
260
213
|
ActionDataProviderSource[ActionDataProviderSource["ParameterOrInput"] = 3] = "ParameterOrInput";
|
|
261
214
|
})(ActionDataProviderSource || (ActionDataProviderSource = {}));
|
|
262
215
|
|
|
216
|
+
function actionExecutionSelectDataProvider(action, dataProvider, viewContainer) {
|
|
217
|
+
if (dataProvider) {
|
|
218
|
+
return {
|
|
219
|
+
dataProvider,
|
|
220
|
+
source: ActionDataProviderSource.ParameterOrInput
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (action.dataProvider) {
|
|
224
|
+
return {
|
|
225
|
+
dataProvider: action.dataProvider,
|
|
226
|
+
source: ActionDataProviderSource.Descriptor
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
if (viewContainer?.dataProvider()) {
|
|
230
|
+
return {
|
|
231
|
+
dataProvider: viewContainer?.dataProvider(),
|
|
232
|
+
source: ActionDataProviderSource.ViewContainer
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
source: ActionDataProviderSource.Undefined
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function actionNotificationSuccess(translate, action, functionName, messageService, customTitleKey, customMessageKey, item) {
|
|
241
|
+
const actionSuccessTitle = getI18nForAction(translate, action, 'success.title', customTitleKey, item, 'general.success', functionName) ?? undefined;
|
|
242
|
+
const actionSuccessMessage = getI18nForAction(translate, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName) ?? undefined;
|
|
243
|
+
return toastMessage(messageService, actionSuccessTitle, actionSuccessMessage);
|
|
244
|
+
}
|
|
245
|
+
function actionNotificationError(translate, action, error, functionName, messageService, item, severity = 'error') {
|
|
246
|
+
const params = {
|
|
247
|
+
errorMessage: getI18nForError(translate, error) ?? error.message
|
|
248
|
+
};
|
|
249
|
+
const actionErrorTitle = getI18nForAction(translate, action, [`error.${functionName}.title`, 'error.title'], action.runNotificationErrorTitle, item, 'general.error', params) ?? undefined;
|
|
250
|
+
const actionErrorMessage = getI18nForAction(translate, action, [`error.${functionName}.message`, 'error.message'], action.runNotificationErrorMessage, item, 'general.errorMessage', params) ??
|
|
251
|
+
undefined;
|
|
252
|
+
return toastMessage(messageService, actionErrorTitle, actionErrorMessage, severity, 'pi-exclamation-triangle');
|
|
253
|
+
}
|
|
254
|
+
|
|
263
255
|
/**
|
|
264
256
|
* Action execution instance containing data about execution state of action
|
|
265
257
|
*/
|
|
@@ -484,10 +476,10 @@ class NavigationService {
|
|
|
484
476
|
this.router.navigateByUrl('/');
|
|
485
477
|
}
|
|
486
478
|
}
|
|
487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
488
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
479
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", 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: "18.2.12", ngImport: i0, type: NavigationService }); }
|
|
489
481
|
}
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: NavigationService, decorators: [{
|
|
491
483
|
type: Injectable
|
|
492
484
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.Location }] });
|
|
493
485
|
|
|
@@ -523,10 +515,10 @@ class ViewContainer {
|
|
|
523
515
|
closeEditor(event) {
|
|
524
516
|
this._editorCloseSubject.next(event ?? {});
|
|
525
517
|
}
|
|
526
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
527
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ViewContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
519
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ViewContainer }); }
|
|
528
520
|
}
|
|
529
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ViewContainer, decorators: [{
|
|
530
522
|
type: Injectable
|
|
531
523
|
}] });
|
|
532
524
|
|
|
@@ -557,12 +549,12 @@ class ActionExecutorService {
|
|
|
557
549
|
* @param dataProvider Data provider.
|
|
558
550
|
*/
|
|
559
551
|
prepareActionContextValidation(action, parameters, dataProvider) {
|
|
560
|
-
const ctxDataProvider =
|
|
552
|
+
const ctxDataProvider = actionExecutionSelectDataProvider(action, dataProvider, this.viewContainer);
|
|
561
553
|
return {
|
|
562
554
|
descriptor: action,
|
|
563
555
|
parameters: parameters,
|
|
564
|
-
serviceInstance: this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider) ?? undefined,
|
|
565
|
-
dataProvider: ctxDataProvider
|
|
556
|
+
serviceInstance: this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider.dataProvider) ?? undefined,
|
|
557
|
+
dataProvider: ctxDataProvider.dataProvider
|
|
566
558
|
};
|
|
567
559
|
}
|
|
568
560
|
/**
|
|
@@ -713,42 +705,6 @@ class ActionExecutorService {
|
|
|
713
705
|
}
|
|
714
706
|
break;
|
|
715
707
|
}
|
|
716
|
-
// switch (ctx.functionName) {
|
|
717
|
-
// case 'submit':
|
|
718
|
-
// actionEditor = ctx.instance.action as ActionEditorDescriptorInst<Item>;
|
|
719
|
-
// if (typeof actionEditor.submitFunction !== 'function') {
|
|
720
|
-
// if (actionEditor instanceof ActionEditorAddDescriptorInst) {
|
|
721
|
-
// fnObs = this.dataProviderExecutor.runCreateOrFail.bind(this.dataProviderExecutor);
|
|
722
|
-
// } else if (actionEditor instanceof ActionEditorEditDescriptorInst) {
|
|
723
|
-
// fnObs = this.dataProviderExecutor.runUpdateOrFail.bind(this.dataProviderExecutor);
|
|
724
|
-
// } else {
|
|
725
|
-
// fnObs = ctx => ctx.parameters?.item ?? undefined;
|
|
726
|
-
// }
|
|
727
|
-
// } else {
|
|
728
|
-
// fnObs = actionEditor.submitFunction;
|
|
729
|
-
// }
|
|
730
|
-
// break;
|
|
731
|
-
// case 'fetch':
|
|
732
|
-
// actionEditor = ctx.instance.action as ActionEditorDescriptorInst<Item>;
|
|
733
|
-
// if (typeof actionEditor.fetchFunction !== 'function') {
|
|
734
|
-
// if (actionEditor instanceof ActionEditorEditDescriptorInst || actionEditor instanceof ActionEditorDetailsDescriptorInst) {
|
|
735
|
-
// fnObs = this.dataProviderExecutor.runFetchOrFail.bind(this.dataProviderExecutor);
|
|
736
|
-
// } else {
|
|
737
|
-
// fnObs = ctx => ctx.parameters?.item ?? undefined;
|
|
738
|
-
// }
|
|
739
|
-
// } else {
|
|
740
|
-
// fnObs = actionEditor.fetchFunction;
|
|
741
|
-
// }
|
|
742
|
-
// break;
|
|
743
|
-
// case 'run':
|
|
744
|
-
// default:
|
|
745
|
-
// if (!ctx.instance.action.hasRunFunction && ctx.instance.action instanceof ActionDeleteDescriptorInst) {
|
|
746
|
-
// fnObs = this.dataProviderExecutor.runDeleteOrFail.bind(this.dataProviderExecutor);
|
|
747
|
-
// } else {
|
|
748
|
-
// fnObs = ctx.instance.action.runFunction;
|
|
749
|
-
// }
|
|
750
|
-
// break;
|
|
751
|
-
// }
|
|
752
708
|
const retObs = of(void 0).pipe(take(1), switchMap(() => {
|
|
753
709
|
if (isMainRunFn) {
|
|
754
710
|
// if main run function, also set loading to true
|
|
@@ -915,24 +871,9 @@ class ActionExecutorService {
|
|
|
915
871
|
throw new CommonsInternalError(`Cannot create editor context for action ${instance.action.actionNameLong} of type ${instance.action.type}.`);
|
|
916
872
|
}
|
|
917
873
|
const editorAction = instance.action;
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
ctxDataProvider = editorAction.dataProvider;
|
|
922
|
-
dataProviderSource = ActionDataProviderSource.Descriptor;
|
|
923
|
-
}
|
|
924
|
-
if (!ctxDataProvider) {
|
|
925
|
-
const viewContainerDataProvider = this.viewContainer?.dataProvider();
|
|
926
|
-
if (viewContainerDataProvider) {
|
|
927
|
-
ctxDataProvider = viewContainerDataProvider;
|
|
928
|
-
dataProviderSource = ActionDataProviderSource.ViewContainer;
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
dataProviderSource = ActionDataProviderSource.Undefined;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
const ctx = new ActionContext(this.injector, instance, parameters, functionName, this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider) ?? undefined, ctxDataProvider, this.viewContainer ?? undefined);
|
|
935
|
-
ctx.dataProviderSource = dataProviderSource;
|
|
874
|
+
const ctxDataProvider = actionExecutionSelectDataProvider(editorAction, dataProvider, this.viewContainer);
|
|
875
|
+
const ctx = new ActionContext(this.injector, instance, parameters, functionName, (this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider.dataProvider) ?? undefined), ctxDataProvider.dataProvider, this.viewContainer ?? undefined);
|
|
876
|
+
ctx.dataProviderSource = ctxDataProvider.source;
|
|
936
877
|
ctx.previousActionInstance = previousActionInstance;
|
|
937
878
|
instance.newContext(ctx);
|
|
938
879
|
return ctx;
|
|
@@ -949,25 +890,9 @@ class ActionExecutorService {
|
|
|
949
890
|
*/
|
|
950
891
|
prepareContext(action, parameters, instance, previousActionInstance) {
|
|
951
892
|
instance = this.getOrCreateInstance(instance, action, parameters, ActionInstanceStateEnum.ActivationEnd);
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
ctxDataProvider = this.viewContainer?.dataProvider();
|
|
956
|
-
dataProviderSource = ActionDataProviderSource.ViewContainer;
|
|
957
|
-
}
|
|
958
|
-
let service = undefined;
|
|
959
|
-
if (ctxDataProvider != null) {
|
|
960
|
-
const dataProviderService = this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider);
|
|
961
|
-
if (!dataProviderService) {
|
|
962
|
-
throw new CommonsInternalError('');
|
|
963
|
-
}
|
|
964
|
-
service = dataProviderService;
|
|
965
|
-
}
|
|
966
|
-
else {
|
|
967
|
-
dataProviderSource = ActionDataProviderSource.Undefined;
|
|
968
|
-
}
|
|
969
|
-
const ctx = new ActionContext(this.injector, instance, parameters, 'run', service, ctxDataProvider, this.viewContainer ?? undefined);
|
|
970
|
-
ctx.dataProviderSource = dataProviderSource;
|
|
893
|
+
const ctxDataProvider = actionExecutionSelectDataProvider(action, undefined, this.viewContainer);
|
|
894
|
+
const ctx = new ActionContext(this.injector, instance, parameters, 'run', (this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider.dataProvider) ?? undefined), ctxDataProvider.dataProvider, this.viewContainer ?? undefined);
|
|
895
|
+
ctx.dataProviderSource = ctxDataProvider.source;
|
|
971
896
|
ctx.previousActionInstance = previousActionInstance;
|
|
972
897
|
instance.newContext(ctx);
|
|
973
898
|
return ctx;
|
|
@@ -1345,10 +1270,10 @@ class RootActionExecutorService extends ActionExecutorService {
|
|
|
1345
1270
|
get instances() {
|
|
1346
1271
|
return this._instances;
|
|
1347
1272
|
}
|
|
1348
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1349
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: RootActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1274
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: RootActionExecutorService }); }
|
|
1350
1275
|
}
|
|
1351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: RootActionExecutorService, decorators: [{
|
|
1352
1277
|
type: Injectable
|
|
1353
1278
|
}] });
|
|
1354
1279
|
|
|
@@ -1360,10 +1285,10 @@ class ComponentActionExecutorService extends ActionExecutorService {
|
|
|
1360
1285
|
get instances() {
|
|
1361
1286
|
return this.rootActionExecutorService.instances;
|
|
1362
1287
|
}
|
|
1363
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1364
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1289
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentActionExecutorService }); }
|
|
1365
1290
|
}
|
|
1366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentActionExecutorService, decorators: [{
|
|
1367
1292
|
type: Injectable
|
|
1368
1293
|
}] });
|
|
1369
1294
|
|
|
@@ -1537,7 +1462,7 @@ class ActionComponent {
|
|
|
1537
1462
|
const routePermissions = this.routePermissions();
|
|
1538
1463
|
if (typeof action.permissions !== 'undefined' || typeof routePermissions !== 'undefined') {
|
|
1539
1464
|
this.isPermittedSubscription?.unsubscribe();
|
|
1540
|
-
const permissions = action.permissions && routePermissions ? Permissions.All.of(routePermissions, action.permissions) : routePermissions ?? action.permissions;
|
|
1465
|
+
const permissions = action.permissions && routePermissions ? Permissions.All.of(routePermissions, action.permissions) : (routePermissions ?? action.permissions);
|
|
1541
1466
|
this.isVisibleSubscription = this.authorization.isActionVisible(permissions, context, this.route().snapshot).subscribe({
|
|
1542
1467
|
next: res => this.isPermitted.set(res)
|
|
1543
1468
|
});
|
|
@@ -1610,13 +1535,13 @@ class ActionComponent {
|
|
|
1610
1535
|
}
|
|
1611
1536
|
return menuItems;
|
|
1612
1537
|
}
|
|
1613
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1614
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
1538
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i3.TranslateService }, { token: i3$1.PermissionService }, { token: ActionExecutorService }, { token: ViewContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1539
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ActionComponent, isStandalone: true, selector: "mng-action", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: false, transformFunction: null }, dataListParams: { classPropertyName: "dataListParams", publicName: "dataListParams", isSignal: true, isRequired: false, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, hostComponent: { classPropertyName: "hostComponent", publicName: "hostComponent", isSignal: true, isRequired: false, transformFunction: null }, routeInit: { classPropertyName: "routeInit", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, inputDisabled: { classPropertyName: "inputDisabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputLoading: { classPropertyName: "inputLoading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { finish: "finish" }, host: { properties: { "class": "hostClass()", "class.m-0": "isHostHidden()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "subactionsMenu", first: true, predicate: Menu, descendants: true, isSignal: true }], ngImport: i0, template: "@if (isVisible() && isPermitted()) {\n @if (actionLink(); as actionLink) {\n @if (actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"label()\"\n [icon]=\"$any(action().button.icon)\"\n [iconPos]=\"action().button.iconPosition\"\n [href]=\"!isEnabled() || inputDisabled() ? null : (actionLink.url | mngParametrize: itemId() : item() : actionData())\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass()\"></a>\n } @else {\n <a\n pButton\n pRipple\n [icon]=\"$any(action().button.icon)\"\n [iconPos]=\"action().button.iconPosition\"\n [label]=\"label()\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"!isEnabled() || inputDisabled() ? null : (actionLink.pathSegments | mngParametrize: itemId() : item() : actionData())\"\n [relativeTo]=\"route()\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId() : item() : actionData()\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass()\"></a>\n }\n } @else if (action().component || action().componentFromDi) {\n <ng-container\n [mngComponent]=\"action().component\"\n [injectionToken]=\"action().componentFromDi\"\n [inputs]=\"{\n action: action(),\n item: item(),\n itemId: itemId(),\n actionData: actionData(),\n enabled: isEnabled(),\n loading: loading()\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n } @else if (action().subactions.length > 0 && !action().subactionsAsMenu) {\n <p-splitButton\n [icon]=\"action().button.icon ?? undefined\"\n [iconPos]=\"action().button.iconPosition\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (onClick)=\"triggerAction(action())\"\n [class]=\"buttonClass()\"\n [model]=\"subactions()\">\n </p-splitButton>\n } @else {\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action().button.icon)\"\n [iconPos]=\"action().button.iconPosition\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [loading]=\"loading() || inputLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (click)=\"triggerAction(action(), undefined, $event)\"\n [class]=\"buttonClass()\"></button>\n <p-menu #subactionsMenu [model]=\"subactions()\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n}\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: 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", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: SplitButtonModule }, { kind: "component", type: i9.SplitButton, selector: "p-splitButton", inputs: ["model", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "icon", "iconPos", "label", "tooltip", "tooltipOptions", "style", "styleClass", "menuStyle", "menuStyleClass", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps", "autofocus", "disabled", "tabindex", "menuButtonDisabled", "buttonDisabled"], outputs: ["onClick", "onMenuHide", "onMenuShow", "onDropdownClick"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: 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 }); }
|
|
1615
1540
|
}
|
|
1616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionComponent, decorators: [{
|
|
1617
1542
|
type: Component,
|
|
1618
1543
|
args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, ButtonModule, RippleModule, TooltipModule, ParametrizePipe, ComponentDirective, SplitButtonModule, MenuModule], providers: [provideActionExecutor()], host: { '[class]': 'hostClass()', '[class.m-0]': 'isHostHidden()' }, template: "@if (isVisible() && isPermitted()) {\n @if (actionLink(); as actionLink) {\n @if (actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"label()\"\n [icon]=\"$any(action().button.icon)\"\n [iconPos]=\"action().button.iconPosition\"\n [href]=\"!isEnabled() || inputDisabled() ? null : (actionLink.url | mngParametrize: itemId() : item() : actionData())\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass()\"></a>\n } @else {\n <a\n pButton\n pRipple\n [icon]=\"$any(action().button.icon)\"\n [iconPos]=\"action().button.iconPosition\"\n [label]=\"label()\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"!isEnabled() || inputDisabled() ? null : (actionLink.pathSegments | mngParametrize: itemId() : item() : actionData())\"\n [relativeTo]=\"route()\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId() : item() : actionData()\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass()\"></a>\n }\n } @else if (action().component || action().componentFromDi) {\n <ng-container\n [mngComponent]=\"action().component\"\n [injectionToken]=\"action().componentFromDi\"\n [inputs]=\"{\n action: action(),\n item: item(),\n itemId: itemId(),\n actionData: actionData(),\n enabled: isEnabled(),\n loading: loading()\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n } @else if (action().subactions.length > 0 && !action().subactionsAsMenu) {\n <p-splitButton\n [icon]=\"action().button.icon ?? undefined\"\n [iconPos]=\"action().button.iconPosition\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (onClick)=\"triggerAction(action())\"\n [class]=\"buttonClass()\"\n [model]=\"subactions()\">\n </p-splitButton>\n } @else {\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action().button.icon)\"\n [iconPos]=\"action().button.iconPosition\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button.tooltipPosition ?? undefined\"\n [loading]=\"loading() || inputLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (click)=\"triggerAction(action(), undefined, $event)\"\n [class]=\"buttonClass()\"></button>\n <p-menu #subactionsMenu [model]=\"subactions()\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n}\n", styles: [":host{display:inline-block}\n"] }]
|
|
1619
|
-
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type:
|
|
1544
|
+
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i3.TranslateService }, { type: i3$1.PermissionService }, { type: ActionExecutorService }, { type: ViewContainer, decorators: [{
|
|
1620
1545
|
type: Optional
|
|
1621
1546
|
}] }] });
|
|
1622
1547
|
|
|
@@ -1663,8 +1588,8 @@ class EditorAutoSaveStatusComponent {
|
|
|
1663
1588
|
}
|
|
1664
1589
|
});
|
|
1665
1590
|
}
|
|
1666
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1667
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
1591
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EditorAutoSaveStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1592
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: EditorAutoSaveStatusComponent, isStandalone: true, selector: "mng-editor-auto-save-status", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1668
1593
|
<span>
|
|
1669
1594
|
@if (icon(); as icon) {
|
|
1670
1595
|
<i [class]="icon"></i>
|
|
@@ -1674,9 +1599,9 @@ class EditorAutoSaveStatusComponent {
|
|
|
1674
1599
|
<span [innerHTML]="label | translate: {timestamp: status()?.timestamp | date: timestampDateFormat()}"></span>
|
|
1675
1600
|
}
|
|
1676
1601
|
</span>
|
|
1677
|
-
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type:
|
|
1602
|
+
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1678
1603
|
}
|
|
1679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EditorAutoSaveStatusComponent, decorators: [{
|
|
1680
1605
|
type: Component,
|
|
1681
1606
|
args: [{
|
|
1682
1607
|
standalone: true,
|
|
@@ -1709,7 +1634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
1709
1634
|
* @return {string} - The generated autosave editor key.
|
|
1710
1635
|
*/
|
|
1711
1636
|
function generateAutosaveEditorKey(descriptor, item, url, opts) {
|
|
1712
|
-
const autoSaveIdentifier = descriptor.autoSaveIdentifier ?? url;
|
|
1637
|
+
const autoSaveIdentifier = descriptor.autoSaveIdentifier ?? url.split('?')[0].split('#')[0];
|
|
1713
1638
|
const editorId = generateEditorId(descriptor, opts?.editorId);
|
|
1714
1639
|
const itemId = generateItemId(descriptor, item, opts?.itemId);
|
|
1715
1640
|
return `autoSave~~${editorId}${itemId}~~${autoSaveIdentifier}`;
|
|
@@ -2240,10 +2165,10 @@ class FormEditorService {
|
|
|
2240
2165
|
init(formComponent) {
|
|
2241
2166
|
this._formComponent = formComponent;
|
|
2242
2167
|
}
|
|
2243
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
2244
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
2168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormEditorService, deps: [{ token: FormEditorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2169
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormEditorService }); }
|
|
2245
2170
|
}
|
|
2246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
2171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormEditorService, decorators: [{
|
|
2247
2172
|
type: Injectable
|
|
2248
2173
|
}], ctorParameters: () => [{ type: FormEditorService }] });
|
|
2249
2174
|
function provideFormComponent() {
|
|
@@ -2362,16 +2287,6 @@ class FormEditorComponent {
|
|
|
2362
2287
|
this._formlyStateDisabledSubject.next(this._formlyOptions.formState.disabled);
|
|
2363
2288
|
});
|
|
2364
2289
|
});
|
|
2365
|
-
effect(() => {
|
|
2366
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2367
|
-
const key = this.autoSaveStorageKey();
|
|
2368
|
-
untracked(() => {
|
|
2369
|
-
this.autoSaveStopValueChangeListen();
|
|
2370
|
-
this.autoSaveLoadSavedFromStorage();
|
|
2371
|
-
this.autoSaveStartEventChangeListen(this.autoSaveStorageKeyCompInit);
|
|
2372
|
-
this.autoSaveStorageKeyCompInit = false;
|
|
2373
|
-
});
|
|
2374
|
-
});
|
|
2375
2290
|
afterNextRender(() => {
|
|
2376
2291
|
if (this.autofocusEnabled()) {
|
|
2377
2292
|
setTimeout(() => {
|
|
@@ -2427,12 +2342,16 @@ class FormEditorComponent {
|
|
|
2427
2342
|
formValue: () => this.getFormValue()
|
|
2428
2343
|
});
|
|
2429
2344
|
});
|
|
2345
|
+
}
|
|
2346
|
+
ngAfterViewInit() {
|
|
2430
2347
|
// mark form as pristine, should be done in next event hook to allow formly to initialize first
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2348
|
+
this._form.markAsPristine();
|
|
2349
|
+
this.autoSaveLoadSavedFromStorage();
|
|
2350
|
+
this.autoSaveStartEventChangeListen(this.autoSaveStorageKeyCompInit);
|
|
2351
|
+
this.autoSaveStorageKeyCompInit = false;
|
|
2434
2352
|
}
|
|
2435
2353
|
ngOnDestroy() {
|
|
2354
|
+
this.autoSaveStopValueChangeListen();
|
|
2436
2355
|
// emit lifecycle event
|
|
2437
2356
|
this.descriptor().nextEvent(FormEventTypeEnum.ComponentLifecycle, this, {
|
|
2438
2357
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
@@ -2462,7 +2381,7 @@ class FormEditorComponent {
|
|
|
2462
2381
|
const formFields = this._formlyFields;
|
|
2463
2382
|
if (formFields[0].type === 'tabs' && formFields[0].fieldGroup) {
|
|
2464
2383
|
for (const tab of formFields[0].fieldGroup) {
|
|
2465
|
-
this._formlyOptions.formState['tab_' + (tab.id ? tab.id : tab.key ?? '') + '_invalid'] = this.isAnyFieldInvalid(tab.fieldGroup);
|
|
2384
|
+
this._formlyOptions.formState['tab_' + (tab.id ? tab.id : (tab.key ?? '')) + '_invalid'] = this.isAnyFieldInvalid(tab.fieldGroup);
|
|
2466
2385
|
}
|
|
2467
2386
|
}
|
|
2468
2387
|
const event = { success: false, formItem: formSubmitItem };
|
|
@@ -2598,6 +2517,7 @@ class FormEditorComponent {
|
|
|
2598
2517
|
*/
|
|
2599
2518
|
onAutoSaveDismiss() {
|
|
2600
2519
|
if (this.autoSaveStorageKey()) {
|
|
2520
|
+
this.autoSaveStopValueChangeListen();
|
|
2601
2521
|
const restore = this.autoSaveRestore();
|
|
2602
2522
|
if (this.autoSaveStatusSubject.value.state === 'preview' && restore?.original) {
|
|
2603
2523
|
this.resetFormModel(restore.original);
|
|
@@ -2673,21 +2593,19 @@ class FormEditorComponent {
|
|
|
2673
2593
|
if (!this.descriptor().autoSave) {
|
|
2674
2594
|
return;
|
|
2675
2595
|
}
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
}, init ? 0 : 500 // delay initial event listening for all the initializations to take place
|
|
2690
|
-
);
|
|
2596
|
+
if (!this.autoSaveEventsSubscription) {
|
|
2597
|
+
this.autoSaveEventsSubscription = of(void 0)
|
|
2598
|
+
.pipe(delay(init ? 0 : 500), // delay initial event listening for all the initializations to take place
|
|
2599
|
+
switchMap(() => this._form.valueChanges), debounceTime(250), distinctUntilChanged(),
|
|
2600
|
+
// skip first one on init
|
|
2601
|
+
tap(() => {
|
|
2602
|
+
if (this.autoSaveStatusSubject.value.state !== 'saved' && this.autoSaveStatusSubject.value.state !== 'preview')
|
|
2603
|
+
this.autoSaveStatusSubject.next({ ...this.autoSaveStatusSubject.value, state: 'saving' });
|
|
2604
|
+
}), debounceTime(750))
|
|
2605
|
+
.subscribe(() => {
|
|
2606
|
+
this.autoSaveSaveToStorage();
|
|
2607
|
+
});
|
|
2608
|
+
}
|
|
2691
2609
|
}
|
|
2692
2610
|
autoSaveStopValueChangeListen() {
|
|
2693
2611
|
this.autoSaveEventsSubscription?.unsubscribe();
|
|
@@ -2713,12 +2631,12 @@ class FormEditorComponent {
|
|
|
2713
2631
|
this.autoSaveRestore.set(this.commonsStorageService.getItem(this.cmpTypeName, this.autoSaveStorageKey()) ?? null);
|
|
2714
2632
|
}
|
|
2715
2633
|
}
|
|
2716
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
2717
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
2634
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2635
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null }, editorId: { classPropertyName: "editorId", publicName: "editorId", isSignal: true, isRequired: false, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, showAutoSaveStatus: { classPropertyName: "showAutoSaveStatus", publicName: "showAutoSaveStatus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { item: "itemChange", formSubmit: "formSubmit", valueChange: "valueChange", autoSaveStatus: "autoSaveStatus" }, providers: [provideFormComponent()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }, { propertyName: "focusThiefElRef", first: true, predicate: ["focusThiefInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2718
2636
|
}
|
|
2719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
2637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2720
2638
|
type: Component,
|
|
2721
|
-
args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule,
|
|
2639
|
+
args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, ButtonModule, TranslateModule, DatePipe, EditorAutoSaveStatusComponent], providers: [provideFormComponent()], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n" }]
|
|
2722
2640
|
}], ctorParameters: () => [] });
|
|
2723
2641
|
|
|
2724
2642
|
class ActionEditorInjectorContextComponent {
|
|
@@ -2745,7 +2663,7 @@ class ActionEditorInjectorContextComponent {
|
|
|
2745
2663
|
this.item = signal(undefined);
|
|
2746
2664
|
this.itemId = signal(undefined);
|
|
2747
2665
|
this.actionData = signal(undefined);
|
|
2748
|
-
this.editorAction =
|
|
2666
|
+
this.editorAction = computed(() => this.data().descriptor);
|
|
2749
2667
|
// actions
|
|
2750
2668
|
this.actions = computed(() => {
|
|
2751
2669
|
const actions = [];
|
|
@@ -2787,26 +2705,36 @@ class ActionEditorInjectorContextComponent {
|
|
|
2787
2705
|
this.footerRightActions = computed(() => this.actions()
|
|
2788
2706
|
.filter(a => a.position === ActionPositionEnum.FooterRight)
|
|
2789
2707
|
.reverse());
|
|
2790
|
-
this.dataProvider = computed(() => this.data().dataProvider ?? this.viewContainer?.dataProvider());
|
|
2791
2708
|
this.loading = signal(false);
|
|
2792
2709
|
this.formValue = signal(undefined);
|
|
2793
2710
|
this.submitLoading = signal(false);
|
|
2794
2711
|
this.autoSaveStatus = signal(undefined);
|
|
2795
|
-
//
|
|
2796
|
-
|
|
2797
|
-
|
|
2712
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2713
|
+
this.#dataEffect = effectWithDeps([this.data], ([data]) => {
|
|
2714
|
+
this.item.set(data.item);
|
|
2715
|
+
this.itemId.set(data.itemId);
|
|
2716
|
+
this.actionData.set(data.actionData);
|
|
2717
|
+
if (data.actionInstance) {
|
|
2718
|
+
this.processActionInstance(data.actionInstance);
|
|
2719
|
+
}
|
|
2720
|
+
// notify executor to for activation to end
|
|
2721
|
+
this.processActionInstance(this.actionExecutor.onActionEditorInit(this.editorAction(), this.instance, this));
|
|
2722
|
+
}, { firstOnly: true });
|
|
2723
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2724
|
+
this.#hasTitleEffect = effectWithDeps([this.hasTitle], ([hasTitle]) => {
|
|
2798
2725
|
if (!hasTitle) {
|
|
2799
2726
|
this.title.set(undefined);
|
|
2800
2727
|
}
|
|
2801
2728
|
else {
|
|
2802
|
-
this
|
|
2803
|
-
this
|
|
2729
|
+
this.#titleSubscription?.unsubscribe();
|
|
2730
|
+
this.#titleSubscription = getI18nActionEditorTitleAsync(this.translate, this.editorAction(), this.item()).subscribe(t => {
|
|
2804
2731
|
this.title.set(t ?? undefined);
|
|
2805
2732
|
});
|
|
2806
2733
|
}
|
|
2807
|
-
}
|
|
2808
|
-
|
|
2809
|
-
|
|
2734
|
+
});
|
|
2735
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2736
|
+
this.#titleUpdateSubscription = toObservable$1(this.hasTitle)
|
|
2737
|
+
.pipe(combineLatestWith(toObservable$1(this.editorAction), toObservable$1(this.item)), mergeMap$1(([hasTitle, editorAction, item]) => (hasTitle ? getI18nActionEditorTitleAsync(this.translate, editorAction, item) : of(undefined))), takeUntilDestroyed())
|
|
2810
2738
|
.subscribe(title => {
|
|
2811
2739
|
this.title.set(title ?? undefined);
|
|
2812
2740
|
const dataDialogConfig = this.data().dialogConfig;
|
|
@@ -2817,35 +2745,49 @@ class ActionEditorInjectorContextComponent {
|
|
|
2817
2745
|
this.commonsService.setPageTitle(title ?? undefined);
|
|
2818
2746
|
}
|
|
2819
2747
|
});
|
|
2820
|
-
//
|
|
2821
|
-
this.viewContainer
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2748
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2749
|
+
this.#viewContainerEditorResetSubscription = this.viewContainer
|
|
2750
|
+
? toObservable$1(this.editorAction)
|
|
2751
|
+
.pipe(switchMap(a => (a.isTableviewMainEditor ? (this.viewContainer?.editorReset$ ?? NEVER) : NEVER)), takeUntilDestroyed())
|
|
2752
|
+
.subscribe({
|
|
2753
|
+
next: e => this.onEditorReset(e)
|
|
2754
|
+
})
|
|
2755
|
+
: undefined;
|
|
2756
|
+
this.#viewContainerEditorCloseSubscription = this.viewContainer
|
|
2757
|
+
? toObservable$1(this.editorAction)
|
|
2758
|
+
.pipe(switchMap(a => (a.isTableviewMainEditor ? (this.viewContainer?.editorClose$ ?? NEVER) : NEVER)), takeUntilDestroyed())
|
|
2759
|
+
.subscribe({
|
|
2760
|
+
next: () => this.cancel()
|
|
2761
|
+
})
|
|
2762
|
+
: undefined;
|
|
2763
|
+
this.#dataProviderEditorResetSubscription = toObservable$1(this.editorAction)
|
|
2764
|
+
.pipe(switchMap(action => action.dataProvider?.editorReset$ ?? NEVER), takeUntilDestroyed())
|
|
2826
2765
|
.subscribe({
|
|
2827
2766
|
next: e => this.onEditorReset(e)
|
|
2828
2767
|
});
|
|
2829
|
-
this.viewContainer
|
|
2830
|
-
|
|
2831
|
-
this.
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
const data = this.data();
|
|
2837
|
-
this.editorAction.set(data.descriptor);
|
|
2838
|
-
this.item.set(data.item);
|
|
2839
|
-
this.itemId.set(data.itemId);
|
|
2840
|
-
this.actionData.set(data.actionData);
|
|
2841
|
-
if (data.actionInstance) {
|
|
2842
|
-
this.processActionInstance(data.actionInstance);
|
|
2843
|
-
}
|
|
2844
|
-
// notify executor to for activation to end
|
|
2845
|
-
this.processActionInstance(this.actionExecutor.onActionEditorInit(this.editorAction(), this.instance, this));
|
|
2768
|
+
this.#viewContainerDataProviderEditorResetSubscription = this.viewContainer
|
|
2769
|
+
? toObservable$1(this.viewContainer.dataProvider)
|
|
2770
|
+
.pipe(combineLatestWith(toObservable$1(this.editorAction)), switchMap(([dataProvider, action]) => action.isTableviewMainEditor && action.dataProvider == null ? (dataProvider?.editorReset$ ?? NEVER) : NEVER), takeUntilDestroyed())
|
|
2771
|
+
.subscribe({
|
|
2772
|
+
next: e => this.onEditorReset(e)
|
|
2773
|
+
})
|
|
2774
|
+
: undefined;
|
|
2846
2775
|
}
|
|
2776
|
+
// subscriptions and effects
|
|
2777
|
+
#titleSubscription;
|
|
2778
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2779
|
+
#dataEffect;
|
|
2780
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2781
|
+
#hasTitleEffect;
|
|
2782
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2783
|
+
#titleUpdateSubscription;
|
|
2784
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2785
|
+
#viewContainerEditorResetSubscription;
|
|
2786
|
+
#viewContainerEditorCloseSubscription;
|
|
2787
|
+
#dataProviderEditorResetSubscription;
|
|
2788
|
+
#viewContainerDataProviderEditorResetSubscription;
|
|
2847
2789
|
ngOnDestroy() {
|
|
2848
|
-
this
|
|
2790
|
+
this.#titleSubscription?.unsubscribe();
|
|
2849
2791
|
this.fetchExecutionSubscription?.unsubscribe();
|
|
2850
2792
|
this.submitExecutionSubscription?.unsubscribe();
|
|
2851
2793
|
const instance = this.instance;
|
|
@@ -2866,7 +2808,7 @@ class ActionEditorInjectorContextComponent {
|
|
|
2866
2808
|
if (this.editorAction().editorDescriptor.isLocalized) {
|
|
2867
2809
|
actionParameters.locale = this.commonsService.getDefaultLocale();
|
|
2868
2810
|
}
|
|
2869
|
-
const context = this.actionExecutor.prepareContextForEditorSubmit(this.editorAction(), actionParameters, this.
|
|
2811
|
+
const context = this.actionExecutor.prepareContextForEditorSubmit(this.editorAction(), actionParameters, this.data().dataProvider, this.instance, this.data().previousActionInstance);
|
|
2870
2812
|
this.submitExecutionSubscription?.unsubscribe();
|
|
2871
2813
|
this.submitExecutionSubscription = context.execution$.pipe(take$1(1)).subscribe({
|
|
2872
2814
|
next: res => {
|
|
@@ -2928,7 +2870,7 @@ class ActionEditorInjectorContextComponent {
|
|
|
2928
2870
|
if (typeof this.instance?.previousInstance?.result !== 'undefined') {
|
|
2929
2871
|
actionParameters.submitResult = this.instance?.previousInstance?.result;
|
|
2930
2872
|
}
|
|
2931
|
-
const context = this.actionExecutor.prepareContextForEditorFetch(this.editorAction(), actionParameters, this.
|
|
2873
|
+
const context = this.actionExecutor.prepareContextForEditorFetch(this.editorAction(), actionParameters, this.data().dataProvider, this.instance, this.data().previousActionInstance);
|
|
2932
2874
|
this.fetchExecutionSubscription?.unsubscribe();
|
|
2933
2875
|
this.fetchExecutionSubscription = context.execution$.pipe(take$1(1)).subscribe(res => {
|
|
2934
2876
|
this.updateItem(res ?? undefined);
|
|
@@ -3078,13 +3020,13 @@ class ActionEditorInjectorContextComponent {
|
|
|
3078
3020
|
this.formEditorCmp()?.resetFormModel();
|
|
3079
3021
|
}
|
|
3080
3022
|
}
|
|
3081
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3082
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
3023
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3024
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionRun: "actionRun", actionCancel: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [editorId]=\"editorAction().actionNameLong\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"\n [isFormDisabled]=\"isFormDisabled()\"\n showAutoSaveStatus=\"false\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\"\n (autoSaveStatus)=\"onAutoSave($event)\" />\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between align-items-center mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n @if (editorAction().editorDescriptor.autoSave) {\n <mng-editor-auto-save-status [status]=\"autoSaveStatus()\"></mng-editor-auto-save-status>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$2.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled", "editorId", "itemId", "showAutoSaveStatus"], outputs: ["itemChange", "formSubmit", "valueChange", "autoSaveStatus"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3083
3025
|
}
|
|
3084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
|
|
3085
3027
|
type: Component,
|
|
3086
|
-
args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent,
|
|
3087
|
-
}],
|
|
3028
|
+
args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent, ToolbarModule, EditorAutoSaveStatusComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [editorId]=\"editorAction().actionNameLong\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"\n [isFormDisabled]=\"isFormDisabled()\"\n showAutoSaveStatus=\"false\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\"\n (autoSaveStatus)=\"onAutoSave($event)\" />\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between align-items-center mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n @if (editorAction().editorDescriptor.autoSave) {\n <mng-editor-auto-save-status [status]=\"autoSaveStatus()\"></mng-editor-auto-save-status>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"] }]
|
|
3029
|
+
}], propDecorators: { beforeWindowUnload: [{
|
|
3088
3030
|
type: HostListener,
|
|
3089
3031
|
args: ['window:beforeunload']
|
|
3090
3032
|
}], onEscapePressed: [{
|
|
@@ -3165,10 +3107,10 @@ class ActionEditorComponent {
|
|
|
3165
3107
|
triggerSubmit() {
|
|
3166
3108
|
this.actionEditorWInjContextCmp?.triggerSubmit();
|
|
3167
3109
|
}
|
|
3168
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3169
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.
|
|
3110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", type: ActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: false, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionRun: "actionRun", actionCancel: "actionCancel" }, ngImport: i0, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData()\n }\"\n [parentInjector]=\"parentInjector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n", dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3170
3112
|
}
|
|
3171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionEditorComponent, decorators: [{
|
|
3172
3114
|
type: Component,
|
|
3173
3115
|
args: [{ standalone: true, selector: 'mng-action-editor', imports: [ComponentDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData()\n }\"\n [parentInjector]=\"parentInjector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n" }]
|
|
3174
3116
|
}], ctorParameters: () => [] });
|
|
@@ -3191,10 +3133,10 @@ class DataLanguageDropdownComponent {
|
|
|
3191
3133
|
this.commons.setAppDataLocale(dataLang);
|
|
3192
3134
|
this.viewContainer?.reloadTable({});
|
|
3193
3135
|
}
|
|
3194
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3195
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.
|
|
3136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DataLanguageDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3137
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", type: DataLanguageDropdownComponent, isStandalone: true, selector: "mng-data-language-dropdown", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: true, transformFunction: null }, enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { trigger: "trigger" }, ngImport: i0, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider()\" [ngModel]=\"commons.appDataLocale()\" [showClear]=\"false\" (valueChange)=\"updateDataLocale($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", "loading", "disabled", "allowInput", "appendTo", "inlineSearch", "searchTrim"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3196
3138
|
}
|
|
3197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DataLanguageDropdownComponent, decorators: [{
|
|
3198
3140
|
type: Component,
|
|
3199
3141
|
args: [{ standalone: true, selector: 'mng-data-language-dropdown', imports: [DropdownComponent, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider()\" [ngModel]=\"commons.appDataLocale()\" [showClear]=\"false\" (valueChange)=\"updateDataLocale($event)\"></mng-dropdown>\n" }]
|
|
3200
3142
|
}] });
|
|
@@ -3326,10 +3268,10 @@ class ActionRouteComponent {
|
|
|
3326
3268
|
this.instanceStateSubscription?.unsubscribe();
|
|
3327
3269
|
this.instanceReactivationSubscription?.unsubscribe();
|
|
3328
3270
|
}
|
|
3329
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3330
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
3271
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3272
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: ActionRouteComponent, isStandalone: true, selector: "mng-action-route", providers: [provideActionExecutor()], ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3331
3273
|
}
|
|
3332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionRouteComponent, decorators: [{
|
|
3333
3275
|
type: Component,
|
|
3334
3276
|
args: [{ standalone: true, selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "" }]
|
|
3335
3277
|
}] });
|
|
@@ -3450,12 +3392,12 @@ class ActionTableComponent {
|
|
|
3450
3392
|
this.reload();
|
|
3451
3393
|
}
|
|
3452
3394
|
}
|
|
3453
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3454
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
3395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3396
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ActionTableComponent, isStandalone: true, selector: "mng-action-table", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, useQueryParams: { classPropertyName: "useQueryParams", publicName: "useQueryParams", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectionEnabled: { classPropertyName: "selectionEnabled", publicName: "selectionEnabled", isSignal: true, isRequired: false, transformFunction: null }, globalFilterFields: { classPropertyName: "globalFilterFields", publicName: "globalFilterFields", isSignal: true, isRequired: false, transformFunction: null }, rowReorderEnabled: { classPropertyName: "rowReorderEnabled", publicName: "rowReorderEnabled", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, captionComponent: { classPropertyName: "captionComponent", publicName: "captionComponent", isSignal: true, isRequired: false, transformFunction: null }, columnActionComponent: { classPropertyName: "columnActionComponent", publicName: "columnActionComponent", isSignal: true, isRequired: false, transformFunction: null }, columnActionMinWidthInput: { classPropertyName: "columnActionMinWidthInput", publicName: "columnActionMinWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tableLoad: "tableLoad", selectionChange: "selectionChange", captionComponentInstance: "captionComponentInstance", columnActionComponentInstance: "columnActionComponentInstance", rowReorder: "rowReorder" }, providers: [provideActionExecutor()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "components", predicate: (QueryList), descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: TableComponent, descendants: true, isSignal: 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 [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n [rowReorderEnabled]=\"rowReorderEnabled()\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionComponentInstance.emit($event)\"\n (columnCustomLastComponentInstance)=\"columnActionComponentInstance.emit($event)\"\n (rowReorder)=\"onRowReorder($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", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { 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 }); }
|
|
3455
3397
|
}
|
|
3456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ActionTableComponent, decorators: [{
|
|
3457
3399
|
type: Component,
|
|
3458
|
-
args: [{ standalone: true, selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TemplateDirective, NgTemplateOutlet
|
|
3400
|
+
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 [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n [rowReorderEnabled]=\"rowReorderEnabled()\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionComponentInstance.emit($event)\"\n (columnCustomLastComponentInstance)=\"columnActionComponentInstance.emit($event)\"\n (rowReorder)=\"onRowReorder($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" }]
|
|
3459
3401
|
}], ctorParameters: () => [] });
|
|
3460
3402
|
|
|
3461
3403
|
const unsavedChangesGuard = (component) => {
|
|
@@ -3493,10 +3435,10 @@ class DefaultDataProviderExecutor extends DataProviderExecutor {
|
|
|
3493
3435
|
runDelete(ctx, fallback) {
|
|
3494
3436
|
return fallback ? runFnFromDataProviderOrFallback(ctx, runDeleteFromDataProvider, fallback) : runDeleteFromDataProvider(ctx);
|
|
3495
3437
|
}
|
|
3496
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3497
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
3438
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DefaultDataProviderExecutor, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3439
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DefaultDataProviderExecutor }); }
|
|
3498
3440
|
}
|
|
3499
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DefaultDataProviderExecutor, decorators: [{
|
|
3500
3442
|
type: Injectable
|
|
3501
3443
|
}] });
|
|
3502
3444
|
|
|
@@ -3505,6 +3447,7 @@ class ACommonsFormlyFieldType extends FieldType {
|
|
|
3505
3447
|
constructor() {
|
|
3506
3448
|
super(...arguments);
|
|
3507
3449
|
this.destroyRef = inject(DestroyRef);
|
|
3450
|
+
this.cd = inject(ChangeDetectorRef);
|
|
3508
3451
|
this.formStateDisabledSubject = new BehaviorSubject(false);
|
|
3509
3452
|
this.formStateDisabled$ = this.formStateDisabledSubject.asObservable();
|
|
3510
3453
|
}
|
|
@@ -3531,10 +3474,10 @@ class ACommonsFormlyFieldType extends FieldType {
|
|
|
3531
3474
|
.pipe(startWith(this.formState.disabled ?? false), takeUntilDestroyed(this.destroyRef))
|
|
3532
3475
|
.subscribe(value => this.formStateDisabledSubject.next(value));
|
|
3533
3476
|
}
|
|
3534
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3535
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.
|
|
3477
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ACommonsFormlyFieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3478
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: ACommonsFormlyFieldType, usesInheritance: true, ngImport: i0 }); }
|
|
3536
3479
|
}
|
|
3537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ACommonsFormlyFieldType, decorators: [{
|
|
3538
3481
|
type: Directive
|
|
3539
3482
|
}] });
|
|
3540
3483
|
|
|
@@ -3579,10 +3522,10 @@ class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
|
|
|
3579
3522
|
this.actionMessage = res.message;
|
|
3580
3523
|
}
|
|
3581
3524
|
}
|
|
3582
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3583
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
3525
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3526
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button.icon)\"\n [label]=\"$any(descriptor.button.label === null ? null : descriptor.button.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n @if (actionMessage) {\n <p-message [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.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$1.UIMessage, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3584
3527
|
}
|
|
3585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldActionComponent, decorators: [{
|
|
3586
3529
|
type: Component,
|
|
3587
3530
|
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" }]
|
|
3588
3531
|
}] });
|
|
@@ -3612,12 +3555,12 @@ class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
|
|
|
3612
3555
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3613
3556
|
});
|
|
3614
3557
|
}
|
|
3615
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3616
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
3558
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3559
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-autocomplete'\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n</mng-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "optionsTrackProperty", "optionsValueProperty", "optionsLabelProperty", "optionsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst", "searchTrim", "disabled"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3617
3560
|
}
|
|
3618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
|
|
3619
3562
|
type: Component,
|
|
3620
|
-
args: [{ standalone: true, selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-autocomplete'\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n" }]
|
|
3563
|
+
args: [{ standalone: true, selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, FormlyModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-autocomplete'\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n</mng-autocomplete>\n" }]
|
|
3621
3564
|
}] });
|
|
3622
3565
|
|
|
3623
3566
|
class FormlyFieldCustomComponent extends ACommonsFormlyFieldType {
|
|
@@ -3641,10 +3584,10 @@ class FormlyFieldCustomComponent extends ACommonsFormlyFieldType {
|
|
|
3641
3584
|
...this.descriptor.customComponentInputs
|
|
3642
3585
|
};
|
|
3643
3586
|
}
|
|
3644
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3645
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
3587
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3588
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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", "parentInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3646
3589
|
}
|
|
3647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldCustomComponent, decorators: [{
|
|
3648
3591
|
type: Component,
|
|
3649
3592
|
args: [{
|
|
3650
3593
|
standalone: true,
|
|
@@ -3675,12 +3618,12 @@ class FormlyFieldDropdownComponent extends ACommonsFormlyFieldType {
|
|
|
3675
3618
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3676
3619
|
});
|
|
3677
3620
|
}
|
|
3678
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3679
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
3621
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3622
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-dropdown'\">\n</mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur", "loading", "disabled", "allowInput", "appendTo", "inlineSearch", "searchTrim"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3680
3623
|
}
|
|
3681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
|
|
3682
3625
|
type: Component,
|
|
3683
|
-
args: [{ standalone: true, selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\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 ?? 'mng-formly-field-dropdown'\">\n</mng-dropdown>\n" }]
|
|
3626
|
+
args: [{ standalone: true, selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, FormlyModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName ?? 'mng-formly-field-dropdown'\">\n</mng-dropdown>\n" }]
|
|
3684
3627
|
}] });
|
|
3685
3628
|
|
|
3686
3629
|
function getEditorFieldLabel(descriptor, editorDescriptor) {
|
|
@@ -3724,10 +3667,10 @@ class FormlyFieldLabelPipe {
|
|
|
3724
3667
|
transform(value, editorDescriptor) {
|
|
3725
3668
|
return getEditorFieldLabel(value, editorDescriptor) ?? '';
|
|
3726
3669
|
}
|
|
3727
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3728
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.
|
|
3670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3671
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLabelPipe, isStandalone: true, name: "mngFormlyFieldLabel" }); }
|
|
3729
3672
|
}
|
|
3730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLabelPipe, decorators: [{
|
|
3731
3674
|
type: Pipe,
|
|
3732
3675
|
args: [{
|
|
3733
3676
|
standalone: true,
|
|
@@ -3751,10 +3694,10 @@ class FormlyFieldFieldsetComponent extends ACommonsFormlyFieldType {
|
|
|
3751
3694
|
config: f
|
|
3752
3695
|
})));
|
|
3753
3696
|
}
|
|
3754
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3755
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
3697
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3698
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\" [hidden]=\"group.config.props.hidden\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$3.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3756
3699
|
}
|
|
3757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
|
|
3758
3701
|
type: Component,
|
|
3759
3702
|
args: [{ standalone: true, selector: 'mng-formly-field-fieldset', imports: [FieldsetModule, FormlyModule, TranslateModule, FormlyFieldLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\" [hidden]=\"group.config.props.hidden\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n" }]
|
|
3760
3703
|
}] });
|
|
@@ -3906,10 +3849,10 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
3906
3849
|
return 'pi-file';
|
|
3907
3850
|
}
|
|
3908
3851
|
}
|
|
3909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3910
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin ?? NUMBER_MIN_SAFE : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax ?? NUMBER_MAX_SAFE : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"key\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + (descriptor.labelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\">\n </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 ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input 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", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$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$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", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i8$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "variant", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autofocus", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i9$1.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i11.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i12.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3852
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3853
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? (descriptor.numberMin ?? NUMBER_MIN_SAFE) : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? (descriptor.numberMax ?? NUMBER_MAX_SAFE) : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"key\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + (descriptor.labelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [id]=\"$any(key)\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.trimOption\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i1$4.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i8$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "variant", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autofocus", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i9$1.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i11.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i12.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3911
3854
|
}
|
|
3912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
|
|
3913
3856
|
type: Component,
|
|
3914
3857
|
args: [{ standalone: true, selector: 'mng-formly-field-input', imports: [
|
|
3915
3858
|
InputNumberModule,
|
|
@@ -3929,7 +3872,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
3929
3872
|
ComponentDirective,
|
|
3930
3873
|
InputTrimDirective,
|
|
3931
3874
|
FormlyFieldLabelPipe
|
|
3932
|
-
], 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 ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"key\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + (descriptor.labelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\">\n </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 ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n" }]
|
|
3875
|
+
], 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 ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"key\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + (descriptor.labelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [id]=\"$any(key)\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.trimOption\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n" }]
|
|
3933
3876
|
}] });
|
|
3934
3877
|
|
|
3935
3878
|
class FormlyFieldLabelComponent extends ACommonsFormlyFieldType {
|
|
@@ -3941,10 +3884,10 @@ class FormlyFieldLabelComponent extends ACommonsFormlyFieldType {
|
|
|
3941
3884
|
super.ngOnInit();
|
|
3942
3885
|
this.formControl?.patchValue(this.descriptor.label);
|
|
3943
3886
|
}
|
|
3944
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
3945
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
3887
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3888
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldLabelComponent, isStandalone: true, selector: "mng-formly-field-label", host: { properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3946
3889
|
}
|
|
3947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
3890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLabelComponent, decorators: [{
|
|
3948
3891
|
type: Component,
|
|
3949
3892
|
args: [{ standalone: true, selector: 'mng-formly-field-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
|
|
3950
3893
|
}], propDecorators: { className: [{
|
|
@@ -4109,12 +4052,12 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
4109
4052
|
this.fieldLabelFormControl.setValue(value);
|
|
4110
4053
|
}
|
|
4111
4054
|
}
|
|
4112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
4113
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
4055
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4056
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n [class]=\"'p-inputgroup mng-dropdown-dialog' + (descriptor.inputClassName ?? 'mng-formly-field-lookup-dialog')\"\n [class.p-inputtext-sm]=\"descriptor.isSizeSmall\"\n [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input\n pInputText\n type=\"text\"\n [id]=\"$any(key)\"\n [readonly]=\"true\"\n [formlyAttributes]=\"field\"\n [formControl]=\"fieldLabelFormControl\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i2$2.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: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4114
4057
|
}
|
|
4115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
4058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
|
|
4116
4059
|
type: Component,
|
|
4117
|
-
args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [TranslateModule, FormlyModule, ReactiveFormsModule, ButtonModule, RippleModule, DialogModule,
|
|
4060
|
+
args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [TranslateModule, FormlyModule, ReactiveFormsModule, ButtonModule, RippleModule, DialogModule, TableComponent, MessagesModule, InputTextModule], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [class]=\"'p-inputgroup mng-dropdown-dialog' + (descriptor.inputClassName ?? 'mng-formly-field-lookup-dialog')\"\n [class.p-inputtext-sm]=\"descriptor.isSizeSmall\"\n [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input\n pInputText\n type=\"text\"\n [id]=\"$any(key)\"\n [readonly]=\"true\"\n [formlyAttributes]=\"field\"\n [formControl]=\"fieldLabelFormControl\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
4118
4061
|
}], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { table: [{
|
|
4119
4062
|
type: ViewChild,
|
|
4120
4063
|
args: [TableComponent]
|
|
@@ -4320,12 +4263,12 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4320
4263
|
}
|
|
4321
4264
|
return false;
|
|
4322
4265
|
}
|
|
4323
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
4324
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
4266
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4267
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance", "rowReorder"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4325
4268
|
}
|
|
4326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
4269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
|
|
4327
4270
|
type: Component,
|
|
4328
|
-
args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, ActionComponent, ActionTableComponent, TemplateDirective,
|
|
4271
|
+
args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, ActionComponent, ActionTableComponent, TemplateDirective, FormlyFieldLabelPipe], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
4329
4272
|
}] });
|
|
4330
4273
|
|
|
4331
4274
|
class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType {
|
|
@@ -4369,7 +4312,7 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4369
4312
|
this.props.onValueChange?.(this.field, v);
|
|
4370
4313
|
});
|
|
4371
4314
|
this.searchDebounceSubject.pipe(debounceTime(200), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(query => {
|
|
4372
|
-
this.addTableComponent?.primeTable()
|
|
4315
|
+
this.addTableComponent?.primeTable()?.filterGlobal(query, 'contains');
|
|
4373
4316
|
});
|
|
4374
4317
|
}
|
|
4375
4318
|
ngAfterViewInit() {
|
|
@@ -4496,12 +4439,12 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4496
4439
|
this.formControl.setValue(newValue);
|
|
4497
4440
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.RowReorder, this, { dragIndex: event.dragIndex, dropIndex: event.dropIndex });
|
|
4498
4441
|
}
|
|
4499
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
4500
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
4442
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4443
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4501
4444
|
}
|
|
4502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
4445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
4503
4446
|
type: Component,
|
|
4504
|
-
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule,
|
|
4447
|
+
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, FormlyFieldLabelPipe], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
|
|
4505
4448
|
}], propDecorators: { addTableComponent: [{
|
|
4506
4449
|
type: ViewChild,
|
|
4507
4450
|
args: ['addTableComponent']
|
|
@@ -4516,10 +4459,10 @@ class FormlyFieldTabsComponent extends ACommonsFormlyFieldType {
|
|
|
4516
4459
|
super.ngOnInit();
|
|
4517
4460
|
this.fieldGroup.set(this.field.fieldGroup === undefined ? [] : this.field.fieldGroup);
|
|
4518
4461
|
}
|
|
4519
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
4520
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
4462
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4463
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"(formControl!.valid ? 'p-tabview-title' : '') + (tab.props.hidden ? ' hidden' : '')\"\n [hidden]=\"tab.props.hidden\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.key ?? '') + '_invalid']\">{{\n tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$5.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$5.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4521
4464
|
}
|
|
4522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
4465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
|
|
4523
4466
|
type: Component,
|
|
4524
4467
|
args: [{ standalone: true, selector: 'mng-formly-field-tabs', imports: [TabViewModule, TranslateModule, FormlyModule, FormlyFieldLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"(formControl!.valid ? 'p-tabview-title' : '') + (tab.props.hidden ? ' hidden' : '')\"\n [hidden]=\"tab.props.hidden\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.key ?? '') + '_invalid']\">{{\n tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n" }]
|
|
4525
4468
|
}] });
|
|
@@ -4543,10 +4486,10 @@ class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
|
4543
4486
|
}
|
|
4544
4487
|
return field;
|
|
4545
4488
|
}
|
|
4546
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
4547
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
4489
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4490
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldNoLabelWrapperComponent, isStandalone: true, selector: "mng-formly-field-no-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block p-error\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4548
4491
|
}
|
|
4549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
4492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, decorators: [{
|
|
4550
4493
|
type: Component,
|
|
4551
4494
|
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" }]
|
|
4552
4495
|
}] });
|
|
@@ -4587,10 +4530,10 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
|
4587
4530
|
this.helpText.set(descriptor.helpText);
|
|
4588
4531
|
}
|
|
4589
4532
|
}
|
|
4590
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
4591
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
4533
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4534
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldWrapperComponent, isStandalone: true, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"'field ' + fieldClassName()\">\n <div class=\"grid mt-0\">\n @if (descriptor.label !== null) {\n <label [for]=\"key\" class=\"col\" [class]=\"descriptor.labelClassName\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4592
4535
|
}
|
|
4593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
4536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldWrapperComponent, decorators: [{
|
|
4594
4537
|
type: Component,
|
|
4595
4538
|
args: [{ standalone: true, selector: 'mng-formly-field-wrapper', imports: [TranslateModule, FormlyModule, FormlyFieldLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'field ' + fieldClassName()\">\n <div class=\"grid mt-0\">\n @if (descriptor.label !== null) {\n <label [for]=\"key\" class=\"col\" [class]=\"descriptor.labelClassName\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n" }]
|
|
4596
4539
|
}] });
|
|
@@ -4736,12 +4679,12 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4736
4679
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
4737
4680
|
});
|
|
4738
4681
|
}
|
|
4739
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
4740
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
4682
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4683
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldDatepickerComponent, isStandalone: true, selector: "mng-formly-field-datepicker", usesInheritance: true, ngImport: i0, template: "<p-calendar\n appendTo=\"body\"\n [class]=\"styleClass()\"\n [formControl]=\"dpFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(minDate())\"\n [maxDate]=\"$any(maxDate())\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n showIcon=\"true\"\n showButtonBar=\"true\"\n [showClear]=\"!props.required\"\n styleClass=\"mng-formly-field-datepicker\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-datepicker-input'\"\n [firstDayOfWeek]=\"1\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i3$3.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4741
4684
|
}
|
|
4742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
4685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldDatepickerComponent, decorators: [{
|
|
4743
4686
|
type: Component,
|
|
4744
|
-
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(minDate())\"\n [maxDate]=\"$any(maxDate())\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n showIcon=\"true\"\n showButtonBar=\"true\"\n [showClear]=\"!props.required\"\n styleClass=\"mng-formly-field-datepicker\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-datepicker-input'\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n" }]
|
|
4687
|
+
args: [{ standalone: true, selector: 'mng-formly-field-datepicker', imports: [ReactiveFormsModule, FormlyModule, CalendarModule, TranslateModule], 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(minDate())\"\n [maxDate]=\"$any(maxDate())\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n showIcon=\"true\"\n showButtonBar=\"true\"\n [showClear]=\"!props.required\"\n styleClass=\"mng-formly-field-datepicker\"\n [inputStyleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-datepicker-input'\"\n [firstDayOfWeek]=\"1\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n" }]
|
|
4745
4688
|
}] });
|
|
4746
4689
|
|
|
4747
4690
|
const formlyWrappersConfig = [
|
|
@@ -5053,10 +4996,10 @@ class TableviewComponent {
|
|
|
5053
4996
|
filterActionsByPositions(actions, actionPositions) {
|
|
5054
4997
|
return actions.filter(action => (action.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true) && actionPositions.includes(action.position));
|
|
5055
4998
|
}
|
|
5056
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
5057
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
4999
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5000
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideViewContainer()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-table\n [descriptor]=\"descriptor().table\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions()\"\n [selectionEnabled]=\"hasItemSelectionAction()\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance", "rowReorder"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5058
5001
|
}
|
|
5059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
5002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TableviewComponent, decorators: [{
|
|
5060
5003
|
type: Component,
|
|
5061
5004
|
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 @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" }]
|
|
5062
5005
|
}] });
|
|
@@ -5065,10 +5008,10 @@ class TableviewRouteComponent {
|
|
|
5065
5008
|
constructor() {
|
|
5066
5009
|
this.tableview = input.required();
|
|
5067
5010
|
}
|
|
5068
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
5069
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.
|
|
5011
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5012
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", 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 }); }
|
|
5070
5013
|
}
|
|
5071
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
5014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TableviewRouteComponent, decorators: [{
|
|
5072
5015
|
type: Component,
|
|
5073
5016
|
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" }]
|
|
5074
5017
|
}] });
|
|
@@ -5298,5 +5241,5 @@ function withTableview(config) {
|
|
|
5298
5241
|
* Generated bundle index. Do not edit.
|
|
5299
5242
|
*/
|
|
5300
5243
|
|
|
5301
|
-
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionDataProviderSource, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance,
|
|
5244
|
+
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionDataProviderSource, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, EditorAutoSaveStatusComponent, FormEditorComponent, FormEditorService, FormlyFieldActionComponent, FormlyFieldAutocompleteComponent, FormlyFieldCustomComponent, FormlyFieldDropdownComponent, FormlyFieldFieldsetComponent, FormlyFieldInputComponent, FormlyFieldLabelComponent, FormlyFieldLookupDialogComponent, FormlyFieldNoLabelWrapperComponent, FormlyFieldTableDialogFormComponent, FormlyFieldTableDialogMultiselectComponent, FormlyFieldTabsComponent, FormlyFieldWrapperComponent, NavigationService, RootActionExecutorService, TableviewComponent, TableviewRouteBuilder, TableviewRouteComponent, ViewContainer, actionNotificationError, actionNotificationSuccess, addAsyncValidationsToFormlyField, addValidationsToFormlyField, calculateTableColumnActionWidth, commonsFormlyConfigProvider, createFormlyConfigFromDescriptor, createFormlyField, createFormlyFields, createFormlyGroupType, createFormlyLocalizationsTab, createFormlyTabType, createFormlyValidation, createTableviewLazyRoute, createTableviewRoute, emailValidationName, emailValidator, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEditorFieldLabel, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getI18nActionEditorTitleAsync, getI18nActionParams, getI18nActionParamsAsync, getI18nActionTitleAsync, getI18nForAction, getI18nForActionAsync, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, maxDateValidationName, maxDateValidator, minDateValidationName, minDateValidator, populateI18nActionParams, provideActionExecutor, provideFormComponent, provideViewContainer, unsavedChangesGuard, withTableview };
|
|
5302
5245
|
//# sourceMappingURL=mediusinc-mng-commons-tableview.mjs.map
|