@mediusinc/mng-commons 7.4.0 → 8.0.0-rc.0
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 +279 -197
- 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-C19Z8HAH.mjs} +12 -10
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-C19Z8HAH.mjs.map +1 -0
- package/fesm2022/{mediusinc-mng-commons-table-mediusinc-mng-commons-table-BfEYZG7s.mjs → mediusinc-mng-commons-table-mediusinc-mng-commons-table-B5SY4k_q.mjs} +553 -517
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-B5SY4k_q.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 +434 -298
- 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 +1 -1
- 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
|
@@ -3,42 +3,42 @@ import { InjectionToken, inject, Injectable, signal, Injector, input, booleanAtt
|
|
|
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, 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
1675
|
args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, 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>
|
|
@@ -1701,7 +1735,7 @@ class EditorAutoSaveStatusComponent {
|
|
|
1701
1735
|
</span>
|
|
1702
1736
|
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
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',
|
|
@@ -1770,7 +1804,9 @@ function generateItemId({ model }, item, itemId) {
|
|
|
1770
1804
|
}
|
|
1771
1805
|
|
|
1772
1806
|
const minDateValidationName = 'minDate';
|
|
1773
|
-
const minDateValidator = (
|
|
1807
|
+
const minDateValidator = (
|
|
1808
|
+
// eslint-disable-next-line sonarjs/use-type-alias
|
|
1809
|
+
min) => {
|
|
1774
1810
|
return ({ fieldFormControl, fieldFormlyConfig }) => {
|
|
1775
1811
|
const minDate = fieldFormlyConfig.props.minDate ?? min;
|
|
1776
1812
|
const date = fieldFormControl?.value == null ? undefined : new Date(fieldFormControl.value);
|
|
@@ -2258,9 +2294,6 @@ class FormEditorService {
|
|
|
2258
2294
|
get formlyFields() {
|
|
2259
2295
|
return this.formComponent.formlyFields;
|
|
2260
2296
|
}
|
|
2261
|
-
get formlyInitialItem() {
|
|
2262
|
-
return this.formComponent.formlyInitialItem;
|
|
2263
|
-
}
|
|
2264
2297
|
get itemInput() {
|
|
2265
2298
|
return this.formComponent.itemInput;
|
|
2266
2299
|
}
|
|
@@ -2307,10 +2340,10 @@ class FormEditorService {
|
|
|
2307
2340
|
init(formComponent) {
|
|
2308
2341
|
this._formComponent = formComponent;
|
|
2309
2342
|
}
|
|
2310
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2311
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2343
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorService, deps: [{ token: FormEditorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2344
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorService }); }
|
|
2312
2345
|
}
|
|
2313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorService, decorators: [{
|
|
2314
2347
|
type: Injectable
|
|
2315
2348
|
}], ctorParameters: () => [{ type: FormEditorService }] });
|
|
2316
2349
|
function provideFormComponent() {
|
|
@@ -2341,13 +2374,6 @@ class FormEditorComponent {
|
|
|
2341
2374
|
get formlyFields() {
|
|
2342
2375
|
return this._formlyFields;
|
|
2343
2376
|
}
|
|
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
2377
|
get itemInput() {
|
|
2352
2378
|
return this.item();
|
|
2353
2379
|
}
|
|
@@ -2366,22 +2392,29 @@ class FormEditorComponent {
|
|
|
2366
2392
|
this.commonsStorageService = inject(CommonsStorageService);
|
|
2367
2393
|
this.router = inject(Router);
|
|
2368
2394
|
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.
|
|
2395
|
+
this.autoSaveStorageKey = computed(() => generateAutosaveEditorKey(this.descriptor(), this.item(), this.router.url, { editorId: this.editorId(), itemId: this.itemId() }), /* @ts-ignore */
|
|
2396
|
+
...(ngDevMode ? [{ debugName: "autoSaveStorageKey" }] : /* istanbul ignore next */ []));
|
|
2397
|
+
this.descriptor = input.required(/* @ts-ignore */
|
|
2398
|
+
...(ngDevMode ? [{ debugName: "descriptor" }] : /* istanbul ignore next */ []));
|
|
2399
|
+
this.submitLoading = input(false, { ...(ngDevMode ? { debugName: "submitLoading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2400
|
+
this.item = model(undefined, /* @ts-ignore */
|
|
2401
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
2402
|
+
this.isFormDisabled = input(false, { ...(ngDevMode ? { debugName: "isFormDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2403
|
+
this.editorId = input(undefined, /* @ts-ignore */
|
|
2404
|
+
...(ngDevMode ? [{ debugName: "editorId" }] : /* istanbul ignore next */ []));
|
|
2405
|
+
this.itemId = input(undefined, /* @ts-ignore */
|
|
2406
|
+
...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
2407
|
+
this.showAutoSaveStatus = input(true, { ...(ngDevMode ? { debugName: "showAutoSaveStatus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2377
2408
|
// event outputs
|
|
2378
2409
|
this.formSubmit = output();
|
|
2379
2410
|
this.valueChange = output();
|
|
2380
2411
|
this.autoSaveStatusSubject = new BehaviorSubject({ state: 'initial', timestamp: new Date() });
|
|
2381
2412
|
this.autoSaveStatus = outputFromObservable(this.autoSaveStatusSubject.asObservable());
|
|
2382
2413
|
// content and view queries
|
|
2383
|
-
this.submitButtonElementRef = viewChild('submitButton',
|
|
2384
|
-
|
|
2414
|
+
this.submitButtonElementRef = viewChild('submitButton', /* @ts-ignore */
|
|
2415
|
+
...(ngDevMode ? [{ debugName: "submitButtonElementRef" }] : /* istanbul ignore next */ []));
|
|
2416
|
+
this.focusThiefElRef = viewChild('focusThiefInput', /* @ts-ignore */
|
|
2417
|
+
...(ngDevMode ? [{ debugName: "focusThiefElRef" }] : /* istanbul ignore next */ []));
|
|
2385
2418
|
// formly specifics
|
|
2386
2419
|
this._form = new UntypedFormGroup({});
|
|
2387
2420
|
this._formlyStateDisabledSubject = new BehaviorSubject(false);
|
|
@@ -2397,15 +2430,19 @@ class FormEditorComponent {
|
|
|
2397
2430
|
this._formlyFields = []; // initialized in ngOnInit, should not be changed after
|
|
2398
2431
|
this.formlyModel = {}; // initialized in ngOnInit, should not be changed after, serves as formly initialization model
|
|
2399
2432
|
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
|
-
|
|
2433
|
+
this.setterFields = computed(() => this.descriptor().fields.filter(f => typeof f.setter === 'function'), /* @ts-ignore */
|
|
2434
|
+
...(ngDevMode ? [{ debugName: "setterFields" }] : /* istanbul ignore next */ []));
|
|
2435
|
+
this.formMessages = signal([], /* @ts-ignore */
|
|
2436
|
+
...(ngDevMode ? [{ debugName: "formMessages" }] : /* istanbul ignore next */ []));
|
|
2402
2437
|
this.formMessagesTypeNarrowed = computed(() => this.formMessages().map(m => ({
|
|
2403
|
-
severity:
|
|
2438
|
+
severity: narrowOptimusMessageSeverity(m.severity),
|
|
2404
2439
|
text: m.detail,
|
|
2405
2440
|
icon: m.icon
|
|
2406
|
-
})),
|
|
2441
|
+
})), /* @ts-ignore */
|
|
2442
|
+
...(ngDevMode ? [{ debugName: "formMessagesTypeNarrowed" }] : /* istanbul ignore next */ []));
|
|
2407
2443
|
// autosave
|
|
2408
|
-
this.autoSaveRestore = signal(null,
|
|
2444
|
+
this.autoSaveRestore = signal(null, /* @ts-ignore */
|
|
2445
|
+
...(ngDevMode ? [{ debugName: "autoSaveRestore" }] : /* istanbul ignore next */ []));
|
|
2409
2446
|
this.autoSave = toSignal(this.autoSaveStatusSubject);
|
|
2410
2447
|
this.autoSavePreviewButtonLabel = computed(() => {
|
|
2411
2448
|
switch (this.autoSave()?.state) {
|
|
@@ -2416,11 +2453,15 @@ class FormEditorComponent {
|
|
|
2416
2453
|
default:
|
|
2417
2454
|
return 'mngEditor.autoSave.restore.preview';
|
|
2418
2455
|
}
|
|
2419
|
-
},
|
|
2420
|
-
|
|
2421
|
-
this.
|
|
2456
|
+
}, /* @ts-ignore */
|
|
2457
|
+
...(ngDevMode ? [{ debugName: "autoSavePreviewButtonLabel" }] : /* istanbul ignore next */ []));
|
|
2458
|
+
this.autoSaveShowRestore = computed(() => this.autoSaveRestore()?.saved != null, /* @ts-ignore */
|
|
2459
|
+
...(ngDevMode ? [{ debugName: "autoSaveShowRestore" }] : /* istanbul ignore next */ []));
|
|
2460
|
+
this.autoSavePreviewDisabledForm = signal(false, /* @ts-ignore */
|
|
2461
|
+
...(ngDevMode ? [{ debugName: "autoSavePreviewDisabledForm" }] : /* istanbul ignore next */ []));
|
|
2422
2462
|
// autofocus
|
|
2423
|
-
this.autofocusEnabled = computed(() => (this.descriptor().autofocusOnField ?? true) && !this._formlyStateDisabled(),
|
|
2463
|
+
this.autofocusEnabled = computed(() => (this.descriptor().autofocusOnField ?? true) && !this._formlyStateDisabled(), /* @ts-ignore */
|
|
2464
|
+
...(ngDevMode ? [{ debugName: "autofocusEnabled" }] : /* istanbul ignore next */ []));
|
|
2424
2465
|
this.formService.init(this);
|
|
2425
2466
|
effect(() => {
|
|
2426
2467
|
const item = this.item();
|
|
@@ -2785,10 +2826,10 @@ class FormEditorComponent {
|
|
|
2785
2826
|
this.autoSaveRestore.set(this.commonsStorageService.getItem(this.cmpTypeName, this.autoSaveStorageKey()) ?? null);
|
|
2786
2827
|
}
|
|
2787
2828
|
}
|
|
2788
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2789
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2829
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2830
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2790
2831
|
}
|
|
2791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2792
2833
|
type: Component,
|
|
2793
2834
|
args: [{ selector: 'mng-form-editor', imports: [FormlyForm, ReactiveFormsModule, TranslatePipe, DatePipe, EditorAutoSaveStatusComponent, Message, ButtonDirective], providers: [provideFormComponent()], changeDetection: ChangeDetectionStrategy.OnPush, 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
2835
|
}], 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 }] }] } });
|
|
@@ -2806,19 +2847,28 @@ class ActionEditorInjectorContextComponent {
|
|
|
2806
2847
|
this.actionExecutor = inject(ActionExecutorService);
|
|
2807
2848
|
this.viewContainer = inject(ViewContainer, { optional: true });
|
|
2808
2849
|
// metadata and editor mode input
|
|
2809
|
-
this.data = input.required(
|
|
2850
|
+
this.data = input.required(/* @ts-ignore */
|
|
2851
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
2810
2852
|
this.actionRun = output();
|
|
2811
2853
|
this.actionCancel = output();
|
|
2812
2854
|
// content and view queries
|
|
2813
|
-
this.formEditorCmp = viewChild((FormEditorComponent),
|
|
2814
|
-
|
|
2815
|
-
this.
|
|
2816
|
-
|
|
2855
|
+
this.formEditorCmp = viewChild((FormEditorComponent), /* @ts-ignore */
|
|
2856
|
+
...(ngDevMode ? [{ debugName: "formEditorCmp" }] : /* istanbul ignore next */ []));
|
|
2857
|
+
this.hasTitle = computed(() => this.editorAction().editorTitle !== null, /* @ts-ignore */
|
|
2858
|
+
...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
|
|
2859
|
+
this.title = signal(undefined, /* @ts-ignore */
|
|
2860
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
2861
|
+
this.isFormDisabled = signal(false, /* @ts-ignore */
|
|
2862
|
+
...(ngDevMode ? [{ debugName: "isFormDisabled" }] : /* istanbul ignore next */ []));
|
|
2817
2863
|
// data
|
|
2818
|
-
this.item = signal(undefined,
|
|
2819
|
-
|
|
2820
|
-
this.
|
|
2821
|
-
|
|
2864
|
+
this.item = signal(undefined, /* @ts-ignore */
|
|
2865
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
2866
|
+
this.itemId = signal(undefined, /* @ts-ignore */
|
|
2867
|
+
...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
2868
|
+
this.actionData = signal(undefined, /* @ts-ignore */
|
|
2869
|
+
...(ngDevMode ? [{ debugName: "actionData" }] : /* istanbul ignore next */ []));
|
|
2870
|
+
this.editorAction = computed(() => this.data().descriptor, /* @ts-ignore */
|
|
2871
|
+
...(ngDevMode ? [{ debugName: "editorAction" }] : /* istanbul ignore next */ []));
|
|
2822
2872
|
// actions
|
|
2823
2873
|
this.actions = computed(() => {
|
|
2824
2874
|
const actions = [];
|
|
@@ -2826,13 +2876,16 @@ class ActionEditorInjectorContextComponent {
|
|
|
2826
2876
|
if (action instanceof ActionEditorSubmitDescriptorInst) {
|
|
2827
2877
|
action.withButtonOpts({
|
|
2828
2878
|
...action.button,
|
|
2879
|
+
// eslint-disable-next-line sonarjs/no-nested-conditional
|
|
2829
2880
|
icon: action.button?.icon === undefined ? (action.submitType === ActionEditorSubmitTypeEnum.Submit ? 'pi pi-check' : 'pi pi-times') : action.button.icon,
|
|
2830
2881
|
label: action.button?.label === undefined
|
|
2831
|
-
?
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2882
|
+
? // eslint-disable-next-line sonarjs/no-nested-conditional
|
|
2883
|
+
action.submitType === ActionEditorSubmitTypeEnum.Submit
|
|
2884
|
+
? 'general.save'
|
|
2885
|
+
: // eslint-disable-next-line sonarjs/no-nested-conditional
|
|
2886
|
+
this.data().isDialog
|
|
2887
|
+
? 'general.close'
|
|
2888
|
+
: 'general.cancel'
|
|
2836
2889
|
: action.button.label
|
|
2837
2890
|
});
|
|
2838
2891
|
// assign run operations
|
|
@@ -2856,19 +2909,28 @@ class ActionEditorInjectorContextComponent {
|
|
|
2856
2909
|
actions.push(action);
|
|
2857
2910
|
}
|
|
2858
2911
|
return actions;
|
|
2859
|
-
},
|
|
2860
|
-
|
|
2912
|
+
}, /* @ts-ignore */
|
|
2913
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
2914
|
+
this.toolbarLeftActions = computed(() => this.actions().filter(a => a.position === ActionPositionEnum.ToolbarLeft), /* @ts-ignore */
|
|
2915
|
+
...(ngDevMode ? [{ debugName: "toolbarLeftActions" }] : /* istanbul ignore next */ []));
|
|
2861
2916
|
this.toolbarRightActions = computed(() => this.actions()
|
|
2862
2917
|
.filter(a => a.position === ActionPositionEnum.ToolbarRight)
|
|
2863
|
-
.reverse(),
|
|
2864
|
-
|
|
2918
|
+
.reverse(), /* @ts-ignore */
|
|
2919
|
+
...(ngDevMode ? [{ debugName: "toolbarRightActions" }] : /* istanbul ignore next */ []));
|
|
2920
|
+
this.footerLeftActions = computed(() => this.actions().filter(a => a.position === ActionPositionEnum.FooterLeft), /* @ts-ignore */
|
|
2921
|
+
...(ngDevMode ? [{ debugName: "footerLeftActions" }] : /* istanbul ignore next */ []));
|
|
2865
2922
|
this.footerRightActions = computed(() => this.actions()
|
|
2866
2923
|
.filter(a => a.position === ActionPositionEnum.FooterRight)
|
|
2867
|
-
.reverse(),
|
|
2868
|
-
|
|
2869
|
-
this.
|
|
2870
|
-
|
|
2871
|
-
this.
|
|
2924
|
+
.reverse(), /* @ts-ignore */
|
|
2925
|
+
...(ngDevMode ? [{ debugName: "footerRightActions" }] : /* istanbul ignore next */ []));
|
|
2926
|
+
this.loading = signal(false, /* @ts-ignore */
|
|
2927
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2928
|
+
this.formValue = signal(undefined, /* @ts-ignore */
|
|
2929
|
+
...(ngDevMode ? [{ debugName: "formValue" }] : /* istanbul ignore next */ []));
|
|
2930
|
+
this.submitLoading = signal(false, /* @ts-ignore */
|
|
2931
|
+
...(ngDevMode ? [{ debugName: "submitLoading" }] : /* istanbul ignore next */ []));
|
|
2932
|
+
this.autoSaveStatus = signal(undefined, /* @ts-ignore */
|
|
2933
|
+
...(ngDevMode ? [{ debugName: "autoSaveStatus" }] : /* istanbul ignore next */ []));
|
|
2872
2934
|
effectWithDeps([this.data], ([data]) => {
|
|
2873
2935
|
this.item.set(data.item);
|
|
2874
2936
|
this.itemId.set(data.itemId);
|
|
@@ -3169,10 +3231,10 @@ class ActionEditorInjectorContextComponent {
|
|
|
3169
3231
|
sourceComponent: this
|
|
3170
3232
|
};
|
|
3171
3233
|
}
|
|
3172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3173
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3235
|
+
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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3174
3236
|
}
|
|
3175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
|
|
3176
3238
|
type: Component,
|
|
3177
3239
|
args: [{ selector: 'mng-action-editor-injector-context', imports: [ActionComponent, FormEditorComponent, EditorAutoSaveStatusComponent, ProgressSpinner, Toolbar, ButtonDirective], changeDetection: ChangeDetectionStrategy.OnPush, 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
3240
|
}], 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: [{
|
|
@@ -3193,15 +3255,20 @@ class ActionEditorComponent {
|
|
|
3193
3255
|
constructor() {
|
|
3194
3256
|
this.injContextCmpType = ActionEditorInjectorContextComponent;
|
|
3195
3257
|
this.dialogConfig = inject(DynamicDialogConfig, { optional: true });
|
|
3196
|
-
this.action = input.required(
|
|
3258
|
+
this.action = input.required(/* @ts-ignore */
|
|
3259
|
+
...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
|
|
3197
3260
|
this.dialogData = this.dialogConfig?.data;
|
|
3198
3261
|
this.isDialog = !!this.dialogData;
|
|
3199
3262
|
this.parentInjector = this.dialogData?.injector;
|
|
3200
3263
|
// data source inputs
|
|
3201
|
-
this.itemId = input(
|
|
3202
|
-
|
|
3203
|
-
this.
|
|
3204
|
-
|
|
3264
|
+
this.itemId = input(/* @ts-ignore */
|
|
3265
|
+
...(ngDevMode ? [undefined, { debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
3266
|
+
this.item = input(/* @ts-ignore */
|
|
3267
|
+
...(ngDevMode ? [undefined, { debugName: "item" }] : /* istanbul ignore next */ []));
|
|
3268
|
+
this.actionData = input(/* @ts-ignore */
|
|
3269
|
+
...(ngDevMode ? [undefined, { debugName: "actionData" }] : /* istanbul ignore next */ []));
|
|
3270
|
+
this.dataProvider = input(/* @ts-ignore */
|
|
3271
|
+
...(ngDevMode ? [undefined, { debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
3205
3272
|
this.actionRun = output();
|
|
3206
3273
|
this.actionCancel = output();
|
|
3207
3274
|
this.actionEditorWInjContextInputData = computed(() => {
|
|
@@ -3216,7 +3283,8 @@ class ActionEditorComponent {
|
|
|
3216
3283
|
actionData: this.dialogData?.action.instance.activationParameters?.actionData ?? this.actionData,
|
|
3217
3284
|
dataProvider: this.dataProvider()
|
|
3218
3285
|
};
|
|
3219
|
-
},
|
|
3286
|
+
}, /* @ts-ignore */
|
|
3287
|
+
...(ngDevMode ? [{ debugName: "actionEditorWInjContextInputData" }] : /* istanbul ignore next */ []));
|
|
3220
3288
|
this.itemIdFirstUpdate = true;
|
|
3221
3289
|
this.itemFirstUpdate = true;
|
|
3222
3290
|
effect(() => {
|
|
@@ -3256,10 +3324,10 @@ class ActionEditorComponent {
|
|
|
3256
3324
|
triggerSubmit() {
|
|
3257
3325
|
this.actionEditorWInjContextCmp?.triggerSubmit();
|
|
3258
3326
|
}
|
|
3259
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3260
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3327
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3328
|
+
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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3261
3329
|
}
|
|
3262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionEditorComponent, decorators: [{
|
|
3263
3331
|
type: Component,
|
|
3264
3332
|
args: [{ selector: 'mng-action-editor', imports: [ComponentDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData()\n }\"\n [parentInjector]=\"parentInjector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n" }]
|
|
3265
3333
|
}], 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"] }] } });
|
|
@@ -3268,24 +3336,31 @@ class DataLanguageDropdownComponent {
|
|
|
3268
3336
|
constructor() {
|
|
3269
3337
|
this.viewContainer = inject(ViewContainer, { optional: true });
|
|
3270
3338
|
this.commons = inject(CommonsService);
|
|
3271
|
-
this.action = input.required(
|
|
3272
|
-
|
|
3273
|
-
this.
|
|
3274
|
-
|
|
3275
|
-
this.
|
|
3276
|
-
|
|
3339
|
+
this.action = input.required(/* @ts-ignore */
|
|
3340
|
+
...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
|
|
3341
|
+
this.actionData = input.required(/* @ts-ignore */
|
|
3342
|
+
...(ngDevMode ? [{ debugName: "actionData" }] : /* istanbul ignore next */ []));
|
|
3343
|
+
this.item = input.required(/* @ts-ignore */
|
|
3344
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
3345
|
+
this.itemId = input.required(/* @ts-ignore */
|
|
3346
|
+
...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
|
|
3347
|
+
this.enabled = input.required(/* @ts-ignore */
|
|
3348
|
+
...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
|
|
3349
|
+
this.loading = input.required(/* @ts-ignore */
|
|
3350
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
3277
3351
|
this.trigger = output();
|
|
3278
3352
|
// dropdown properties
|
|
3279
|
-
this.selectionItemsDataProvider = computed(() => lookupDataProvider().withLookup(() => of(this.commons.appDataLocales())),
|
|
3353
|
+
this.selectionItemsDataProvider = computed(() => lookupDataProvider().withLookup(() => of(this.commons.appDataLocales())), /* @ts-ignore */
|
|
3354
|
+
...(ngDevMode ? [{ debugName: "selectionItemsDataProvider" }] : /* istanbul ignore next */ []));
|
|
3280
3355
|
}
|
|
3281
3356
|
updateDataLocale(dataLang) {
|
|
3282
3357
|
this.commons.setAppDataLocale(dataLang);
|
|
3283
3358
|
this.viewContainer?.reloadTable({});
|
|
3284
3359
|
}
|
|
3285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3286
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3360
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataLanguageDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3361
|
+
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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3287
3362
|
}
|
|
3288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataLanguageDropdownComponent, decorators: [{
|
|
3289
3364
|
type: Component,
|
|
3290
3365
|
args: [{ selector: 'mng-data-language-dropdown', imports: [DropdownComponent, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider()\" [ngModel]=\"commons.appDataLocale()\" [showClear]=\"false\" (valueChange)=\"updateDataLocale($event)\"></mng-dropdown>\n" }]
|
|
3291
3366
|
}], 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"] }] } });
|
|
@@ -3417,10 +3492,10 @@ class ActionRouteComponent {
|
|
|
3417
3492
|
this.instanceStateSubscription?.unsubscribe();
|
|
3418
3493
|
this.instanceReactivationSubscription?.unsubscribe();
|
|
3419
3494
|
}
|
|
3420
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3421
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3496
|
+
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: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3422
3497
|
}
|
|
3423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionRouteComponent, decorators: [{
|
|
3424
3499
|
type: Component,
|
|
3425
3500
|
args: [{ selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "" }]
|
|
3426
3501
|
}] });
|
|
@@ -3466,46 +3541,66 @@ class ActionTableComponent {
|
|
|
3466
3541
|
this.actionExecutor = inject(ActionExecutorService);
|
|
3467
3542
|
this.viewContainer = inject((ViewContainer), { optional: true });
|
|
3468
3543
|
// metadata input
|
|
3469
|
-
this.descriptor = input.required(
|
|
3544
|
+
this.descriptor = input.required(/* @ts-ignore */
|
|
3545
|
+
...(ngDevMode ? [{ debugName: "descriptor" }] : /* istanbul ignore next */ []));
|
|
3470
3546
|
// data source inputs
|
|
3471
|
-
this.items = input(
|
|
3472
|
-
|
|
3473
|
-
this.
|
|
3474
|
-
|
|
3475
|
-
this.
|
|
3476
|
-
this.
|
|
3547
|
+
this.items = input(/* @ts-ignore */
|
|
3548
|
+
...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
|
|
3549
|
+
this.result = input(/* @ts-ignore */
|
|
3550
|
+
...(ngDevMode ? [undefined, { debugName: "result" }] : /* istanbul ignore next */ []));
|
|
3551
|
+
this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3552
|
+
this.dataProvider = input(/* @ts-ignore */
|
|
3553
|
+
...(ngDevMode ? [undefined, { debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
3554
|
+
this.queryParamPrepend = input(/* @ts-ignore */
|
|
3555
|
+
...(ngDevMode ? [undefined, { debugName: "queryParamPrepend" }] : /* istanbul ignore next */ []));
|
|
3556
|
+
this.useQueryParams = input(false, /* @ts-ignore */
|
|
3557
|
+
...(ngDevMode ? [{ debugName: "useQueryParams" }] : /* istanbul ignore next */ []));
|
|
3477
3558
|
// extra features input
|
|
3478
|
-
this.tableTemplates = input([],
|
|
3479
|
-
|
|
3480
|
-
this.
|
|
3481
|
-
|
|
3482
|
-
this.
|
|
3483
|
-
|
|
3484
|
-
this.
|
|
3559
|
+
this.tableTemplates = input([], /* @ts-ignore */
|
|
3560
|
+
...(ngDevMode ? [{ debugName: "tableTemplates" }] : /* istanbul ignore next */ []));
|
|
3561
|
+
this.tableClassName = input(/* @ts-ignore */
|
|
3562
|
+
...(ngDevMode ? [undefined, { debugName: "tableClassName" }] : /* istanbul ignore next */ []));
|
|
3563
|
+
this.selectionMode = input('multiple', /* @ts-ignore */
|
|
3564
|
+
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
3565
|
+
this.selectionEnabled = input(false, /* @ts-ignore */
|
|
3566
|
+
...(ngDevMode ? [{ debugName: "selectionEnabled" }] : /* istanbul ignore next */ []));
|
|
3567
|
+
this.globalFilterFields = input(/* @ts-ignore */
|
|
3568
|
+
...(ngDevMode ? [undefined, { debugName: "globalFilterFields" }] : /* istanbul ignore next */ []));
|
|
3569
|
+
this.rowReorderEnabled = input(true, /* @ts-ignore */
|
|
3570
|
+
...(ngDevMode ? [{ debugName: "rowReorderEnabled" }] : /* istanbul ignore next */ []));
|
|
3571
|
+
this.featureConfig = input(undefined, /* @ts-ignore */
|
|
3572
|
+
...(ngDevMode ? [{ debugName: "featureConfig" }] : /* istanbul ignore next */ []));
|
|
3485
3573
|
// actions
|
|
3486
|
-
this.actions = input([],
|
|
3574
|
+
this.actions = input([], /* @ts-ignore */
|
|
3575
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ [])); // can be anything
|
|
3487
3576
|
// component inputs
|
|
3488
|
-
this.columnActionMinWidthInput = input(undefined, { ...(ngDevMode ? { debugName: "columnActionMinWidthInput" } : {}), alias: 'columnActionMinWidth' });
|
|
3577
|
+
this.columnActionMinWidthInput = input(undefined, { ...(ngDevMode ? { debugName: "columnActionMinWidthInput" } : /* istanbul ignore next */ {}), alias: 'columnActionMinWidth' });
|
|
3489
3578
|
this.columnActionMinWidth = computed(() => this.descriptor() && !this.columnActionMinWidthInput()
|
|
3490
3579
|
? calculateTableColumnActionWidth(this.descriptor(), this.rowInlineActions())
|
|
3491
|
-
: this.columnActionMinWidthInput(),
|
|
3580
|
+
: this.columnActionMinWidthInput(), /* @ts-ignore */
|
|
3581
|
+
...(ngDevMode ? [{ debugName: "columnActionMinWidth" }] : /* istanbul ignore next */ []));
|
|
3492
3582
|
// event outputs
|
|
3493
3583
|
this.tableLoad = output();
|
|
3494
3584
|
this.selectionChange = output();
|
|
3495
3585
|
this.rowReorder = output();
|
|
3496
3586
|
// content and view queries
|
|
3497
|
-
this.contentTemplates = contentChildren(TableTemplateDirective,
|
|
3498
|
-
|
|
3587
|
+
this.contentTemplates = contentChildren(TableTemplateDirective, /* @ts-ignore */
|
|
3588
|
+
...(ngDevMode ? [{ debugName: "contentTemplates" }] : /* istanbul ignore next */ []));
|
|
3589
|
+
this.table = viewChild.required(TableComponent, /* @ts-ignore */
|
|
3590
|
+
...(ngDevMode ? [{ debugName: "table" }] : /* istanbul ignore next */ []));
|
|
3499
3591
|
this.tableTemplatesMerged = computed(() => {
|
|
3500
3592
|
return [...this.contentTemplates(), ...this.tableTemplates()];
|
|
3501
|
-
},
|
|
3593
|
+
}, /* @ts-ignore */
|
|
3594
|
+
...(ngDevMode ? [{ debugName: "tableTemplatesMerged" }] : /* istanbul ignore next */ []));
|
|
3502
3595
|
// actions
|
|
3503
3596
|
this.rowClickActions = computed(() => {
|
|
3504
3597
|
return this.actions().filter(action => action.position === ActionPositionEnum.RowClick);
|
|
3505
|
-
},
|
|
3598
|
+
}, /* @ts-ignore */
|
|
3599
|
+
...(ngDevMode ? [{ debugName: "rowClickActions" }] : /* istanbul ignore next */ []));
|
|
3506
3600
|
this.rowInlineActions = computed(() => {
|
|
3507
3601
|
return this.actions().filter(action => action.position === ActionPositionEnum.RowInline);
|
|
3508
|
-
},
|
|
3602
|
+
}, /* @ts-ignore */
|
|
3603
|
+
...(ngDevMode ? [{ debugName: "rowInlineActions" }] : /* istanbul ignore next */ []));
|
|
3509
3604
|
this.viewContainer?.tableReload$.pipe(takeUntilDestroyed()).subscribe(e => this.reload(e));
|
|
3510
3605
|
}
|
|
3511
3606
|
reload(e) {
|
|
@@ -3539,10 +3634,10 @@ class ActionTableComponent {
|
|
|
3539
3634
|
this.reload();
|
|
3540
3635
|
}
|
|
3541
3636
|
}
|
|
3542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3543
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3637
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3638
|
+
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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3544
3639
|
}
|
|
3545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ActionTableComponent, decorators: [{
|
|
3546
3641
|
type: Component,
|
|
3547
3642
|
args: [{ selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TableTemplateDirective], providers: [provideActionExecutor()], changeDetection: ChangeDetectionStrategy.OnPush, 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
3643
|
}], 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 }] }] } });
|
|
@@ -3570,18 +3665,30 @@ class TableviewComponent {
|
|
|
3570
3665
|
constructor() {
|
|
3571
3666
|
this.viewContainer = inject(ViewContainer, { optional: true });
|
|
3572
3667
|
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
|
-
|
|
3668
|
+
this.actionTable = viewChild.required((ActionTableComponent), /* @ts-ignore */
|
|
3669
|
+
...(ngDevMode ? [{ debugName: "actionTable" }] : /* istanbul ignore next */ []));
|
|
3670
|
+
this.descriptor = input.required(/* @ts-ignore */
|
|
3671
|
+
...(ngDevMode ? [{ debugName: "descriptor" }] : /* istanbul ignore next */ []));
|
|
3672
|
+
this.dataProvider = input(/* @ts-ignore */
|
|
3673
|
+
...(ngDevMode ? [undefined, { debugName: "dataProvider" }] : /* istanbul ignore next */ []));
|
|
3674
|
+
this.actions = input([], /* @ts-ignore */
|
|
3675
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
3676
|
+
this.toolbarLeftActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarLeft]), /* @ts-ignore */
|
|
3677
|
+
...(ngDevMode ? [{ debugName: "toolbarLeftActions" }] : /* istanbul ignore next */ []));
|
|
3678
|
+
this.toolbarRightActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarRight]).reverse(), /* @ts-ignore */
|
|
3679
|
+
...(ngDevMode ? [{ debugName: "toolbarRightActions" }] : /* istanbul ignore next */ []));
|
|
3680
|
+
this.tableActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.TableHeader, ActionPositionEnum.RowInline, ActionPositionEnum.RowClick]), /* @ts-ignore */
|
|
3681
|
+
...(ngDevMode ? [{ debugName: "tableActions" }] : /* istanbul ignore next */ []));
|
|
3682
|
+
this.tableParams = signal(undefined, /* @ts-ignore */
|
|
3683
|
+
...(ngDevMode ? [{ debugName: "tableParams" }] : /* istanbul ignore next */ []));
|
|
3684
|
+
this.hasItemSelectionAction = computed(() => [...this.toolbarLeftActions(), ...this.toolbarRightActions()].some(e => e.hasItemsSelection), /* @ts-ignore */
|
|
3685
|
+
...(ngDevMode ? [{ debugName: "hasItemSelectionAction" }] : /* istanbul ignore next */ []));
|
|
3686
|
+
this.selectedItems = signal([], /* @ts-ignore */
|
|
3687
|
+
...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
3688
|
+
this.contentTableTemplates = contentChildren(TableTemplateDirective, /* @ts-ignore */
|
|
3689
|
+
...(ngDevMode ? [{ debugName: "contentTableTemplates" }] : /* istanbul ignore next */ []));
|
|
3690
|
+
this.tableTemplates = computed(() => [...this.contentTableTemplates()], /* @ts-ignore */
|
|
3691
|
+
...(ngDevMode ? [{ debugName: "tableTemplates" }] : /* istanbul ignore next */ []));
|
|
3585
3692
|
}
|
|
3586
3693
|
ngOnInit() {
|
|
3587
3694
|
if (this.viewContainer) {
|
|
@@ -3601,10 +3708,10 @@ class TableviewComponent {
|
|
|
3601
3708
|
filterActionsByPositions(actions, actionPositions) {
|
|
3602
3709
|
return actions.filter(action => (action.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true) && actionPositions.includes(action.position));
|
|
3603
3710
|
}
|
|
3604
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3605
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3711
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3712
|
+
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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3606
3713
|
}
|
|
3607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewComponent, decorators: [{
|
|
3608
3715
|
type: Component,
|
|
3609
3716
|
args: [{ selector: 'mng-tableview', imports: [ActionComponent, ActionTableComponent, RouterOutlet, Toolbar], providers: [provideViewContainer()], changeDetection: ChangeDetectionStrategy.OnPush, 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
3717
|
}], 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 }] }] } });
|
|
@@ -3671,10 +3778,10 @@ class DefaultDataProviderExecutor extends DataProviderExecutor {
|
|
|
3671
3778
|
runDelete(ctx, fallback) {
|
|
3672
3779
|
return fallback ? runFnFromDataProviderOrFallback(ctx, runDeleteFromDataProvider, fallback) : runDeleteFromDataProvider(ctx);
|
|
3673
3780
|
}
|
|
3674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3675
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3781
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DefaultDataProviderExecutor, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3782
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DefaultDataProviderExecutor }); }
|
|
3676
3783
|
}
|
|
3677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DefaultDataProviderExecutor, decorators: [{
|
|
3678
3785
|
type: Injectable
|
|
3679
3786
|
}] });
|
|
3680
3787
|
|
|
@@ -3685,8 +3792,10 @@ class ACommonsFormlyType extends FieldType {
|
|
|
3685
3792
|
this.cd = inject(ChangeDetectorRef);
|
|
3686
3793
|
this.formStateDisabledSubject = new BehaviorSubject(false);
|
|
3687
3794
|
this.formStateDisabled$ = this.formStateDisabledSubject.asObservable();
|
|
3688
|
-
this.descriptorSig = signal(undefined,
|
|
3689
|
-
|
|
3795
|
+
this.descriptorSig = signal(undefined, /* @ts-ignore */
|
|
3796
|
+
...(ngDevMode ? [{ debugName: "descriptorSig" }] : /* istanbul ignore next */ []));
|
|
3797
|
+
this.fieldSig = signal(undefined, /* @ts-ignore */
|
|
3798
|
+
...(ngDevMode ? [{ debugName: "fieldSig" }] : /* istanbul ignore next */ []));
|
|
3690
3799
|
}
|
|
3691
3800
|
get descriptor() {
|
|
3692
3801
|
return this.props.descriptor;
|
|
@@ -3713,38 +3822,44 @@ class ACommonsFormlyType extends FieldType {
|
|
|
3713
3822
|
.pipe(startWith(this.formState.disabled ?? false), takeUntilDestroyed(this.destroyRef))
|
|
3714
3823
|
.subscribe(value => this.formStateDisabledSubject.next(value));
|
|
3715
3824
|
}
|
|
3716
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3717
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
3825
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3826
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: ACommonsFormlyType, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
3718
3827
|
}
|
|
3719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyType, decorators: [{
|
|
3720
3829
|
type: Directive
|
|
3721
3830
|
}] });
|
|
3722
3831
|
|
|
3723
3832
|
class ACommonsFormlyFieldType extends ACommonsFormlyType {
|
|
3724
3833
|
constructor() {
|
|
3725
3834
|
super(...arguments);
|
|
3726
|
-
this.controlClassName = computed(() => ['mng-field-control', this.descriptorSig()?.className?.control].filter(c => !!c).join(' '),
|
|
3727
|
-
|
|
3728
|
-
this.
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3835
|
+
this.controlClassName = computed(() => ['mng-field-control', this.descriptorSig()?.className?.control].filter(c => !!c).join(' '), /* @ts-ignore */
|
|
3836
|
+
...(ngDevMode ? [{ debugName: "controlClassName" }] : /* istanbul ignore next */ []));
|
|
3837
|
+
this.labelClassName = computed(() => ['mng-field-label', this.descriptorSig()?.className?.label].filter(c => !!c).join(' '), /* @ts-ignore */
|
|
3838
|
+
...(ngDevMode ? [{ debugName: "labelClassName" }] : /* istanbul ignore next */ []));
|
|
3839
|
+
this.controlInputClassName = computed(() => ['mng-field-control-input', this.descriptorSig()?.className?.input].filter(c => !!c).join(' '), /* @ts-ignore */
|
|
3840
|
+
...(ngDevMode ? [{ debugName: "controlInputClassName" }] : /* istanbul ignore next */ []));
|
|
3841
|
+
this.controlWithInputClassName = computed(() => this.controlClassName() + ' ' + this.controlInputClassName(), /* @ts-ignore */
|
|
3842
|
+
...(ngDevMode ? [{ debugName: "controlWithInputClassName" }] : /* istanbul ignore next */ []));
|
|
3843
|
+
}
|
|
3844
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyFieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3845
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: ACommonsFormlyFieldType, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
3733
3846
|
}
|
|
3734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyFieldType, decorators: [{
|
|
3735
3848
|
type: Directive
|
|
3736
3849
|
}] });
|
|
3737
3850
|
|
|
3738
3851
|
class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
|
|
3739
3852
|
constructor() {
|
|
3740
3853
|
super(...arguments);
|
|
3741
|
-
this.buttonStyle = signal({ severity: 'primary' },
|
|
3742
|
-
|
|
3854
|
+
this.buttonStyle = signal({ severity: 'primary' }, /* @ts-ignore */
|
|
3855
|
+
...(ngDevMode ? [{ debugName: "buttonStyle" }] : /* istanbul ignore next */ []));
|
|
3856
|
+
this.actionMessage = signal(undefined, /* @ts-ignore */
|
|
3857
|
+
...(ngDevMode ? [{ debugName: "actionMessage" }] : /* istanbul ignore next */ []));
|
|
3743
3858
|
}
|
|
3744
3859
|
ngOnInit() {
|
|
3745
3860
|
super.ngOnInit();
|
|
3746
3861
|
if (this.descriptor.button?.style) {
|
|
3747
|
-
this.buttonStyle.set(
|
|
3862
|
+
this.buttonStyle.set(buttonStyleToOptimusStyles(this.descriptor.button?.style));
|
|
3748
3863
|
}
|
|
3749
3864
|
}
|
|
3750
3865
|
ngOnDestroy() {
|
|
@@ -3779,10 +3894,10 @@ class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
|
|
|
3779
3894
|
this.actionMessage.set(res.message);
|
|
3780
3895
|
}
|
|
3781
3896
|
}
|
|
3782
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3783
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3897
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3898
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3784
3899
|
}
|
|
3785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldActionComponent, decorators: [{
|
|
3786
3901
|
type: Component,
|
|
3787
3902
|
args: [{ selector: 'mng-formly-field-action', imports: [TranslatePipe, Tooltip, Message, ButtonDirective], changeDetection: ChangeDetectionStrategy.OnPush, 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
3903
|
}] });
|
|
@@ -3812,10 +3927,10 @@ class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
|
|
|
3812
3927
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3813
3928
|
});
|
|
3814
3929
|
}
|
|
3815
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3816
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3930
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3931
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3817
3932
|
}
|
|
3818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
|
|
3819
3934
|
type: Component,
|
|
3820
3935
|
args: [{ selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, TranslatePipe, FormlyAttributes], changeDetection: ChangeDetectionStrategy.OnPush, 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
3936
|
}] });
|
|
@@ -3841,10 +3956,10 @@ class FormlyFieldCustomComponent extends ACommonsFormlyFieldType {
|
|
|
3841
3956
|
...this.descriptor.customComponentInputs
|
|
3842
3957
|
};
|
|
3843
3958
|
}
|
|
3844
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3845
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3959
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3960
|
+
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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3846
3961
|
}
|
|
3847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldCustomComponent, decorators: [{
|
|
3848
3963
|
type: Component,
|
|
3849
3964
|
args: [{
|
|
3850
3965
|
selector: 'mng-formly-field-custom',
|
|
@@ -3874,10 +3989,10 @@ class FormlyFieldDropdownComponent extends ACommonsFormlyFieldType {
|
|
|
3874
3989
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
3875
3990
|
});
|
|
3876
3991
|
}
|
|
3877
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3878
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3992
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3993
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3879
3994
|
}
|
|
3880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3995
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
|
|
3881
3996
|
type: Component,
|
|
3882
3997
|
args: [{ selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, TranslatePipe, FormlyAttributes], changeDetection: ChangeDetectionStrategy.OnPush, 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
3998
|
}] });
|
|
@@ -3924,10 +4039,10 @@ class FormlyFieldLabelPipe {
|
|
|
3924
4039
|
const label = getEditorFieldLabel(value, editorDescriptor) ?? '';
|
|
3925
4040
|
return label === '' ? '\u00A0' : label;
|
|
3926
4041
|
}
|
|
3927
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3928
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
4042
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4043
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelPipe, isStandalone: true, name: "mngFormlyFieldLabel" }); }
|
|
3929
4044
|
}
|
|
3930
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelPipe, decorators: [{
|
|
3931
4046
|
type: Pipe,
|
|
3932
4047
|
args: [{
|
|
3933
4048
|
name: 'mngFormlyFieldLabel',
|
|
@@ -3936,10 +4051,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
3936
4051
|
}] });
|
|
3937
4052
|
|
|
3938
4053
|
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: "
|
|
4054
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyGroupType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4055
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: ACommonsFormlyGroupType, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
3941
4056
|
}
|
|
3942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ACommonsFormlyGroupType, decorators: [{
|
|
3943
4058
|
type: Directive
|
|
3944
4059
|
}] });
|
|
3945
4060
|
|
|
@@ -3955,12 +4070,13 @@ class FormlyFieldFieldsetComponent extends ACommonsFormlyGroupType {
|
|
|
3955
4070
|
type: f.props.descriptor?.type,
|
|
3956
4071
|
config: f
|
|
3957
4072
|
}));
|
|
3958
|
-
},
|
|
4073
|
+
}, /* @ts-ignore */
|
|
4074
|
+
...(ngDevMode ? [{ debugName: "fieldGroup" }] : /* istanbul ignore next */ []));
|
|
3959
4075
|
}
|
|
3960
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3961
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4076
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4077
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3962
4078
|
}
|
|
3963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
|
|
3964
4080
|
type: Component,
|
|
3965
4081
|
args: [{ selector: 'mng-formly-field-fieldset', imports: [TranslatePipe, FormlyFieldLabelPipe, Fieldset, FormlyField], changeDetection: ChangeDetectionStrategy.OnPush, 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
4082
|
}] });
|
|
@@ -3979,7 +4095,8 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
3979
4095
|
this.imageFormArray = this.formBuilder.array([]);
|
|
3980
4096
|
this.invalidFileSizeMessageDetail = signal(this.translateService.instant('mngEditor.validation.fileTooBig', {
|
|
3981
4097
|
max: this.#formatSize(500000)
|
|
3982
|
-
}),
|
|
4098
|
+
}), /* @ts-ignore */
|
|
4099
|
+
...(ngDevMode ? [{ debugName: "invalidFileSizeMessageDetail" }] : /* istanbul ignore next */ []));
|
|
3983
4100
|
}
|
|
3984
4101
|
ngOnInit() {
|
|
3985
4102
|
super.ngOnInit();
|
|
@@ -4033,6 +4150,7 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
4033
4150
|
}
|
|
4034
4151
|
this.imageFormArray.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), distinctUntilChanged()).subscribe(v => {
|
|
4035
4152
|
const fcv = v.filter((i) => !!i && typeof i === 'string' && i.length > 0);
|
|
4153
|
+
// eslint-disable-next-line sonarjs/no-nested-conditional
|
|
4036
4154
|
this.iFormControl.setValue(fcv.length > 0 ? (this.descriptor.fileMultiple ? fcv : fcv[0]) : undefined);
|
|
4037
4155
|
this.iFormControl.updateValueAndValidity();
|
|
4038
4156
|
});
|
|
@@ -4127,10 +4245,10 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
4127
4245
|
return 'pi-file';
|
|
4128
4246
|
}
|
|
4129
4247
|
}
|
|
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 }); }
|
|
4248
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4249
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4132
4250
|
}
|
|
4133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
|
|
4134
4252
|
type: Component,
|
|
4135
4253
|
args: [{ selector: 'mng-formly-field-input', imports: [
|
|
4136
4254
|
InputNumber,
|
|
@@ -4164,10 +4282,10 @@ class FormlyFieldLabelComponent extends ACommonsFormlyFieldType {
|
|
|
4164
4282
|
super.ngOnInit();
|
|
4165
4283
|
this.formControl?.patchValue(this.descriptor.label);
|
|
4166
4284
|
}
|
|
4167
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4168
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
4285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4286
|
+
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: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4169
4287
|
}
|
|
4170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLabelComponent, decorators: [{
|
|
4171
4289
|
type: Component,
|
|
4172
4290
|
args: [{ selector: 'mng-formly-field-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
|
|
4173
4291
|
}], propDecorators: { className: [{
|
|
@@ -4181,13 +4299,15 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
4181
4299
|
this.injector = inject(Injector);
|
|
4182
4300
|
this.logger = inject(LoggerService).create('FormlyFieldLookupDialogComponent');
|
|
4183
4301
|
this.fieldLabelFormControl = new FormControl();
|
|
4184
|
-
this.addItems = signal({ data: [], totalCount: 0 },
|
|
4302
|
+
this.addItems = signal({ data: [], totalCount: 0 }, /* @ts-ignore */
|
|
4303
|
+
...(ngDevMode ? [{ debugName: "addItems" }] : /* istanbul ignore next */ []));
|
|
4185
4304
|
this.dialogUseDataProvider = false;
|
|
4186
4305
|
this.dialogDataProviderService = null;
|
|
4187
4306
|
this.isDialogVisible = false;
|
|
4188
4307
|
this.dialogAreItemsLoaded = false;
|
|
4189
4308
|
this.dialogSelectedItem = null;
|
|
4190
|
-
this.dialogIsLoading = signal(false,
|
|
4309
|
+
this.dialogIsLoading = signal(false, /* @ts-ignore */
|
|
4310
|
+
...(ngDevMode ? [{ debugName: "dialogIsLoading" }] : /* istanbul ignore next */ []));
|
|
4191
4311
|
}
|
|
4192
4312
|
ngOnInit() {
|
|
4193
4313
|
super.ngOnInit();
|
|
@@ -4319,10 +4439,10 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
4319
4439
|
this.fieldLabelFormControl.setValue(value);
|
|
4320
4440
|
}
|
|
4321
4441
|
}
|
|
4322
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4323
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4442
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4443
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4324
4444
|
}
|
|
4325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
|
|
4326
4446
|
type: Component,
|
|
4327
4447
|
args: [{ selector: 'mng-formly-field-lookup-dialog', imports: [
|
|
4328
4448
|
TranslatePipe,
|
|
@@ -4347,7 +4467,8 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4347
4467
|
super(...arguments);
|
|
4348
4468
|
this.injector = inject(Injector);
|
|
4349
4469
|
this.labelInfoTooltipDefaultIcon = labelInfoTooltipDefaultIcon;
|
|
4350
|
-
this.items = signal([],
|
|
4470
|
+
this.items = signal([], /* @ts-ignore */
|
|
4471
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
4351
4472
|
this.actions = [];
|
|
4352
4473
|
this.toolbarRightActions = [];
|
|
4353
4474
|
this.isDisabledSubject = new BehaviorSubject(false);
|
|
@@ -4559,10 +4680,10 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
4559
4680
|
}
|
|
4560
4681
|
return false;
|
|
4561
4682
|
}
|
|
4562
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4563
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4683
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4684
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4564
4685
|
}
|
|
4565
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
|
|
4566
4687
|
type: Component,
|
|
4567
4688
|
args: [{ selector: 'mng-formly-table-dialog-form-field', imports: [TranslatePipe, ActionComponent, ActionTableComponent, FormlyFieldLabelPipe, NgClass, Tooltip, TableTemplateDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, 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
4689
|
}] });
|
|
@@ -4573,13 +4694,16 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4573
4694
|
this.injector = inject(Injector);
|
|
4574
4695
|
this.logger = inject(LoggerService).create('FormlyFieldTableDialogMultiselectComponent');
|
|
4575
4696
|
this.labelInfoTooltipDefaultIcon = labelInfoTooltipDefaultIcon;
|
|
4576
|
-
this.items = signal([],
|
|
4577
|
-
|
|
4697
|
+
this.items = signal([], /* @ts-ignore */
|
|
4698
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
4699
|
+
this.addItems = signal({ data: [], totalCount: 0 }, /* @ts-ignore */
|
|
4700
|
+
...(ngDevMode ? [{ debugName: "addItems" }] : /* istanbul ignore next */ []));
|
|
4578
4701
|
this.dialogDataProviderService = null;
|
|
4579
4702
|
this.isDialogVisible = false;
|
|
4580
4703
|
this.dialogAreItemsLoaded = false;
|
|
4581
4704
|
this.dialogSelectedAddItems = [];
|
|
4582
|
-
this.dialogIsLoading = signal(false,
|
|
4705
|
+
this.dialogIsLoading = signal(false, /* @ts-ignore */
|
|
4706
|
+
...(ngDevMode ? [{ debugName: "dialogIsLoading" }] : /* istanbul ignore next */ []));
|
|
4583
4707
|
this.hasAddAction = false;
|
|
4584
4708
|
this.hasDeleteAction = false;
|
|
4585
4709
|
this.searchDebounceSubject = new Subject();
|
|
@@ -4609,7 +4733,7 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4609
4733
|
this.props.onValueChange?.(this.field, v);
|
|
4610
4734
|
});
|
|
4611
4735
|
this.searchDebounceSubject.pipe(debounceTime(200), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(query => {
|
|
4612
|
-
this.addTableComponent?.
|
|
4736
|
+
this.addTableComponent?.optimusTable()?.filterGlobal(query, 'contains');
|
|
4613
4737
|
});
|
|
4614
4738
|
}
|
|
4615
4739
|
ngAfterViewInit() {
|
|
@@ -4629,7 +4753,7 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4629
4753
|
this.dialogSelectedAddItems = [];
|
|
4630
4754
|
this.isDialogVisible = true;
|
|
4631
4755
|
if (!this.dialogAreItemsLoaded) {
|
|
4632
|
-
//
|
|
4756
|
+
// Wrapped in requestAnimationFrame due to an Optimus UI timing issue.
|
|
4633
4757
|
requestAnimationFrame(() => {
|
|
4634
4758
|
this.dialogIsLoading.set(true);
|
|
4635
4759
|
const params = { limit: 50, sort: [] };
|
|
@@ -4737,10 +4861,10 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4737
4861
|
this.formControl.setValue(newValue);
|
|
4738
4862
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.RowReorder, this, { dragIndex: event.dragIndex, dropIndex: event.dropIndex });
|
|
4739
4863
|
}
|
|
4740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4741
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4864
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4865
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4742
4866
|
}
|
|
4743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
4744
4868
|
type: Component,
|
|
4745
4869
|
args: [{ selector: 'mng-formly-table-multiselect-add-field', imports: [TranslatePipe, TableComponent, FormlyFieldLabelPipe, NgClass, ButtonDirective, Tooltip, Dialog, TableTemplateDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, 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
4870
|
}], propDecorators: { addTableComponent: [{
|
|
@@ -4751,7 +4875,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
4751
4875
|
class FormlyFieldTabsComponent extends ACommonsFormlyGroupType {
|
|
4752
4876
|
constructor() {
|
|
4753
4877
|
super(...arguments);
|
|
4754
|
-
this.fieldGroup = signal([],
|
|
4878
|
+
this.fieldGroup = signal([], /* @ts-ignore */
|
|
4879
|
+
...(ngDevMode ? [{ debugName: "fieldGroup" }] : /* istanbul ignore next */ []));
|
|
4755
4880
|
}
|
|
4756
4881
|
ngOnInit() {
|
|
4757
4882
|
super.ngOnInit();
|
|
@@ -4760,10 +4885,10 @@ class FormlyFieldTabsComponent extends ACommonsFormlyGroupType {
|
|
|
4760
4885
|
onEscape() {
|
|
4761
4886
|
window.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true, cancelable: true }));
|
|
4762
4887
|
}
|
|
4763
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4764
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4888
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4889
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4765
4890
|
}
|
|
4766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4891
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
|
|
4767
4892
|
type: Component,
|
|
4768
4893
|
args: [{ selector: 'mng-formly-field-tabs', imports: [TranslatePipe, FormlyFieldLabelPipe, Tabs, TabList, Tab, TabPanels, TabPanel, FormlyField], changeDetection: ChangeDetectionStrategy.OnPush, 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
4894
|
}] });
|
|
@@ -4772,9 +4897,12 @@ class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
|
4772
4897
|
constructor() {
|
|
4773
4898
|
super(...arguments);
|
|
4774
4899
|
this.destroyRef = inject(DestroyRef);
|
|
4775
|
-
this.wrapperClassName = signal('mng-field-wrapper',
|
|
4776
|
-
|
|
4777
|
-
this.
|
|
4900
|
+
this.wrapperClassName = signal('mng-field-wrapper', /* @ts-ignore */
|
|
4901
|
+
...(ngDevMode ? [{ debugName: "wrapperClassName" }] : /* istanbul ignore next */ []));
|
|
4902
|
+
this.helpText = signal(undefined, /* @ts-ignore */
|
|
4903
|
+
...(ngDevMode ? [{ debugName: "helpText" }] : /* istanbul ignore next */ []));
|
|
4904
|
+
this.shouldShowError = signal(false, /* @ts-ignore */
|
|
4905
|
+
...(ngDevMode ? [{ debugName: "shouldShowError" }] : /* istanbul ignore next */ []));
|
|
4778
4906
|
}
|
|
4779
4907
|
ngOnInit() {
|
|
4780
4908
|
this.descriptor = this.props?.descriptor;
|
|
@@ -4798,10 +4926,10 @@ class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
|
4798
4926
|
}
|
|
4799
4927
|
return field;
|
|
4800
4928
|
}
|
|
4801
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4802
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4929
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4930
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4803
4931
|
}
|
|
4804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, decorators: [{
|
|
4805
4933
|
type: Component,
|
|
4806
4934
|
args: [{ selector: 'mng-formly-field-no-label-wrapper', imports: [TranslatePipe, FormlyValidationMessage], changeDetection: ChangeDetectionStrategy.OnPush, 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
4935
|
}] });
|
|
@@ -4811,8 +4939,10 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
|
4811
4939
|
super(...arguments);
|
|
4812
4940
|
this.destroyRef = inject(DestroyRef);
|
|
4813
4941
|
this.labelInfoTooltipDefaultIcon = labelInfoTooltipDefaultIcon;
|
|
4814
|
-
this.wrapperClassName = signal('mng-field-wrapper',
|
|
4815
|
-
|
|
4942
|
+
this.wrapperClassName = signal('mng-field-wrapper', /* @ts-ignore */
|
|
4943
|
+
...(ngDevMode ? [{ debugName: "wrapperClassName" }] : /* istanbul ignore next */ []));
|
|
4944
|
+
this.helpText = signal(undefined, /* @ts-ignore */
|
|
4945
|
+
...(ngDevMode ? [{ debugName: "helpText" }] : /* istanbul ignore next */ []));
|
|
4816
4946
|
}
|
|
4817
4947
|
ngOnInit() {
|
|
4818
4948
|
const descriptor = this.props?.descriptor;
|
|
@@ -4846,10 +4976,10 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
|
|
|
4846
4976
|
this.helpText.set(descriptor.helpText);
|
|
4847
4977
|
}
|
|
4848
4978
|
}
|
|
4849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4850
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4979
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4980
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4851
4981
|
}
|
|
4852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldWrapperComponent, decorators: [{
|
|
4853
4983
|
type: Component,
|
|
4854
4984
|
args: [{ selector: 'mng-formly-field-wrapper', imports: [TranslatePipe, FormlyFieldLabelPipe, NgClass, Tooltip, FormlyValidationMessage], changeDetection: ChangeDetectionStrategy.OnPush, 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
4985
|
}] });
|
|
@@ -4858,14 +4988,18 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4858
4988
|
constructor() {
|
|
4859
4989
|
super(...arguments);
|
|
4860
4990
|
this.dpFormControl = new FormControl();
|
|
4861
|
-
this.#validationClassName = signal('ng-valid',
|
|
4862
|
-
|
|
4991
|
+
this.#validationClassName = signal('ng-valid', /* @ts-ignore */
|
|
4992
|
+
...(ngDevMode ? [{ debugName: "#validationClassName" }] : /* istanbul ignore next */ []));
|
|
4993
|
+
this.styleClass = computed(() => [this.controlClassName(), this.#validationClassName()].join(' '), /* @ts-ignore */
|
|
4994
|
+
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
4863
4995
|
this.moduleConfig = inject(COMMONS_MODULE_CONFIG_IT, { optional: true });
|
|
4864
4996
|
this.dateTimeInUtc = this.moduleConfig?.serialization?.dateTimeInUtc ?? false;
|
|
4865
4997
|
this.dateTimeWithTimezone = this.moduleConfig?.serialization?.dateTimeWithTimezone ?? true;
|
|
4866
4998
|
this.dateTimeWithMillis = this.moduleConfig?.serialization?.dateTimeWithMillis ?? true;
|
|
4867
|
-
this.minDate = signal(undefined,
|
|
4868
|
-
|
|
4999
|
+
this.minDate = signal(undefined, /* @ts-ignore */
|
|
5000
|
+
...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
5001
|
+
this.maxDate = signal(undefined, /* @ts-ignore */
|
|
5002
|
+
...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
4869
5003
|
}
|
|
4870
5004
|
#validationClassName;
|
|
4871
5005
|
ngOnInit() {
|
|
@@ -4970,6 +5104,7 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4970
5104
|
}
|
|
4971
5105
|
}
|
|
4972
5106
|
}
|
|
5107
|
+
// eslint-disable-next-line sonarjs/use-type-alias
|
|
4973
5108
|
convertDateValue(value) {
|
|
4974
5109
|
const convertDateType = this.descriptor.datePickerValueNoTime || !this.descriptor.datePickerShowTime ? 'date' : 'date-time';
|
|
4975
5110
|
const convertDateTimeOpts = {
|
|
@@ -5014,12 +5149,12 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
5014
5149
|
eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
|
|
5015
5150
|
});
|
|
5016
5151
|
}
|
|
5017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5018
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5153
|
+
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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5019
5154
|
}
|
|
5020
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FormlyFieldDatepickerComponent, decorators: [{
|
|
5021
5156
|
type: Component,
|
|
5022
|
-
args: [{ selector: 'mng-formly-field-datepicker', imports: [ReactiveFormsModule, TranslatePipe, FormlyAttributes, DatetimePickerComponent], changeDetection: ChangeDetectionStrategy.OnPush, 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 [
|
|
5157
|
+
args: [{ selector: 'mng-formly-field-datepicker', imports: [ReactiveFormsModule, TranslatePipe, FormlyAttributes, DatetimePickerComponent], changeDetection: ChangeDetectionStrategy.OnPush, 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
5158
|
}] });
|
|
5024
5159
|
|
|
5025
5160
|
const formlyWrappersConfig = [
|
|
@@ -5319,12 +5454,13 @@ function commonsFormlyConfigProvider(translate, datePipe, config = {}) {
|
|
|
5319
5454
|
|
|
5320
5455
|
class TableviewRouteComponent {
|
|
5321
5456
|
constructor() {
|
|
5322
|
-
this.tableview = input.required(
|
|
5457
|
+
this.tableview = input.required(/* @ts-ignore */
|
|
5458
|
+
...(ngDevMode ? [{ debugName: "tableview" }] : /* istanbul ignore next */ []));
|
|
5323
5459
|
}
|
|
5324
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5325
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
5460
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5461
|
+
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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5326
5462
|
}
|
|
5327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableviewRouteComponent, decorators: [{
|
|
5328
5464
|
type: Component,
|
|
5329
5465
|
args: [{ selector: 'mng-tableview-route', imports: [TableviewComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-tableview [descriptor]=\"tableview().descriptor\" [dataProvider]=\"tableview().dataProvider\" [actions]=\"tableview().actions\"> </mng-tableview>\n" }]
|
|
5330
5466
|
}], propDecorators: { tableview: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableview", required: true }] }] } });
|