@mediusinc/mng-commons 5.4.0-rc.5 → 5.4.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/data-list/data-list-params-helpers.d.ts +12 -2
- package/esm2022/core/data-list/data-list-params-helpers.mjs +14 -8
- package/esm2022/filter/descriptors/filter-generic.descriptor.mjs +11 -1
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +10 -5
- package/esm2022/form/components/dropdown/dropdown.component.mjs +67 -99
- package/esm2022/table/api/descriptors/table.descriptor.mjs +6 -2
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +11 -11
- package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +4 -3
- package/esm2022/table/components/table/table.component.mjs +45 -9
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +4 -18
- package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +9 -1
- package/esm2022/tableview/api/editor/descriptors/field-group.descriptor.mjs +10 -1
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +14 -2
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +24 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +7 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs +13 -7
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +10 -0
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +75 -103
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +5 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +57 -20
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +30 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +35 -24
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/descriptors/filter-generic.descriptor.d.ts +5 -2
- package/form/components/autocomplete/autocomplete.component.d.ts +1 -0
- package/form/components/dropdown/dropdown.component.d.ts +5 -10
- package/package.json +1 -1
- package/table/api/descriptors/table.descriptor.d.ts +1 -0
- package/table/components/filter/filter-form/filter-form.component.d.ts +11 -8
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +3 -2
- package/table/components/table/table.component.d.ts +6 -2
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +0 -2
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +3 -0
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +5 -0
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +8 -0
- package/tableview/editor/components/editor/form-editor.component.d.ts +5 -1
- package/version-info.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { AsyncPipe, DatePipe, NgTemplateOutlet, JsonPipe, NgStyle } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, Injectable, signal, inject, Injector, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy, Optional, DestroyRef, model, untracked,
|
|
4
|
+
import { InjectionToken, Injectable, signal, inject, Injector, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy, Optional, DestroyRef, ElementRef, model, untracked, afterNextRender, HostListener, contentChildren, viewChildren, QueryList, Directive, Pipe, LOCALE_ID, HostBinding, ViewChild } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i1 from '@angular/router';
|
|
7
7
|
import { NavigationEnd, Router, ActivatedRoute, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, RouterOutlet } from '@angular/router';
|
|
@@ -1839,6 +1839,9 @@ function createFormlyTabType(tabGroups, editorDescriptor, formlyConfig, formEdit
|
|
|
1839
1839
|
if (tab.title) {
|
|
1840
1840
|
tabField.props.label = tab.title;
|
|
1841
1841
|
}
|
|
1842
|
+
if (tab.hiddenExpression) {
|
|
1843
|
+
tabField.expressions['hide'] = tab.hiddenExpression;
|
|
1844
|
+
}
|
|
1842
1845
|
tabField.fieldGroup.push(...createFormlyGroupType(tab.fields, editorDescriptor, formlyConfig, formEditorComponent));
|
|
1843
1846
|
tabsField.fieldGroup.push(tabField);
|
|
1844
1847
|
}
|
|
@@ -1872,6 +1875,9 @@ function createFormlyGroupType(groups, editorDescriptor, formlyConfig, formEdito
|
|
|
1872
1875
|
if (group.title) {
|
|
1873
1876
|
groupField.props.label = group.title;
|
|
1874
1877
|
}
|
|
1878
|
+
if (group.hiddenExpression) {
|
|
1879
|
+
groupField.expressions['hide'] = group.hiddenExpression;
|
|
1880
|
+
}
|
|
1875
1881
|
groupField.fieldGroup.push(...createFormlyFields(group, editorDescriptor, formlyConfig, formEditorComponent));
|
|
1876
1882
|
groupsField.fieldGroup.push(groupField);
|
|
1877
1883
|
}
|
|
@@ -2274,12 +2280,13 @@ class FormEditorComponent {
|
|
|
2274
2280
|
return this._formlyInitialItem;
|
|
2275
2281
|
}
|
|
2276
2282
|
constructor() {
|
|
2283
|
+
this.destroyRef = inject(DestroyRef);
|
|
2284
|
+
this.elementRef = inject(ElementRef);
|
|
2277
2285
|
this.formlyConfig = inject(FormlyConfig);
|
|
2278
2286
|
this.translateService = inject(TranslateService);
|
|
2279
2287
|
this.commons = inject(CommonsService);
|
|
2280
2288
|
this.cmpTypeName = 'FormEditorComponent';
|
|
2281
2289
|
this.logger = inject(LoggerService).create(this.cmpTypeName);
|
|
2282
|
-
this.destroyRef = inject(DestroyRef);
|
|
2283
2290
|
this.formService = inject((FormEditorService));
|
|
2284
2291
|
this.commonsStorageService = inject(CommonsStorageService);
|
|
2285
2292
|
this.router = inject(Router);
|
|
@@ -2299,9 +2306,11 @@ class FormEditorComponent {
|
|
|
2299
2306
|
this.autoSaveStatus = outputFromObservable(this.autoSaveStatusSubject.asObservable());
|
|
2300
2307
|
// content and view queries
|
|
2301
2308
|
this.submitButtonElementRef = viewChild('submitButton');
|
|
2309
|
+
this.focusThiefElRef = viewChild('focusThiefInput');
|
|
2302
2310
|
// formly specifics
|
|
2303
2311
|
this._form = new UntypedFormGroup({});
|
|
2304
2312
|
this._formlyStateDisabledSubject = new BehaviorSubject(false);
|
|
2313
|
+
this._formlyStateDisabled = toSignal(this._formlyStateDisabledSubject);
|
|
2305
2314
|
this._formlyOptions = {
|
|
2306
2315
|
formState: {
|
|
2307
2316
|
add: false,
|
|
@@ -2335,6 +2344,8 @@ class FormEditorComponent {
|
|
|
2335
2344
|
});
|
|
2336
2345
|
this.autoSaveShowRestore = computed(() => this.autoSaveRestore()?.saved != null);
|
|
2337
2346
|
this.autoSavePreviewDisabledForm = signal(false);
|
|
2347
|
+
// autofocus
|
|
2348
|
+
this.autofocusEnabled = computed(() => (this.descriptor().autofocusOnField ?? true) && !this._formlyStateDisabled());
|
|
2338
2349
|
this.formService.init(this);
|
|
2339
2350
|
effect(() => {
|
|
2340
2351
|
const item = this.item();
|
|
@@ -2361,6 +2372,20 @@ class FormEditorComponent {
|
|
|
2361
2372
|
this.autoSaveStorageKeyCompInit = false;
|
|
2362
2373
|
});
|
|
2363
2374
|
});
|
|
2375
|
+
afterNextRender(() => {
|
|
2376
|
+
if (this.autofocusEnabled()) {
|
|
2377
|
+
setTimeout(() => {
|
|
2378
|
+
const formFields = this.elementRef.nativeElement.querySelectorAll('input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [role="combobox"]:not([disabled])');
|
|
2379
|
+
const activeEl = document.activeElement;
|
|
2380
|
+
const activeInputIdx = activeEl ? [...formFields].findIndex(el => activeEl.isEqualNode(el)) : 0;
|
|
2381
|
+
if (activeInputIdx <= 0 && this.focusThiefElRef()?.nativeElement.isEqualNode(formFields[0])) {
|
|
2382
|
+
// only if focus on focus theif (or no focus), go the next field (of first on)
|
|
2383
|
+
const targetIndex = (activeInputIdx <= 0 ? 1 : activeInputIdx + 1) % formFields.length;
|
|
2384
|
+
formFields[targetIndex].focus();
|
|
2385
|
+
}
|
|
2386
|
+
}, 500);
|
|
2387
|
+
}
|
|
2388
|
+
});
|
|
2364
2389
|
}
|
|
2365
2390
|
ngOnInit() {
|
|
2366
2391
|
// init form state
|
|
@@ -2689,18 +2714,17 @@ class FormEditorComponent {
|
|
|
2689
2714
|
}
|
|
2690
2715
|
}
|
|
2691
2716
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2692
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", 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 }], ngImport: i0, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2717
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null }, editorId: { classPropertyName: "editorId", publicName: "editorId", isSignal: true, isRequired: false, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, showAutoSaveStatus: { classPropertyName: "showAutoSaveStatus", publicName: "showAutoSaveStatus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { item: "itemChange", formSubmit: "formSubmit", valueChange: "valueChange", autoSaveStatus: "autoSaveStatus" }, providers: [provideFormComponent()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }, { propertyName: "focusThiefElRef", first: true, predicate: ["focusThiefInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2693
2718
|
}
|
|
2694
2719
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2695
2720
|
type: Component,
|
|
2696
|
-
args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule, TranslateModule, DatePipe, EditorAutoSaveStatusComponent], providers: [provideFormComponent()], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n" }]
|
|
2721
|
+
args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule, TranslateModule, DatePipe, EditorAutoSaveStatusComponent], providers: [provideFormComponent()], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (autoSaveShowRestore()) {\n <p-messages severity=\"warn\">\n <ng-template pTemplate>\n <div class=\"flex flex-grow-1 justify-content-between align-items-center\">\n <h6 class=\"m-0 p-0\">\n <em class=\"pi pi-save mr-4\"></em>\n {{\n 'mngEditor.autoSave.restore.title'\n | translate: {lastChange: autoSaveRestore()?.savedAt ? (autoSaveRestore()?.savedAt! | date: 'dd. MM. YYYY HH:mm:ss') : ''}\n }}\n </h6>\n <div>\n <p-button\n icon=\"pi pi-sync\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.restore' | translate\"\n [styleClass]=\"restoreLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSaveRestore()\"></p-button>\n @if (autoSave()?.state !== 'preview' || autoSave()?.state !== 'previewCurrent') {\n <p-button\n icon=\"pi pi-eye\"\n size=\"small\"\n [label]=\"autoSavePreviewButtonLabel() | translate\"\n [styleClass]=\"previewLocalStateButtonStyle\"\n [text]=\"true\"\n (click)=\"onAutoSavePreview()\"></p-button>\n }\n <p-button\n icon=\"pi pi-times\"\n size=\"small\"\n [label]=\"'mngEditor.autoSave.restore.dismiss' | translate\"\n [styleClass]=\"clearLocalStateButtonStyle\"\n (click)=\"onAutoSaveDismiss()\"></p-button>\n </div>\n </div>\n </ng-template>\n </p-messages>\n}\n\n@if (autofocusEnabled()) {\n <input type=\"hidden\" #focusThiefInput tabindex=\"0\" />\n}\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n\n@if (descriptor().autoSave && showAutoSaveStatus()) {\n <mng-editor-auto-save-status [status]=\"autoSave()\"></mng-editor-auto-save-status>\n}\n" }]
|
|
2697
2722
|
}], ctorParameters: () => [] });
|
|
2698
2723
|
|
|
2699
2724
|
class ActionEditorInjectorContextComponent {
|
|
2700
2725
|
constructor() {
|
|
2701
2726
|
this.ActionActivationTriggerEnum = ActionActivationTriggerEnum;
|
|
2702
2727
|
this.actionEditorSubmitTypeSubmit = ActionEditorSubmitTypeEnum.Submit;
|
|
2703
|
-
this.elementRef = inject(ElementRef);
|
|
2704
2728
|
this.translate = inject(TranslateService);
|
|
2705
2729
|
this.confirmationService = inject(ConfirmationService);
|
|
2706
2730
|
this.dialogService = inject(DialogService);
|
|
@@ -2714,7 +2738,6 @@ class ActionEditorInjectorContextComponent {
|
|
|
2714
2738
|
this.actionCancel = output();
|
|
2715
2739
|
// content and view queries
|
|
2716
2740
|
this.formEditorCmp = viewChild(FormEditorComponent);
|
|
2717
|
-
this.focusThiefElRef = viewChild.required('focusThiefInput');
|
|
2718
2741
|
this.hasTitle = computed(() => this.editorAction().editorTitle !== null);
|
|
2719
2742
|
this.title = signal(undefined);
|
|
2720
2743
|
this.isFormDisabled = signal(false);
|
|
@@ -2808,18 +2831,6 @@ class ActionEditorInjectorContextComponent {
|
|
|
2808
2831
|
this.cancel();
|
|
2809
2832
|
}
|
|
2810
2833
|
});
|
|
2811
|
-
afterNextRender(() => {
|
|
2812
|
-
setTimeout(() => {
|
|
2813
|
-
const formFields = this.elementRef.nativeElement.querySelectorAll('input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [role="combobox"]:not([disabled])');
|
|
2814
|
-
const activeEl = document.activeElement;
|
|
2815
|
-
const activeInputIdx = activeEl ? [...formFields].findIndex(el => activeEl.isEqualNode(el)) : 0;
|
|
2816
|
-
if (activeInputIdx <= 0 && this.focusThiefElRef().nativeElement.isEqualNode(formFields[0])) {
|
|
2817
|
-
// only if focus on focus theif (or no focus), go the next field (of first on)
|
|
2818
|
-
const targetIndex = (activeInputIdx <= 0 ? 1 : activeInputIdx + 1) % formFields.length;
|
|
2819
|
-
formFields[targetIndex].focus();
|
|
2820
|
-
}
|
|
2821
|
-
}, 500);
|
|
2822
|
-
});
|
|
2823
2834
|
}
|
|
2824
2835
|
ngOnInit() {
|
|
2825
2836
|
const data = this.data();
|
|
@@ -3068,11 +3079,11 @@ class ActionEditorInjectorContextComponent {
|
|
|
3068
3079
|
}
|
|
3069
3080
|
}
|
|
3070
3081
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3071
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", 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 }
|
|
3082
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionRun: "actionRun", actionCancel: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [editorId]=\"editorAction().actionNameLong\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"\n [isFormDisabled]=\"isFormDisabled()\"\n showAutoSaveStatus=\"false\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\"\n (autoSaveStatus)=\"onAutoSave($event)\">\n </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between align-items-center mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n @if (editorAction().editorDescriptor.autoSave) {\n <mng-editor-auto-save-status [status]=\"autoSaveStatus()\"></mng-editor-auto-save-status>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$3.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled", "editorId", "itemId", "showAutoSaveStatus"], outputs: ["itemChange", "formSubmit", "valueChange", "autoSaveStatus"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: EditorAutoSaveStatusComponent, selector: "mng-editor-auto-save-status", inputs: ["status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3072
3083
|
}
|
|
3073
3084
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
|
|
3074
3085
|
type: Component,
|
|
3075
|
-
args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent, ComponentDirective, ToolbarModule, EditorAutoSaveStatusComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n
|
|
3086
|
+
args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent, ComponentDirective, ToolbarModule, EditorAutoSaveStatusComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [editorId]=\"editorAction().actionNameLong\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"\n [isFormDisabled]=\"isFormDisabled()\"\n showAutoSaveStatus=\"false\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\"\n (autoSaveStatus)=\"onAutoSave($event)\">\n </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between align-items-center mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n @if (editorAction().editorDescriptor.autoSave) {\n <mng-editor-auto-save-status [status]=\"autoSaveStatus()\"></mng-editor-auto-save-status>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"] }]
|
|
3076
3087
|
}], ctorParameters: () => [], propDecorators: { beforeWindowUnload: [{
|
|
3077
3088
|
type: HostListener,
|
|
3078
3089
|
args: ['window:beforeunload']
|
|
@@ -3741,11 +3752,11 @@ class FormlyFieldFieldsetComponent extends ACommonsFormlyFieldType {
|
|
|
3741
3752
|
})));
|
|
3742
3753
|
}
|
|
3743
3754
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3744
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", 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
|
|
3755
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\" [hidden]=\"group.config.props.hidden\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$4.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3745
3756
|
}
|
|
3746
3757
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
|
|
3747
3758
|
type: Component,
|
|
3748
|
-
args: [{ standalone: true, selector: 'mng-formly-field-fieldset', imports: [FieldsetModule, FormlyModule, TranslateModule, FormlyFieldLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n
|
|
3759
|
+
args: [{ standalone: true, selector: 'mng-formly-field-fieldset', imports: [FieldsetModule, FormlyModule, TranslateModule, FormlyFieldLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (group of fieldGroup(); track group) {\n @switch (group.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.config.props.descriptor | mngFormlyFieldLabel: group.config.props.editorDescriptor | translate\" [hidden]=\"group.config.props.hidden\">\n <formly-field [field]=\"group.config\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group.config\"></formly-field>\n }\n }\n}\n" }]
|
|
3749
3760
|
}] });
|
|
3750
3761
|
|
|
3751
3762
|
class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
@@ -4506,11 +4517,11 @@ class FormlyFieldTabsComponent extends ACommonsFormlyFieldType {
|
|
|
4506
4517
|
this.fieldGroup.set(this.field.fieldGroup === undefined ? [] : this.field.fieldGroup);
|
|
4507
4518
|
}
|
|
4508
4519
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4509
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' :
|
|
4520
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"(formControl!.valid ? 'p-tabview-title' : '') + (tab.props.hidden ? ' hidden' : '')\"\n [hidden]=\"tab.props.hidden\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.key ?? '') + '_invalid']\">{{\n tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$6.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$6.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4510
4521
|
}
|
|
4511
4522
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
|
|
4512
4523
|
type: Component,
|
|
4513
|
-
args: [{ standalone: true, selector: 'mng-formly-field-tabs', imports: [TabViewModule, TranslateModule, FormlyModule, FormlyFieldLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' :
|
|
4524
|
+
args: [{ standalone: true, selector: 'mng-formly-field-tabs', imports: [TabViewModule, TranslateModule, FormlyModule, FormlyFieldLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of fieldGroup(); track tab) {\n <p-tabPanel\n [header]=\"tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\"\n [headerStyleClass]=\"(formControl!.valid ? 'p-tabview-title' : '') + (tab.props.hidden ? ' hidden' : '')\"\n [hidden]=\"tab.props.hidden\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.key ?? '') + '_invalid']\">{{\n tab.props.descriptor | mngFormlyFieldLabel: tab.props.editorDescriptor | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n" }]
|
|
4514
4525
|
}] });
|
|
4515
4526
|
|
|
4516
4527
|
class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|