@mediusinc/mng-commons 0.17.7 → 0.18.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/esm2020/lib/components/form/editor/form-editor.component.mjs +8 -2
- package/esm2020/lib/components/form/formly/fields/formly-field-action/formly-field-action.component.mjs +39 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +6 -5
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +6 -5
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +3 -2
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +6 -5
- package/esm2020/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.mjs +3 -2
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +5 -4
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +5 -4
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +5 -4
- package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +1 -1
- package/esm2020/lib/components/form/formly/fields/index.mjs +2 -1
- package/esm2020/lib/components/form/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +15 -0
- package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/wrappers/index.mjs +2 -2
- package/esm2020/lib/components/form/models/field-action-context.model.mjs +2 -0
- package/esm2020/lib/components/form/models/form-editor.interface.mjs +2 -0
- package/esm2020/lib/components/form/models/index.mjs +2 -1
- package/esm2020/lib/components/layout/menu-item.component.mjs +2 -2
- package/esm2020/lib/config/formly.config.mjs +11 -6
- package/esm2020/lib/config/models/config.model.mjs +2 -0
- package/esm2020/lib/config/models/formly-config.model.mjs +2 -0
- package/esm2020/lib/config/models/index.mjs +3 -3
- package/esm2020/lib/descriptors/action.descriptor.mjs +1 -1
- package/esm2020/lib/descriptors/editor.descriptor.mjs +7 -2
- package/esm2020/lib/descriptors/field.descriptor.mjs +40 -2
- package/esm2020/lib/mng-commons.module.mjs +9 -6
- package/esm2020/lib/models/formly-field.model.mjs +1 -1
- package/esm2020/lib/utils/editor-formly.util.mjs +29 -17
- package/fesm2015/mediusinc-mng-commons.mjs +166 -57
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +164 -57
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/form/editor/form-editor.component.d.ts +5 -5
- package/lib/components/form/formly/fields/formly-field-action/formly-field-action.component.d.ts +13 -0
- package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +5 -4
- package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +5 -4
- package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +5 -4
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +5 -4
- package/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.d.ts +4 -3
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +2 -1
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +2 -1
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +2 -1
- package/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +2 -1
- package/lib/components/form/formly/fields/index.d.ts +1 -0
- package/lib/components/form/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.d.ts +6 -0
- package/lib/components/form/formly/wrappers/index.d.ts +1 -1
- package/lib/components/form/models/field-action-context.model.d.ts +17 -0
- package/lib/components/form/models/form-editor.interface.d.ts +10 -0
- package/lib/components/form/models/index.d.ts +1 -0
- package/lib/config/formly.config.d.ts +3 -6
- package/lib/config/models/{mng-config.model.d.ts → config.model.d.ts} +5 -3
- package/lib/config/models/formly-config.model.d.ts +11 -0
- package/lib/config/models/index.d.ts +2 -2
- package/lib/descriptors/editor.descriptor.d.ts +2 -1
- package/lib/descriptors/field.descriptor.d.ts +16 -1
- package/lib/mng-commons.module.d.ts +52 -51
- package/lib/models/formly-field.model.d.ts +8 -8
- package/lib/utils/editor-formly.util.d.ts +6 -5
- package/package.json +1 -1
- package/version-info.json +5 -5
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +0 -15
- package/esm2020/lib/config/models/mng-config.model.mjs +0 -2
- package/esm2020/lib/config/models/mng-formly-config-model.mjs +0 -2
- package/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.d.ts +0 -6
- package/lib/config/models/mng-formly-config-model.d.ts +0 -17
|
@@ -6,9 +6,9 @@ import { Message } from 'primeng/api';
|
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
7
|
import { EditorDescriptor } from '../../../descriptors';
|
|
8
8
|
import { MngTemplateDirective } from '../../../directives';
|
|
9
|
-
import { MngFormEditorSubmitEvent } from '../models';
|
|
9
|
+
import { IFormEditorComponent, MngFormEditorSubmitEvent } from '../models';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class MngFormEditorComponent<T> implements OnInit, OnDestroy {
|
|
11
|
+
export declare class MngFormEditorComponent<T> implements IFormEditorComponent<T>, OnInit, OnDestroy {
|
|
12
12
|
private translateService;
|
|
13
13
|
descriptor: EditorDescriptor<T>;
|
|
14
14
|
submitLoading: Observable<boolean> | boolean;
|
|
@@ -34,9 +34,9 @@ export declare class MngFormEditorComponent<T> implements OnInit, OnDestroy {
|
|
|
34
34
|
getFormValue(): T;
|
|
35
35
|
resetFormModel(item?: T): void;
|
|
36
36
|
getFormField(key: string): AbstractControl<any, any> | null;
|
|
37
|
-
setFormFieldValue(key: string, value: any):
|
|
38
|
-
patchFormFieldValue(key: string, value: any):
|
|
39
|
-
resetFormFieldValue(key: string, value?: any):
|
|
37
|
+
setFormFieldValue(key: string, value: any): boolean;
|
|
38
|
+
patchFormFieldValue(key: string, value: any): boolean;
|
|
39
|
+
resetFormFieldValue(key: string, value?: any): boolean;
|
|
40
40
|
private findFormField;
|
|
41
41
|
private isAnyFieldInvalid;
|
|
42
42
|
private updateFormState;
|
package/lib/components/form/formly/fields/formly-field-action/formly-field-action.component.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FieldType } from '@ngx-formly/core';
|
|
3
|
+
import { FieldActionDescriptor } from '../../../../../descriptors';
|
|
4
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class MngFormlyFieldActionComponent<ET> extends FieldType<MngFormlyFieldConfig> implements OnInit {
|
|
7
|
+
descriptor: FieldActionDescriptor<ET>;
|
|
8
|
+
buttonClass: string;
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
onClick(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldActionComponent<any>, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldActionComponent<any>, "mng-formly-field-action", never, {}, {}, never, never, false>;
|
|
13
|
+
}
|
|
@@ -2,14 +2,15 @@ import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { FieldType } from '@ngx-formly/core';
|
|
4
4
|
import { FieldLookupDescriptor } from '../../../../../descriptors';
|
|
5
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class MngFormlyFieldAutocompleteComponent<T> extends FieldType implements OnInit, AfterViewInit, OnDestroy {
|
|
7
|
+
export declare class MngFormlyFieldAutocompleteComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
7
8
|
aFormControl: FormControl;
|
|
8
|
-
descriptor: FieldLookupDescriptor<T,
|
|
9
|
+
descriptor: FieldLookupDescriptor<T, ET>;
|
|
9
10
|
private subscriptions;
|
|
10
11
|
ngOnInit(): void;
|
|
11
12
|
ngAfterViewInit(): void;
|
|
12
13
|
ngOnDestroy(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldAutocompleteComponent<any>, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldAutocompleteComponent<any>, "mng-formly-field-autocomplete", never, {}, {}, never, never, false>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldAutocompleteComponent<any, any>, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldAutocompleteComponent<any, any>, "mng-formly-field-autocomplete", never, {}, {}, never, never, false>;
|
|
15
16
|
}
|
package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts
CHANGED
|
@@ -2,13 +2,14 @@ import { OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { FieldType } from '@ngx-formly/core';
|
|
4
4
|
import { FieldLookupDescriptor } from '../../../../../descriptors';
|
|
5
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class MngFormlyFieldDropdownComponent<T> extends FieldType implements OnInit, OnDestroy {
|
|
7
|
+
export declare class MngFormlyFieldDropdownComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, OnDestroy {
|
|
7
8
|
dFormControl: FormControl;
|
|
8
|
-
descriptor: FieldLookupDescriptor<T,
|
|
9
|
+
descriptor: FieldLookupDescriptor<T, ET>;
|
|
9
10
|
private subscriptions;
|
|
10
11
|
ngOnInit(): void;
|
|
11
12
|
ngOnDestroy(): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldDropdownComponent<any>, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldDropdownComponent<any>, "mng-formly-field-dropdown", never, {}, {}, never, never, false>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldDropdownComponent<any, any>, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldDropdownComponent<any, any>, "mng-formly-field-dropdown", never, {}, {}, never, never, false>;
|
|
14
15
|
}
|
package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { FieldType } from '@ngx-formly/core';
|
|
3
3
|
import { FieldGroupDescriptor } from '../../../../../descriptors';
|
|
4
4
|
import { FieldGroupTypeEnum } from '../../../../../descriptors/types';
|
|
5
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class MngFormlyFieldFieldsetComponent extends FieldType implements OnInit {
|
|
7
|
+
export declare class MngFormlyFieldFieldsetComponent<ET> extends FieldType<MngFormlyFieldConfig> implements OnInit {
|
|
7
8
|
readonly typeFieldset = FieldGroupTypeEnum.Fieldset;
|
|
8
9
|
readonly typeLogical = FieldGroupTypeEnum.Logical;
|
|
9
|
-
descriptor?: FieldGroupDescriptor<
|
|
10
|
+
descriptor?: FieldGroupDescriptor<ET>;
|
|
10
11
|
ngOnInit(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldFieldsetComponent
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldFieldsetComponent
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldFieldsetComponent<any>, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldFieldsetComponent<any>, "mng-formly-field-fieldset", never, {}, {}, never, never, false>;
|
|
13
14
|
}
|
package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import { OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { FieldType } from '@ngx-formly/core';
|
|
4
4
|
import { FieldInputDescriptor } from '../../../../../descriptors';
|
|
5
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class MngFormlyFieldInputComponent extends FieldType implements OnInit, OnDestroy {
|
|
7
|
+
export declare class MngFormlyFieldInputComponent<ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, OnDestroy {
|
|
7
8
|
applicationLocale: string;
|
|
8
9
|
iFormControl: FormControl;
|
|
9
|
-
descriptor: FieldInputDescriptor<
|
|
10
|
+
descriptor: FieldInputDescriptor<ET>;
|
|
10
11
|
numberFieldMode: 'decimal' | 'currency';
|
|
11
12
|
currency?: string;
|
|
12
13
|
private files;
|
|
@@ -18,6 +19,6 @@ export declare class MngFormlyFieldInputComponent extends FieldType implements O
|
|
|
18
19
|
onFileRemove(event: any): void;
|
|
19
20
|
onFileClear(event: Event): void;
|
|
20
21
|
private updateFileFormControl;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldInputComponent
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldInputComponent
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldInputComponent<any>, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldInputComponent<any>, "mng-formly-field-input", never, {}, {}, never, never, false>;
|
|
23
24
|
}
|
package/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FieldType } from '@ngx-formly/core';
|
|
3
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class MngFormlyFieldLabelComponent extends FieldType implements OnInit {
|
|
5
|
+
export declare class MngFormlyFieldLabelComponent<ET> extends FieldType<MngFormlyFieldConfig> implements OnInit {
|
|
5
6
|
className: string;
|
|
6
7
|
private descriptor;
|
|
7
8
|
ngOnInit(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldLabelComponent
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldLabelComponent
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldLabelComponent<any>, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldLabelComponent<any>, "mng-formly-field-label", never, {}, {}, never, never, false>;
|
|
10
11
|
}
|
|
@@ -6,9 +6,10 @@ import { Observable, Subject } from 'rxjs';
|
|
|
6
6
|
import { MediusQueryResult } from '../../../../../api/models';
|
|
7
7
|
import { FieldLookupDescriptor } from '../../../../../descriptors';
|
|
8
8
|
import { FieldLookupConfig } from '../../../../../descriptors/interfaces';
|
|
9
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
9
10
|
import { MngTableComponent } from '../../../../tableview';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class MngFormlyFieldLookupDialogComponent<T, ET> extends FieldType implements OnInit, AfterViewInit, OnDestroy {
|
|
12
|
+
export declare class MngFormlyFieldLookupDialogComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
12
13
|
private injector;
|
|
13
14
|
mngTable?: MngTableComponent<any, any>;
|
|
14
15
|
descriptor: FieldLookupDescriptor<T, ET>;
|
|
@@ -2,8 +2,9 @@ import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { FieldType } from '@ngx-formly/core';
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { ActionDescriptor, FieldManyEditorDescriptor } from '../../../../../descriptors';
|
|
5
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class MngFormlyFieldTableDialogFormComponent<T, ET> extends FieldType implements OnInit, AfterViewInit, OnDestroy {
|
|
7
|
+
export declare class MngFormlyFieldTableDialogFormComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
7
8
|
descriptor: FieldManyEditorDescriptor<T, ET>;
|
|
8
9
|
itemsSubject: Subject<Array<T>>;
|
|
9
10
|
items$: Observable<Array<T>>;
|
|
@@ -3,8 +3,9 @@ import { FieldType } from '@ngx-formly/core';
|
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { MediusQueryResult } from '../../../../../api/models';
|
|
5
5
|
import { FieldManyToManyEditorDescriptor } from '../../../../../descriptors';
|
|
6
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extends FieldType implements OnInit, AfterViewInit, OnDestroy {
|
|
8
|
+
export declare class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
8
9
|
private injector;
|
|
9
10
|
descriptor: FieldManyToManyEditorDescriptor<T, ET>;
|
|
10
11
|
itemsSubject: Subject<Array<T>>;
|
package/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FieldType } from '@ngx-formly/core';
|
|
2
|
+
import { MngFormlyFieldConfig } from '../../../../../models';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class MngFormlyFieldTabsComponent extends FieldType {
|
|
4
|
+
export declare class MngFormlyFieldTabsComponent extends FieldType<MngFormlyFieldConfig> {
|
|
4
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldTabsComponent, never>;
|
|
5
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldTabsComponent, "mng-formly-field-tabs", never, {}, {}, never, never, false>;
|
|
6
7
|
}
|
|
@@ -7,3 +7,4 @@ export * from './formly-field-table-dialog-form/formly-field-table-dialog-form.c
|
|
|
7
7
|
export * from './formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component';
|
|
8
8
|
export * from './formly-field-tabs/formly-field-tabs.component';
|
|
9
9
|
export * from './formly-field-fieldset/formly-field-fieldset.component';
|
|
10
|
+
export * from './formly-field-action/formly-field-action.component';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldWrapper } from '@ngx-formly/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MngFormlyFieldNoLabelWrapperComponent extends FieldWrapper {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldNoLabelWrapperComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldNoLabelWrapperComponent, "mng-formly-field-no-label-wrapper", never, {}, {}, never, never, false>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbstractControl, FormArray, FormGroup } from '@angular/forms';
|
|
2
|
+
import { FormlyFormOptions } from '@ngx-formly/core';
|
|
3
|
+
import { FieldActionDescriptor } from '../../../descriptors';
|
|
4
|
+
import { MngFormlyFieldProps } from '../../../models';
|
|
5
|
+
import { IFormEditorComponent } from './form-editor.interface';
|
|
6
|
+
export interface FieldActionContext<ET> {
|
|
7
|
+
descriptor: FieldActionDescriptor<ET>;
|
|
8
|
+
formEditorComponent: IFormEditorComponent<ET>;
|
|
9
|
+
formly: {
|
|
10
|
+
model: ET;
|
|
11
|
+
formControl: AbstractControl;
|
|
12
|
+
form: FormGroup | FormArray;
|
|
13
|
+
options: FormlyFormOptions;
|
|
14
|
+
props: MngFormlyFieldProps;
|
|
15
|
+
formState: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
export interface IFormEditorComponent<T> {
|
|
3
|
+
submit(): void;
|
|
4
|
+
getFormValue(): T;
|
|
5
|
+
resetFormModel(item?: T): void;
|
|
6
|
+
getFormField(key: string): AbstractControl | null;
|
|
7
|
+
setFormFieldValue(key: string, value: any): boolean;
|
|
8
|
+
patchFormFieldValue(key: string, value: any): boolean;
|
|
9
|
+
resetFormFieldValue(key: string, value?: any): boolean;
|
|
10
|
+
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import { WrapperOption } from '@ngx-formly/core/lib/models/config';
|
|
1
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { MngFormlyFieldWrapperComponent } from '../components/form/formly/wrappers';
|
|
4
4
|
import { MngFormlyFieldConfig } from '../models';
|
|
5
5
|
import { MngFormlyTypeConfig } from './models';
|
|
6
|
-
export declare const formlyWrappersConfig:
|
|
7
|
-
|
|
8
|
-
component: typeof MngFormlyFieldWrapperComponent;
|
|
9
|
-
}[];
|
|
10
|
-
export declare const formlyTypesConfig: MngFormlyTypeConfig<any>[];
|
|
6
|
+
export declare const formlyWrappersConfig: WrapperOption[];
|
|
7
|
+
export declare const formlyTypesConfig: MngFormlyTypeConfig[];
|
|
11
8
|
export declare function getRequiredValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string>;
|
|
12
9
|
export declare function getMinLengthValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
|
|
13
10
|
export declare function getMaxLengthValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ValidatorOption, WrapperOption } from '@ngx-formly/core/lib/models/config';
|
|
1
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
2
3
|
import { MenuItem } from 'primeng/api';
|
|
3
4
|
import { VersionConfigType } from '../../models';
|
|
5
|
+
import { MngFormlyTypeConfig } from './formly-config.model';
|
|
4
6
|
export interface MngModuleConfig {
|
|
5
7
|
app?: {
|
|
6
8
|
name?: string;
|
|
@@ -28,9 +30,9 @@ export interface MngModuleConfig {
|
|
|
28
30
|
formly?: {
|
|
29
31
|
skip?: boolean;
|
|
30
32
|
merge?: boolean;
|
|
31
|
-
types?:
|
|
32
|
-
wrappers?:
|
|
33
|
-
validators?:
|
|
33
|
+
types?: MngFormlyTypeConfig[];
|
|
34
|
+
wrappers?: WrapperOption[];
|
|
35
|
+
validators?: ValidatorOption[];
|
|
34
36
|
getValidationMessages?: (translate: TranslateService) => any[];
|
|
35
37
|
};
|
|
36
38
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
+
import { TypeOption } from '@ngx-formly/core/lib/models';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { MngFormlyFieldConfig } from '../../models';
|
|
5
|
+
export interface MngFormlyTypeConfig extends TypeOption {
|
|
6
|
+
defaultOptions?: MngFormlyFieldConfig;
|
|
7
|
+
}
|
|
8
|
+
export interface MngFormlyValidationMessage {
|
|
9
|
+
name: string;
|
|
10
|
+
message: (error: any, field: FormlyFieldConfig) => Observable<string> | undefined;
|
|
11
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './config.model';
|
|
2
|
+
export * from './formly-config.model';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ILookupDataProvider } from '../data-providers';
|
|
2
2
|
import { TableviewAttributeDef } from '../models/tableview-attr.model';
|
|
3
3
|
import { ClassType, EnumConstantType, EnumType, MngFieldValidationMessage, MngFieldValidator } from '../types';
|
|
4
|
-
import { AFieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
|
|
4
|
+
import { AFieldDescriptor, FieldActionDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
|
|
5
5
|
import { FieldInputTypeEnum, TableviewEditorTypeEnum } from './types';
|
|
6
6
|
export declare class EditorDescriptor<T> {
|
|
7
7
|
static readonly defaultGroupName = "_default";
|
|
@@ -48,6 +48,7 @@ export declare class EditorDescriptor<T> {
|
|
|
48
48
|
*/
|
|
49
49
|
removeField(property: string): void;
|
|
50
50
|
getField(property: string): AFieldDescriptor<any, T> | null;
|
|
51
|
+
addFieldAction(actionName: string): FieldActionDescriptor<T>;
|
|
51
52
|
addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T>;
|
|
52
53
|
addFieldLookupEnum(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null): FieldLookupEnumDescriptor<T>;
|
|
53
54
|
addFieldManyEditor<FT>(property: string, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
|
|
@@ -4,10 +4,12 @@ import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
5
|
import { MediusQueryParam, MediusQueryResult } from '../api/models';
|
|
6
6
|
import { MngFormFieldEvent, MngFormFieldEventData, MngFormFieldEventTypeEnum } from '../components/form/models';
|
|
7
|
+
import { FieldActionContext } from '../components/form/models/field-action-context.model';
|
|
7
8
|
import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
|
|
8
9
|
import { EnumValue } from '../models';
|
|
10
|
+
import { StyleLevelEnum } from '../styles/models';
|
|
9
11
|
import { ClassType, EnumConstantType, EnumType, MngFieldAsyncValidator, MngFieldValidationMessage, MngFieldValidator } from '../types';
|
|
10
|
-
import { ActionDescriptor, EditorDescriptor, FieldValidationDescriptor, TableDescriptor, TableviewDescriptor } from './';
|
|
12
|
+
import { ActionButtonDescriptor, ActionDescriptor, EditorDescriptor, FieldValidationDescriptor, TableDescriptor, TableviewDescriptor } from './';
|
|
11
13
|
import { FieldConfig, FieldLookupConfig, ILookupDescriptor } from './interfaces';
|
|
12
14
|
import { FieldGroupTypeEnum, FieldInputTypeEnum, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorTypeEnum, FieldSizeEnum } from './types';
|
|
13
15
|
export declare abstract class AGenericFieldDescriptor<ET> {
|
|
@@ -173,6 +175,19 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
|
|
|
173
175
|
withFileOnSelectHandler(fn: (file: File[] | null, control: AbstractControl) => void): void;
|
|
174
176
|
copy(): FieldInputDescriptor<ET>;
|
|
175
177
|
}
|
|
178
|
+
export declare class FieldActionDescriptor<ET> extends AFieldDescriptor<void, ET> {
|
|
179
|
+
protected readonly _fieldActionName: string;
|
|
180
|
+
protected readonly _fieldActionNameLong: string;
|
|
181
|
+
protected _button: ActionButtonDescriptor;
|
|
182
|
+
protected _runFunction?: (ctx: FieldActionContext<ET>) => void;
|
|
183
|
+
constructor(editor: EditorDescriptor<ET>, property: string);
|
|
184
|
+
get button(): ActionButtonDescriptor;
|
|
185
|
+
get runFunction(): ((ctx: FieldActionContext<ET>) => void) | undefined;
|
|
186
|
+
withButtonDescriptor(button: ActionButtonDescriptor): this;
|
|
187
|
+
withButton(label?: string | null, icon?: string | null, styleLevel?: StyleLevelEnum, styleText?: boolean): this;
|
|
188
|
+
withRunFunction(fn: (ctx: FieldActionContext<ET>) => void): this;
|
|
189
|
+
copy(): FieldActionDescriptor<ET>;
|
|
190
|
+
}
|
|
176
191
|
export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET> implements ILookupDescriptor<T> {
|
|
177
192
|
protected readonly _modelType: ClassType<T> | null;
|
|
178
193
|
protected _lookupType: FieldLookupTypeEnum;
|
|
@@ -25,7 +25,7 @@ import * as i20 from "./components/form/autocomplete/autocomplete.component";
|
|
|
25
25
|
import * as i21 from "./components/form/dropdown/dropdown.component";
|
|
26
26
|
import * as i22 from "./components/form/date-range/date-range.component";
|
|
27
27
|
import * as i23 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
|
|
28
|
-
import * as i24 from "./components/form/formly/wrappers/formly-
|
|
28
|
+
import * as i24 from "./components/form/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component";
|
|
29
29
|
import * as i25 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
|
|
30
30
|
import * as i26 from "./components/form/formly/fields/formly-field-label/formly-field-label.component";
|
|
31
31
|
import * as i27 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
|
|
@@ -35,59 +35,60 @@ import * as i30 from "./components/form/formly/fields/formly-field-table-dialog-
|
|
|
35
35
|
import * as i31 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
|
|
36
36
|
import * as i32 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
|
|
37
37
|
import * as i33 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
|
|
38
|
-
import * as i34 from "./components/
|
|
39
|
-
import * as i35 from "./components/tableview/
|
|
40
|
-
import * as i36 from "./components/tableview/
|
|
41
|
-
import * as i37 from "./components/tableview/table/column-
|
|
42
|
-
import * as i38 from "./components/tableview/
|
|
43
|
-
import * as i39 from "./components/
|
|
44
|
-
import * as i40 from "./components/
|
|
45
|
-
import * as i41 from "./components/action/
|
|
46
|
-
import * as i42 from "./components/action/
|
|
47
|
-
import * as i43 from "
|
|
48
|
-
import * as i44 from "@angular/
|
|
49
|
-
import * as i45 from "@angular/
|
|
50
|
-
import * as i46 from "@angular/
|
|
51
|
-
import * as i47 from "@
|
|
52
|
-
import * as i48 from "@ngx-
|
|
53
|
-
import * as i49 from "
|
|
54
|
-
import * as i50 from "primeng/
|
|
55
|
-
import * as i51 from "primeng/
|
|
56
|
-
import * as i52 from "primeng/
|
|
57
|
-
import * as i53 from "primeng/
|
|
58
|
-
import * as i54 from "primeng/
|
|
59
|
-
import * as i55 from "primeng/
|
|
60
|
-
import * as i56 from "primeng/
|
|
61
|
-
import * as i57 from "primeng/
|
|
62
|
-
import * as i58 from "primeng/
|
|
63
|
-
import * as i59 from "primeng/
|
|
64
|
-
import * as i60 from "primeng/
|
|
65
|
-
import * as i61 from "primeng/
|
|
66
|
-
import * as i62 from "primeng/
|
|
67
|
-
import * as i63 from "primeng/
|
|
68
|
-
import * as i64 from "primeng/
|
|
69
|
-
import * as i65 from "primeng/
|
|
70
|
-
import * as i66 from "primeng/
|
|
71
|
-
import * as i67 from "primeng/
|
|
72
|
-
import * as i68 from "primeng/
|
|
73
|
-
import * as i69 from "primeng/
|
|
74
|
-
import * as i70 from "primeng/
|
|
75
|
-
import * as i71 from "primeng/
|
|
76
|
-
import * as i72 from "primeng/
|
|
77
|
-
import * as i73 from "primeng/
|
|
78
|
-
import * as i74 from "primeng/
|
|
79
|
-
import * as i75 from "primeng/
|
|
80
|
-
import * as i76 from "primeng/
|
|
81
|
-
import * as i77 from "primeng/
|
|
82
|
-
import * as i78 from "primeng/
|
|
83
|
-
import * as i79 from "primeng/
|
|
84
|
-
import * as i80 from "primeng/
|
|
85
|
-
import * as i81 from "primeng/
|
|
86
|
-
import * as i82 from "primeng/
|
|
38
|
+
import * as i34 from "./components/form/formly/fields/formly-field-action/formly-field-action.component";
|
|
39
|
+
import * as i35 from "./components/tableview/table/table.component";
|
|
40
|
+
import * as i36 from "./components/tableview/tableview.component";
|
|
41
|
+
import * as i37 from "./components/tableview/table/column-value/column-value.component";
|
|
42
|
+
import * as i38 from "./components/tableview/table/column-filter/column-filter.component";
|
|
43
|
+
import * as i39 from "./components/tableview/route/tableview-route.component";
|
|
44
|
+
import * as i40 from "./components/form/editor/form-editor.component";
|
|
45
|
+
import * as i41 from "./components/action/action.component";
|
|
46
|
+
import * as i42 from "./components/action/editor/action-editor.component";
|
|
47
|
+
import * as i43 from "./components/action/route/action-route.component";
|
|
48
|
+
import * as i44 from "@angular/common";
|
|
49
|
+
import * as i45 from "@angular/router";
|
|
50
|
+
import * as i46 from "@angular/common/http";
|
|
51
|
+
import * as i47 from "@angular/forms";
|
|
52
|
+
import * as i48 from "@ngx-translate/core";
|
|
53
|
+
import * as i49 from "@ngx-formly/core";
|
|
54
|
+
import * as i50 from "primeng/autocomplete";
|
|
55
|
+
import * as i51 from "primeng/breadcrumb";
|
|
56
|
+
import * as i52 from "primeng/button";
|
|
57
|
+
import * as i53 from "primeng/calendar";
|
|
58
|
+
import * as i54 from "primeng/card";
|
|
59
|
+
import * as i55 from "primeng/checkbox";
|
|
60
|
+
import * as i56 from "primeng/chip";
|
|
61
|
+
import * as i57 from "primeng/confirmdialog";
|
|
62
|
+
import * as i58 from "primeng/confirmpopup";
|
|
63
|
+
import * as i59 from "primeng/dialog";
|
|
64
|
+
import * as i60 from "primeng/dynamicdialog";
|
|
65
|
+
import * as i61 from "primeng/dropdown";
|
|
66
|
+
import * as i62 from "primeng/fileupload";
|
|
67
|
+
import * as i63 from "primeng/inputnumber";
|
|
68
|
+
import * as i64 from "primeng/inputmask";
|
|
69
|
+
import * as i65 from "primeng/inputswitch";
|
|
70
|
+
import * as i66 from "primeng/inputtext";
|
|
71
|
+
import * as i67 from "primeng/inputtextarea";
|
|
72
|
+
import * as i68 from "primeng/paginator";
|
|
73
|
+
import * as i69 from "primeng/radiobutton";
|
|
74
|
+
import * as i70 from "primeng/ripple";
|
|
75
|
+
import * as i71 from "primeng/selectbutton";
|
|
76
|
+
import * as i72 from "primeng/table";
|
|
77
|
+
import * as i73 from "primeng/tag";
|
|
78
|
+
import * as i74 from "primeng/toast";
|
|
79
|
+
import * as i75 from "primeng/togglebutton";
|
|
80
|
+
import * as i76 from "primeng/toolbar";
|
|
81
|
+
import * as i77 from "primeng/tooltip";
|
|
82
|
+
import * as i78 from "primeng/messages";
|
|
83
|
+
import * as i79 from "primeng/progressspinner";
|
|
84
|
+
import * as i80 from "primeng/tabview";
|
|
85
|
+
import * as i81 from "primeng/fieldset";
|
|
86
|
+
import * as i82 from "primeng/multiselect";
|
|
87
|
+
import * as i83 from "primeng/skeleton";
|
|
87
88
|
export declare const primeNgModules: (typeof InputTextModule)[];
|
|
88
89
|
export declare class MngCommonsModule {
|
|
89
90
|
static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
|
|
90
91
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
|
|
91
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngParametrizePipe, typeof i8.MngGetterPipe, typeof i9.MngTemplatePipe, typeof i10.MngClassMapPipe, typeof i11.MngEnumeratePipe, typeof i12.MngEnumerateAsyncPipe, typeof i13.MngBreadcrumbComponent, typeof i14.MngFooterComponent, typeof i15.MngMainLayoutComponent, typeof i16.MngMenuComponent, typeof i17.MngMenuItemComponent, typeof i18.MngTopbarComponent, typeof i19.MngVersionComponent, typeof i20.MngAutocompleteComponent, typeof i21.MngDropdownComponent, typeof i22.MngDateRangeComponent, typeof i23.MngFormlyFieldWrapperComponent, typeof i24.
|
|
92
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngParametrizePipe, typeof i8.MngGetterPipe, typeof i9.MngTemplatePipe, typeof i10.MngClassMapPipe, typeof i11.MngEnumeratePipe, typeof i12.MngEnumerateAsyncPipe, typeof i13.MngBreadcrumbComponent, typeof i14.MngFooterComponent, typeof i15.MngMainLayoutComponent, typeof i16.MngMenuComponent, typeof i17.MngMenuItemComponent, typeof i18.MngTopbarComponent, typeof i19.MngVersionComponent, typeof i20.MngAutocompleteComponent, typeof i21.MngDropdownComponent, typeof i22.MngDateRangeComponent, typeof i23.MngFormlyFieldWrapperComponent, typeof i24.MngFormlyFieldNoLabelWrapperComponent, typeof i25.MngFormlyFieldInputComponent, typeof i26.MngFormlyFieldLabelComponent, typeof i27.MngFormlyFieldDropdownComponent, typeof i28.MngFormlyFieldAutocompleteComponent, typeof i29.MngFormlyFieldLookupDialogComponent, typeof i30.MngFormlyFieldTableDialogMultiselectComponent, typeof i31.MngFormlyFieldTableDialogFormComponent, typeof i32.MngFormlyFieldTabsComponent, typeof i33.MngFormlyFieldFieldsetComponent, typeof i34.MngFormlyFieldActionComponent, typeof i35.MngTableComponent, typeof i36.MngTableviewComponent, typeof i37.MngTableColumnValueComponent, typeof i38.MngTableColumnFilterComponent, typeof i39.MngTableviewRouteComponent, typeof i40.MngFormEditorComponent, typeof i41.MngActionComponent, typeof i42.MngActionEditorComponent, typeof i43.MngActionRouteComponent], [typeof i44.CommonModule, typeof i45.RouterModule, typeof i46.HttpClientModule, typeof i47.ReactiveFormsModule, typeof i48.TranslateModule, typeof i49.FormlyModule, typeof i50.AutoCompleteModule, typeof i51.BreadcrumbModule, typeof i52.ButtonModule, typeof i53.CalendarModule, typeof i54.CardModule, typeof i55.CheckboxModule, typeof i56.ChipModule, typeof i57.ConfirmDialogModule, typeof i58.ConfirmPopupModule, typeof i59.DialogModule, typeof i60.DynamicDialogModule, typeof i61.DropdownModule, typeof i62.FileUploadModule, typeof i63.InputNumberModule, typeof i64.InputMaskModule, typeof i65.InputSwitchModule, typeof i66.InputTextModule, typeof i67.InputTextareaModule, typeof i68.PaginatorModule, typeof i69.RadioButtonModule, typeof i70.RippleModule, typeof i71.SelectButtonModule, typeof i72.TableModule, typeof i73.TagModule, typeof i74.ToastModule, typeof i75.ToggleButtonModule, typeof i76.ToolbarModule, typeof i77.TooltipModule, typeof i78.MessagesModule, typeof i79.ProgressSpinnerModule, typeof i80.TabViewModule, typeof i81.FieldsetModule, typeof i82.MultiSelectModule, typeof i83.SkeletonModule], [typeof i50.AutoCompleteModule, typeof i51.BreadcrumbModule, typeof i52.ButtonModule, typeof i53.CalendarModule, typeof i54.CardModule, typeof i55.CheckboxModule, typeof i56.ChipModule, typeof i57.ConfirmDialogModule, typeof i58.ConfirmPopupModule, typeof i59.DialogModule, typeof i60.DynamicDialogModule, typeof i61.DropdownModule, typeof i62.FileUploadModule, typeof i63.InputNumberModule, typeof i64.InputMaskModule, typeof i65.InputSwitchModule, typeof i66.InputTextModule, typeof i67.InputTextareaModule, typeof i68.PaginatorModule, typeof i69.RadioButtonModule, typeof i70.RippleModule, typeof i71.SelectButtonModule, typeof i72.TableModule, typeof i73.TagModule, typeof i74.ToastModule, typeof i75.ToggleButtonModule, typeof i76.ToolbarModule, typeof i77.TooltipModule, typeof i78.MessagesModule, typeof i79.ProgressSpinnerModule, typeof i80.TabViewModule, typeof i81.FieldsetModule, typeof i82.MultiSelectModule, typeof i83.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngParametrizePipe, typeof i8.MngGetterPipe, typeof i9.MngTemplatePipe, typeof i10.MngClassMapPipe, typeof i11.MngEnumeratePipe, typeof i12.MngEnumerateAsyncPipe, typeof i13.MngBreadcrumbComponent, typeof i14.MngFooterComponent, typeof i15.MngMainLayoutComponent, typeof i16.MngMenuComponent, typeof i17.MngMenuItemComponent, typeof i18.MngTopbarComponent, typeof i19.MngVersionComponent, typeof i20.MngAutocompleteComponent, typeof i21.MngDropdownComponent, typeof i22.MngDateRangeComponent, typeof i23.MngFormlyFieldWrapperComponent, typeof i24.MngFormlyFieldNoLabelWrapperComponent, typeof i25.MngFormlyFieldInputComponent, typeof i26.MngFormlyFieldLabelComponent, typeof i27.MngFormlyFieldDropdownComponent, typeof i28.MngFormlyFieldAutocompleteComponent, typeof i29.MngFormlyFieldLookupDialogComponent, typeof i30.MngFormlyFieldTableDialogMultiselectComponent, typeof i31.MngFormlyFieldTableDialogFormComponent, typeof i32.MngFormlyFieldTabsComponent, typeof i33.MngFormlyFieldFieldsetComponent, typeof i34.MngFormlyFieldActionComponent, typeof i35.MngTableComponent, typeof i36.MngTableviewComponent, typeof i37.MngTableColumnValueComponent, typeof i38.MngTableColumnFilterComponent, typeof i39.MngTableviewRouteComponent, typeof i40.MngFormEditorComponent, typeof i41.MngActionComponent, typeof i42.MngActionEditorComponent, typeof i43.MngActionRouteComponent]>;
|
|
92
93
|
static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
|
|
93
94
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { FormlyFieldConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
2
|
-
import {
|
|
1
|
+
import { FieldType, FormlyFieldConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
2
|
+
import { IFormEditorComponent } from '../components/form/models';
|
|
3
3
|
import { AFieldDescriptor, AFieldGroupDescriptor } from '../descriptors';
|
|
4
|
-
export
|
|
4
|
+
export declare type MngFormlyFieldProps = FormlyFieldProps & MngFormlyFieldAdditionalProps<unknown, unknown>;
|
|
5
|
+
export interface MngFormlyFieldConfig<Props = MngFormlyFieldProps> extends FormlyFieldConfig<Props> {
|
|
5
6
|
props: Props;
|
|
6
|
-
expressions: {
|
|
7
|
-
[property: string]: string | ((field?: FormlyFieldConfig) => any) | Observable<any>;
|
|
8
|
-
};
|
|
9
7
|
}
|
|
10
|
-
export interface MngFormlyFieldAdditionalProps {
|
|
11
|
-
descriptor?: AFieldDescriptor<
|
|
8
|
+
export interface MngFormlyFieldAdditionalProps<T, ET> {
|
|
9
|
+
descriptor?: AFieldDescriptor<T, ET> | AFieldGroupDescriptor<ET>;
|
|
10
|
+
formEditorComponent?: IFormEditorComponent<ET>;
|
|
11
|
+
fieldComponent?: FieldType<MngFormlyFieldConfig>;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
hide?: boolean;
|
|
14
14
|
disabled?: boolean;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
+
import { IFormEditorComponent } from '../components/form/models';
|
|
2
3
|
import { AFieldDescriptor, EditorDescriptor, FieldGroupDescriptor, FieldTabGroupDescriptor, FieldValidationDescriptor } from '../descriptors';
|
|
3
4
|
export declare class EditorFormlyUtil {
|
|
4
|
-
static createFormlyConfigFromDescriptor(descriptor: EditorDescriptor<any>): FormlyFieldConfig[];
|
|
5
|
-
static createFormlyTabType(tabGroups: FieldTabGroupDescriptor<any>[]): FormlyFieldConfig[];
|
|
6
|
-
static createFormlyGroupType(groups: FieldGroupDescriptor<any>[]): FormlyFieldConfig[];
|
|
7
|
-
static createFormlyFields(descriptor: FieldGroupDescriptor<any>): FormlyFieldConfig[];
|
|
8
|
-
static createFormlyField(descriptor: AFieldDescriptor<any, any>): FormlyFieldConfig;
|
|
5
|
+
static createFormlyConfigFromDescriptor(descriptor: EditorDescriptor<any>, formEditorComponent: IFormEditorComponent<unknown>): FormlyFieldConfig[];
|
|
6
|
+
static createFormlyTabType(tabGroups: FieldTabGroupDescriptor<any>[], formEditorComponent: IFormEditorComponent<unknown>): FormlyFieldConfig[];
|
|
7
|
+
static createFormlyGroupType(groups: FieldGroupDescriptor<any>[], formEditorComponent: IFormEditorComponent<unknown>): FormlyFieldConfig[];
|
|
8
|
+
static createFormlyFields(descriptor: FieldGroupDescriptor<any>, formEditorComponent: IFormEditorComponent<unknown>): FormlyFieldConfig[];
|
|
9
|
+
static createFormlyField(descriptor: AFieldDescriptor<any, any>, formEditorComponent: IFormEditorComponent<unknown>): FormlyFieldConfig;
|
|
9
10
|
static addValidationsToFormlyField(config: FormlyFieldConfig, validations: Array<FieldValidationDescriptor>): void;
|
|
10
11
|
static addAsyncValidationsToFormlyField(config: FormlyFieldConfig, asyncValidations: Array<FieldValidationDescriptor>): void;
|
|
11
12
|
}
|
package/package.json
CHANGED
package/version-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"tag": "v0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
|
+
"tag": "v0.18.0",
|
|
5
5
|
"distance": 0,
|
|
6
|
-
"hash": "
|
|
6
|
+
"hash": "8cdb3456",
|
|
7
7
|
"dirty": false,
|
|
8
|
-
"semver": "0.
|
|
9
|
-
"raw": "v0.
|
|
8
|
+
"semver": "0.18.0",
|
|
9
|
+
"raw": "v0.18.0-8cdb3456"
|
|
10
10
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { FieldWrapper } from '@ngx-formly/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@ngx-formly/core";
|
|
6
|
-
import * as i3 from "@ngx-translate/core";
|
|
7
|
-
export class MngFormlyTableWrapperComponent extends FieldWrapper {
|
|
8
|
-
}
|
|
9
|
-
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
-
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
|
|
12
|
-
type: Component,
|
|
13
|
-
args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
14
|
-
}] });
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWx5LXRhYmxlLXdyYXBwZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb21wb25lbnRzL2Zvcm0vZm9ybWx5L3dyYXBwZXJzL2Zvcm1seS10YWJsZS13cmFwcGVyL2Zvcm1seS10YWJsZS13cmFwcGVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29tcG9uZW50cy9mb3JtL2Zvcm1seS93cmFwcGVycy9mb3JtbHktdGFibGUtd3JhcHBlci9mb3JtbHktdGFibGUtd3JhcHBlci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRWpFLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxrQkFBa0IsQ0FBQzs7Ozs7QUFPOUMsTUFBTSxPQUFPLDhCQUErQixTQUFRLFlBQVk7OzJIQUFuRCw4QkFBOEI7K0dBQTlCLDhCQUE4Qix1RkNUM0MsOFlBT0E7MkZERWEsOEJBQThCO2tCQUwxQyxTQUFTOytCQUNJLDBCQUEwQixtQkFFbkIsdUJBQXVCLENBQUMsTUFBTSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Q2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3ksIENvbXBvbmVudH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7RmllbGRXcmFwcGVyfSBmcm9tICdAbmd4LWZvcm1seS9jb3JlJztcblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICdtbmctZm9ybWx5LXRhYmxlLXdyYXBwZXInLFxuICAgIHRlbXBsYXRlVXJsOiAnLi9mb3JtbHktdGFibGUtd3JhcHBlci5jb21wb25lbnQuaHRtbCcsXG4gICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2hcbn0pXG5leHBvcnQgY2xhc3MgTW5nRm9ybWx5VGFibGVXcmFwcGVyQ29tcG9uZW50IGV4dGVuZHMgRmllbGRXcmFwcGVyIHt9XG4iLCI8ZGl2IFtjbGFzc109XCJ0bz8uWydkZXNjcmlwdG9yJ10/LlsnZmllbGRDbGFzc05hbWUnXSA/PyAnZmllbGQgdGFibGUnXCI+XG4gICAgPG5nLWNvbnRhaW5lciAjZmllbGRDb21wb25lbnQ+PC9uZy1jb250YWluZXI+XG4gICAgPHNtYWxsICpuZ0lmPVwidG8/LlsnZGVzY3JpcHRvciddPy5bJ2hlbHBUZXh0J11cIj57eyB0bz8uWydkZXNjcmlwdG9yJ10/LlsnaGVscFRleHQnXSB8IHRyYW5zbGF0ZSB9fTwvc21hbGw+XG4gICAgPHNtYWxsICpuZ0lmPVwic2hvd0Vycm9yXCIgY2xhc3M9XCJwLWVycm9yXCI+XG4gICAgICAgIDxmb3JtbHktdmFsaWRhdGlvbi1tZXNzYWdlIFtmaWVsZF09XCJmaWVsZFwiPjwvZm9ybWx5LXZhbGlkYXRpb24tbWVzc2FnZT5cbiAgICA8L3NtYWxsPlxuPC9kaXY+XG4iXX0=
|