@mediusinc/mng-commons 7.4.0 → 8.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -62
- package/fesm2022/mediusinc-mng-commons-core.mjs +159 -302
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +3 -9
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs +4 -4
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +285 -203
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs +2 -5
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +1 -0
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/{mediusinc-mng-commons-table-column-toggle.component-BS5xvoDR.mjs → mediusinc-mng-commons-table-column-toggle.component-BHIzrUZz.mjs} +14 -12
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-BHIzrUZz.mjs.map +1 -0
- package/fesm2022/{mediusinc-mng-commons-table-mediusinc-mng-commons-table-BfEYZG7s.mjs → mediusinc-mng-commons-table-mediusinc-mng-commons-table-BPgwJRZk.mjs} +558 -522
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BPgwJRZk.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +10 -75
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +460 -326
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/i18n/en.json +1 -1
- package/i18n/sl.json +2 -2
- package/package.json +11 -24
- package/types/mediusinc-mng-commons-core.d.ts +55 -115
- package/types/mediusinc-mng-commons-filter.d.ts +4 -8
- package/types/mediusinc-mng-commons-form-api.d.ts +7 -7
- package/types/mediusinc-mng-commons-form.d.ts +11 -11
- package/types/mediusinc-mng-commons-table-api.d.ts +2 -2
- package/types/mediusinc-mng-commons-table.d.ts +21 -25
- package/types/mediusinc-mng-commons-tableview-api.d.ts +9 -51
- package/types/mediusinc-mng-commons-tableview.d.ts +9 -15
- package/fesm2022/mediusinc-mng-commons-model-class.mjs +0 -97
- package/fesm2022/mediusinc-mng-commons-model-class.mjs.map +0 -1
- package/fesm2022/mediusinc-mng-commons-table-api-class.mjs +0 -204
- package/fesm2022/mediusinc-mng-commons-table-api-class.mjs.map +0 -1
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-BS5xvoDR.mjs.map +0 -1
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BfEYZG7s.mjs.map +0 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs +0 -374
- package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs.map +0 -1
- package/model/class/README.md +0 -8
- package/table/api/class/README.md +0 -10
- package/tableview/api/class/README.md +0 -13
- package/types/mediusinc-mng-commons-model-class.d.ts +0 -25
- package/types/mediusinc-mng-commons-table-api-class.d.ts +0 -77
- package/types/mediusinc-mng-commons-tableview-api-class.d.ts +0 -141
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, signal, Injector, input, booleanAttribute, output, viewChild, computed, ViewEncapsulation,
|
|
2
|
+
import { InjectionToken, inject, Injectable, signal, Injector, input, booleanAttribute, output, viewChild, computed, ViewEncapsulation, Component, DestroyRef, ElementRef, model, effect, untracked, afterNextRender, HostListener, contentChildren, ChangeDetectorRef, Directive, Pipe, LOCALE_ID, HostBinding, ViewChild } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { Router, NavigationEnd, ActivatedRoute, RouterLink, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, RouterOutlet } from '@angular/router';
|
|
5
5
|
import { TranslateService, TranslatePipe } from '@ngx-translate/core';
|
|
6
|
-
import { ButtonDirective, Button } from '
|
|
7
|
-
import { Menu } from '
|
|
8
|
-
import { Tooltip } from '
|
|
6
|
+
import { ButtonDirective, Button } from '@openng/optimus-ui/button';
|
|
7
|
+
import { Menu } from '@openng/optimus-ui/menu';
|
|
8
|
+
import { Tooltip } from '@openng/optimus-ui/tooltip';
|
|
9
9
|
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';
|
|
10
|
-
import { getI18n, getI18nAsync, LoggerService, toastMessage, getI18nErrorParams, getI18nForError, CommonsService, ParametrizePipe, escapeHtmlAny, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, PermissionService, effectWithDeps, Permissions, ComponentDirective, CommonsStorageService,
|
|
11
|
-
import {
|
|
10
|
+
import { getI18n, getI18nAsync, LoggerService, toastMessage, getI18nErrorParams, getI18nForError, CommonsService, ParametrizePipe, escapeHtmlAny, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, PermissionService, effectWithDeps, Permissions, ComponentDirective, CommonsStorageService, narrowOptimusMessageSeverity, objectDeepCopy, Styles, getI18nTypePropertyKey, getI18nTypeGroupKey, getI18nTypeTabKey, fromSubscribeError, getErrorLogLevel, getObjectPropertyByPath, FilterMatchMode, COMMONS_MODULE_CONFIG_IT, dateToIsoString, RouteBuilder, createLazyRoute, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
|
|
11
|
+
import { buttonStyleToOptimusStyles, LookupDataProviderInst, lookupDataProvider } from '@mediusinc/mng-commons/form/api';
|
|
12
12
|
import { ActionEditorDescriptorInst, ActionInstanceStateEnum, ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, TableviewActionDefaultCategories, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptorInst, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FieldValidationDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, AFieldDescriptor, AFieldGroupDescriptor, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, actionEditor, actionEditorCancel, action, FieldManyToManyEditorActionEnum, EditorDescriptorNestedObjectWrapper, fieldLookupGetProviderCfgObj, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
|
|
13
13
|
import { mergeMap, map, filter, startWith, catchError, first, take as take$1 } from 'rxjs/operators';
|
|
14
14
|
import { getI18nModelParams, getI18nModelParamsAsync } from '@mediusinc/mng-commons/model';
|
|
15
15
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
16
|
-
import { MessageService, ConfirmationService } from '
|
|
17
|
-
import { DialogService, DynamicDialogConfig } from '
|
|
16
|
+
import { MessageService, ConfirmationService } from '@openng/optimus-ui/api';
|
|
17
|
+
import { DialogService, DynamicDialogConfig } from '@openng/optimus-ui/dynamicdialog';
|
|
18
18
|
import { Location, DatePipe, NgClass } from '@angular/common';
|
|
19
|
-
import { ProgressSpinner } from '
|
|
20
|
-
import { Toolbar } from '
|
|
21
|
-
import { ZIndexUtils } from '
|
|
19
|
+
import { ProgressSpinner } from '@openng/optimus-ui/progressspinner';
|
|
20
|
+
import { Toolbar } from '@openng/optimus-ui/toolbar';
|
|
21
|
+
import { ZIndexUtils } from '@openng/optimus-ui/utils';
|
|
22
22
|
import * as i1 from '@angular/forms';
|
|
23
23
|
import { Validators, UntypedFormGroup, FormGroup, FormArray, ReactiveFormsModule, FormsModule, FormBuilder, FormControl } from '@angular/forms';
|
|
24
24
|
import { FormlyConfig, FormlyForm, FieldType, FormlyAttributes, FormlyField, FormlyValidationMessage, FieldWrapper, provideFormlyCore, FORMLY_CONFIG } from '@ngx-formly/core';
|
|
25
|
-
import { Message } from '
|
|
25
|
+
import { Message } from '@openng/optimus-ui/message';
|
|
26
26
|
import { DropdownComponent, AutocompleteComponent, InputTrimDirective, InputEmptyValueDirective, DatetimePickerComponent } from '@mediusinc/mng-commons/form';
|
|
27
27
|
import { TableTemplateDirective, TableComponent } from '@mediusinc/mng-commons/table';
|
|
28
28
|
import { TableSizeEnum } from '@mediusinc/mng-commons/table/api';
|
|
29
|
-
import { Fieldset } from '
|
|
30
|
-
import { FileUpload } from '
|
|
31
|
-
import { Image } from '
|
|
32
|
-
import { InputGroup } from '
|
|
33
|
-
import { InputGroupAddon } from '
|
|
34
|
-
import { InputMask } from '
|
|
35
|
-
import { InputNumber } from '
|
|
36
|
-
import { InputText } from '
|
|
37
|
-
import { RadioButton } from '
|
|
38
|
-
import { Textarea } from '
|
|
39
|
-
import { ToggleSwitch } from '
|
|
40
|
-
import { Dialog } from '
|
|
41
|
-
import { Tabs, TabList, Tab, TabPanels, TabPanel } from '
|
|
29
|
+
import { Fieldset } from '@openng/optimus-ui/fieldset';
|
|
30
|
+
import { FileUpload } from '@openng/optimus-ui/fileupload';
|
|
31
|
+
import { Image } from '@openng/optimus-ui/image';
|
|
32
|
+
import { InputGroup } from '@openng/optimus-ui/inputgroup';
|
|
33
|
+
import { InputGroupAddon } from '@openng/optimus-ui/inputgroupaddon';
|
|
34
|
+
import { InputMask } from '@openng/optimus-ui/inputmask';
|
|
35
|
+
import { InputNumber } from '@openng/optimus-ui/inputnumber';
|
|
36
|
+
import { InputText } from '@openng/optimus-ui/inputtext';
|
|
37
|
+
import { RadioButton } from '@openng/optimus-ui/radiobutton';
|
|
38
|
+
import { Textarea } from '@openng/optimus-ui/textarea';
|
|
39
|
+
import { ToggleSwitch } from '@openng/optimus-ui/toggleswitch';
|
|
40
|
+
import { Dialog } from '@openng/optimus-ui/dialog';
|
|
41
|
+
import { Tabs, TabList, Tab, TabPanels, TabPanel } from '@openng/optimus-ui/tabs';
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Asynchronously retrieves internationalized text for a specified action.
|
|
@@ -320,6 +320,7 @@ class ActionInstance {
|
|
|
320
320
|
this.contextExecutionSubscriptions = [];
|
|
321
321
|
// linked actions
|
|
322
322
|
this._reactivationInstanceSubject = new BehaviorSubject(undefined); // editor action with resubmit enabled
|
|
323
|
+
// eslint-disable-next-line sonarjs/pseudo-random
|
|
323
324
|
this.instanceId = Math.random().toString(36).substring(2);
|
|
324
325
|
this.instanceLongName = `${action.actionNameLong}_${this.instanceId}`;
|
|
325
326
|
this.action = action;
|
|
@@ -526,10 +527,10 @@ class NavigationService {
|
|
|
526
527
|
this.router.navigateByUrl('/');
|
|
527
528
|
}
|
|
528
529
|
}
|
|
529
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
530
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
530
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
531
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NavigationService }); }
|
|
531
532
|
}
|
|
532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NavigationService, decorators: [{
|
|
533
534
|
type: Injectable
|
|
534
535
|
}], ctorParameters: () => [] });
|
|
535
536
|
|
|
@@ -540,9 +541,12 @@ const ACTION_EDITOR_COMPONENT_IT = new InjectionToken('ACTION_EDITOR_COMPONENT')
|
|
|
540
541
|
*/
|
|
541
542
|
class ViewContainer {
|
|
542
543
|
constructor() {
|
|
543
|
-
this.dataProvider = signal(undefined,
|
|
544
|
-
|
|
545
|
-
this.
|
|
544
|
+
this.dataProvider = signal(undefined, /* @ts-ignore */
|
|
545
|
+
...(ngDevMode ? [{ debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
546
|
+
this.routeTriggeredActionInstance = signal(undefined, /* @ts-ignore */
|
|
547
|
+
...(ngDevMode ? [{ debugName: "routeTriggeredActionInstance" }] : /* istanbul ignore next */ []));
|
|
548
|
+
this.actions = signal([], /* @ts-ignore */
|
|
549
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
546
550
|
this._tableReloadSubject = new Subject();
|
|
547
551
|
this._editorResetSubject = new Subject();
|
|
548
552
|
this._editorCloseSubject = new Subject();
|
|
@@ -565,10 +569,10 @@ class ViewContainer {
|
|
|
565
569
|
closeEditor(event) {
|
|
566
570
|
this._editorCloseSubject.next(event ?? {});
|
|
567
571
|
}
|
|
568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
569
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
572
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ViewContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
573
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ViewContainer }); }
|
|
570
574
|
}
|
|
571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ViewContainer, decorators: [{
|
|
572
576
|
type: Injectable
|
|
573
577
|
}] });
|
|
574
578
|
|
|
@@ -639,7 +643,7 @@ class ActionExecutorService {
|
|
|
639
643
|
acceptVisible: true,
|
|
640
644
|
acceptLabel: getTranslationOrUndefined(confirmationOpts.acceptButton?.label, 'confirm.accept', 'general.yes'),
|
|
641
645
|
acceptIcon: confirmationOpts.acceptButton?.icon !== null ? (confirmationOpts.acceptButton?.icon ?? ctx.instance.action.button?.icon ?? 'pi pi-check') : undefined,
|
|
642
|
-
acceptButtonProps:
|
|
646
|
+
acceptButtonProps: buttonStyleToOptimusStyles({
|
|
643
647
|
severity: ctx.instance.action.button?.style?.severity,
|
|
644
648
|
...confirmationOpts.acceptButton?.style
|
|
645
649
|
}),
|
|
@@ -647,7 +651,7 @@ class ActionExecutorService {
|
|
|
647
651
|
rejectLabel: confirmationOpts.rejectButton !== false ? getTranslationOrUndefined(confirmationOpts.rejectButton?.label, 'confirm.reject', 'general.no') : undefined,
|
|
648
652
|
rejectIcon: confirmationOpts.rejectButton !== false && confirmationOpts.rejectButton?.icon !== null ? (confirmationOpts.rejectButton?.icon ?? 'pi pi-times') : undefined,
|
|
649
653
|
rejectButtonProps: confirmationOpts.rejectButton !== false
|
|
650
|
-
?
|
|
654
|
+
? buttonStyleToOptimusStyles({
|
|
651
655
|
severity: 'secondary',
|
|
652
656
|
...confirmationOpts.rejectButton?.style
|
|
653
657
|
})
|
|
@@ -1032,7 +1036,7 @@ class ActionExecutorService {
|
|
|
1032
1036
|
}
|
|
1033
1037
|
dialogConfig.styleClass = dialogClassNames.join(' ');
|
|
1034
1038
|
// commons has its own focus trap
|
|
1035
|
-
//
|
|
1039
|
+
// There is also an Optimus UI issue in this path.
|
|
1036
1040
|
dialogConfig.focusOnShow = false;
|
|
1037
1041
|
dialogConfig.modal = true;
|
|
1038
1042
|
const dialogRef = this.dialogService.open(dialogComponent, dialogConfig);
|
|
@@ -1353,10 +1357,10 @@ class RootActionExecutorService extends ActionExecutorService {
|
|
|
1353
1357
|
get instances() {
|
|
1354
1358
|
return this._instances;
|
|
1355
1359
|
}
|
|
1356
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1357
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1360
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RootActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1361
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RootActionExecutorService }); }
|
|
1358
1362
|
}
|
|
1359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RootActionExecutorService, decorators: [{
|
|
1360
1364
|
type: Injectable
|
|
1361
1365
|
}] });
|
|
1362
1366
|
|
|
@@ -1368,10 +1372,10 @@ class ComponentActionExecutorService extends ActionExecutorService {
|
|
|
1368
1372
|
get instances() {
|
|
1369
1373
|
return this.rootActionExecutorService.instances;
|
|
1370
1374
|
}
|
|
1371
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1372
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1375
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ComponentActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1376
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ComponentActionExecutorService }); }
|
|
1373
1377
|
}
|
|
1374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ComponentActionExecutorService, decorators: [{
|
|
1375
1379
|
type: Injectable
|
|
1376
1380
|
}] });
|
|
1377
1381
|
|
|
@@ -1391,35 +1395,55 @@ class ActionComponent {
|
|
|
1391
1395
|
this.actionExecutor = inject(ActionExecutorService);
|
|
1392
1396
|
this.viewContainer = inject((ViewContainer), { optional: true });
|
|
1393
1397
|
// metadata and editor mode input
|
|
1394
|
-
this.action = input.required(
|
|
1395
|
-
|
|
1396
|
-
this.
|
|
1397
|
-
|
|
1398
|
-
this.
|
|
1399
|
-
|
|
1400
|
-
this.
|
|
1401
|
-
|
|
1402
|
-
this.
|
|
1403
|
-
|
|
1404
|
-
this.
|
|
1405
|
-
|
|
1398
|
+
this.action = input.required(/* @ts-ignore */
|
|
1399
|
+
...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
|
|
1400
|
+
this.item = input(/* @ts-ignore */
|
|
1401
|
+
...(ngDevMode ? [undefined, { debugName: "item" }] : /* istanbul ignore next */ []));
|
|
1402
|
+
this.itemId = input(/* @ts-ignore */
|
|
1403
|
+
...(ngDevMode ? [undefined, { debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
1404
|
+
this.actionData = input(/* @ts-ignore */
|
|
1405
|
+
...(ngDevMode ? [undefined, { debugName: "actionData" }] : /* istanbul ignore next */ []));
|
|
1406
|
+
this.dataListParams = input(/* @ts-ignore */
|
|
1407
|
+
...(ngDevMode ? [undefined, { debugName: "dataListParams" }] : /* istanbul ignore next */ []));
|
|
1408
|
+
this.dataProvider = input(/* @ts-ignore */
|
|
1409
|
+
...(ngDevMode ? [undefined, { debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
1410
|
+
this.hostComponent = input(/* @ts-ignore */
|
|
1411
|
+
...(ngDevMode ? [undefined, { debugName: "hostComponent" }] : /* istanbul ignore next */ []));
|
|
1412
|
+
this.routeInit = input(undefined, { ...(ngDevMode ? { debugName: "routeInit" } : /* istanbul ignore next */ {}), alias: 'route' });
|
|
1413
|
+
this.inputDisabled = input(false, { ...(ngDevMode ? { debugName: "inputDisabled" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
1414
|
+
this.inputLoading = input(false, { ...(ngDevMode ? { debugName: "inputLoading" } : /* istanbul ignore next */ {}), alias: 'loading', transform: booleanAttribute });
|
|
1415
|
+
this.selectedItems = input([], /* @ts-ignore */
|
|
1416
|
+
...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
1406
1417
|
this.finish = output();
|
|
1407
|
-
this.subactionsMenu = viewChild(Menu,
|
|
1408
|
-
|
|
1409
|
-
this.
|
|
1410
|
-
|
|
1411
|
-
this.
|
|
1412
|
-
|
|
1413
|
-
this.
|
|
1414
|
-
|
|
1415
|
-
this.
|
|
1416
|
-
|
|
1418
|
+
this.subactionsMenu = viewChild(Menu, /* @ts-ignore */
|
|
1419
|
+
...(ngDevMode ? [{ debugName: "subactionsMenu" }] : /* istanbul ignore next */ []));
|
|
1420
|
+
this.hostClass = computed(() => this.action().button?.style?.class ?? 'mng-action-button' + ` ${this.action().actionNameLong} ${this.action().actionName}`, /* @ts-ignore */
|
|
1421
|
+
...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
1422
|
+
this.isHostHidden = computed(() => !this.isVisible() || !this.isPermitted(), /* @ts-ignore */
|
|
1423
|
+
...(ngDevMode ? [{ debugName: "isHostHidden" }] : /* istanbul ignore next */ []));
|
|
1424
|
+
this.id = computed(() => this.action().actionNameLong, /* @ts-ignore */
|
|
1425
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1426
|
+
this.loading = signal(false, /* @ts-ignore */
|
|
1427
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
1428
|
+
this.isVisible = signal(true, /* @ts-ignore */
|
|
1429
|
+
...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
|
|
1430
|
+
this.isPermitted = signal(true, /* @ts-ignore */
|
|
1431
|
+
...(ngDevMode ? [{ debugName: "isPermitted" }] : /* istanbul ignore next */ []));
|
|
1432
|
+
this.isEnabled = signal(true, /* @ts-ignore */
|
|
1433
|
+
...(ngDevMode ? [{ debugName: "isEnabled" }] : /* istanbul ignore next */ []));
|
|
1434
|
+
this.label = signal('', /* @ts-ignore */
|
|
1435
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1436
|
+
this.tooltip = signal('', /* @ts-ignore */
|
|
1437
|
+
...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
1417
1438
|
this.actionLink = computed(() => {
|
|
1418
1439
|
const action = this.action();
|
|
1419
1440
|
return action instanceof ActionLinkDescriptorInst ? action : undefined;
|
|
1420
|
-
},
|
|
1421
|
-
|
|
1422
|
-
this.
|
|
1441
|
+
}, /* @ts-ignore */
|
|
1442
|
+
...(ngDevMode ? [{ debugName: "actionLink" }] : /* istanbul ignore next */ []));
|
|
1443
|
+
this.hasNoTitle = computed(() => this.action().button?.label === null, /* @ts-ignore */
|
|
1444
|
+
...(ngDevMode ? [{ debugName: "hasNoTitle" }] : /* istanbul ignore next */ []));
|
|
1445
|
+
this.route = computed(() => this.routeInit() ?? this.routeService, /* @ts-ignore */
|
|
1446
|
+
...(ngDevMode ? [{ debugName: "route" }] : /* istanbul ignore next */ []));
|
|
1423
1447
|
this.routeData = toSignal(this.route().data);
|
|
1424
1448
|
this.routePermissions = computed(() => {
|
|
1425
1449
|
const routeData = this.routeData();
|
|
@@ -1431,12 +1455,15 @@ class ActionComponent {
|
|
|
1431
1455
|
}
|
|
1432
1456
|
}
|
|
1433
1457
|
return undefined;
|
|
1434
|
-
},
|
|
1458
|
+
}, /* @ts-ignore */
|
|
1459
|
+
...(ngDevMode ? [{ debugName: "routePermissions" }] : /* istanbul ignore next */ []));
|
|
1435
1460
|
this.buttonStyles = computed(() => {
|
|
1436
1461
|
const buttonDescriptor = this.action().button?.style;
|
|
1437
|
-
return
|
|
1438
|
-
},
|
|
1439
|
-
|
|
1462
|
+
return buttonStyleToOptimusStyles(buttonDescriptor, this.hasNoTitle());
|
|
1463
|
+
}, /* @ts-ignore */
|
|
1464
|
+
...(ngDevMode ? [{ debugName: "buttonStyles" }] : /* istanbul ignore next */ []));
|
|
1465
|
+
this.subactions = signal([], /* @ts-ignore */
|
|
1466
|
+
...(ngDevMode ? [{ debugName: "subactions" }] : /* istanbul ignore next */ []));
|
|
1440
1467
|
this.subactionSubscriptions = [];
|
|
1441
1468
|
this.#actionProcessingParams = computed(() => ({
|
|
1442
1469
|
itemId: this.itemId(),
|
|
@@ -1446,7 +1473,8 @@ class ActionComponent {
|
|
|
1446
1473
|
dataListParams: this.dataListParams(),
|
|
1447
1474
|
routePermissions: this.routePermissions(),
|
|
1448
1475
|
hostComponent: this.hostComponent()
|
|
1449
|
-
}),
|
|
1476
|
+
}), /* @ts-ignore */
|
|
1477
|
+
...(ngDevMode ? [{ debugName: "#actionProcessingParams" }] : /* istanbul ignore next */ []));
|
|
1450
1478
|
effectWithDeps([this.action, this.dataProvider, this.route, this.hasNoTitle, this.#actionProcessingParams], ([action, dataProvider, route, hasNoTitle, processingParams]) => this.processSubscriptions(action, dataProvider, route, hasNoTitle, processingParams));
|
|
1451
1479
|
}
|
|
1452
1480
|
ngOnDestroy() {
|
|
@@ -1637,17 +1665,20 @@ class ActionComponent {
|
|
|
1637
1665
|
return menuItem;
|
|
1638
1666
|
});
|
|
1639
1667
|
}
|
|
1640
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1641
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1668
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1669
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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()", "id": "id()" } }, 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 [label]=\"label()\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [href]=\"!isEnabled() || inputDisabled() ? null : (actionLink.url | mngParametrize: itemId() : item() : actionData())\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\">\n </a>\n } @else {\n <a\n pButton\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [label]=\"label()\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"!isEnabled() || inputDisabled() ? null : (actionLink.pathSegments | mngParametrize: itemId() : item() : actionData())\"\n [relativeTo]=\"route()\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId() : item() : actionData()\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\">\n </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 @defer (on idle) {\n <p-splitButton\n [icon]=\"action().button?.icon ?? undefined\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (onClick)=\"triggerAction(action())\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\"\n [model]=\"subactions()\" />\n }\n } @else {\n <button\n pButton\n type=\"button\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [loading]=\"loading() || inputLoading()\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\"\n (click)=\"triggerAction(action(), undefined, $event)\"></button>\n @defer (on idle) {\n <p-menu #subactionsMenu [model]=\"subactions()\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n }\n}\n", styles: ["mng-action{margin:var(--mng-action-margin-y, .15rem) var(--mng-action-margin-y, .15rem)}mng-action a.disabled{opacity:var(--mng-action-anchor-disabled-opacity, .6);cursor:default}\n"], dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "pipe", type: ParametrizePipe, name: "mngParametrize" }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [Tooltip, /* @ts-ignore */
|
|
1670
|
+
import('@openng/optimus-ui/splitbutton').then(m => m.SplitButton)], () => [Menu]] }); }
|
|
1642
1671
|
}
|
|
1643
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "
|
|
1672
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.1.4", ngImport: i0, type: ActionComponent, resolveDeferredDeps: () => [/* @ts-ignore */
|
|
1673
|
+
import('@openng/optimus-ui/splitbutton').then(m => m.SplitButton)], resolveMetadata: SplitButton => ({ decorators: [{
|
|
1644
1674
|
type: Component,
|
|
1645
|
-
args: [{ selector: 'mng-action',
|
|
1675
|
+
args: [{ selector: 'mng-action', imports: [ParametrizePipe, ComponentDirective, RouterLink, ButtonDirective, Tooltip, SplitButton, Menu], providers: [provideActionExecutor()], host: { '[class]': 'hostClass()', '[class.m-0]': 'isHostHidden()', '[id]': 'id()' }, encapsulation: ViewEncapsulation.None, template: "@if (isVisible() && isPermitted()) {\n @if (actionLink(); as actionLink) {\n @if (actionLink.url !== '') {\n <a\n pButton\n [label]=\"label()\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [href]=\"!isEnabled() || inputDisabled() ? null : (actionLink.url | mngParametrize: itemId() : item() : actionData())\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\">\n </a>\n } @else {\n <a\n pButton\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [label]=\"label()\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"!isEnabled() || inputDisabled() ? null : (actionLink.pathSegments | mngParametrize: itemId() : item() : actionData())\"\n [relativeTo]=\"route()\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId() : item() : actionData()\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"!isEnabled() || inputDisabled()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\">\n </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 @defer (on idle) {\n <p-splitButton\n [icon]=\"action().button?.icon ?? undefined\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n (onClick)=\"triggerAction(action())\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\"\n [model]=\"subactions()\" />\n }\n } @else {\n <button\n pButton\n type=\"button\"\n [icon]=\"$any(action().button?.icon)\"\n [iconPos]=\"action().button?.iconPosition ?? 'left'\"\n [label]=\"label()\"\n [pTooltip]=\"tooltip()\"\n [tooltipPosition]=\"action().button?.tooltipPosition ?? 'top'\"\n [loading]=\"loading() || inputLoading()\"\n [disabled]=\"!isEnabled() || inputDisabled()\"\n [size]=\"buttonStyles().size\"\n [severity]=\"buttonStyles().severity\"\n [text]=\"buttonStyles().text\"\n [outlined]=\"buttonStyles().outlined\"\n [raised]=\"buttonStyles().raised\"\n [rounded]=\"buttonStyles().rounded\"\n [class]=\"buttonStyles().class\"\n (click)=\"triggerAction(action(), undefined, $event)\"></button>\n @defer (on idle) {\n <p-menu #subactionsMenu [model]=\"subactions()\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n }\n}\n", styles: ["mng-action{margin:var(--mng-action-margin-y, .15rem) var(--mng-action-margin-y, .15rem)}mng-action a.disabled{opacity:var(--mng-action-anchor-disabled-opacity, .6);cursor:default}\n"] }]
|
|
1646
1676
|
}], ctorParameters: () => [], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], itemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemId", required: false }] }], actionData: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionData", required: false }] }], dataListParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataListParams", required: false }] }], dataProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataProvider", required: false }] }], hostComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostComponent", required: false }] }], routeInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], inputDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inputLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: false }] }], finish: [{ type: i0.Output, args: ["finish"] }], subactionsMenu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Menu), { isSignal: true }] }] } }) });
|
|
1647
1677
|
|
|
1648
1678
|
class EditorAutoSaveStatusComponent {
|
|
1649
1679
|
constructor() {
|
|
1650
|
-
this.status = input(
|
|
1680
|
+
this.status = input(/* @ts-ignore */
|
|
1681
|
+
...(ngDevMode ? [undefined, { debugName: "status" }] : /* istanbul ignore next */ []));
|
|
1651
1682
|
this.label = computed(() => {
|
|
1652
1683
|
switch (this.status()?.state) {
|
|
1653
1684
|
case 'saving':
|
|
@@ -1662,7 +1693,8 @@ class EditorAutoSaveStatusComponent {
|
|
|
1662
1693
|
default:
|
|
1663
1694
|
return undefined;
|
|
1664
1695
|
}
|
|
1665
|
-
},
|
|
1696
|
+
}, /* @ts-ignore */
|
|
1697
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1666
1698
|
this.timestampDateFormat = computed(() => {
|
|
1667
1699
|
switch (this.status()?.state) {
|
|
1668
1700
|
case 'saving':
|
|
@@ -1671,7 +1703,8 @@ class EditorAutoSaveStatusComponent {
|
|
|
1671
1703
|
default:
|
|
1672
1704
|
return 'dd. MM. yyyy HH:mm:ss';
|
|
1673
1705
|
}
|
|
1674
|
-
},
|
|
1706
|
+
}, /* @ts-ignore */
|
|
1707
|
+
...(ngDevMode ? [{ debugName: "timestampDateFormat" }] : /* istanbul ignore next */ []));
|
|
1675
1708
|
this.icon = computed(() => {
|
|
1676
1709
|
switch (this.status()?.state) {
|
|
1677
1710
|
case 'saved':
|
|
@@ -1686,10 +1719,11 @@ class EditorAutoSaveStatusComponent {
|
|
|
1686
1719
|
default:
|
|
1687
1720
|
return undefined;
|
|
1688
1721
|
}
|
|
1689
|
-
},
|
|
1722
|
+
}, /* @ts-ignore */
|
|
1723
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1690
1724
|
}
|
|
1691
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1692
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1725
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: EditorAutoSaveStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1726
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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: `
|
|
1693
1727
|
<span>
|
|
1694
1728
|
@if (icon(); as icon) {
|
|
1695
1729
|
<i [class]="icon"></i>
|
|
@@ -1699,9 +1733,9 @@ class EditorAutoSaveStatusComponent {
|
|
|
1699
1733
|
<span [innerHTML]="label | translate: {timestamp: status()?.timestamp | date: timestampDateFormat()}"></span>
|
|
1700
1734
|
}
|
|
1701
1735
|
</span>
|
|
1702
|
-
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TranslatePipe, name: "translate" }]
|
|
1736
|
+
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1703
1737
|
}
|
|
1704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: EditorAutoSaveStatusComponent, decorators: [{
|
|
1705
1739
|
type: Component,
|
|
1706
1740
|
args: [{
|
|
1707
1741
|
selector: 'mng-editor-auto-save-status',
|
|
@@ -1716,8 +1750,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1716
1750
|
<span [innerHTML]="label | translate: {timestamp: status()?.timestamp | date: timestampDateFormat()}"></span>
|
|
1717
1751
|
}
|
|
1718
1752
|
</span>
|
|
1719
|
-
|
|
1720
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1753
|
+
`
|
|
1721
1754
|
}]
|
|
1722
1755
|
}], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
|
|
1723
1756
|
|
|
@@ -1770,7 +1803,9 @@ function generateItemId({ model }, item, itemId) {
|
|
|
1770
1803
|
}
|
|
1771
1804
|
|
|
1772
1805
|
const minDateValidationName = 'minDate';
|
|
1773
|
-
const minDateValidator = (
|
|
1806
|
+
const minDateValidator = (
|
|
1807
|
+
// eslint-disable-next-line sonarjs/use-type-alias
|
|
1808
|
+
min) => {
|
|
1774
1809
|
return ({ fieldFormControl, fieldFormlyConfig }) => {
|
|
1775
1810
|
const minDate = fieldFormlyConfig.props.minDate ?? min;
|
|
1776
1811
|
const date = fieldFormControl?.value == null ? undefined : new Date(fieldFormControl.value);
|
|
@@ -2258,9 +2293,6 @@ class FormEditorService {
|
|
|
2258
2293
|
get formlyFields() {
|
|
2259
2294
|
return this.formComponent.formlyFields;
|
|
2260
2295
|
}
|
|
2261
|
-
get formlyInitialItem() {
|
|
2262
|
-
return this.formComponent.formlyInitialItem;
|
|
2263
|
-
}
|
|
2264
2296
|
get itemInput() {
|
|
2265
2297
|
return this.formComponent.itemInput;
|
|
2266
2298
|
}
|
|
@@ -2307,10 +2339,10 @@ class FormEditorService {
|
|
|
2307
2339
|
init(formComponent) {
|
|
2308
2340
|
this._formComponent = formComponent;
|
|
2309
2341
|
}
|
|
2310
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2311
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorService, deps: [{ token: FormEditorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2343
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorService }); }
|
|
2312
2344
|
}
|
|
2313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorService, decorators: [{
|
|
2314
2346
|
type: Injectable
|
|
2315
2347
|
}], ctorParameters: () => [{ type: FormEditorService }] });
|
|
2316
2348
|
function provideFormComponent() {
|
|
@@ -2341,13 +2373,6 @@ class FormEditorComponent {
|
|
|
2341
2373
|
get formlyFields() {
|
|
2342
2374
|
return this._formlyFields;
|
|
2343
2375
|
}
|
|
2344
|
-
/**
|
|
2345
|
-
* @deprecated, use
|
|
2346
|
-
* Only used for form initialization. Further changes should be done using {resetFormModel}.
|
|
2347
|
-
*/
|
|
2348
|
-
get formlyInitialItem() {
|
|
2349
|
-
return this.formlyModel;
|
|
2350
|
-
}
|
|
2351
2376
|
get itemInput() {
|
|
2352
2377
|
return this.item();
|
|
2353
2378
|
}
|
|
@@ -2366,22 +2391,29 @@ class FormEditorComponent {
|
|
|
2366
2391
|
this.commonsStorageService = inject(CommonsStorageService);
|
|
2367
2392
|
this.router = inject(Router);
|
|
2368
2393
|
this.autoSaveStorageKeyCompInit = true;
|
|
2369
|
-
this.autoSaveStorageKey = computed(() => generateAutosaveEditorKey(this.descriptor(), this.item(), this.router.url, { editorId: this.editorId(), itemId: this.itemId() }),
|
|
2370
|
-
|
|
2371
|
-
this.
|
|
2372
|
-
|
|
2373
|
-
this.
|
|
2374
|
-
this.
|
|
2375
|
-
|
|
2376
|
-
this.
|
|
2394
|
+
this.autoSaveStorageKey = computed(() => generateAutosaveEditorKey(this.descriptor(), this.item(), this.router.url, { editorId: this.editorId(), itemId: this.itemId() }), /* @ts-ignore */
|
|
2395
|
+
...(ngDevMode ? [{ debugName: "autoSaveStorageKey" }] : /* istanbul ignore next */ []));
|
|
2396
|
+
this.descriptor = input.required(/* @ts-ignore */
|
|
2397
|
+
...(ngDevMode ? [{ debugName: "descriptor" }] : /* istanbul ignore next */ []));
|
|
2398
|
+
this.submitLoading = input(false, { ...(ngDevMode ? { debugName: "submitLoading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2399
|
+
this.item = model(undefined, /* @ts-ignore */
|
|
2400
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
2401
|
+
this.isFormDisabled = input(false, { ...(ngDevMode ? { debugName: "isFormDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2402
|
+
this.editorId = input(undefined, /* @ts-ignore */
|
|
2403
|
+
...(ngDevMode ? [{ debugName: "editorId" }] : /* istanbul ignore next */ []));
|
|
2404
|
+
this.itemId = input(undefined, /* @ts-ignore */
|
|
2405
|
+
...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
2406
|
+
this.showAutoSaveStatus = input(true, { ...(ngDevMode ? { debugName: "showAutoSaveStatus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2377
2407
|
// event outputs
|
|
2378
2408
|
this.formSubmit = output();
|
|
2379
2409
|
this.valueChange = output();
|
|
2380
2410
|
this.autoSaveStatusSubject = new BehaviorSubject({ state: 'initial', timestamp: new Date() });
|
|
2381
2411
|
this.autoSaveStatus = outputFromObservable(this.autoSaveStatusSubject.asObservable());
|
|
2382
2412
|
// content and view queries
|
|
2383
|
-
this.submitButtonElementRef = viewChild('submitButton',
|
|
2384
|
-
|
|
2413
|
+
this.submitButtonElementRef = viewChild('submitButton', /* @ts-ignore */
|
|
2414
|
+
...(ngDevMode ? [{ debugName: "submitButtonElementRef" }] : /* istanbul ignore next */ []));
|
|
2415
|
+
this.focusThiefElRef = viewChild('focusThiefInput', /* @ts-ignore */
|
|
2416
|
+
...(ngDevMode ? [{ debugName: "focusThiefElRef" }] : /* istanbul ignore next */ []));
|
|
2385
2417
|
// formly specifics
|
|
2386
2418
|
this._form = new UntypedFormGroup({});
|
|
2387
2419
|
this._formlyStateDisabledSubject = new BehaviorSubject(false);
|
|
@@ -2397,15 +2429,19 @@ class FormEditorComponent {
|
|
|
2397
2429
|
this._formlyFields = []; // initialized in ngOnInit, should not be changed after
|
|
2398
2430
|
this.formlyModel = {}; // initialized in ngOnInit, should not be changed after, serves as formly initialization model
|
|
2399
2431
|
this.#formInitialValue = {}; // initialized in ngOnInit, should not be changed after, serves as formly initialization model
|
|
2400
|
-
this.setterFields = computed(() => this.descriptor().fields.filter(f => typeof f.setter === 'function'),
|
|
2401
|
-
|
|
2432
|
+
this.setterFields = computed(() => this.descriptor().fields.filter(f => typeof f.setter === 'function'), /* @ts-ignore */
|
|
2433
|
+
...(ngDevMode ? [{ debugName: "setterFields" }] : /* istanbul ignore next */ []));
|
|
2434
|
+
this.formMessages = signal([], /* @ts-ignore */
|
|
2435
|
+
...(ngDevMode ? [{ debugName: "formMessages" }] : /* istanbul ignore next */ []));
|
|
2402
2436
|
this.formMessagesTypeNarrowed = computed(() => this.formMessages().map(m => ({
|
|
2403
|
-
severity:
|
|
2437
|
+
severity: narrowOptimusMessageSeverity(m.severity),
|
|
2404
2438
|
text: m.detail,
|
|
2405
2439
|
icon: m.icon
|
|
2406
|
-
})),
|
|
2440
|
+
})), /* @ts-ignore */
|
|
2441
|
+
...(ngDevMode ? [{ debugName: "formMessagesTypeNarrowed" }] : /* istanbul ignore next */ []));
|
|
2407
2442
|
// autosave
|
|
2408
|
-
this.autoSaveRestore = signal(null,
|
|
2443
|
+
this.autoSaveRestore = signal(null, /* @ts-ignore */
|
|
2444
|
+
...(ngDevMode ? [{ debugName: "autoSaveRestore" }] : /* istanbul ignore next */ []));
|
|
2409
2445
|
this.autoSave = toSignal(this.autoSaveStatusSubject);
|
|
2410
2446
|
this.autoSavePreviewButtonLabel = computed(() => {
|
|
2411
2447
|
switch (this.autoSave()?.state) {
|
|
@@ -2416,11 +2452,15 @@ class FormEditorComponent {
|
|
|
2416
2452
|
default:
|
|
2417
2453
|
return 'mngEditor.autoSave.restore.preview';
|
|
2418
2454
|
}
|
|
2419
|
-
},
|
|
2420
|
-
|
|
2421
|
-
this.
|
|
2455
|
+
}, /* @ts-ignore */
|
|
2456
|
+
...(ngDevMode ? [{ debugName: "autoSavePreviewButtonLabel" }] : /* istanbul ignore next */ []));
|
|
2457
|
+
this.autoSaveShowRestore = computed(() => this.autoSaveRestore()?.saved != null, /* @ts-ignore */
|
|
2458
|
+
...(ngDevMode ? [{ debugName: "autoSaveShowRestore" }] : /* istanbul ignore next */ []));
|
|
2459
|
+
this.autoSavePreviewDisabledForm = signal(false, /* @ts-ignore */
|
|
2460
|
+
...(ngDevMode ? [{ debugName: "autoSavePreviewDisabledForm" }] : /* istanbul ignore next */ []));
|
|
2422
2461
|
// autofocus
|
|
2423
|
-
this.autofocusEnabled = computed(() => (this.descriptor().autofocusOnField ?? true) && !this._formlyStateDisabled(),
|
|
2462
|
+
this.autofocusEnabled = computed(() => (this.descriptor().autofocusOnField ?? true) && !this._formlyStateDisabled(), /* @ts-ignore */
|
|
2463
|
+
...(ngDevMode ? [{ debugName: "autofocusEnabled" }] : /* istanbul ignore next */ []));
|
|
2424
2464
|
this.formService.init(this);
|
|
2425
2465
|
effect(() => {
|
|
2426
2466
|
const item = this.item();
|
|
@@ -2785,12 +2825,12 @@ class FormEditorComponent {
|
|
|
2785
2825
|
this.autoSaveRestore.set(this.commonsStorageService.getItem(this.cmpTypeName, this.autoSaveStorageKey()) ?? null);
|
|
2786
2826
|
}
|
|
2787
2827
|
}
|
|
2788
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2789
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2828
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2829
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null }, 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-message severity=\"warn\" icon=\"pi pi-save\">\n <ng-template #container>\n <div class=\"flex w-full justify-end items-center\">\n <div class=\"grow\">\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. yyyy HH:mm:ss') : ''}\n }}\n </div>\n <div>\n <button\n pButton\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n severity=\"success\"\n text=\"true\"\n (click)=\"onAutoSaveRestore()\"></button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <button\n pButton\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n severity=\"info\"\n text=\"true\"\n (click)=\"onAutoSavePreview()\"></button>\n }\n <button\n pButton\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n severity=\"danger\"\n text=\"true\"\n (click)=\"onAutoSaveDismiss()\"></button>\n </div>\n </div>\n </ng-template>\n </p-message>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" class=\"hidden!\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyModel\"></formly-form>\n <button #submitButton type=\"submit\" class=\"hidden!\"></button>\n</form>\n@for (message of formMessagesTypeNarrowed(); track message) {\n <p-message [severity]=\"message.severity\" [icon]=\"message.icon\">{{ message.text }} </p-message>\n}\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\" />\n}\n", styles: ["mng-form-editor .mng-field-control{width:100%}mng-form-editor .mng-field{margin:var(--mng-field-margin, 0 0 .5rem 0)}:is(mng-form-editor .mng-field.mng-field-number,mng-form-editor .mng-field.mng-field-currency) .p-inputnumber,:is(mng-form-editor .mng-field.mng-field-number,mng-form-editor .mng-field.mng-field-currency) input{width:100%}mng-form-editor .mng-field.mng-field-switch .mng-field-control{width:var(--p-toggleswitch-width)}mng-form-editor .mng-field.mng-field-radio .mng-field-control{width:var(--p-radiobutton-width)}mng-form-editor .mng-field.mng-field-datepicker mng-datetime-picker{max-width:var(--mng-field-datepicker-max-width, 450px)}mng-form-editor .mng-field.mng-field-autocomplete .p-autocomplete{width:100%}:is(mng-form-editor .mng-field.mng-field-dropdown,mng-form-editor .mng-field.mng-field-enum) .p-select{width:100%}mng-form-editor .mng-localized-input-translation-missing input,mng-form-editor .mng-localized-input-translation-missing textarea{border-color:var(--p-button-warn-background)}mng-form-editor .field.table .p-datatable .p-datatable-header{border-top:none;padding-left:0;padding-right:0;padding-top:0;padding-bottom:.25rem}mng-form-editor .p-fieldset{margin-bottom:1rem}mng-form-editor .p-fieldset .p-fieldset-content{padding:.75rem 0 0}mng-form-editor .mng-field-validation-messages{color:var(--p-form-field-invalid-placeholder-color)}.mng-field-datepicker.p-datepicker-panel{width:415px}\n"], dependencies: [{ kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }, { kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "date" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2790
2830
|
}
|
|
2791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2792
2832
|
type: Component,
|
|
2793
|
-
args: [{ selector: 'mng-form-editor', imports: [FormlyForm, ReactiveFormsModule, TranslatePipe, DatePipe, EditorAutoSaveStatusComponent, Message, ButtonDirective], providers: [provideFormComponent()],
|
|
2833
|
+
args: [{ selector: 'mng-form-editor', imports: [FormlyForm, ReactiveFormsModule, TranslatePipe, DatePipe, EditorAutoSaveStatusComponent, Message, ButtonDirective], providers: [provideFormComponent()], encapsulation: ViewEncapsulation.None, template: "@if (autoSaveShowRestore()) {\n <p-message severity=\"warn\" icon=\"pi pi-save\">\n <ng-template #container>\n <div class=\"flex w-full justify-end items-center\">\n <div class=\"grow\">\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. yyyy HH:mm:ss') : ''}\n }}\n </div>\n <div>\n <button\n pButton\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n severity=\"success\"\n text=\"true\"\n (click)=\"onAutoSaveRestore()\"></button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <button\n pButton\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n severity=\"info\"\n text=\"true\"\n (click)=\"onAutoSavePreview()\"></button>\n }\n <button\n pButton\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n severity=\"danger\"\n text=\"true\"\n (click)=\"onAutoSaveDismiss()\"></button>\n </div>\n </div>\n </ng-template>\n </p-message>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" class=\"hidden!\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyModel\"></formly-form>\n <button #submitButton type=\"submit\" class=\"hidden!\"></button>\n</form>\n@for (message of formMessagesTypeNarrowed(); track message) {\n <p-message [severity]=\"message.severity\" [icon]=\"message.icon\">{{ message.text }} </p-message>\n}\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\" />\n}\n", styles: ["mng-form-editor .mng-field-control{width:100%}mng-form-editor .mng-field{margin:var(--mng-field-margin, 0 0 .5rem 0)}:is(mng-form-editor .mng-field.mng-field-number,mng-form-editor .mng-field.mng-field-currency) .p-inputnumber,:is(mng-form-editor .mng-field.mng-field-number,mng-form-editor .mng-field.mng-field-currency) input{width:100%}mng-form-editor .mng-field.mng-field-switch .mng-field-control{width:var(--p-toggleswitch-width)}mng-form-editor .mng-field.mng-field-radio .mng-field-control{width:var(--p-radiobutton-width)}mng-form-editor .mng-field.mng-field-datepicker mng-datetime-picker{max-width:var(--mng-field-datepicker-max-width, 450px)}mng-form-editor .mng-field.mng-field-autocomplete .p-autocomplete{width:100%}:is(mng-form-editor .mng-field.mng-field-dropdown,mng-form-editor .mng-field.mng-field-enum) .p-select{width:100%}mng-form-editor .mng-localized-input-translation-missing input,mng-form-editor .mng-localized-input-translation-missing textarea{border-color:var(--p-button-warn-background)}mng-form-editor .field.table .p-datatable .p-datatable-header{border-top:none;padding-left:0;padding-right:0;padding-top:0;padding-bottom:.25rem}mng-form-editor .p-fieldset{margin-bottom:1rem}mng-form-editor .p-fieldset .p-fieldset-content{padding:.75rem 0 0}mng-form-editor .mng-field-validation-messages{color:var(--p-form-field-invalid-placeholder-color)}.mng-field-datepicker.p-datepicker-panel{width:415px}\n"] }]
|
|
2794
2834
|
}], ctorParameters: () => [], propDecorators: { descriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "descriptor", required: true }] }], submitLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitLoading", required: false }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }, { type: i0.Output, args: ["itemChange"] }], isFormDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFormDisabled", required: false }] }], editorId: [{ type: i0.Input, args: [{ isSignal: true, alias: "editorId", required: false }] }], itemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemId", required: false }] }], showAutoSaveStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAutoSaveStatus", required: false }] }], formSubmit: [{ type: i0.Output, args: ["formSubmit"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], autoSaveStatus: [{ type: i0.Output, args: ["autoSaveStatus"] }], submitButtonElementRef: [{ type: i0.ViewChild, args: ['submitButton', { isSignal: true }] }], focusThiefElRef: [{ type: i0.ViewChild, args: ['focusThiefInput', { isSignal: true }] }] } });
|
|
2795
2835
|
|
|
2796
2836
|
class ActionEditorInjectorContextComponent {
|
|
@@ -2806,19 +2846,28 @@ class ActionEditorInjectorContextComponent {
|
|
|
2806
2846
|
this.actionExecutor = inject(ActionExecutorService);
|
|
2807
2847
|
this.viewContainer = inject(ViewContainer, { optional: true });
|
|
2808
2848
|
// metadata and editor mode input
|
|
2809
|
-
this.data = input.required(
|
|
2849
|
+
this.data = input.required(/* @ts-ignore */
|
|
2850
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
2810
2851
|
this.actionRun = output();
|
|
2811
2852
|
this.actionCancel = output();
|
|
2812
2853
|
// content and view queries
|
|
2813
|
-
this.formEditorCmp = viewChild((FormEditorComponent),
|
|
2814
|
-
|
|
2815
|
-
this.
|
|
2816
|
-
|
|
2854
|
+
this.formEditorCmp = viewChild((FormEditorComponent), /* @ts-ignore */
|
|
2855
|
+
...(ngDevMode ? [{ debugName: "formEditorCmp" }] : /* istanbul ignore next */ []));
|
|
2856
|
+
this.hasTitle = computed(() => this.editorAction().editorTitle !== null, /* @ts-ignore */
|
|
2857
|
+
...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
|
|
2858
|
+
this.title = signal(undefined, /* @ts-ignore */
|
|
2859
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
2860
|
+
this.isFormDisabled = signal(false, /* @ts-ignore */
|
|
2861
|
+
...(ngDevMode ? [{ debugName: "isFormDisabled" }] : /* istanbul ignore next */ []));
|
|
2817
2862
|
// data
|
|
2818
|
-
this.item = signal(undefined,
|
|
2819
|
-
|
|
2820
|
-
this.
|
|
2821
|
-
|
|
2863
|
+
this.item = signal(undefined, /* @ts-ignore */
|
|
2864
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
2865
|
+
this.itemId = signal(undefined, /* @ts-ignore */
|
|
2866
|
+
...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
2867
|
+
this.actionData = signal(undefined, /* @ts-ignore */
|
|
2868
|
+
...(ngDevMode ? [{ debugName: "actionData" }] : /* istanbul ignore next */ []));
|
|
2869
|
+
this.editorAction = computed(() => this.data().descriptor, /* @ts-ignore */
|
|
2870
|
+
...(ngDevMode ? [{ debugName: "editorAction" }] : /* istanbul ignore next */ []));
|
|
2822
2871
|
// actions
|
|
2823
2872
|
this.actions = computed(() => {
|
|
2824
2873
|
const actions = [];
|
|
@@ -2826,13 +2875,16 @@ class ActionEditorInjectorContextComponent {
|
|
|
2826
2875
|
if (action instanceof ActionEditorSubmitDescriptorInst) {
|
|
2827
2876
|
action.withButtonOpts({
|
|
2828
2877
|
...action.button,
|
|
2878
|
+
// eslint-disable-next-line sonarjs/no-nested-conditional
|
|
2829
2879
|
icon: action.button?.icon === undefined ? (action.submitType === ActionEditorSubmitTypeEnum.Submit ? 'pi pi-check' : 'pi pi-times') : action.button.icon,
|
|
2830
2880
|
label: action.button?.label === undefined
|
|
2831
|
-
?
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2881
|
+
? // eslint-disable-next-line sonarjs/no-nested-conditional
|
|
2882
|
+
action.submitType === ActionEditorSubmitTypeEnum.Submit
|
|
2883
|
+
? 'general.save'
|
|
2884
|
+
: // eslint-disable-next-line sonarjs/no-nested-conditional
|
|
2885
|
+
this.data().isDialog
|
|
2886
|
+
? 'general.close'
|
|
2887
|
+
: 'general.cancel'
|
|
2836
2888
|
: action.button.label
|
|
2837
2889
|
});
|
|
2838
2890
|
// assign run operations
|
|
@@ -2856,19 +2908,28 @@ class ActionEditorInjectorContextComponent {
|
|
|
2856
2908
|
actions.push(action);
|
|
2857
2909
|
}
|
|
2858
2910
|
return actions;
|
|
2859
|
-
},
|
|
2860
|
-
|
|
2911
|
+
}, /* @ts-ignore */
|
|
2912
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
2913
|
+
this.toolbarLeftActions = computed(() => this.actions().filter(a => a.position === ActionPositionEnum.ToolbarLeft), /* @ts-ignore */
|
|
2914
|
+
...(ngDevMode ? [{ debugName: "toolbarLeftActions" }] : /* istanbul ignore next */ []));
|
|
2861
2915
|
this.toolbarRightActions = computed(() => this.actions()
|
|
2862
2916
|
.filter(a => a.position === ActionPositionEnum.ToolbarRight)
|
|
2863
|
-
.reverse(),
|
|
2864
|
-
|
|
2917
|
+
.reverse(), /* @ts-ignore */
|
|
2918
|
+
...(ngDevMode ? [{ debugName: "toolbarRightActions" }] : /* istanbul ignore next */ []));
|
|
2919
|
+
this.footerLeftActions = computed(() => this.actions().filter(a => a.position === ActionPositionEnum.FooterLeft), /* @ts-ignore */
|
|
2920
|
+
...(ngDevMode ? [{ debugName: "footerLeftActions" }] : /* istanbul ignore next */ []));
|
|
2865
2921
|
this.footerRightActions = computed(() => this.actions()
|
|
2866
2922
|
.filter(a => a.position === ActionPositionEnum.FooterRight)
|
|
2867
|
-
.reverse(),
|
|
2868
|
-
|
|
2869
|
-
this.
|
|
2870
|
-
|
|
2871
|
-
this.
|
|
2923
|
+
.reverse(), /* @ts-ignore */
|
|
2924
|
+
...(ngDevMode ? [{ debugName: "footerRightActions" }] : /* istanbul ignore next */ []));
|
|
2925
|
+
this.loading = signal(false, /* @ts-ignore */
|
|
2926
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2927
|
+
this.formValue = signal(undefined, /* @ts-ignore */
|
|
2928
|
+
...(ngDevMode ? [{ debugName: "formValue" }] : /* istanbul ignore next */ []));
|
|
2929
|
+
this.submitLoading = signal(false, /* @ts-ignore */
|
|
2930
|
+
...(ngDevMode ? [{ debugName: "submitLoading" }] : /* istanbul ignore next */ []));
|
|
2931
|
+
this.autoSaveStatus = signal(undefined, /* @ts-ignore */
|
|
2932
|
+
...(ngDevMode ? [{ debugName: "autoSaveStatus" }] : /* istanbul ignore next */ []));
|
|
2872
2933
|
effectWithDeps([this.data], ([data]) => {
|
|
2873
2934
|
this.item.set(data.item);
|
|
2874
2935
|
this.itemId.set(data.itemId);
|
|
@@ -3169,12 +3230,12 @@ class ActionEditorInjectorContextComponent {
|
|
|
3169
3230
|
sourceComponent: this
|
|
3170
3231
|
};
|
|
3171
3232
|
}
|
|
3172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3173
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3234
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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 mng-action-editor-dialog-close-button-wrapper\">\n <button\n pButton\n severity=\"secondary\"\n class=\"p-dialog-header-icon p-button-icon-only p-dialog-close-button\"\n text=\"true\"\n rounded=\"true\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <i class=\"pi pi-times\"></i>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-col\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"grow mng-action-editor-toolbar-container\">\n <p-toolbar class=\"mng-action-editor-toolbar\">\n <ng-template #start>\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 #end>\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=\"grow 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-between 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: [".p-dialog.mng-dialog.mng-action-editor-dialog .p-dialog-header.mng-action-editor-dialog-close-button-wrapper{position:absolute;top:.63rem;right:1rem;background:transparent;padding:0}.p-dialog.mng-dialog.mng-action-editor-on-route-dialog .p-dialog-header .p-dialog-maximize-button{position:absolute;top:.6rem;right:4.1rem}mng-action-editor-injector-context.p-toolbar.mng-action-editor-toolbar{border:none}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled", "editorId", "itemId", "showAutoSaveStatus"], outputs: ["itemChange", "formSubmit", "valueChange", "autoSaveStatus"] }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }, { kind: "component", type: ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: Toolbar, selector: "p-toolbar", inputs: ["styleClass", "ariaLabelledBy"] }, { kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3174
3235
|
}
|
|
3175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
|
|
3176
3237
|
type: Component,
|
|
3177
|
-
args: [{ selector: 'mng-action-editor-injector-context', imports: [ActionComponent, FormEditorComponent, EditorAutoSaveStatusComponent, ProgressSpinner, Toolbar, ButtonDirective],
|
|
3238
|
+
args: [{ selector: 'mng-action-editor-injector-context', imports: [ActionComponent, FormEditorComponent, EditorAutoSaveStatusComponent, ProgressSpinner, Toolbar, ButtonDirective], encapsulation: ViewEncapsulation.None, 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 mng-action-editor-dialog-close-button-wrapper\">\n <button\n pButton\n severity=\"secondary\"\n class=\"p-dialog-header-icon p-button-icon-only p-dialog-close-button\"\n text=\"true\"\n rounded=\"true\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <i class=\"pi pi-times\"></i>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-col\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"grow mng-action-editor-toolbar-container\">\n <p-toolbar class=\"mng-action-editor-toolbar\">\n <ng-template #start>\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 #end>\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=\"grow 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-between 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: [".p-dialog.mng-dialog.mng-action-editor-dialog .p-dialog-header.mng-action-editor-dialog-close-button-wrapper{position:absolute;top:.63rem;right:1rem;background:transparent;padding:0}.p-dialog.mng-dialog.mng-action-editor-on-route-dialog .p-dialog-header .p-dialog-maximize-button{position:absolute;top:.6rem;right:4.1rem}mng-action-editor-injector-context.p-toolbar.mng-action-editor-toolbar{border:none}\n"] }]
|
|
3178
3239
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], actionRun: [{ type: i0.Output, args: ["actionRun"] }], actionCancel: [{ type: i0.Output, args: ["actionCancel"] }], formEditorCmp: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FormEditorComponent), { isSignal: true }] }], beforeWindowUnload: [{
|
|
3179
3240
|
type: HostListener,
|
|
3180
3241
|
args: ['window:beforeunload']
|
|
@@ -3193,15 +3254,20 @@ class ActionEditorComponent {
|
|
|
3193
3254
|
constructor() {
|
|
3194
3255
|
this.injContextCmpType = ActionEditorInjectorContextComponent;
|
|
3195
3256
|
this.dialogConfig = inject(DynamicDialogConfig, { optional: true });
|
|
3196
|
-
this.action = input.required(
|
|
3257
|
+
this.action = input.required(/* @ts-ignore */
|
|
3258
|
+
...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
|
|
3197
3259
|
this.dialogData = this.dialogConfig?.data;
|
|
3198
3260
|
this.isDialog = !!this.dialogData;
|
|
3199
3261
|
this.parentInjector = this.dialogData?.injector;
|
|
3200
3262
|
// data source inputs
|
|
3201
|
-
this.itemId = input(
|
|
3202
|
-
|
|
3203
|
-
this.
|
|
3204
|
-
|
|
3263
|
+
this.itemId = input(/* @ts-ignore */
|
|
3264
|
+
...(ngDevMode ? [undefined, { debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
3265
|
+
this.item = input(/* @ts-ignore */
|
|
3266
|
+
...(ngDevMode ? [undefined, { debugName: "item" }] : /* istanbul ignore next */ []));
|
|
3267
|
+
this.actionData = input(/* @ts-ignore */
|
|
3268
|
+
...(ngDevMode ? [undefined, { debugName: "actionData" }] : /* istanbul ignore next */ []));
|
|
3269
|
+
this.dataProvider = input(/* @ts-ignore */
|
|
3270
|
+
...(ngDevMode ? [undefined, { debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
3205
3271
|
this.actionRun = output();
|
|
3206
3272
|
this.actionCancel = output();
|
|
3207
3273
|
this.actionEditorWInjContextInputData = computed(() => {
|
|
@@ -3216,7 +3282,8 @@ class ActionEditorComponent {
|
|
|
3216
3282
|
actionData: this.dialogData?.action.instance.activationParameters?.actionData ?? this.actionData,
|
|
3217
3283
|
dataProvider: this.dataProvider()
|
|
3218
3284
|
};
|
|
3219
|
-
},
|
|
3285
|
+
}, /* @ts-ignore */
|
|
3286
|
+
...(ngDevMode ? [{ debugName: "actionEditorWInjContextInputData" }] : /* istanbul ignore next */ []));
|
|
3220
3287
|
this.itemIdFirstUpdate = true;
|
|
3221
3288
|
this.itemFirstUpdate = true;
|
|
3222
3289
|
effect(() => {
|
|
@@ -3256,38 +3323,45 @@ class ActionEditorComponent {
|
|
|
3256
3323
|
triggerSubmit() {
|
|
3257
3324
|
this.actionEditorWInjContextCmp?.triggerSubmit();
|
|
3258
3325
|
}
|
|
3259
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3260
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3326
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3327
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", 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"] }] }); }
|
|
3261
3328
|
}
|
|
3262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorComponent, decorators: [{
|
|
3263
3330
|
type: Component,
|
|
3264
|
-
args: [{ selector: 'mng-action-editor', imports: [ComponentDirective],
|
|
3331
|
+
args: [{ selector: 'mng-action-editor', imports: [ComponentDirective], template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData()\n }\"\n [parentInjector]=\"parentInjector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n" }]
|
|
3265
3332
|
}], ctorParameters: () => [], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }], itemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemId", required: false }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], actionData: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionData", required: false }] }], dataProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataProvider", required: false }] }], actionRun: [{ type: i0.Output, args: ["actionRun"] }], actionCancel: [{ type: i0.Output, args: ["actionCancel"] }] } });
|
|
3266
3333
|
|
|
3267
3334
|
class DataLanguageDropdownComponent {
|
|
3268
3335
|
constructor() {
|
|
3269
3336
|
this.viewContainer = inject(ViewContainer, { optional: true });
|
|
3270
3337
|
this.commons = inject(CommonsService);
|
|
3271
|
-
this.action = input.required(
|
|
3272
|
-
|
|
3273
|
-
this.
|
|
3274
|
-
|
|
3275
|
-
this.
|
|
3276
|
-
|
|
3338
|
+
this.action = input.required(/* @ts-ignore */
|
|
3339
|
+
...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
|
|
3340
|
+
this.actionData = input.required(/* @ts-ignore */
|
|
3341
|
+
...(ngDevMode ? [{ debugName: "actionData" }] : /* istanbul ignore next */ []));
|
|
3342
|
+
this.item = input.required(/* @ts-ignore */
|
|
3343
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
3344
|
+
this.itemId = input.required(/* @ts-ignore */
|
|
3345
|
+
...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
3346
|
+
this.enabled = input.required(/* @ts-ignore */
|
|
3347
|
+
...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
|
|
3348
|
+
this.loading = input.required(/* @ts-ignore */
|
|
3349
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
3277
3350
|
this.trigger = output();
|
|
3278
3351
|
// dropdown properties
|
|
3279
|
-
this.selectionItemsDataProvider = computed(() => lookupDataProvider().withLookup(() => of(this.commons.appDataLocales())),
|
|
3352
|
+
this.selectionItemsDataProvider = computed(() => lookupDataProvider().withLookup(() => of(this.commons.appDataLocales())), /* @ts-ignore */
|
|
3353
|
+
...(ngDevMode ? [{ debugName: "selectionItemsDataProvider" }] : /* istanbul ignore next */ []));
|
|
3280
3354
|
}
|
|
3281
3355
|
updateDataLocale(dataLang) {
|
|
3282
3356
|
this.commons.setAppDataLocale(dataLang);
|
|
3283
3357
|
this.viewContainer?.reloadTable({});
|
|
3284
3358
|
}
|
|
3285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3286
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3359
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataLanguageDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3360
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", 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", "templates", "inlineSearch", "searchTrim"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
3287
3361
|
}
|
|
3288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataLanguageDropdownComponent, decorators: [{
|
|
3289
3363
|
type: Component,
|
|
3290
|
-
args: [{ selector: 'mng-data-language-dropdown', imports: [DropdownComponent, FormsModule],
|
|
3364
|
+
args: [{ selector: 'mng-data-language-dropdown', imports: [DropdownComponent, FormsModule], template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider()\" [ngModel]=\"commons.appDataLocale()\" [showClear]=\"false\" (valueChange)=\"updateDataLocale($event)\"></mng-dropdown>\n" }]
|
|
3291
3365
|
}], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }], actionData: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionData", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], itemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemId", required: true }] }], enabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "enabled", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: true }] }], trigger: [{ type: i0.Output, args: ["trigger"] }] } });
|
|
3292
3366
|
|
|
3293
3367
|
class ActionRouteComponent {
|
|
@@ -3417,12 +3491,12 @@ class ActionRouteComponent {
|
|
|
3417
3491
|
this.instanceStateSubscription?.unsubscribe();
|
|
3418
3492
|
this.instanceReactivationSubscription?.unsubscribe();
|
|
3419
3493
|
}
|
|
3420
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3421
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3494
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3495
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ActionRouteComponent, isStandalone: true, selector: "mng-action-route", providers: [provideActionExecutor()], ngImport: i0, template: "" }); }
|
|
3422
3496
|
}
|
|
3423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionRouteComponent, decorators: [{
|
|
3424
3498
|
type: Component,
|
|
3425
|
-
args: [{ selector: 'mng-action-route',
|
|
3499
|
+
args: [{ selector: 'mng-action-route', providers: [provideActionExecutor()], template: "" }]
|
|
3426
3500
|
}] });
|
|
3427
3501
|
|
|
3428
3502
|
var actionRoute_component = /*#__PURE__*/Object.freeze({
|
|
@@ -3466,46 +3540,66 @@ class ActionTableComponent {
|
|
|
3466
3540
|
this.actionExecutor = inject(ActionExecutorService);
|
|
3467
3541
|
this.viewContainer = inject((ViewContainer), { optional: true });
|
|
3468
3542
|
// metadata input
|
|
3469
|
-
this.descriptor = input.required(
|
|
3543
|
+
this.descriptor = input.required(/* @ts-ignore */
|
|
3544
|
+
...(ngDevMode ? [{ debugName: "descriptor" }] : /* istanbul ignore next */ []));
|
|
3470
3545
|
// data source inputs
|
|
3471
|
-
this.items = input(
|
|
3472
|
-
|
|
3473
|
-
this.
|
|
3474
|
-
|
|
3475
|
-
this.
|
|
3476
|
-
this.
|
|
3546
|
+
this.items = input(/* @ts-ignore */
|
|
3547
|
+
...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
|
|
3548
|
+
this.result = input(/* @ts-ignore */
|
|
3549
|
+
...(ngDevMode ? [undefined, { debugName: "result" }] : /* istanbul ignore next */ []));
|
|
3550
|
+
this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3551
|
+
this.dataProvider = input(/* @ts-ignore */
|
|
3552
|
+
...(ngDevMode ? [undefined, { debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
3553
|
+
this.queryParamPrepend = input(/* @ts-ignore */
|
|
3554
|
+
...(ngDevMode ? [undefined, { debugName: "queryParamPrepend" }] : /* istanbul ignore next */ []));
|
|
3555
|
+
this.useQueryParams = input(false, /* @ts-ignore */
|
|
3556
|
+
...(ngDevMode ? [{ debugName: "useQueryParams" }] : /* istanbul ignore next */ []));
|
|
3477
3557
|
// extra features input
|
|
3478
|
-
this.tableTemplates = input([],
|
|
3479
|
-
|
|
3480
|
-
this.
|
|
3481
|
-
|
|
3482
|
-
this.
|
|
3483
|
-
|
|
3484
|
-
this.
|
|
3558
|
+
this.tableTemplates = input([], /* @ts-ignore */
|
|
3559
|
+
...(ngDevMode ? [{ debugName: "tableTemplates" }] : /* istanbul ignore next */ []));
|
|
3560
|
+
this.tableClassName = input(/* @ts-ignore */
|
|
3561
|
+
...(ngDevMode ? [undefined, { debugName: "tableClassName" }] : /* istanbul ignore next */ []));
|
|
3562
|
+
this.selectionMode = input('multiple', /* @ts-ignore */
|
|
3563
|
+
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
3564
|
+
this.selectionEnabled = input(false, /* @ts-ignore */
|
|
3565
|
+
...(ngDevMode ? [{ debugName: "selectionEnabled" }] : /* istanbul ignore next */ []));
|
|
3566
|
+
this.globalFilterFields = input(/* @ts-ignore */
|
|
3567
|
+
...(ngDevMode ? [undefined, { debugName: "globalFilterFields" }] : /* istanbul ignore next */ []));
|
|
3568
|
+
this.rowReorderEnabled = input(true, /* @ts-ignore */
|
|
3569
|
+
...(ngDevMode ? [{ debugName: "rowReorderEnabled" }] : /* istanbul ignore next */ []));
|
|
3570
|
+
this.featureConfig = input(undefined, /* @ts-ignore */
|
|
3571
|
+
...(ngDevMode ? [{ debugName: "featureConfig" }] : /* istanbul ignore next */ []));
|
|
3485
3572
|
// actions
|
|
3486
|
-
this.actions = input([],
|
|
3573
|
+
this.actions = input([], /* @ts-ignore */
|
|
3574
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ [])); // can be anything
|
|
3487
3575
|
// component inputs
|
|
3488
|
-
this.columnActionMinWidthInput = input(undefined, { ...(ngDevMode ? { debugName: "columnActionMinWidthInput" } : {}), alias: 'columnActionMinWidth' });
|
|
3576
|
+
this.columnActionMinWidthInput = input(undefined, { ...(ngDevMode ? { debugName: "columnActionMinWidthInput" } : /* istanbul ignore next */ {}), alias: 'columnActionMinWidth' });
|
|
3489
3577
|
this.columnActionMinWidth = computed(() => this.descriptor() && !this.columnActionMinWidthInput()
|
|
3490
3578
|
? calculateTableColumnActionWidth(this.descriptor(), this.rowInlineActions())
|
|
3491
|
-
: this.columnActionMinWidthInput(),
|
|
3579
|
+
: this.columnActionMinWidthInput(), /* @ts-ignore */
|
|
3580
|
+
...(ngDevMode ? [{ debugName: "columnActionMinWidth" }] : /* istanbul ignore next */ []));
|
|
3492
3581
|
// event outputs
|
|
3493
3582
|
this.tableLoad = output();
|
|
3494
3583
|
this.selectionChange = output();
|
|
3495
3584
|
this.rowReorder = output();
|
|
3496
3585
|
// content and view queries
|
|
3497
|
-
this.contentTemplates = contentChildren(TableTemplateDirective,
|
|
3498
|
-
|
|
3586
|
+
this.contentTemplates = contentChildren(TableTemplateDirective, /* @ts-ignore */
|
|
3587
|
+
...(ngDevMode ? [{ debugName: "contentTemplates" }] : /* istanbul ignore next */ []));
|
|
3588
|
+
this.table = viewChild.required(TableComponent, /* @ts-ignore */
|
|
3589
|
+
...(ngDevMode ? [{ debugName: "table" }] : /* istanbul ignore next */ []));
|
|
3499
3590
|
this.tableTemplatesMerged = computed(() => {
|
|
3500
3591
|
return [...this.contentTemplates(), ...this.tableTemplates()];
|
|
3501
|
-
},
|
|
3592
|
+
}, /* @ts-ignore */
|
|
3593
|
+
...(ngDevMode ? [{ debugName: "tableTemplatesMerged" }] : /* istanbul ignore next */ []));
|
|
3502
3594
|
// actions
|
|
3503
3595
|
this.rowClickActions = computed(() => {
|
|
3504
3596
|
return this.actions().filter(action => action.position === ActionPositionEnum.RowClick);
|
|
3505
|
-
},
|
|
3597
|
+
}, /* @ts-ignore */
|
|
3598
|
+
...(ngDevMode ? [{ debugName: "rowClickActions" }] : /* istanbul ignore next */ []));
|
|
3506
3599
|
this.rowInlineActions = computed(() => {
|
|
3507
3600
|
return this.actions().filter(action => action.position === ActionPositionEnum.RowInline);
|
|
3508
|
-
},
|
|
3601
|
+
}, /* @ts-ignore */
|
|
3602
|
+
...(ngDevMode ? [{ debugName: "rowInlineActions" }] : /* istanbul ignore next */ []));
|
|
3509
3603
|
this.viewContainer?.tableReload$.pipe(takeUntilDestroyed()).subscribe(e => this.reload(e));
|
|
3510
3604
|
}
|
|
3511
3605
|
reload(e) {
|
|
@@ -3539,12 +3633,12 @@ class ActionTableComponent {
|
|
|
3539
3633
|
this.reload();
|
|
3540
3634
|
}
|
|
3541
3635
|
}
|
|
3542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3543
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3636
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3637
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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 }, queryParamPrepend: { classPropertyName: "queryParamPrepend", publicName: "queryParamPrepend", isSignal: true, isRequired: false, transformFunction: null }, useQueryParams: { classPropertyName: "useQueryParams", publicName: "useQueryParams", isSignal: true, isRequired: false, transformFunction: null }, tableTemplates: { classPropertyName: "tableTemplates", publicName: "tableTemplates", isSignal: true, isRequired: false, transformFunction: null }, tableClassName: { classPropertyName: "tableClassName", publicName: "tableClassName", 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 }, featureConfig: { classPropertyName: "featureConfig", publicName: "featureConfig", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, columnActionMinWidthInput: { classPropertyName: "columnActionMinWidthInput", publicName: "columnActionMinWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tableLoad: "tableLoad", selectionChange: "selectionChange", rowReorder: "rowReorder" }, providers: [provideActionExecutor()], queries: [{ propertyName: "contentTemplates", predicate: TableTemplateDirective, isSignal: true }], viewQueries: [{ 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 [queryParamPrepend]=\"queryParamPrepend()\"\n [useQueryParams]=\"useQueryParams()\"\n [selectionMode]=\"selectionMode()\"\n [selectionEnabled]=\"selectionEnabled()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [columnLastMinWidth]=\"columnActionMinWidth()\"\n [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n [rowReorderEnabled]=\"rowReorderEnabled()\"\n [featureConfig]=\"featureConfig()\"\n [class]=\"tableClassName()\"\n [templates]=\"tableTemplatesMerged()\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (rowReorder)=\"onRowReorder($event)\">\n @if (rowInlineActions().length > 0) {\n <ng-template mngTableTemplate name=\"columnCustomLast\" let-item=\"item\" let-idx=\"index\">\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</mng-table>\n", dependencies: [{ kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "queryParamPrepend", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "featureConfig", "columnLastMinWidth", "globalFilterFields", "templates"], outputs: ["tableLoad", "cellClick", "selectionChange", "rowReorder", "filterChange", "searchChange", "sortChange"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: TableTemplateDirective, selector: "[mngTableTemplate]", inputs: ["name"] }] }); }
|
|
3544
3638
|
}
|
|
3545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionTableComponent, decorators: [{
|
|
3546
3640
|
type: Component,
|
|
3547
|
-
args: [{ selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TableTemplateDirective], providers: [provideActionExecutor()],
|
|
3641
|
+
args: [{ selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TableTemplateDirective], providers: [provideActionExecutor()], template: "<mng-table\n [descriptor]=\"descriptor()\"\n [items]=\"items()\"\n [result]=\"result()\"\n [loading]=\"loading()\"\n [dataProvider]=\"dataProvider()\"\n [queryParamPrepend]=\"queryParamPrepend()\"\n [useQueryParams]=\"useQueryParams()\"\n [selectionMode]=\"selectionMode()\"\n [selectionEnabled]=\"selectionEnabled()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [columnLastMinWidth]=\"columnActionMinWidth()\"\n [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n [rowReorderEnabled]=\"rowReorderEnabled()\"\n [featureConfig]=\"featureConfig()\"\n [class]=\"tableClassName()\"\n [templates]=\"tableTemplatesMerged()\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (rowReorder)=\"onRowReorder($event)\">\n @if (rowInlineActions().length > 0) {\n <ng-template mngTableTemplate name=\"columnCustomLast\" let-item=\"item\" let-idx=\"index\">\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</mng-table>\n" }]
|
|
3548
3642
|
}], ctorParameters: () => [], propDecorators: { descriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "descriptor", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], result: [{ type: i0.Input, args: [{ isSignal: true, alias: "result", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], dataProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataProvider", required: false }] }], queryParamPrepend: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParamPrepend", required: false }] }], useQueryParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "useQueryParams", required: false }] }], tableTemplates: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableTemplates", required: false }] }], tableClassName: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClassName", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectionEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionEnabled", required: false }] }], globalFilterFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalFilterFields", required: false }] }], rowReorderEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowReorderEnabled", required: false }] }], featureConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "featureConfig", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], columnActionMinWidthInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnActionMinWidth", required: false }] }], tableLoad: [{ type: i0.Output, args: ["tableLoad"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], rowReorder: [{ type: i0.Output, args: ["rowReorder"] }], contentTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableTemplateDirective), { isSignal: true }] }], table: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TableComponent), { isSignal: true }] }] } });
|
|
3549
3643
|
|
|
3550
3644
|
const unsavedChangesGuard = (component) => {
|
|
@@ -3570,18 +3664,30 @@ class TableviewComponent {
|
|
|
3570
3664
|
constructor() {
|
|
3571
3665
|
this.viewContainer = inject(ViewContainer, { optional: true });
|
|
3572
3666
|
this.config = inject(COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, { optional: true });
|
|
3573
|
-
this.actionTable = viewChild.required((ActionTableComponent)
|
|
3574
|
-
|
|
3575
|
-
this.
|
|
3576
|
-
|
|
3577
|
-
this.
|
|
3578
|
-
|
|
3579
|
-
this.
|
|
3580
|
-
|
|
3581
|
-
this.
|
|
3582
|
-
|
|
3583
|
-
this.
|
|
3584
|
-
|
|
3667
|
+
this.actionTable = viewChild.required((ActionTableComponent), /* @ts-ignore */
|
|
3668
|
+
...(ngDevMode ? [{ debugName: "actionTable" }] : /* istanbul ignore next */ []));
|
|
3669
|
+
this.descriptor = input.required(/* @ts-ignore */
|
|
3670
|
+
...(ngDevMode ? [{ debugName: "descriptor" }] : /* istanbul ignore next */ []));
|
|
3671
|
+
this.dataProvider = input(/* @ts-ignore */
|
|
3672
|
+
...(ngDevMode ? [undefined, { debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
3673
|
+
this.actions = input([], /* @ts-ignore */
|
|
3674
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
3675
|
+
this.toolbarLeftActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarLeft]), /* @ts-ignore */
|
|
3676
|
+
...(ngDevMode ? [{ debugName: "toolbarLeftActions" }] : /* istanbul ignore next */ []));
|
|
3677
|
+
this.toolbarRightActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarRight]).reverse(), /* @ts-ignore */
|
|
3678
|
+
...(ngDevMode ? [{ debugName: "toolbarRightActions" }] : /* istanbul ignore next */ []));
|
|
3679
|
+
this.tableActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.TableHeader, ActionPositionEnum.RowInline, ActionPositionEnum.RowClick]), /* @ts-ignore */
|
|
3680
|
+
...(ngDevMode ? [{ debugName: "tableActions" }] : /* istanbul ignore next */ []));
|
|
3681
|
+
this.tableParams = signal(undefined, /* @ts-ignore */
|
|
3682
|
+
...(ngDevMode ? [{ debugName: "tableParams" }] : /* istanbul ignore next */ []));
|
|
3683
|
+
this.hasItemSelectionAction = computed(() => [...this.toolbarLeftActions(), ...this.toolbarRightActions()].some(e => e.hasItemsSelection), /* @ts-ignore */
|
|
3684
|
+
...(ngDevMode ? [{ debugName: "hasItemSelectionAction" }] : /* istanbul ignore next */ []));
|
|
3685
|
+
this.selectedItems = signal([], /* @ts-ignore */
|
|
3686
|
+
...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
3687
|
+
this.contentTableTemplates = contentChildren(TableTemplateDirective, /* @ts-ignore */
|
|
3688
|
+
...(ngDevMode ? [{ debugName: "contentTableTemplates" }] : /* istanbul ignore next */ []));
|
|
3689
|
+
this.tableTemplates = computed(() => [...this.contentTableTemplates()], /* @ts-ignore */
|
|
3690
|
+
...(ngDevMode ? [{ debugName: "tableTemplates" }] : /* istanbul ignore next */ []));
|
|
3585
3691
|
}
|
|
3586
3692
|
ngOnInit() {
|
|
3587
3693
|
if (this.viewContainer) {
|
|
@@ -3601,12 +3707,12 @@ class TableviewComponent {
|
|
|
3601
3707
|
filterActionsByPositions(actions, actionPositions) {
|
|
3602
3708
|
return actions.filter(action => (action.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true) && actionPositions.includes(action.position));
|
|
3603
3709
|
}
|
|
3604
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3605
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3710
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3711
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideViewContainer()], queries: [{ propertyName: "contentTableTemplates", predicate: TableTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "actionTable", first: true, predicate: (ActionTableComponent), descendants: true, 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-6\">\n <ng-template #start>\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 #end>\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]=\"descriptor().queryParamsEnabled !== false\"\n [queryParamPrepend]=\"descriptor().queryParamPrepend\"\n [actions]=\"tableActions()\"\n [selectionEnabled]=\"hasItemSelectionAction()\"\n [selectionMode]=\"'multiple'\"\n [tableTemplates]=\"tableTemplates()\"\n [featureConfig]=\"config?.table\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [".mng-tableview .p-paginator .p-paginator-current{margin-left:auto}.mng-tableview .p-progressbar{height:.5rem;background-color:#d8dadc}.mng-tableview .p-progressbar .p-progressbar-value{background-color:#607d8b}.mng-tableview .p-datatable .p-datatable-scrollable-table>.p-datatable-thead{z-index:2}.mng-tableview .p-datatable .p-datatable-loading-overlay{z-index:3}.mng-tableview .p-datatable .p-datatable-header{text-align:left;font-size:1.5rem}.mng-tableview .p-datatable .p-datatable-thead>tr>th{text-align:left}\n"], dependencies: [{ 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", "queryParamPrepend", "useQueryParams", "tableTemplates", "tableClassName", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "featureConfig", "actions", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "rowReorder"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: Toolbar, selector: "p-toolbar", inputs: ["styleClass", "ariaLabelledBy"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3606
3712
|
}
|
|
3607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewComponent, decorators: [{
|
|
3608
3714
|
type: Component,
|
|
3609
|
-
args: [{ selector: 'mng-tableview', imports: [ActionComponent, ActionTableComponent, RouterOutlet, Toolbar], providers: [provideViewContainer()],
|
|
3715
|
+
args: [{ selector: 'mng-tableview', imports: [ActionComponent, ActionTableComponent, RouterOutlet, Toolbar], providers: [provideViewContainer()], encapsulation: ViewEncapsulation.None, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-6\">\n <ng-template #start>\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 #end>\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]=\"descriptor().queryParamsEnabled !== false\"\n [queryParamPrepend]=\"descriptor().queryParamPrepend\"\n [actions]=\"tableActions()\"\n [selectionEnabled]=\"hasItemSelectionAction()\"\n [selectionMode]=\"'multiple'\"\n [tableTemplates]=\"tableTemplates()\"\n [featureConfig]=\"config?.table\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [".mng-tableview .p-paginator .p-paginator-current{margin-left:auto}.mng-tableview .p-progressbar{height:.5rem;background-color:#d8dadc}.mng-tableview .p-progressbar .p-progressbar-value{background-color:#607d8b}.mng-tableview .p-datatable .p-datatable-scrollable-table>.p-datatable-thead{z-index:2}.mng-tableview .p-datatable .p-datatable-loading-overlay{z-index:3}.mng-tableview .p-datatable .p-datatable-header{text-align:left;font-size:1.5rem}.mng-tableview .p-datatable .p-datatable-thead>tr>th{text-align:left}\n"] }]
|
|
3610
3716
|
}], propDecorators: { actionTable: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ActionTableComponent), { isSignal: true }] }], descriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "descriptor", required: true }] }], dataProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataProvider", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], contentTableTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableTemplateDirective), { isSignal: true }] }] } });
|
|
3611
3717
|
|
|
3612
3718
|
function getActionParentFormEditor(ctx,
|
|
@@ -3671,10 +3777,10 @@ class DefaultDataProviderExecutor extends DataProviderExecutor {
|
|
|
3671
3777
|
runDelete(ctx, fallback) {
|
|
3672
3778
|
return fallback ? runFnFromDataProviderOrFallback(ctx, runDeleteFromDataProvider, fallback) : runDeleteFromDataProvider(ctx);
|
|
3673
3779
|
}
|
|
3674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3675
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3780
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DefaultDataProviderExecutor, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3781
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DefaultDataProviderExecutor }); }
|
|
3676
3782
|
}
|
|
3677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DefaultDataProviderExecutor, decorators: [{
|
|
3678
3784
|
type: Injectable
|
|
3679
3785
|
}] });
|
|
3680
3786
|
|
|
@@ -3685,8 +3791,10 @@ class ACommonsFormlyType extends FieldType {
|
|
|
3685
3791
|
this.cd = inject(ChangeDetectorRef);
|
|
3686
3792
|
this.formStateDisabledSubject = new BehaviorSubject(false);
|
|
3687
3793
|
this.formStateDisabled$ = this.formStateDisabledSubject.asObservable();
|
|
3688
|
-
this.descriptorSig = signal(undefined,
|
|
3689
|
-
|
|
3794
|
+
this.descriptorSig = signal(undefined, /* @ts-ignore */
|
|
3795
|
+
...(ngDevMode ? [{ debugName: "descriptorSig" }] : /* istanbul ignore next */ []));
|
|
3796
|
+
this.fieldSig = signal(undefined, /* @ts-ignore */
|
|
3797
|
+
...(ngDevMode ? [{ debugName: "fieldSig" }] : /* istanbul ignore next */ []));
|
|
3690
3798
|
}
|
|
3691
3799
|
get descriptor() {
|
|
3692
3800
|
return this.props.descriptor;
|
|
@@ -3713,38 +3821,44 @@ class ACommonsFormlyType extends FieldType {
|
|
|
3713
3821
|
.pipe(startWith(this.formState.disabled ?? false), takeUntilDestroyed(this.destroyRef))
|
|
3714
3822
|
.subscribe(value => this.formStateDisabledSubject.next(value));
|
|
3715
3823
|
}
|
|
3716
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3717
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
3824
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3825
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: ACommonsFormlyType, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
3718
3826
|
}
|
|
3719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyType, decorators: [{
|
|
3720
3828
|
type: Directive
|
|
3721
3829
|
}] });
|
|
3722
3830
|
|
|
3723
3831
|
class ACommonsFormlyFieldType extends ACommonsFormlyType {
|
|
3724
3832
|
constructor() {
|
|
3725
3833
|
super(...arguments);
|
|
3726
|
-
this.controlClassName = computed(() => ['mng-field-control', this.descriptorSig()?.className?.control].filter(c => !!c).join(' '),
|
|
3727
|
-
|
|
3728
|
-
this.
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3834
|
+
this.controlClassName = computed(() => ['mng-field-control', this.descriptorSig()?.className?.control].filter(c => !!c).join(' '), /* @ts-ignore */
|
|
3835
|
+
...(ngDevMode ? [{ debugName: "controlClassName" }] : /* istanbul ignore next */ []));
|
|
3836
|
+
this.labelClassName = computed(() => ['mng-field-label', this.descriptorSig()?.className?.label].filter(c => !!c).join(' '), /* @ts-ignore */
|
|
3837
|
+
...(ngDevMode ? [{ debugName: "labelClassName" }] : /* istanbul ignore next */ []));
|
|
3838
|
+
this.controlInputClassName = computed(() => ['mng-field-control-input', this.descriptorSig()?.className?.input].filter(c => !!c).join(' '), /* @ts-ignore */
|
|
3839
|
+
...(ngDevMode ? [{ debugName: "controlInputClassName" }] : /* istanbul ignore next */ []));
|
|
3840
|
+
this.controlWithInputClassName = computed(() => this.controlClassName() + ' ' + this.controlInputClassName(), /* @ts-ignore */
|
|
3841
|
+
...(ngDevMode ? [{ debugName: "controlWithInputClassName" }] : /* istanbul ignore next */ []));
|
|
3842
|
+
}
|
|
3843
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyFieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3844
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: ACommonsFormlyFieldType, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
3733
3845
|
}
|
|
3734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3846
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyFieldType, decorators: [{
|
|
3735
3847
|
type: Directive
|
|
3736
3848
|
}] });
|
|
3737
3849
|
|
|
3738
3850
|
class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
|
|
3739
3851
|
constructor() {
|
|
3740
3852
|
super(...arguments);
|
|
3741
|
-
this.buttonStyle = signal({ severity: 'primary' },
|
|
3742
|
-
|
|
3853
|
+
this.buttonStyle = signal({ severity: 'primary' }, /* @ts-ignore */
|
|
3854
|
+
...(ngDevMode ? [{ debugName: "buttonStyle" }] : /* istanbul ignore next */ []));
|
|
3855
|
+
this.actionMessage = signal(undefined, /* @ts-ignore */
|
|
3856
|
+
...(ngDevMode ? [{ debugName: "actionMessage" }] : /* istanbul ignore next */ []));
|
|
3743
3857
|
}
|
|
3744
3858
|
ngOnInit() {
|
|
3745
3859
|
super.ngOnInit();
|
|
3746
3860
|
if (this.descriptor.button?.style) {
|
|
3747
|
-
this.buttonStyle.set(
|
|
3861
|
+
this.buttonStyle.set(buttonStyleToOptimusStyles(this.descriptor.button?.style));
|
|
3748
3862
|
}
|
|
3749
3863
|
}
|
|
3750
3864
|
ngOnDestroy() {
|
|
@@ -3779,12 +3893,12 @@ class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
|
|
|
3779
3893
|
this.actionMessage.set(res.message);
|
|
3780
3894
|
}
|
|
3781
3895
|
}
|
|
3782
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3783
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3896
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3897
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"mng-field flex items-center\">\n <button\n type=\"button\"\n pButton\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 [size]=\"buttonStyle().size\"\n [severity]=\"buttonStyle().severity\"\n [text]=\"buttonStyle().text\"\n [outlined]=\"buttonStyle().outlined\"\n [raised]=\"buttonStyle().raised\"\n [rounded]=\"buttonStyle().rounded\"\n [class]=\"buttonStyle().class\"\n (click)=\"onClick()\"></button>\n @if (actionMessage()) {\n <p-message [severity]=\"actionMessage()?.severity ?? 'success'\" closable=\"true\">{{ actionMessage()?.content }}</p-message>\n }\n</div>\n", dependencies: [{ kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }, { kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
3784
3898
|
}
|
|
3785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldActionComponent, decorators: [{
|
|
3786
3900
|
type: Component,
|
|
3787
|
-
args: [{ selector: 'mng-formly-field-action', imports: [TranslatePipe, Tooltip, Message, ButtonDirective],
|
|
3901
|
+
args: [{ selector: 'mng-formly-field-action', imports: [TranslatePipe, Tooltip, Message, ButtonDirective], template: "<div class=\"mng-field flex items-center\">\n <button\n type=\"button\"\n pButton\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 [size]=\"buttonStyle().size\"\n [severity]=\"buttonStyle().severity\"\n [text]=\"buttonStyle().text\"\n [outlined]=\"buttonStyle().outlined\"\n [raised]=\"buttonStyle().raised\"\n [rounded]=\"buttonStyle().rounded\"\n [class]=\"buttonStyle().class\"\n (click)=\"onClick()\"></button>\n @if (actionMessage()) {\n <p-message [severity]=\"actionMessage()?.severity ?? 'success'\" closable=\"true\">{{ actionMessage()?.content }}</p-message>\n }\n</div>\n" }]
|
|
3788
3902
|
}] });
|
|
3789
3903
|
|
|
3790
3904
|
class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
|
|
@@ -3812,12 +3926,12 @@ class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
|
|
|
3812
3926
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3813
3927
|
});
|
|
3814
3928
|
}
|
|
3815
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3816
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3929
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3930
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"descriptor.property\"\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]=\"controlInputClassName()\"\n [class]=\"controlClassName()\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.inlineSearch ?? false\"\n [allowInput]=\"descriptor.allowInput ?? 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", "allowInput", "searchTrim", "disabled", "templates"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
3817
3931
|
}
|
|
3818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
|
|
3819
3933
|
type: Component,
|
|
3820
|
-
args: [{ selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, TranslatePipe, FormlyAttributes],
|
|
3934
|
+
args: [{ selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, TranslatePipe, FormlyAttributes], template: "<mng-autocomplete\n [id]=\"descriptor.property\"\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]=\"controlInputClassName()\"\n [class]=\"controlClassName()\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.inlineSearch ?? false\"\n [allowInput]=\"descriptor.allowInput ?? false\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\">\n</mng-autocomplete>\n" }]
|
|
3821
3935
|
}] });
|
|
3822
3936
|
|
|
3823
3937
|
class FormlyFieldCustomComponent extends ACommonsFormlyFieldType {
|
|
@@ -3841,16 +3955,15 @@ class FormlyFieldCustomComponent extends ACommonsFormlyFieldType {
|
|
|
3841
3955
|
...this.descriptor.customComponentInputs
|
|
3842
3956
|
};
|
|
3843
3957
|
}
|
|
3844
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3845
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3958
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3959
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: FormlyFieldCustomComponent, isStandalone: true, selector: "mng-formly-field-custom", usesInheritance: true, ngImport: i0, template: `<ng-container [mngComponent]="descriptor.customComponentType!" [inputs]="inputs"></ng-container>`, isInline: true, dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }] }); }
|
|
3846
3960
|
}
|
|
3847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldCustomComponent, decorators: [{
|
|
3848
3962
|
type: Component,
|
|
3849
3963
|
args: [{
|
|
3850
3964
|
selector: 'mng-formly-field-custom',
|
|
3851
3965
|
template: `<ng-container [mngComponent]="descriptor.customComponentType!" [inputs]="inputs"></ng-container>`,
|
|
3852
|
-
imports: [ComponentDirective]
|
|
3853
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
3966
|
+
imports: [ComponentDirective]
|
|
3854
3967
|
}]
|
|
3855
3968
|
}] });
|
|
3856
3969
|
|
|
@@ -3874,12 +3987,12 @@ class FormlyFieldDropdownComponent extends ACommonsFormlyFieldType {
|
|
|
3874
3987
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3875
3988
|
});
|
|
3876
3989
|
}
|
|
3877
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3878
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3990
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3991
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"descriptor.property\"\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 [allowInput]=\"descriptor.allowInput ?? false\"\n [inlineSearch]=\"descriptor.inlineSearch ?? false\"\n [showClear]=\"!props.required\"\n [className]=\"controlInputClassName()\"\n [class]=\"controlClassName()\" />\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", "templates", "inlineSearch", "searchTrim"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
3879
3992
|
}
|
|
3880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3993
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
|
|
3881
3994
|
type: Component,
|
|
3882
|
-
args: [{ selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, TranslatePipe, FormlyAttributes],
|
|
3995
|
+
args: [{ selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, TranslatePipe, FormlyAttributes], template: "<mng-dropdown\n [id]=\"descriptor.property\"\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 [allowInput]=\"descriptor.allowInput ?? false\"\n [inlineSearch]=\"descriptor.inlineSearch ?? false\"\n [showClear]=\"!props.required\"\n [className]=\"controlInputClassName()\"\n [class]=\"controlClassName()\" />\n" }]
|
|
3883
3996
|
}] });
|
|
3884
3997
|
|
|
3885
3998
|
function getEditorFieldLabel(descriptor, editorDescriptor) {
|
|
@@ -3924,10 +4037,10 @@ class FormlyFieldLabelPipe {
|
|
|
3924
4037
|
const label = getEditorFieldLabel(value, editorDescriptor) ?? '';
|
|
3925
4038
|
return label === '' ? '\u00A0' : label;
|
|
3926
4039
|
}
|
|
3927
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3928
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
4040
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4041
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelPipe, isStandalone: true, name: "mngFormlyFieldLabel" }); }
|
|
3929
4042
|
}
|
|
3930
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelPipe, decorators: [{
|
|
3931
4044
|
type: Pipe,
|
|
3932
4045
|
args: [{
|
|
3933
4046
|
name: 'mngFormlyFieldLabel',
|
|
@@ -3936,10 +4049,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
3936
4049
|
}] });
|
|
3937
4050
|
|
|
3938
4051
|
class ACommonsFormlyGroupType extends ACommonsFormlyType {
|
|
3939
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3940
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
4052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyGroupType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4053
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: ACommonsFormlyGroupType, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
3941
4054
|
}
|
|
3942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4055
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyGroupType, decorators: [{
|
|
3943
4056
|
type: Directive
|
|
3944
4057
|
}] });
|
|
3945
4058
|
|
|
@@ -3955,14 +4068,15 @@ class FormlyFieldFieldsetComponent extends ACommonsFormlyGroupType {
|
|
|
3955
4068
|
type: f.props.descriptor?.type,
|
|
3956
4069
|
config: f
|
|
3957
4070
|
}));
|
|
3958
|
-
},
|
|
4071
|
+
}, /* @ts-ignore */
|
|
4072
|
+
...(ngDevMode ? [{ debugName: "fieldGroup" }] : /* istanbul ignore next */ []));
|
|
3959
4073
|
}
|
|
3960
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3961
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4074
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4075
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset\n [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\"\n [hidden]=\"group.config.props['groupHidden']\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "component", type: Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "style", "styleClass", "transitionOptions", "motionOptions", "collapsed"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }] }); }
|
|
3962
4076
|
}
|
|
3963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
|
|
3964
4078
|
type: Component,
|
|
3965
|
-
args: [{ selector: 'mng-formly-field-fieldset', imports: [TranslatePipe, FormlyFieldLabelPipe, Fieldset, FormlyField],
|
|
4079
|
+
args: [{ selector: 'mng-formly-field-fieldset', imports: [TranslatePipe, FormlyFieldLabelPipe, Fieldset, FormlyField], template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset\n [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\"\n [hidden]=\"group.config.props['groupHidden']\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n" }]
|
|
3966
4080
|
}] });
|
|
3967
4081
|
|
|
3968
4082
|
class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
@@ -3979,7 +4093,8 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
3979
4093
|
this.imageFormArray = this.formBuilder.array([]);
|
|
3980
4094
|
this.invalidFileSizeMessageDetail = signal(this.translateService.instant('mngEditor.validation.fileTooBig', {
|
|
3981
4095
|
max: this.#formatSize(500000)
|
|
3982
|
-
}),
|
|
4096
|
+
}), /* @ts-ignore */
|
|
4097
|
+
...(ngDevMode ? [{ debugName: "invalidFileSizeMessageDetail" }] : /* istanbul ignore next */ []));
|
|
3983
4098
|
}
|
|
3984
4099
|
ngOnInit() {
|
|
3985
4100
|
super.ngOnInit();
|
|
@@ -4033,6 +4148,7 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
4033
4148
|
}
|
|
4034
4149
|
this.imageFormArray.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), distinctUntilChanged()).subscribe(v => {
|
|
4035
4150
|
const fcv = v.filter((i) => !!i && typeof i === 'string' && i.length > 0);
|
|
4151
|
+
// eslint-disable-next-line sonarjs/no-nested-conditional
|
|
4036
4152
|
this.iFormControl.setValue(fcv.length > 0 ? (this.descriptor.fileMultiple ? fcv : fcv[0]) : undefined);
|
|
4037
4153
|
this.iFormControl.updateValueAndValidity();
|
|
4038
4154
|
});
|
|
@@ -4127,10 +4243,10 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
4127
4243
|
return 'pi-file';
|
|
4128
4244
|
}
|
|
4129
4245
|
}
|
|
4130
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4131
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"(descriptor.numberAutoCorrect ? descriptor.numberMin : undefined) ?? NUMBER_MIN_SAFE\"\n [max]=\"(descriptor.numberAutoCorrect ? descriptor.numberMax : undefined) ?? NUMBER_MAX_SAFE\"\n [step]=\"descriptor.numberStep ?? 1\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [styleClass]=\"controlClassName()\"\n [inputStyleClass]=\"controlInputClassName()\"\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 [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"flex flex-col\">\n @if (descriptor.label !== null) {\n <label [for]=\"descriptor.property\" [class]=\"labelClassName()\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n <p-toggle-switch [id]=\"descriptor.property\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-toggle-switch>\n @if (showError) {\n <small class=\"mng-field-validation-messages\">\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]=\"descriptor.property\" class=\"mb-2\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'ml-2 ' + (descriptor.radioLabelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pTextarea\n [class]=\"controlWithInputClassName()\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"controlWithInputClassName()\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\" />\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"descriptor.property\"\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 chooseStyleClass=\"p-button-sm p-button-outlined\"\n cancelStyleClass=\"p-button-sm p-button-outlined\"\n [styleClass]=\"controlClassName()\"\n invalidFileSizeMessageSummary=\"{0}: \"\n [invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail()\"\n mode=\"advanced\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template #file let-file let-idx=\"index\">\n <div class=\"p-fileupload-file\">\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 items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-file-info\">\n <div class=\"p-fileupload-file-name\">{{ file.name }}</div>\n <span class=\"p-fileupload-file-size\">{{ fileUploadInput.formatSize(file.size) }}</span>\n </div>\n <div class=\"p-fileupload-file-actions\">\n <p-button\n icon=\"pi pi-times\"\n severity=\"danger\"\n size=\"small\"\n outlined=\"true\"\n rounded=\"true\"\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\" />\n </div>\n </div>\n </ng-template>\n <ng-template #empty>\n <div class=\"text-gray-300 mng-fileupload-dragdrop-zone\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-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 mng-no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <p-inputgroup [styleClass]=\"controlClassName() + ' mb-1'\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"descriptor.property\"\n type=\"text\"\n [class]=\"controlInputClassName()\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled && imageFormArray.controls.length > 1) {\n <p-inputgroup-addon>\n <p-button type=\"button\" icon=\"pi pi-minus\" severity=\"secondary\" (click)=\"removeImageUrlAt(idx)\"></p-button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <p-button\n type=\"button\"\n icon=\"pi pi-plus\"\n size=\"small\"\n severity=\"primary\"\n outlined=\"true\"\n styleClass=\"mt-2\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></p-button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [class]=\"controlWithInputClassName()\"\n [id]=\"descriptor.property\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n", styles: ["mng-formly-field-input .mng-image.p-image-preview{height:150px}mng-formly-field-input .mng-image.p-image-preview img{max-height:100%}mng-formly-field-input .mng-image.p-image-preview.mng-no-image{width:150px}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator{background-color:var(--p-surface-200);height:100%;opacity:1;cursor:default;display:flex;align-items:center;justify-content:center}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator .p-image-preview-icon{color:var(--p-primary-800);font-size:1.5rem}mng-formly-field-input .p-fileupload .p-fileupload-content{gap:var(--mng-fileupload-content-gap, 0);padding:var(--p-panel-header-padding)}mng-formly-field-input .p-fileupload .p-fileupload-content .p-progressbar{display:none}mng-formly-field-input .p-fileupload .p-fileupload-content .mng-fileupload-dragdrop-zone{height:5rem;display:flex;border:dashed;border-radius:8px;align-items:center;justify-content:center}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file>div:first-child{flex-grow:0;flex-shrink:0;width:50px;padding:0}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file img{max-width:100%}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar span.p-fileupload-choose{width:auto}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar p-button button{width:auto}\n"], dependencies: [{ kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: RadioButton, selector: "p-radioButton, p-radiobutton, p-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "component", type: FileUpload, selector: "p-fileupload, 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", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "component", type: ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "preview", "showTransitionOptions", "hideTransitionOptions", "modalEnterAnimation", "modalLeaveAnimation", "appendTo", "maskMotionOptions", "motionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "directive", type: InputEmptyValueDirective, selector: "[mngInputEmptyValue]", inputs: ["mngInputEmptyValue"] }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: FormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4246
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4247
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"(descriptor.numberAutoCorrect ? descriptor.numberMin : undefined) ?? NUMBER_MIN_SAFE\"\n [max]=\"(descriptor.numberAutoCorrect ? descriptor.numberMax : undefined) ?? NUMBER_MAX_SAFE\"\n [step]=\"descriptor.numberStep ?? 1\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [styleClass]=\"controlClassName()\"\n [inputStyleClass]=\"controlInputClassName()\"\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 [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"flex flex-col\">\n @if (descriptor.label !== null) {\n <label [for]=\"descriptor.property\" [class]=\"labelClassName()\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n <p-toggle-switch [id]=\"descriptor.property\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-toggle-switch>\n @if (showError) {\n <small class=\"mng-field-validation-messages\">\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]=\"descriptor.property\" class=\"mb-2\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'ml-2 ' + (descriptor.radioLabelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pTextarea\n [class]=\"controlWithInputClassName()\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"controlWithInputClassName()\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\" />\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"descriptor.property\"\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 chooseStyleClass=\"p-button-sm p-button-outlined\"\n cancelStyleClass=\"p-button-sm p-button-outlined\"\n [styleClass]=\"controlClassName()\"\n invalidFileSizeMessageSummary=\"{0}: \"\n [invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail()\"\n mode=\"advanced\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template #file let-file let-idx=\"index\">\n <div class=\"p-fileupload-file\">\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 items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-file-info\">\n <div class=\"p-fileupload-file-name\">{{ file.name }}</div>\n <span class=\"p-fileupload-file-size\">{{ fileUploadInput.formatSize(file.size) }}</span>\n </div>\n <div class=\"p-fileupload-file-actions\">\n <p-button\n icon=\"pi pi-times\"\n severity=\"danger\"\n size=\"small\"\n outlined=\"true\"\n rounded=\"true\"\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\" />\n </div>\n </div>\n </ng-template>\n <ng-template #empty>\n <div class=\"text-gray-300 mng-fileupload-dragdrop-zone\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-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 mng-no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <p-inputgroup [styleClass]=\"controlClassName() + ' mb-1'\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"descriptor.property\"\n type=\"text\"\n [class]=\"controlInputClassName()\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled && imageFormArray.controls.length > 1) {\n <p-inputgroup-addon>\n <p-button type=\"button\" icon=\"pi pi-minus\" severity=\"secondary\" (click)=\"removeImageUrlAt(idx)\"></p-button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <p-button\n type=\"button\"\n icon=\"pi pi-plus\"\n size=\"small\"\n severity=\"primary\"\n outlined=\"true\"\n styleClass=\"mt-2\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></p-button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [class]=\"controlWithInputClassName()\"\n [id]=\"descriptor.property\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n", styles: ["mng-formly-field-input .mng-image.p-image-preview{height:150px}mng-formly-field-input .mng-image.p-image-preview img{max-height:100%}mng-formly-field-input .mng-image.p-image-preview.mng-no-image{width:150px}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator{background-color:var(--p-surface-200);height:100%;opacity:1;cursor:default;display:flex;align-items:center;justify-content:center}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator .p-image-preview-icon{color:var(--p-primary-800);font-size:1.5rem}mng-formly-field-input .p-fileupload .p-fileupload-content{gap:var(--mng-fileupload-content-gap, 0);padding:var(--p-panel-header-padding)}mng-formly-field-input .p-fileupload .p-fileupload-content .p-progressbar{display:none}mng-formly-field-input .p-fileupload .p-fileupload-content .mng-fileupload-dragdrop-zone{height:5rem;display:flex;border:dashed;border-radius:8px;align-items:center;justify-content:center}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file>div:first-child{flex-grow:0;flex-shrink:0;width:50px;padding:0}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file img{max-width:100%}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar span.p-fileupload-choose{width:auto}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar p-button button{width:auto}\n"], dependencies: [{ kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: RadioButton, selector: "p-radioButton, p-radiobutton, p-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "component", type: FileUpload, selector: "p-fileupload, 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", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "component", type: ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "preview", "showTransitionOptions", "hideTransitionOptions", "modalEnterAnimation", "modalLeaveAnimation", "appendTo", "maskMotionOptions", "motionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "directive", type: InputEmptyValueDirective, selector: "[mngInputEmptyValue]", inputs: ["mngInputEmptyValue"] }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: FormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
4132
4248
|
}
|
|
4133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
|
|
4134
4250
|
type: Component,
|
|
4135
4251
|
args: [{ selector: 'mng-formly-field-input', imports: [
|
|
4136
4252
|
InputNumber,
|
|
@@ -4152,7 +4268,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
4152
4268
|
InputEmptyValueDirective,
|
|
4153
4269
|
FormlyAttributes,
|
|
4154
4270
|
FormlyValidationMessage
|
|
4155
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"(descriptor.numberAutoCorrect ? descriptor.numberMin : undefined) ?? NUMBER_MIN_SAFE\"\n [max]=\"(descriptor.numberAutoCorrect ? descriptor.numberMax : undefined) ?? NUMBER_MAX_SAFE\"\n [step]=\"descriptor.numberStep ?? 1\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [styleClass]=\"controlClassName()\"\n [inputStyleClass]=\"controlInputClassName()\"\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 [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"flex flex-col\">\n @if (descriptor.label !== null) {\n <label [for]=\"descriptor.property\" [class]=\"labelClassName()\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n <p-toggle-switch [id]=\"descriptor.property\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-toggle-switch>\n @if (showError) {\n <small class=\"mng-field-validation-messages\">\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]=\"descriptor.property\" class=\"mb-2\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'ml-2 ' + (descriptor.radioLabelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pTextarea\n [class]=\"controlWithInputClassName()\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"controlWithInputClassName()\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\" />\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"descriptor.property\"\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 chooseStyleClass=\"p-button-sm p-button-outlined\"\n cancelStyleClass=\"p-button-sm p-button-outlined\"\n [styleClass]=\"controlClassName()\"\n invalidFileSizeMessageSummary=\"{0}: \"\n [invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail()\"\n mode=\"advanced\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template #file let-file let-idx=\"index\">\n <div class=\"p-fileupload-file\">\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 items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-file-info\">\n <div class=\"p-fileupload-file-name\">{{ file.name }}</div>\n <span class=\"p-fileupload-file-size\">{{ fileUploadInput.formatSize(file.size) }}</span>\n </div>\n <div class=\"p-fileupload-file-actions\">\n <p-button\n icon=\"pi pi-times\"\n severity=\"danger\"\n size=\"small\"\n outlined=\"true\"\n rounded=\"true\"\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\" />\n </div>\n </div>\n </ng-template>\n <ng-template #empty>\n <div class=\"text-gray-300 mng-fileupload-dragdrop-zone\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-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 mng-no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <p-inputgroup [styleClass]=\"controlClassName() + ' mb-1'\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"descriptor.property\"\n type=\"text\"\n [class]=\"controlInputClassName()\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled && imageFormArray.controls.length > 1) {\n <p-inputgroup-addon>\n <p-button type=\"button\" icon=\"pi pi-minus\" severity=\"secondary\" (click)=\"removeImageUrlAt(idx)\"></p-button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <p-button\n type=\"button\"\n icon=\"pi pi-plus\"\n size=\"small\"\n severity=\"primary\"\n outlined=\"true\"\n styleClass=\"mt-2\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></p-button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [class]=\"controlWithInputClassName()\"\n [id]=\"descriptor.property\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n", styles: ["mng-formly-field-input .mng-image.p-image-preview{height:150px}mng-formly-field-input .mng-image.p-image-preview img{max-height:100%}mng-formly-field-input .mng-image.p-image-preview.mng-no-image{width:150px}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator{background-color:var(--p-surface-200);height:100%;opacity:1;cursor:default;display:flex;align-items:center;justify-content:center}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator .p-image-preview-icon{color:var(--p-primary-800);font-size:1.5rem}mng-formly-field-input .p-fileupload .p-fileupload-content{gap:var(--mng-fileupload-content-gap, 0);padding:var(--p-panel-header-padding)}mng-formly-field-input .p-fileupload .p-fileupload-content .p-progressbar{display:none}mng-formly-field-input .p-fileupload .p-fileupload-content .mng-fileupload-dragdrop-zone{height:5rem;display:flex;border:dashed;border-radius:8px;align-items:center;justify-content:center}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file>div:first-child{flex-grow:0;flex-shrink:0;width:50px;padding:0}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file img{max-width:100%}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar span.p-fileupload-choose{width:auto}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar p-button button{width:auto}\n"] }]
|
|
4271
|
+
], encapsulation: ViewEncapsulation.None, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"(descriptor.numberAutoCorrect ? descriptor.numberMin : undefined) ?? NUMBER_MIN_SAFE\"\n [max]=\"(descriptor.numberAutoCorrect ? descriptor.numberMax : undefined) ?? NUMBER_MAX_SAFE\"\n [step]=\"descriptor.numberStep ?? 1\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [styleClass]=\"controlClassName()\"\n [inputStyleClass]=\"controlInputClassName()\"\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 [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"flex flex-col\">\n @if (descriptor.label !== null) {\n <label [for]=\"descriptor.property\" [class]=\"labelClassName()\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n <p-toggle-switch [id]=\"descriptor.property\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-toggle-switch>\n @if (showError) {\n <small class=\"mng-field-validation-messages\">\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]=\"descriptor.property\" class=\"mb-2\">\n <p-radioButton [name]=\"$any(key)\" [value]=\"option.value\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"controlClassName()\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'ml-2 ' + (descriptor.radioLabelClassName ?? '')\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pTextarea\n [class]=\"controlWithInputClassName()\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"descriptor.property\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"controlWithInputClassName()\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\" />\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"descriptor.property\"\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 chooseStyleClass=\"p-button-sm p-button-outlined\"\n cancelStyleClass=\"p-button-sm p-button-outlined\"\n [styleClass]=\"controlClassName()\"\n invalidFileSizeMessageSummary=\"{0}: \"\n [invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail()\"\n mode=\"advanced\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template #file let-file let-idx=\"index\">\n <div class=\"p-fileupload-file\">\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 items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex items-center justify-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-file-info\">\n <div class=\"p-fileupload-file-name\">{{ file.name }}</div>\n <span class=\"p-fileupload-file-size\">{{ fileUploadInput.formatSize(file.size) }}</span>\n </div>\n <div class=\"p-fileupload-file-actions\">\n <p-button\n icon=\"pi pi-times\"\n severity=\"danger\"\n size=\"small\"\n outlined=\"true\"\n rounded=\"true\"\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\" />\n </div>\n </div>\n </ng-template>\n <ng-template #empty>\n <div class=\"text-gray-300 mng-fileupload-dragdrop-zone\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-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 mng-no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <p-inputgroup [styleClass]=\"controlClassName() + ' mb-1'\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"descriptor.property\"\n type=\"text\"\n [class]=\"controlInputClassName()\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled && imageFormArray.controls.length > 1) {\n <p-inputgroup-addon>\n <p-button type=\"button\" icon=\"pi pi-minus\" severity=\"secondary\" (click)=\"removeImageUrlAt(idx)\"></p-button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <p-button\n type=\"button\"\n icon=\"pi pi-plus\"\n size=\"small\"\n severity=\"primary\"\n outlined=\"true\"\n styleClass=\"mt-2\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></p-button>\n }\n }\n </div>\n }\n @default {\n <input\n pInputText\n [class]=\"controlWithInputClassName()\"\n [id]=\"descriptor.property\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mngInputTrim]=\"descriptor.textTrim ?? 'both'\"\n [mngInputEmptyValue]=\"descriptor.emptyValue ?? 'undefined'\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n }\n}\n", styles: ["mng-formly-field-input .mng-image.p-image-preview{height:150px}mng-formly-field-input .mng-image.p-image-preview img{max-height:100%}mng-formly-field-input .mng-image.p-image-preview.mng-no-image{width:150px}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator{background-color:var(--p-surface-200);height:100%;opacity:1;cursor:default;display:flex;align-items:center;justify-content:center}mng-formly-field-input .mng-image.p-image-preview.mng-no-image .p-image-preview-indicator .p-image-preview-icon{color:var(--p-primary-800);font-size:1.5rem}mng-formly-field-input .p-fileupload .p-fileupload-content{gap:var(--mng-fileupload-content-gap, 0);padding:var(--p-panel-header-padding)}mng-formly-field-input .p-fileupload .p-fileupload-content .p-progressbar{display:none}mng-formly-field-input .p-fileupload .p-fileupload-content .mng-fileupload-dragdrop-zone{height:5rem;display:flex;border:dashed;border-radius:8px;align-items:center;justify-content:center}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file>div:first-child{flex-grow:0;flex-shrink:0;width:50px;padding:0}mng-formly-field-input .p-fileupload .p-fileupload-content .p-fileupload-file-list .p-fileupload-file img{max-width:100%}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar span.p-fileupload-choose{width:auto}mng-formly-field-input .p-fileupload .p-fileupload-buttonbar p-button button{width:auto}\n"] }]
|
|
4156
4272
|
}] });
|
|
4157
4273
|
|
|
4158
4274
|
class FormlyFieldLabelComponent extends ACommonsFormlyFieldType {
|
|
@@ -4164,12 +4280,12 @@ class FormlyFieldLabelComponent extends ACommonsFormlyFieldType {
|
|
|
4164
4280
|
super.ngOnInit();
|
|
4165
4281
|
this.formControl?.patchValue(this.descriptor.label);
|
|
4166
4282
|
}
|
|
4167
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4168
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
4283
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4284
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: FormlyFieldLabelComponent, isStandalone: true, selector: "mng-formly-field-label", host: { properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: "" }); }
|
|
4169
4285
|
}
|
|
4170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelComponent, decorators: [{
|
|
4171
4287
|
type: Component,
|
|
4172
|
-
args: [{ selector: 'mng-formly-field-label',
|
|
4288
|
+
args: [{ selector: 'mng-formly-field-label', template: "" }]
|
|
4173
4289
|
}], propDecorators: { className: [{
|
|
4174
4290
|
type: HostBinding,
|
|
4175
4291
|
args: ['class']
|
|
@@ -4181,13 +4297,15 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
4181
4297
|
this.injector = inject(Injector);
|
|
4182
4298
|
this.logger = inject(LoggerService).create('FormlyFieldLookupDialogComponent');
|
|
4183
4299
|
this.fieldLabelFormControl = new FormControl();
|
|
4184
|
-
this.addItems = signal({ data: [], totalCount: 0 },
|
|
4300
|
+
this.addItems = signal({ data: [], totalCount: 0 }, /* @ts-ignore */
|
|
4301
|
+
...(ngDevMode ? [{ debugName: "addItems" }] : /* istanbul ignore next */ []));
|
|
4185
4302
|
this.dialogUseDataProvider = false;
|
|
4186
4303
|
this.dialogDataProviderService = null;
|
|
4187
4304
|
this.isDialogVisible = false;
|
|
4188
4305
|
this.dialogAreItemsLoaded = false;
|
|
4189
4306
|
this.dialogSelectedItem = null;
|
|
4190
|
-
this.dialogIsLoading = signal(false,
|
|
4307
|
+
this.dialogIsLoading = signal(false, /* @ts-ignore */
|
|
4308
|
+
...(ngDevMode ? [{ debugName: "dialogIsLoading" }] : /* istanbul ignore next */ []));
|
|
4191
4309
|
}
|
|
4192
4310
|
ngOnInit() {
|
|
4193
4311
|
super.ngOnInit();
|
|
@@ -4319,10 +4437,10 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
4319
4437
|
this.fieldLabelFormControl.setValue(value);
|
|
4320
4438
|
}
|
|
4321
4439
|
}
|
|
4322
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4323
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4440
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4441
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<p-inputgroup [styleClass]=\"controlClassName()\">\n <p-inputgroup [styleClass]=\"controlClassName()\">\n <p-inputgroup-addon>\n <button pButton type=\"button\" icon=\"pi pi-search\" text=\"true\" severity=\"secondary\" [disabled]=\"formControl.disabled\" (click)=\"openSelectDialog()\"></button>\n </p-inputgroup-addon>\n <input\n pInputText\n type=\"text\"\n (click)=\"openSelectDialog()\"\n [id]=\"descriptor.property\"\n [readonly]=\"true\"\n [formlyAttributes]=\"field\"\n [formControl]=\"fieldLabelFormControl\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <p-inputgroup-addon>\n <button pButton type=\"button\" icon=\"pi pi-times\" text=\"true\" severity=\"secondary\" (click)=\"clear()\"></button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n\n <p-dialog [(visible)]=\"isDialogVisible\" [draggable]=\"false\" [modal]=\"true\" appendTo=\"body\" styleClass=\"mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template #header>\n <div class=\"flex justify-end items-center\">\n @if (descriptor.dialogTitle !== null) {\n <label class=\"grow p-dialog-title\">\n @if (descriptor.dialogTitle) {\n {{ descriptor.dialogTitle | translate }}\n } @else if (descriptor.label !== null) {\n @let labelFromDescriptor = descriptor | mngFormlyFieldLabel: editorDescriptor | translate;\n @if (descriptor.label) {\n {{ labelFromDescriptor }}\n } @else {\n {{ 'general.search' | translate: {item: props.label!} }}\n }\n }\n </label>\n }\n </div>\n </ng-template>\n <ng-template #content>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (config.table?.headerTitleComponent; as captionComponent) {\n <ng-template mngTableTemplate name=\"headerTitle\">\n <ng-container [mngComponent]=\"captionComponent\" attachToHost=\"true\"></ng-container>\n </ng-template>\n }\n @if (config.table?.columnActionComponent; as columnActionComponent) {\n <ng-template mngTableTemplate name=\"columnCustomLast\">\n <ng-container [mngComponent]=\"columnActionComponent\" attachToHost=\"true\"></ng-container>\n </ng-template>\n }\n </mng-table>\n </ng-template>\n\n <ng-template #footer>\n <button pButton type=\"button\" severity=\"secondary\" text=\"true\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n (click)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n </p-dialog>\n</p-inputgroup>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "ariaLabelledBy", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "queryParamPrepend", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "featureConfig", "columnLastMinWidth", "globalFilterFields", "templates"], outputs: ["tableLoad", "cellClick", "selectionChange", "rowReorder", "filterChange", "searchChange", "sortChange"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: TableTemplateDirective, selector: "[mngTableTemplate]", inputs: ["name"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }] }); }
|
|
4324
4442
|
}
|
|
4325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
|
|
4326
4444
|
type: Component,
|
|
4327
4445
|
args: [{ selector: 'mng-formly-field-lookup-dialog', imports: [
|
|
4328
4446
|
TranslatePipe,
|
|
@@ -4337,7 +4455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
4337
4455
|
TableTemplateDirective,
|
|
4338
4456
|
ComponentDirective,
|
|
4339
4457
|
FormlyFieldLabelPipe
|
|
4340
|
-
], providers: [provideViewContainer(false)],
|
|
4458
|
+
], providers: [provideViewContainer(false)], template: "<p-inputgroup [styleClass]=\"controlClassName()\">\n <p-inputgroup [styleClass]=\"controlClassName()\">\n <p-inputgroup-addon>\n <button pButton type=\"button\" icon=\"pi pi-search\" text=\"true\" severity=\"secondary\" [disabled]=\"formControl.disabled\" (click)=\"openSelectDialog()\"></button>\n </p-inputgroup-addon>\n <input\n pInputText\n type=\"text\"\n (click)=\"openSelectDialog()\"\n [id]=\"descriptor.property\"\n [readonly]=\"true\"\n [formlyAttributes]=\"field\"\n [formControl]=\"fieldLabelFormControl\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <p-inputgroup-addon>\n <button pButton type=\"button\" icon=\"pi pi-times\" text=\"true\" severity=\"secondary\" (click)=\"clear()\"></button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n\n <p-dialog [(visible)]=\"isDialogVisible\" [draggable]=\"false\" [modal]=\"true\" appendTo=\"body\" styleClass=\"mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template #header>\n <div class=\"flex justify-end items-center\">\n @if (descriptor.dialogTitle !== null) {\n <label class=\"grow p-dialog-title\">\n @if (descriptor.dialogTitle) {\n {{ descriptor.dialogTitle | translate }}\n } @else if (descriptor.label !== null) {\n @let labelFromDescriptor = descriptor | mngFormlyFieldLabel: editorDescriptor | translate;\n @if (descriptor.label) {\n {{ labelFromDescriptor }}\n } @else {\n {{ 'general.search' | translate: {item: props.label!} }}\n }\n }\n </label>\n }\n </div>\n </ng-template>\n <ng-template #content>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (config.table?.headerTitleComponent; as captionComponent) {\n <ng-template mngTableTemplate name=\"headerTitle\">\n <ng-container [mngComponent]=\"captionComponent\" attachToHost=\"true\"></ng-container>\n </ng-template>\n }\n @if (config.table?.columnActionComponent; as columnActionComponent) {\n <ng-template mngTableTemplate name=\"columnCustomLast\">\n <ng-container [mngComponent]=\"columnActionComponent\" attachToHost=\"true\"></ng-container>\n </ng-template>\n }\n </mng-table>\n </ng-template>\n\n <ng-template #footer>\n <button pButton type=\"button\" severity=\"secondary\" text=\"true\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n (click)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n </p-dialog>\n</p-inputgroup>\n" }]
|
|
4341
4459
|
}] });
|
|
4342
4460
|
|
|
4343
4461
|
const labelInfoTooltipDefaultIcon = 'pi pi-info-circle';
|
|
@@ -4347,7 +4465,8 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4347
4465
|
super(...arguments);
|
|
4348
4466
|
this.injector = inject(Injector);
|
|
4349
4467
|
this.labelInfoTooltipDefaultIcon = labelInfoTooltipDefaultIcon;
|
|
4350
|
-
this.items = signal([],
|
|
4468
|
+
this.items = signal([], /* @ts-ignore */
|
|
4469
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
4351
4470
|
this.actions = [];
|
|
4352
4471
|
this.toolbarRightActions = [];
|
|
4353
4472
|
this.isDisabledSubject = new BehaviorSubject(false);
|
|
@@ -4559,12 +4678,12 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4559
4678
|
}
|
|
4560
4679
|
return false;
|
|
4561
4680
|
}
|
|
4562
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4563
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4681
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4682
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table\n [id]=\"descriptor.property\"\n [descriptor]=\"descriptor.tableDescriptor\"\n [items]=\"items()\"\n [actions]=\"actions\"\n [rowReorderEnabled]=\"!disableRowReorder()\"\n (rowReorder)=\"onRowReorder($event)\"\n tableClassName=\"mng-table-header-compact pb-2\">\n <ng-template mngTableTemplate name=\"headerTitle\">\n <div class=\"flex justify-end items-center\">\n @if (descriptor.label !== null) {\n <label class=\"grow\" [for]=\"descriptor.property\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </div>\n </ng-template>\n <ng-template mngTableTemplate name=\"headerTitleRowRight\">\n <div class=\"flex justify-end items-center grow\">\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\" [hostComponent]=\"this\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ 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", "queryParamPrepend", "useQueryParams", "tableTemplates", "tableClassName", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "featureConfig", "actions", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "rowReorder"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "directive", type: TableTemplateDirective, selector: "[mngTableTemplate]", inputs: ["name"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }] }); }
|
|
4564
4683
|
}
|
|
4565
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
|
|
4566
4685
|
type: Component,
|
|
4567
|
-
args: [{ selector: 'mng-formly-table-dialog-form-field', imports: [TranslatePipe, ActionComponent, ActionTableComponent, FormlyFieldLabelPipe, NgClass, Tooltip, TableTemplateDirective], providers: [provideViewContainer(false)],
|
|
4686
|
+
args: [{ selector: 'mng-formly-table-dialog-form-field', imports: [TranslatePipe, ActionComponent, ActionTableComponent, FormlyFieldLabelPipe, NgClass, Tooltip, TableTemplateDirective], providers: [provideViewContainer(false)], template: "<mng-action-table\n [id]=\"descriptor.property\"\n [descriptor]=\"descriptor.tableDescriptor\"\n [items]=\"items()\"\n [actions]=\"actions\"\n [rowReorderEnabled]=\"!disableRowReorder()\"\n (rowReorder)=\"onRowReorder($event)\"\n tableClassName=\"mng-table-header-compact pb-2\">\n <ng-template mngTableTemplate name=\"headerTitle\">\n <div class=\"flex justify-end items-center\">\n @if (descriptor.label !== null) {\n <label class=\"grow\" [for]=\"descriptor.property\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </div>\n </ng-template>\n <ng-template mngTableTemplate name=\"headerTitleRowRight\">\n <div class=\"flex justify-end items-center grow\">\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\" [hostComponent]=\"this\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
4568
4687
|
}] });
|
|
4569
4688
|
|
|
4570
4689
|
class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType {
|
|
@@ -4573,13 +4692,16 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4573
4692
|
this.injector = inject(Injector);
|
|
4574
4693
|
this.logger = inject(LoggerService).create('FormlyFieldTableDialogMultiselectComponent');
|
|
4575
4694
|
this.labelInfoTooltipDefaultIcon = labelInfoTooltipDefaultIcon;
|
|
4576
|
-
this.items = signal([],
|
|
4577
|
-
|
|
4695
|
+
this.items = signal([], /* @ts-ignore */
|
|
4696
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
4697
|
+
this.addItems = signal({ data: [], totalCount: 0 }, /* @ts-ignore */
|
|
4698
|
+
...(ngDevMode ? [{ debugName: "addItems" }] : /* istanbul ignore next */ []));
|
|
4578
4699
|
this.dialogDataProviderService = null;
|
|
4579
4700
|
this.isDialogVisible = false;
|
|
4580
4701
|
this.dialogAreItemsLoaded = false;
|
|
4581
4702
|
this.dialogSelectedAddItems = [];
|
|
4582
|
-
this.dialogIsLoading = signal(false,
|
|
4703
|
+
this.dialogIsLoading = signal(false, /* @ts-ignore */
|
|
4704
|
+
...(ngDevMode ? [{ debugName: "dialogIsLoading" }] : /* istanbul ignore next */ []));
|
|
4583
4705
|
this.hasAddAction = false;
|
|
4584
4706
|
this.hasDeleteAction = false;
|
|
4585
4707
|
this.searchDebounceSubject = new Subject();
|
|
@@ -4609,7 +4731,7 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4609
4731
|
this.props.onValueChange?.(this.field, v);
|
|
4610
4732
|
});
|
|
4611
4733
|
this.searchDebounceSubject.pipe(debounceTime(200), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(query => {
|
|
4612
|
-
this.addTableComponent?.
|
|
4734
|
+
this.addTableComponent?.optimusTable()?.filterGlobal(query, 'contains');
|
|
4613
4735
|
});
|
|
4614
4736
|
}
|
|
4615
4737
|
ngAfterViewInit() {
|
|
@@ -4629,7 +4751,7 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4629
4751
|
this.dialogSelectedAddItems = [];
|
|
4630
4752
|
this.isDialogVisible = true;
|
|
4631
4753
|
if (!this.dialogAreItemsLoaded) {
|
|
4632
|
-
//
|
|
4754
|
+
// Wrapped in requestAnimationFrame due to an Optimus UI timing issue.
|
|
4633
4755
|
requestAnimationFrame(() => {
|
|
4634
4756
|
this.dialogIsLoading.set(true);
|
|
4635
4757
|
const params = { limit: 50, sort: [] };
|
|
@@ -4737,12 +4859,12 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4737
4859
|
this.formControl.setValue(newValue);
|
|
4738
4860
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.RowReorder, this, { dragIndex: event.dragIndex, dropIndex: event.dropIndex });
|
|
4739
4861
|
}
|
|
4740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4741
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4862
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4863
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table\n [id]=\"descriptor.property\"\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [items]=\"items()\"\n [rowReorderEnabled]=\"!disableRowReorder()\"\n (rowReorder)=\"onRowReorder($event)\"\n class=\"mng-table-header-compact\">\n <ng-template mngTableTemplate name=\"headerTitle\">\n @if (descriptor.label !== null) {\n <label [for]=\"descriptor.property\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </ng-template>\n <ng-template mngTableTemplate name=\"headerTitleRowRight\">\n <div class=\"flex grow justify-end\">\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-plus\"\n rounded=\"true\"\n outlined=\"true\"\n class=\"mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </ng-template>\n <ng-template mngTableTemplate name=\"columnCustomLast\" let-item=\"item\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-trash\"\n outlined=\"true\"\n severity=\"danger\"\n rounded=\"true\"\n class=\"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 [(visible)]=\"isDialogVisible\" [draggable]=\"false\" [modal]=\"true\" appendTo=\"body\" styleClass=\"mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template #header>\n <div class=\"flex justify-end items-center\">\n @if (descriptor.dialogTitle !== null) {\n <label class=\"grow p-dialog-title\">\n @if (descriptor.dialogTitle) {\n {{ descriptor.dialogTitle | translate }}\n } @else if (descriptor.label !== null) {\n @let labelFromDescriptor = descriptor | mngFormlyFieldLabel: editorDescriptor | translate;\n @if (descriptor.label) {\n {{ labelFromDescriptor }}\n } @else {\n {{ 'general.addItem' | translate: {item: labelFromDescriptor} }}\n }\n }\n </label>\n }\n </div>\n </ng-template>\n\n <ng-template #content class=\"table-container\">\n <div class=\"h-full flex flex-col\">\n <div class=\"grow 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-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" text=\"true\" severity=\"secondary\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\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: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "queryParamPrepend", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "featureConfig", "columnLastMinWidth", "globalFilterFields", "templates"], outputs: ["tableLoad", "cellClick", "selectionChange", "rowReorder", "filterChange", "searchChange", "sortChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "ariaLabelledBy", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: TableTemplateDirective, selector: "[mngTableTemplate]", inputs: ["name"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }] }); }
|
|
4742
4864
|
}
|
|
4743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4865
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
4744
4866
|
type: Component,
|
|
4745
|
-
args: [{ selector: 'mng-formly-table-multiselect-add-field', imports: [TranslatePipe, TableComponent, FormlyFieldLabelPipe, NgClass, ButtonDirective, Tooltip, Dialog, TableTemplateDirective], providers: [provideViewContainer(false)],
|
|
4867
|
+
args: [{ selector: 'mng-formly-table-multiselect-add-field', imports: [TranslatePipe, TableComponent, FormlyFieldLabelPipe, NgClass, ButtonDirective, Tooltip, Dialog, TableTemplateDirective], providers: [provideViewContainer(false)], template: "<mng-table\n [id]=\"descriptor.property\"\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [items]=\"items()\"\n [rowReorderEnabled]=\"!disableRowReorder()\"\n (rowReorder)=\"onRowReorder($event)\"\n class=\"mng-table-header-compact\">\n <ng-template mngTableTemplate name=\"headerTitle\">\n @if (descriptor.label !== null) {\n <label [for]=\"descriptor.property\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </ng-template>\n <ng-template mngTableTemplate name=\"headerTitleRowRight\">\n <div class=\"flex grow justify-end\">\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-plus\"\n rounded=\"true\"\n outlined=\"true\"\n class=\"mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </ng-template>\n <ng-template mngTableTemplate name=\"columnCustomLast\" let-item=\"item\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-trash\"\n outlined=\"true\"\n severity=\"danger\"\n rounded=\"true\"\n class=\"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 [(visible)]=\"isDialogVisible\" [draggable]=\"false\" [modal]=\"true\" appendTo=\"body\" styleClass=\"mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template #header>\n <div class=\"flex justify-end items-center\">\n @if (descriptor.dialogTitle !== null) {\n <label class=\"grow p-dialog-title\">\n @if (descriptor.dialogTitle) {\n {{ descriptor.dialogTitle | translate }}\n } @else if (descriptor.label !== null) {\n @let labelFromDescriptor = descriptor | mngFormlyFieldLabel: editorDescriptor | translate;\n @if (descriptor.label) {\n {{ labelFromDescriptor }}\n } @else {\n {{ 'general.addItem' | translate: {item: labelFromDescriptor} }}\n }\n }\n </label>\n }\n </div>\n </ng-template>\n\n <ng-template #content class=\"table-container\">\n <div class=\"h-full flex flex-col\">\n <div class=\"grow 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-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" text=\"true\" severity=\"secondary\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\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"] }]
|
|
4746
4868
|
}], propDecorators: { addTableComponent: [{
|
|
4747
4869
|
type: ViewChild,
|
|
4748
4870
|
args: ['addTableComponent']
|
|
@@ -4751,7 +4873,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
4751
4873
|
class FormlyFieldTabsComponent extends ACommonsFormlyGroupType {
|
|
4752
4874
|
constructor() {
|
|
4753
4875
|
super(...arguments);
|
|
4754
|
-
this.fieldGroup = signal([],
|
|
4876
|
+
this.fieldGroup = signal([], /* @ts-ignore */
|
|
4877
|
+
...(ngDevMode ? [{ debugName: "fieldGroup" }] : /* istanbul ignore next */ []));
|
|
4755
4878
|
}
|
|
4756
4879
|
ngOnInit() {
|
|
4757
4880
|
super.ngOnInit();
|
|
@@ -4760,21 +4883,24 @@ class FormlyFieldTabsComponent extends ACommonsFormlyGroupType {
|
|
|
4760
4883
|
onEscape() {
|
|
4761
4884
|
window.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true, cancelable: true }));
|
|
4762
4885
|
}
|
|
4763
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4764
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4886
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4887
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabs scrollable=\"true\" [value]=\"fieldGroup()[0]?.id ?? 0\">\n <p-tablist>\n @for (tab of fieldGroup(); track tab; let idx = $index) {\n <p-tab [value]=\"tab.id ?? idx\" [class.hidden!]=\"tab.props['groupHidden']\" (keydown.escape)=\"onEscape()\">\n <span class=\"mng-tab-title\" [class.mng-tab-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : (tab.key ?? '')) + '_invalid']\">\n {{ tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate }}\n </span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of fieldGroup(); track tab; let idx = $index) {\n <p-tabpanel [value]=\"tab.id ?? idx\" [class.hidden!]=\"tab.props['groupHidden']\">\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabpanel>\n }\n </p-tabpanels>\n</p-tabs>\n", styles: ["mng-formly-field-tabs .p-tab .mng-tab-title.mng-tab-error{color:var(--p-form-field-float-label-invalid-color)!important}\n"], dependencies: [{ kind: "component", type: Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: TabList, selector: "p-tablist" }, { kind: "component", type: Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: TabPanels, selector: "p-tabpanels" }, { kind: "component", type: TabPanel, selector: "p-tabpanel", inputs: ["lazy", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
4765
4888
|
}
|
|
4766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
|
|
4767
4890
|
type: Component,
|
|
4768
|
-
args: [{ selector: 'mng-formly-field-tabs', imports: [TranslatePipe, FormlyFieldLabelPipe, Tabs, TabList, Tab, TabPanels, TabPanel, FormlyField],
|
|
4891
|
+
args: [{ selector: 'mng-formly-field-tabs', imports: [TranslatePipe, FormlyFieldLabelPipe, Tabs, TabList, Tab, TabPanels, TabPanel, FormlyField], encapsulation: ViewEncapsulation.None, template: "<p-tabs scrollable=\"true\" [value]=\"fieldGroup()[0]?.id ?? 0\">\n <p-tablist>\n @for (tab of fieldGroup(); track tab; let idx = $index) {\n <p-tab [value]=\"tab.id ?? idx\" [class.hidden!]=\"tab.props['groupHidden']\" (keydown.escape)=\"onEscape()\">\n <span class=\"mng-tab-title\" [class.mng-tab-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : (tab.key ?? '')) + '_invalid']\">\n {{ tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate }}\n </span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of fieldGroup(); track tab; let idx = $index) {\n <p-tabpanel [value]=\"tab.id ?? idx\" [class.hidden!]=\"tab.props['groupHidden']\">\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabpanel>\n }\n </p-tabpanels>\n</p-tabs>\n", styles: ["mng-formly-field-tabs .p-tab .mng-tab-title.mng-tab-error{color:var(--p-form-field-float-label-invalid-color)!important}\n"] }]
|
|
4769
4892
|
}] });
|
|
4770
4893
|
|
|
4771
4894
|
class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
4772
4895
|
constructor() {
|
|
4773
4896
|
super(...arguments);
|
|
4774
4897
|
this.destroyRef = inject(DestroyRef);
|
|
4775
|
-
this.wrapperClassName = signal('mng-field-wrapper',
|
|
4776
|
-
|
|
4777
|
-
this.
|
|
4898
|
+
this.wrapperClassName = signal('mng-field-wrapper', /* @ts-ignore */
|
|
4899
|
+
...(ngDevMode ? [{ debugName: "wrapperClassName" }] : /* istanbul ignore next */ []));
|
|
4900
|
+
this.helpText = signal(undefined, /* @ts-ignore */
|
|
4901
|
+
...(ngDevMode ? [{ debugName: "helpText" }] : /* istanbul ignore next */ []));
|
|
4902
|
+
this.shouldShowError = signal(false, /* @ts-ignore */
|
|
4903
|
+
...(ngDevMode ? [{ debugName: "shouldShowError" }] : /* istanbul ignore next */ []));
|
|
4778
4904
|
}
|
|
4779
4905
|
ngOnInit() {
|
|
4780
4906
|
this.descriptor = this.props?.descriptor;
|
|
@@ -4798,12 +4924,12 @@ class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
|
4798
4924
|
}
|
|
4799
4925
|
return field;
|
|
4800
4926
|
}
|
|
4801
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4802
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4927
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4928
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldNoLabelWrapperComponent, isStandalone: true, selector: "mng-formly-field-no-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClassName()\">\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block mng-field-validation-messages\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "component", type: FormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
4803
4929
|
}
|
|
4804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, decorators: [{
|
|
4805
4931
|
type: Component,
|
|
4806
|
-
args: [{ selector: 'mng-formly-field-no-label-wrapper', imports: [TranslatePipe, FormlyValidationMessage],
|
|
4932
|
+
args: [{ selector: 'mng-formly-field-no-label-wrapper', imports: [TranslatePipe, FormlyValidationMessage], template: "<div [class]=\"wrapperClassName()\">\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block mng-field-validation-messages\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n" }]
|
|
4807
4933
|
}] });
|
|
4808
4934
|
|
|
4809
4935
|
class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
@@ -4811,8 +4937,10 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
|
4811
4937
|
super(...arguments);
|
|
4812
4938
|
this.destroyRef = inject(DestroyRef);
|
|
4813
4939
|
this.labelInfoTooltipDefaultIcon = labelInfoTooltipDefaultIcon;
|
|
4814
|
-
this.wrapperClassName = signal('mng-field-wrapper',
|
|
4815
|
-
|
|
4940
|
+
this.wrapperClassName = signal('mng-field-wrapper', /* @ts-ignore */
|
|
4941
|
+
...(ngDevMode ? [{ debugName: "wrapperClassName" }] : /* istanbul ignore next */ []));
|
|
4942
|
+
this.helpText = signal(undefined, /* @ts-ignore */
|
|
4943
|
+
...(ngDevMode ? [{ debugName: "helpText" }] : /* istanbul ignore next */ []));
|
|
4816
4944
|
}
|
|
4817
4945
|
ngOnInit() {
|
|
4818
4946
|
const descriptor = this.props?.descriptor;
|
|
@@ -4846,26 +4974,30 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
|
4846
4974
|
this.helpText.set(descriptor.helpText);
|
|
4847
4975
|
}
|
|
4848
4976
|
}
|
|
4849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4850
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4977
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4978
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FormlyFieldWrapperComponent, isStandalone: true, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClassName()\">\n <div>\n @if (descriptor.label !== null) {\n <label [for]=\"key\" [class]=\"descriptor.className?.label\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError) {\n <small class=\"block mng-field-validation-messages\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: FormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }] }); }
|
|
4851
4979
|
}
|
|
4852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldWrapperComponent, decorators: [{
|
|
4853
4981
|
type: Component,
|
|
4854
|
-
args: [{ selector: 'mng-formly-field-wrapper', imports: [TranslatePipe, FormlyFieldLabelPipe, NgClass, Tooltip, FormlyValidationMessage],
|
|
4982
|
+
args: [{ selector: 'mng-formly-field-wrapper', imports: [TranslatePipe, FormlyFieldLabelPipe, NgClass, Tooltip, FormlyValidationMessage], template: "<div [class]=\"wrapperClassName()\">\n <div>\n @if (descriptor.label !== null) {\n <label [for]=\"key\" [class]=\"descriptor.className?.label\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n @if (descriptor.labelInfoTooltip !== undefined) {\n <span [ngClass]=\"{'ml-1': props.required && props['hideRequiredMarker'] !== true}\">\n <i [class]=\"descriptor.labelInfoTooltipIcon ?? labelInfoTooltipDefaultIcon\" [pTooltip]=\"descriptor.labelInfoTooltip | translate\"></i>\n </span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (helpText(); as ht) {\n <small class=\"block\">{{ ht | translate }}</small>\n }\n @if (showError) {\n <small class=\"block mng-field-validation-messages\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n" }]
|
|
4855
4983
|
}] });
|
|
4856
4984
|
|
|
4857
4985
|
class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
4858
4986
|
constructor() {
|
|
4859
4987
|
super(...arguments);
|
|
4860
4988
|
this.dpFormControl = new FormControl();
|
|
4861
|
-
this.#validationClassName = signal('ng-valid',
|
|
4862
|
-
|
|
4989
|
+
this.#validationClassName = signal('ng-valid', /* @ts-ignore */
|
|
4990
|
+
...(ngDevMode ? [{ debugName: "#validationClassName" }] : /* istanbul ignore next */ []));
|
|
4991
|
+
this.styleClass = computed(() => [this.controlClassName(), this.#validationClassName()].join(' '), /* @ts-ignore */
|
|
4992
|
+
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
4863
4993
|
this.moduleConfig = inject(COMMONS_MODULE_CONFIG_IT, { optional: true });
|
|
4864
4994
|
this.dateTimeInUtc = this.moduleConfig?.serialization?.dateTimeInUtc ?? false;
|
|
4865
4995
|
this.dateTimeWithTimezone = this.moduleConfig?.serialization?.dateTimeWithTimezone ?? true;
|
|
4866
4996
|
this.dateTimeWithMillis = this.moduleConfig?.serialization?.dateTimeWithMillis ?? true;
|
|
4867
|
-
this.minDate = signal(undefined,
|
|
4868
|
-
|
|
4997
|
+
this.minDate = signal(undefined, /* @ts-ignore */
|
|
4998
|
+
...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
4999
|
+
this.maxDate = signal(undefined, /* @ts-ignore */
|
|
5000
|
+
...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
4869
5001
|
}
|
|
4870
5002
|
#validationClassName;
|
|
4871
5003
|
ngOnInit() {
|
|
@@ -4907,7 +5039,7 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4907
5039
|
}
|
|
4908
5040
|
});
|
|
4909
5041
|
// init values from form to datepicker
|
|
4910
|
-
if (typeof this.formControl?.value === 'string' || typeof this.formControl?.value === 'number') {
|
|
5042
|
+
if (typeof this.formControl?.value === 'string' || typeof this.formControl?.value === 'number' || this.formControl?.value instanceof Date) {
|
|
4911
5043
|
this.dpFormControl.setValue(new Date(this.formControl.value));
|
|
4912
5044
|
this.dpFormControl.markAsPristine(); // mark as pristine only on component initialization
|
|
4913
5045
|
}
|
|
@@ -4970,6 +5102,7 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4970
5102
|
}
|
|
4971
5103
|
}
|
|
4972
5104
|
}
|
|
5105
|
+
// eslint-disable-next-line sonarjs/use-type-alias
|
|
4973
5106
|
convertDateValue(value) {
|
|
4974
5107
|
const convertDateType = this.descriptor.datePickerValueNoTime || !this.descriptor.datePickerShowTime ? 'date' : 'date-time';
|
|
4975
5108
|
const convertDateTimeOpts = {
|
|
@@ -5014,12 +5147,12 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
5014
5147
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
5015
5148
|
});
|
|
5016
5149
|
}
|
|
5017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5018
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: FormlyFieldDatepickerComponent, isStandalone: true, selector: "mng-formly-field-datepicker", usesInheritance: true, ngImport: i0, template: "<mng-datetime-picker\n [id]=\"descriptor.property\"\n [className]=\"styleClass()\"\n [formControl]=\"dpFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(minDate())\"\n [maxDate]=\"$any(maxDate())\"\n [time]=\"descriptor.datePickerShowTime\"\n [seconds]=\"descriptor.datePickerShowSeconds\"\n [milliseconds]=\"descriptor.datePickerShowMilliseconds\"\n [optimusTimePicker]=\"descriptor.datePickerOptimusTimePicker\"\n [timeSelect]=\"descriptor.datePickerTimeSelect\"\n [timeSelectInterval]=\"descriptor.datePickerTimeSelectInterval\"\n showIcon=\"true\"\n showButtonBar=\"true\"\n [showClear]=\"!props.required\"\n [panelStyleClass]=\"controlClassName() + ' mng-field-datepicker'\"\n [inputStyleClass]=\"controlInputClassName()\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n (blur)=\"onBlur()\">\n</mng-datetime-picker>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: DatetimePickerComponent, selector: "mng-datetime-picker", inputs: ["templates", "time", "timeSelect", "timeSelectInterval", "seconds", "milliseconds", "optimusTimePicker", "dateFormat", "placeholder", "minDate", "maxDate", "disabled", "showIcon", "showButtonBar", "showClear", "className", "panelStyleClass", "inputStyleClass", "dateRange"], outputs: ["blur"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
5019
5152
|
}
|
|
5020
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDatepickerComponent, decorators: [{
|
|
5021
5154
|
type: Component,
|
|
5022
|
-
args: [{ selector: 'mng-formly-field-datepicker', imports: [ReactiveFormsModule, TranslatePipe, FormlyAttributes, DatetimePickerComponent],
|
|
5155
|
+
args: [{ selector: 'mng-formly-field-datepicker', imports: [ReactiveFormsModule, TranslatePipe, FormlyAttributes, DatetimePickerComponent], template: "<mng-datetime-picker\n [id]=\"descriptor.property\"\n [className]=\"styleClass()\"\n [formControl]=\"dpFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(minDate())\"\n [maxDate]=\"$any(maxDate())\"\n [time]=\"descriptor.datePickerShowTime\"\n [seconds]=\"descriptor.datePickerShowSeconds\"\n [milliseconds]=\"descriptor.datePickerShowMilliseconds\"\n [optimusTimePicker]=\"descriptor.datePickerOptimusTimePicker\"\n [timeSelect]=\"descriptor.datePickerTimeSelect\"\n [timeSelectInterval]=\"descriptor.datePickerTimeSelectInterval\"\n showIcon=\"true\"\n showButtonBar=\"true\"\n [showClear]=\"!props.required\"\n [panelStyleClass]=\"controlClassName() + ' mng-field-datepicker'\"\n [inputStyleClass]=\"controlInputClassName()\"\n [placeholder]=\"descriptor.placeholder ?? '' | translate\"\n (blur)=\"onBlur()\">\n</mng-datetime-picker>\n" }]
|
|
5023
5156
|
}] });
|
|
5024
5157
|
|
|
5025
5158
|
const formlyWrappersConfig = [
|
|
@@ -5319,14 +5452,15 @@ function commonsFormlyConfigProvider(translate, datePipe, config = {}) {
|
|
|
5319
5452
|
|
|
5320
5453
|
class TableviewRouteComponent {
|
|
5321
5454
|
constructor() {
|
|
5322
|
-
this.tableview = input.required(
|
|
5455
|
+
this.tableview = input.required(/* @ts-ignore */
|
|
5456
|
+
...(ngDevMode ? [{ debugName: "tableview" }] : /* istanbul ignore next */ []));
|
|
5323
5457
|
}
|
|
5324
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5325
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
5458
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5459
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: TableviewRouteComponent, isStandalone: true, selector: "mng-tableview-route", inputs: { tableview: { classPropertyName: "tableview", publicName: "tableview", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mng-tableview [descriptor]=\"tableview().descriptor\" [dataProvider]=\"tableview().dataProvider\" [actions]=\"tableview().actions\"> </mng-tableview>\n", dependencies: [{ kind: "component", type: TableviewComponent, selector: "mng-tableview", inputs: ["descriptor", "dataProvider", "actions"] }] }); }
|
|
5326
5460
|
}
|
|
5327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewRouteComponent, decorators: [{
|
|
5328
5462
|
type: Component,
|
|
5329
|
-
args: [{ selector: 'mng-tableview-route', imports: [TableviewComponent],
|
|
5463
|
+
args: [{ selector: 'mng-tableview-route', imports: [TableviewComponent], template: "<mng-tableview [descriptor]=\"tableview().descriptor\" [dataProvider]=\"tableview().dataProvider\" [actions]=\"tableview().actions\"> </mng-tableview>\n" }]
|
|
5330
5464
|
}], propDecorators: { tableview: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableview", required: true }] }] } });
|
|
5331
5465
|
|
|
5332
5466
|
class TableviewRouteBuilder extends RouteBuilder {
|