@mediusinc/mng-commons 5.0.1 → 5.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/core/descriptors/model.descriptor.d.ts +1 -1
- package/core/error/error-helpers.d.ts +18 -1
- package/core/helpers/coercion.d.ts +1 -0
- package/core/i18n/i18n-type.d.ts +0 -9
- package/core/index.d.ts +0 -1
- package/core/services/commons-configuration.service.d.ts +12 -0
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +5 -6
- package/esm2022/core/components/pages/error/error.page.component.mjs +4 -4
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +4 -4
- package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
- package/esm2022/core/directives/component.directive.mjs +3 -3
- package/esm2022/core/directives/template.directive.mjs +3 -3
- package/esm2022/core/error/error-helpers.mjs +20 -1
- package/esm2022/core/helpers/coercion.mjs +4 -1
- package/esm2022/core/i18n/i18n-type.mjs +1 -34
- package/esm2022/core/index.mjs +1 -2
- package/esm2022/core/pipes/boolean.pipe.mjs +3 -3
- package/esm2022/core/pipes/class-map.pipe.mjs +3 -3
- package/esm2022/core/pipes/enum.pipe.mjs +5 -5
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +3 -3
- package/esm2022/core/pipes/enumerate.pipe.mjs +3 -3
- package/esm2022/core/pipes/getter.pipe.mjs +3 -3
- package/esm2022/core/pipes/i18n-property.pipe.mjs +3 -3
- package/esm2022/core/pipes/json-path.pipe.mjs +3 -3
- package/esm2022/core/pipes/parametrize.pipe.mjs +3 -3
- package/esm2022/core/pipes/template.pipe.mjs +3 -3
- package/esm2022/core/security/permission.service.mjs +3 -3
- package/esm2022/core/services/commons-configuration.service.mjs +16 -1
- package/esm2022/core/services/commons-init.service.mjs +3 -3
- package/esm2022/core/services/commons-router.service.mjs +3 -3
- package/esm2022/core/services/commons.service.mjs +3 -3
- package/esm2022/core/services/local-storage-config.service.mjs +3 -3
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +4 -4
- package/esm2022/form/components/date-range/date-range.component.mjs +4 -4
- package/esm2022/form/components/dropdown/dropdown.component.mjs +4 -4
- package/esm2022/form/directives/input-trim.directive.mjs +14 -19
- package/esm2022/model/descriptors/model.descriptor.mjs +1 -1
- package/esm2022/model/helpers/i18n.mjs +7 -10
- package/esm2022/table/api/descriptors/table.descriptor.mjs +2 -2
- package/esm2022/table/api/models/table.model.mjs +1 -1
- package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +4 -4
- package/esm2022/table/components/column-value/column-value.component.mjs +43 -53
- package/esm2022/table/components/table/table.component.mjs +300 -365
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +3 -3
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +3 -3
- package/esm2022/table/services/data-list.service.mjs +3 -3
- package/esm2022/tableview/action/components/action/action.component.mjs +5 -5
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +6 -7
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +5 -4
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +3 -3
- package/esm2022/tableview/action/components/route/action-route.component.mjs +3 -3
- package/esm2022/tableview/action/components/table/action-table.component.mjs +43 -92
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/navigation.service.mjs +3 -3
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/view-container.service.mjs +3 -3
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +4 -1
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +6 -14
- package/esm2022/tableview/api/editor/models/field-action-context.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +5 -5
- package/esm2022/tableview/api/editor/models/formly-field.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-options.model.mjs +2 -0
- package/esm2022/tableview/api/index.mjs +2 -2
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +25 -20
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +7 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +10 -12
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +7 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +51 -10
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +10 -11
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +8 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +8 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +7 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +19 -33
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +16 -18
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +21 -26
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +7 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +23 -0
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +14 -2
- package/esm2022/tableview/editor/helpers/editor-validators.mjs +25 -0
- package/esm2022/tableview/editor/helpers/formly-config.mjs +7 -5
- package/esm2022/tableview/editor/services/form-editor.service.mjs +3 -3
- package/esm2022/tableview/index.mjs +2 -1
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +3 -3
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +4 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs +164 -205
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +23 -27
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs +7 -10
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +357 -431
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +13 -39
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +305 -280
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/form/directives/input-trim.directive.d.ts +5 -8
- package/model/descriptors/model.descriptor.d.ts +3 -3
- package/model/helpers/i18n.d.ts +1 -3
- package/package.json +15 -15
- package/table/api/models/table.model.d.ts +1 -1
- package/table/components/column-value/column-value.component.d.ts +11 -17
- package/table/components/table/table.component.d.ts +43 -47
- package/tableview/action/components/editor/action-editor.component.d.ts +1 -2
- package/tableview/action/components/table/action-table.component.d.ts +26 -29
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +3 -3
- package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +3 -3
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +2 -1
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +13 -9
- package/tableview/api/editor/models/field-action-context.model.d.ts +4 -4
- package/tableview/api/editor/models/form-editor.interface.d.ts +24 -14
- package/tableview/api/editor/models/formly-custom-field.model.d.ts +22 -19
- package/tableview/api/editor/models/formly-field.model.d.ts +20 -0
- package/tableview/api/editor/models/formly-options.model.d.ts +15 -0
- package/tableview/api/index.d.ts +1 -1
- package/tableview/editor/components/editor/form-editor.component.d.ts +9 -17
- package/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.d.ts +3 -4
- package/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +3 -7
- package/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.d.ts +3 -4
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +6 -4
- package/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +3 -6
- package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +3 -4
- package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +4 -6
- package/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.d.ts +5 -6
- package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +6 -10
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +4 -7
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +7 -12
- package/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +2 -3
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +12 -0
- package/tableview/editor/helpers/editor-validators.d.ts +7 -0
- package/tableview/index.d.ts +1 -0
- package/version-info.json +5 -5
- package/core/directives/dialog-keydown-handler.directive.d.ts +0 -12
- package/esm2022/core/directives/dialog-keydown-handler.directive.mjs +0 -49
- package/esm2022/tableview/api/editor/helpers/field-validators.mjs +0 -23
- package/tableview/api/editor/helpers/field-validators.d.ts +0 -7
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { NgControl } from '@angular/forms';
|
|
3
1
|
import { InputTrimType } from '@mediusinc/mng-commons/form/api';
|
|
4
2
|
import * as i0 from "@angular/core";
|
|
5
3
|
export declare class InputTrimDirective {
|
|
6
|
-
|
|
7
|
-
private
|
|
8
|
-
|
|
9
|
-
constructor(el: ElementRef, ngControl: NgControl);
|
|
4
|
+
mngInputTrim: import("@angular/core").InputSignal<InputTrimType | undefined>;
|
|
5
|
+
private readonly el;
|
|
6
|
+
private readonly ngControl;
|
|
10
7
|
onBlur(): void;
|
|
11
8
|
private getTrimmedValue;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InputTrimDirective,
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<InputTrimDirective, "[mngInputTrim]", never, { "mngInputTrim": { "alias": "mngInputTrim"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputTrimDirective, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InputTrimDirective, "[mngInputTrim]", never, { "mngInputTrim": { "alias": "mngInputTrim"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
14
11
|
}
|
|
@@ -6,7 +6,7 @@ export declare class ModelDescriptor<Model, ModelClass = ClassOptType<Model>> im
|
|
|
6
6
|
private _i18nBaseKey;
|
|
7
7
|
private _idProperty?;
|
|
8
8
|
private _titleProperty?;
|
|
9
|
-
constructor(type: ModelClass, idProperty?: string, titleProperty?: string, i18nBaseKey?: string | ClassType<any>);
|
|
9
|
+
constructor(type: ModelClass, idProperty?: string, titleProperty?: string | ((item: Model) => string), i18nBaseKey?: string | ClassType<any>);
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated Use standalone {model()} instead.
|
|
12
12
|
*/
|
|
@@ -19,7 +19,7 @@ export declare class ModelDescriptor<Model, ModelClass = ClassOptType<Model>> im
|
|
|
19
19
|
get typeName(): string | undefined;
|
|
20
20
|
get i18nBaseKey(): string;
|
|
21
21
|
get idProperty(): string | undefined;
|
|
22
|
-
get titleProperty(): string | undefined;
|
|
22
|
+
get titleProperty(): string | ((item: Model) => string) | undefined;
|
|
23
23
|
withIdProperty(property: keyof Model): this;
|
|
24
24
|
withIdPropertyUnsafe(property: string): this;
|
|
25
25
|
withTitleProperty(property: keyof Model): this;
|
|
@@ -29,7 +29,7 @@ export declare class ModelDescriptor<Model, ModelClass = ClassOptType<Model>> im
|
|
|
29
29
|
}
|
|
30
30
|
export type ModelDescriptorCreateOpts<Model> = {
|
|
31
31
|
id?: keyof Model;
|
|
32
|
-
title?: keyof Model;
|
|
32
|
+
title?: keyof Model | ((item: Model) => string);
|
|
33
33
|
i18nBase?: string | ClassType<any>;
|
|
34
34
|
};
|
|
35
35
|
export declare function model<Model>(): ModelDescriptor<Model, undefined>;
|
package/model/helpers/i18n.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { KeyOfType } from '@mediusinc/mng-commons/core';
|
|
4
4
|
import { ModelDescriptor } from '../descriptors/model.descriptor';
|
|
5
5
|
export declare function getI18nForModel(translate: TranslateService, model: ModelDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, params?: any): string | null;
|
|
6
|
-
export declare function getI18nModelName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null;
|
|
7
|
-
export declare function getI18nModelNameAsync(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): Observable<string | null>;
|
|
8
6
|
export declare function getI18nModelParams(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params?: any): any;
|
|
9
7
|
export declare function getI18nModelParamsAsync(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params?: any): Observable<any>;
|
|
10
|
-
export declare function populateI18nModelParams(idProperty?: KeyOfType, titleProperty?: KeyOfType, item?: any, params?: any): any;
|
|
8
|
+
export declare function populateI18nModelParams(idProperty?: KeyOfType, titleProperty?: KeyOfType | ((item: any) => string), item?: any, params?: any): any;
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "5.0.1",
|
|
3
|
+
"version": "5.1.0-rc.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/animations": "^17.3.0",
|
|
6
|
-
"@angular/common": "^17.3.0",
|
|
7
|
-
"@angular/core": "^17.3.0",
|
|
8
|
-
"@angular/forms": "^17.3.0",
|
|
9
|
-
"@angular/platform-browser": "^17.3.0",
|
|
10
|
-
"@angular/router": "^17.3.0",
|
|
11
|
-
"@ngx-formly/core": "^6.3.
|
|
5
|
+
"@angular/animations": "^17.3.0 || ^18.0.0",
|
|
6
|
+
"@angular/common": "^17.3.0 || ^18.0.0",
|
|
7
|
+
"@angular/core": "^17.3.0 || ^18.0.0",
|
|
8
|
+
"@angular/forms": "^17.3.0 || ^18.0.0",
|
|
9
|
+
"@angular/platform-browser": "^17.3.0 || ^18.0.0",
|
|
10
|
+
"@angular/router": "^17.3.0 || ^18.0.0",
|
|
11
|
+
"@ngx-formly/core": "^6.3.5",
|
|
12
12
|
"@ngx-translate/core": "^15.0.0",
|
|
13
|
-
"primeng": "^17.
|
|
13
|
+
"primeng": "^17.18.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"reflect-metadata": "^0.1.13",
|
|
@@ -38,6 +38,12 @@
|
|
|
38
38
|
"esm": "./esm2022/core/mediusinc-mng-commons-core.mjs",
|
|
39
39
|
"default": "./fesm2022/mediusinc-mng-commons-core.mjs"
|
|
40
40
|
},
|
|
41
|
+
"./model": {
|
|
42
|
+
"types": "./model/index.d.ts",
|
|
43
|
+
"esm2022": "./esm2022/model/mediusinc-mng-commons-model.mjs",
|
|
44
|
+
"esm": "./esm2022/model/mediusinc-mng-commons-model.mjs",
|
|
45
|
+
"default": "./fesm2022/mediusinc-mng-commons-model.mjs"
|
|
46
|
+
},
|
|
41
47
|
"./filter": {
|
|
42
48
|
"types": "./filter/index.d.ts",
|
|
43
49
|
"esm2022": "./esm2022/filter/mediusinc-mng-commons-filter.mjs",
|
|
@@ -50,12 +56,6 @@
|
|
|
50
56
|
"esm": "./esm2022/form/mediusinc-mng-commons-form.mjs",
|
|
51
57
|
"default": "./fesm2022/mediusinc-mng-commons-form.mjs"
|
|
52
58
|
},
|
|
53
|
-
"./model": {
|
|
54
|
-
"types": "./model/index.d.ts",
|
|
55
|
-
"esm2022": "./esm2022/model/mediusinc-mng-commons-model.mjs",
|
|
56
|
-
"esm": "./esm2022/model/mediusinc-mng-commons-model.mjs",
|
|
57
|
-
"default": "./fesm2022/mediusinc-mng-commons-model.mjs"
|
|
58
|
-
},
|
|
59
59
|
"./table": {
|
|
60
60
|
"types": "./table/index.d.ts",
|
|
61
61
|
"esm2022": "./esm2022/table/mediusinc-mng-commons-table.mjs",
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { MessageService } from 'primeng/api';
|
|
4
1
|
import { ColumnDescriptor, ColumnDisplayTypeEnum } from '@mediusinc/mng-commons/table/api';
|
|
5
2
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TableColumnValueComponent<T, TT>
|
|
7
|
-
private elementRef;
|
|
8
|
-
private messageService;
|
|
9
|
-
private translate;
|
|
3
|
+
export declare class TableColumnValueComponent<T, TT> {
|
|
10
4
|
readonly columnDisplayTypeString: ColumnDisplayTypeEnum;
|
|
11
5
|
readonly columnDisplayTypeNumber: ColumnDisplayTypeEnum;
|
|
12
6
|
readonly columnDisplayTypeCurrency: ColumnDisplayTypeEnum;
|
|
@@ -15,18 +9,18 @@ export declare class TableColumnValueComponent<T, TT> implements OnInit {
|
|
|
15
9
|
readonly columnDisplayTypeEnum: ColumnDisplayTypeEnum;
|
|
16
10
|
readonly columnDisplayTypeComponent: ColumnDisplayTypeEnum;
|
|
17
11
|
readonly columnDisplayTypeHtml: ColumnDisplayTypeEnum;
|
|
12
|
+
private readonly elementRef;
|
|
13
|
+
private readonly messageService;
|
|
14
|
+
private readonly translate;
|
|
18
15
|
private readonly getterPipe;
|
|
19
16
|
private readonly templatePipe;
|
|
20
|
-
descriptor: ColumnDescriptor<T, TT
|
|
21
|
-
item: any
|
|
22
|
-
styleMaxWidth: number | null
|
|
23
|
-
className: string
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
value: any;
|
|
27
|
-
constructor(elementRef: ElementRef, messageService: MessageService, translate: TranslateService);
|
|
28
|
-
ngOnInit(): void;
|
|
17
|
+
descriptor: import("@angular/core").InputSignal<ColumnDescriptor<T, TT, T>>;
|
|
18
|
+
item: import("@angular/core").InputSignal<any>;
|
|
19
|
+
styleMaxWidth: import("@angular/core").Signal<number | null>;
|
|
20
|
+
className: import("@angular/core").Signal<string>;
|
|
21
|
+
value: import("@angular/core").Signal<any>;
|
|
22
|
+
currency: import("@angular/core").Signal<string | undefined>;
|
|
29
23
|
copyToClipboard(event: Event): void;
|
|
30
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnValueComponent<any, any>, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableColumnValueComponent<any, any>, "mng-table-column-value", never, { "descriptor": { "alias": "descriptor"; "required": true; }; "item": { "alias": "item"; "required": true; }; }, {}, never, never, true, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableColumnValueComponent<any, any>, "mng-table-column-value", never, { "descriptor": { "alias": "descriptor"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
32
26
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, Signal, TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { MultiSelectChangeEvent } from 'primeng/multiselect';
|
|
3
3
|
import { Table, TableColumnReorderEvent, TableLazyLoadEvent } from 'primeng/table';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
4
|
import { ComponentDirective, DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
6
5
|
import { ColumnDescriptor, ITableDataProvider, TableCellClickEvent, TableDescriptorInst, TableLoadEvent } from '@mediusinc/mng-commons/table/api';
|
|
7
6
|
import { ColumnWithPreferences } from '../../models/column-preferences.model';
|
|
8
7
|
import { DataListService } from '../../services/data-list.service';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> implements
|
|
9
|
+
export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> implements OnDestroy {
|
|
11
10
|
readonly cmpTypeName = "TableComponent";
|
|
12
11
|
private readonly logger;
|
|
13
12
|
private readonly injector;
|
|
14
|
-
private readonly destroyRef;
|
|
15
13
|
private readonly router;
|
|
16
14
|
private readonly route;
|
|
17
15
|
private readonly translate;
|
|
@@ -19,48 +17,54 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
19
17
|
private readonly commons;
|
|
20
18
|
private readonly localStorageService;
|
|
21
19
|
readonly dataListService: DataListService<any>;
|
|
22
|
-
descriptorInput: TableDescriptorInst<Item, Sorts, Filters
|
|
23
|
-
items
|
|
24
|
-
result
|
|
25
|
-
loadingInput
|
|
26
|
-
dataProvider
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
descriptorInput: import("@angular/core").InputSignal<TableDescriptorInst<Item, Sorts, Filters>>;
|
|
21
|
+
items: import("@angular/core").InputSignal<Item[] | undefined>;
|
|
22
|
+
result: import("@angular/core").InputSignal<DataListResult<Item> | undefined>;
|
|
23
|
+
loadingInput: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
24
|
+
dataProvider: import("@angular/core").InputSignal<ITableDataProvider<Item, Service, Sorts, Filters> | undefined>;
|
|
25
|
+
useQueryParamsInput: import("@angular/core").InputSignal<boolean>;
|
|
26
|
+
cellClickEnabled: import("@angular/core").InputSignal<boolean>;
|
|
27
|
+
selectionMode: import("@angular/core").InputSignal<"single" | "multiple">;
|
|
28
|
+
selectionEnabled: import("@angular/core").InputSignal<boolean>;
|
|
29
|
+
columnLastMinWidth: import("@angular/core").InputSignal<number | undefined>;
|
|
30
|
+
captionComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
31
|
+
columnCustomLastComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
32
|
+
globalFilterFieldsInput: import("@angular/core").InputSignal<string[] | undefined>;
|
|
33
|
+
private cellClickSubject;
|
|
34
|
+
isCellClickObserved: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
isCellClickEnabled: Signal<boolean>;
|
|
36
|
+
tableLoad: import("@angular/core").OutputEmitterRef<TableLoadEvent>;
|
|
37
|
+
cellClick: import("@angular/core").OutputRef<TableCellClickEvent<Item>>;
|
|
38
|
+
selectionChange: import("@angular/core").OutputEmitterRef<Item[]>;
|
|
39
|
+
captionComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
40
|
+
columnCustomLastComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
39
41
|
templates: Signal<readonly TemplateDirective[]>;
|
|
40
|
-
components:
|
|
41
|
-
primeTable: Table
|
|
42
|
+
components: Signal<readonly ComponentDirective<any>[]>;
|
|
43
|
+
primeTable: Signal<Table>;
|
|
42
44
|
captionTemplate: Signal<TemplateRef<any> | null>;
|
|
43
45
|
columnCustomLastTemplate: Signal<TemplateRef<any> | null>;
|
|
44
46
|
footerTemplate: Signal<TemplateRef<any> | null>;
|
|
45
47
|
rowExpandTemplate: Signal<TemplateRef<any> | null>;
|
|
46
|
-
|
|
47
|
-
isLazy:
|
|
48
|
-
isPagination:
|
|
48
|
+
useQueryParams: Signal<boolean>;
|
|
49
|
+
isLazy: Signal<boolean>;
|
|
50
|
+
isPagination: Signal<boolean>;
|
|
49
51
|
useQueryParamsInitialized: import("@angular/core").WritableSignal<boolean>;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
private paginationMode;
|
|
53
|
+
infiniteScroll: Signal<boolean>;
|
|
54
|
+
className: Signal<string>;
|
|
55
|
+
tableFullHeightOffset: Signal<number | undefined>;
|
|
56
|
+
rowHeight: Signal<number | undefined>;
|
|
54
57
|
private dataProviderService;
|
|
55
58
|
private dataProviderLatestLazyLoadEvent?;
|
|
56
59
|
private latestLazyLoadEventVersion;
|
|
57
60
|
private latestParamsWithDefaults?;
|
|
58
61
|
private latestParamsWithDefaultsVersion;
|
|
59
62
|
private dataProviderSubscription?;
|
|
60
|
-
private resultSubscription?;
|
|
61
|
-
private itemsSubscription?;
|
|
62
63
|
descriptor: import("@angular/core").WritableSignal<TableDescriptorInst<any, any, any>>;
|
|
63
|
-
|
|
64
|
+
private localstorageKey;
|
|
65
|
+
private layoutPrefsSaveCnt;
|
|
66
|
+
private layoutPreferences;
|
|
67
|
+
columns: Signal<ColumnWithPreferences[]>;
|
|
64
68
|
visibleColumns: Signal<ColumnWithPreferences[]>;
|
|
65
69
|
hasColumnFilters: Signal<boolean>;
|
|
66
70
|
private filterDescriptors;
|
|
@@ -68,15 +72,12 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
68
72
|
private isFilterChanged;
|
|
69
73
|
private isSortChanged;
|
|
70
74
|
anyColumnVisible: Signal<boolean>;
|
|
71
|
-
hasCustomLastColumn: import("@angular/core").
|
|
72
|
-
hasLastColumn: Signal<
|
|
75
|
+
hasCustomLastColumn: Signal<import("@angular/core").InputSignal<Type<any> | undefined>>;
|
|
76
|
+
hasLastColumn: Signal<import("@angular/core").InputSignal<Type<any> | undefined>>;
|
|
73
77
|
areColumnsReorderable: Signal<boolean>;
|
|
74
78
|
areColumnsToggleable: Signal<boolean>;
|
|
75
|
-
private layoutPreferences;
|
|
76
|
-
private localstorageKey;
|
|
77
79
|
private routerIsNavigationOutsideInProgress;
|
|
78
|
-
|
|
79
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
80
|
+
constructor();
|
|
80
81
|
ngOnDestroy(): void;
|
|
81
82
|
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
82
83
|
onTableLazyLoad(event: TableLazyLoadEvent): void;
|
|
@@ -91,24 +92,19 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
91
92
|
onTableColumnResize({ element }: any): void;
|
|
92
93
|
private loadTableWithDataProvider;
|
|
93
94
|
private loadTableFromRouteUpdate;
|
|
94
|
-
private setMainAndRelatedDescriptors;
|
|
95
95
|
private updatePrimeSortAndFilter;
|
|
96
96
|
private createFilterMeta;
|
|
97
97
|
private createSortMeta;
|
|
98
|
-
private initializeDataLoadingTriggers;
|
|
99
98
|
onColumnToggle(event: MultiSelectChangeEvent): void;
|
|
100
99
|
onColumnToggleAll(): void;
|
|
101
100
|
onColumnReorder(event: TableColumnReorderEvent): void;
|
|
102
101
|
private saveLayoutPreferences;
|
|
103
|
-
private
|
|
104
|
-
private
|
|
102
|
+
private computeDefaultDataListParams;
|
|
103
|
+
private computColumnsWithLayout;
|
|
105
104
|
/**
|
|
106
105
|
* Reset column order and column visibility to default settings
|
|
107
106
|
*/
|
|
108
107
|
resetDefaultLayout(): void;
|
|
109
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any, any, any, any>, never>;
|
|
110
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any, any, any, any>, "mng-table", never, { "descriptorInput": { "alias": "descriptor"; "required": true; }; "items": { "alias": "items"; "required": false; }; "result": { "alias": "result"; "required": false; }; "loadingInput": { "alias": "loading"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "
|
|
111
|
-
static ngAcceptInputType_items: unknown;
|
|
112
|
-
static ngAcceptInputType_result: unknown;
|
|
113
|
-
static ngAcceptInputType_loadingInput: unknown;
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any, any, any, any>, "mng-table", never, { "descriptorInput": { "alias": "descriptor"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "result": { "alias": "result"; "required": false; "isSignal": true; }; "loadingInput": { "alias": "loading"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; "useQueryParamsInput": { "alias": "useQueryParams"; "required": false; "isSignal": true; }; "cellClickEnabled": { "alias": "cellClickEnabled"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; "isSignal": true; }; "columnLastMinWidth": { "alias": "columnLastMinWidth"; "required": false; "isSignal": true; }; "captionComponent": { "alias": "captionComponent"; "required": false; "isSignal": true; }; "columnCustomLastComponent": { "alias": "columnCustomLastComponent"; "required": false; "isSignal": true; }; "globalFilterFieldsInput": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; }, { "tableLoad": "tableLoad"; "cellClick": "cellClick"; "selectionChange": "selectionChange"; "captionComponentInstance": "captionComponentInstance"; "columnCustomLastComponentInstance": "columnCustomLastComponentInstance"; }, ["templates"], never, true, never>;
|
|
114
110
|
}
|
|
@@ -4,7 +4,6 @@ import { ActionData, IDataProvider, IdType } from '@mediusinc/mng-commons/core';
|
|
|
4
4
|
import { ActionEditorDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
5
5
|
import { ActionEditorInjectorContextComponent, ActionEditorInjectorContextInputData } from './injector-context/action-editor-injector-context.component';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@mediusinc/mng-commons/core";
|
|
8
7
|
export declare class ActionEditorComponent<T = any, S = any> {
|
|
9
8
|
readonly injContextCmpType: Type<any>;
|
|
10
9
|
readonly dialogConfig: DynamicDialogConfig<any> | null;
|
|
@@ -29,5 +28,5 @@ export declare class ActionEditorComponent<T = any, S = any> {
|
|
|
29
28
|
cancel(): void;
|
|
30
29
|
triggerSubmit(): void;
|
|
31
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActionEditorComponent<any, any>, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ActionEditorComponent<any, any>, "mng-action-editor", never, { "action": { "alias": "action"; "required": true; "isSignal": true; }; "itemId": { "alias": "itemId"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; "actionData": { "alias": "actionData"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; }, { "actionRun": "actionRun"; "actionCancel": "actionCancel"; }, never, never, true,
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionEditorComponent<any, any>, "mng-action-editor", never, { "action": { "alias": "action"; "required": true; "isSignal": true; }; "itemId": { "alias": "itemId"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; "actionData": { "alias": "actionData"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; }, { "actionRun": "actionRun"; "actionCancel": "actionCancel"; }, never, never, true, never>;
|
|
33
32
|
}
|
|
@@ -1,48 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ComponentDirective, DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
1
|
+
import { QueryList, Signal, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
4
3
|
import { TableComponent } from '@mediusinc/mng-commons/table';
|
|
5
4
|
import { ITableDataProvider, TableCellClickEvent, TableDescriptorInst, TableLoadEvent } from '@mediusinc/mng-commons/table/api';
|
|
6
5
|
import { ActionDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
7
6
|
import { ActionInstance } from '../../models/execution/action-instance.model';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class ActionTableComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item>
|
|
8
|
+
export declare class ActionTableComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> {
|
|
10
9
|
private readonly route;
|
|
11
10
|
private readonly actionExecutor;
|
|
12
11
|
private readonly viewContainer;
|
|
13
|
-
descriptor: TableDescriptorInst<Item, Sorts, Filters
|
|
14
|
-
items
|
|
15
|
-
result
|
|
16
|
-
loading
|
|
17
|
-
dataProvider
|
|
18
|
-
useQueryParams: boolean
|
|
19
|
-
selectionMode:
|
|
20
|
-
selectionEnabled: boolean
|
|
21
|
-
globalFilterFields
|
|
22
|
-
actions:
|
|
23
|
-
captionComponent
|
|
24
|
-
columnActionComponent
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
descriptor: import("@angular/core").InputSignal<TableDescriptorInst<Item, Sorts, Filters>>;
|
|
13
|
+
items: import("@angular/core").InputSignal<Item[] | undefined>;
|
|
14
|
+
result: import("@angular/core").InputSignal<DataListResult<Item> | undefined>;
|
|
15
|
+
loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
16
|
+
dataProvider: import("@angular/core").InputSignal<ITableDataProvider<Item, Service, Sorts, Filters> | undefined>;
|
|
17
|
+
useQueryParams: import("@angular/core").InputSignal<boolean>;
|
|
18
|
+
selectionMode: import("@angular/core").InputSignal<"single" | "multiple">;
|
|
19
|
+
selectionEnabled: import("@angular/core").InputSignal<boolean>;
|
|
20
|
+
globalFilterFields: import("@angular/core").InputSignal<string[] | undefined>;
|
|
21
|
+
actions: import("@angular/core").InputSignal<ActionDescriptorInst<any, any>[]>;
|
|
22
|
+
captionComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
23
|
+
columnActionComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
24
|
+
columnActionMinWidthInput: import("@angular/core").InputSignal<number | undefined>;
|
|
25
|
+
columnActionMinWidth: Signal<number | undefined>;
|
|
26
|
+
tableLoad: import("@angular/core").OutputEmitterRef<TableLoadEvent>;
|
|
27
|
+
selectionChange: import("@angular/core").OutputEmitterRef<Item[]>;
|
|
28
|
+
captionComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
29
|
+
columnActionComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
30
30
|
templates: Signal<readonly TemplateDirective[]>;
|
|
31
|
-
components: QueryList<
|
|
32
|
-
table: TableComponent
|
|
31
|
+
components: Signal<readonly QueryList<any>[]>;
|
|
32
|
+
table: Signal<TableComponent<any, any, any, any>>;
|
|
33
33
|
captionTemplate: Signal<TemplateRef<any> | null>;
|
|
34
34
|
footerTemplate: Signal<TemplateRef<any> | null>;
|
|
35
35
|
rowExpandTemplate: Signal<TemplateRef<any> | null>;
|
|
36
|
-
rowClickActions:
|
|
37
|
-
rowInlineActions:
|
|
36
|
+
rowClickActions: Signal<ActionDescriptorInst<any, any>[]>;
|
|
37
|
+
rowInlineActions: Signal<ActionDescriptorInst<any, any>[]>;
|
|
38
38
|
constructor();
|
|
39
|
-
ngOnInit(): void;
|
|
40
39
|
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
41
40
|
onCellClick(event: TableCellClickEvent<Item>): void;
|
|
42
41
|
onSelectionChange(items: Array<Item>): void;
|
|
43
42
|
onActionFinish(runResult: ActionInstance<Item, Service>): void;
|
|
44
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActionTableComponent<any, any, any, any>, never>;
|
|
45
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ActionTableComponent<any, any, any, any>, "mng-action-table", never, { "descriptor": { "alias": "descriptor"; "required": true; }; "items": { "alias": "items"; "required": false; }; "result": { "alias": "result"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "useQueryParams": { "alias": "useQueryParams"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "captionComponent": { "alias": "captionComponent"; "required": false; }; "columnActionComponent": { "alias": "columnActionComponent"; "required": false; }; "
|
|
46
|
-
static ngAcceptInputType_result: unknown;
|
|
47
|
-
static ngAcceptInputType_loading: unknown;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionTableComponent<any, any, any, any>, "mng-action-table", never, { "descriptor": { "alias": "descriptor"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "result": { "alias": "result"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; "useQueryParams": { "alias": "useQueryParams"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; "isSignal": true; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "captionComponent": { "alias": "captionComponent"; "required": false; "isSignal": true; }; "columnActionComponent": { "alias": "columnActionComponent"; "required": false; "isSignal": true; }; "columnActionMinWidthInput": { "alias": "columnActionMinWidth"; "required": false; "isSignal": true; }; }, { "tableLoad": "tableLoad"; "selectionChange": "selectionChange"; "captionComponentInstance": "captionComponentInstance"; "columnActionComponentInstance": "columnActionComponentInstance"; }, ["templates"], never, true, never>;
|
|
48
45
|
}
|
|
@@ -49,7 +49,7 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
49
49
|
/** @ignore */ protected _inputClassName: string;
|
|
50
50
|
/** @ignore */ protected _size: FieldSizeEnum;
|
|
51
51
|
/** @ignore */ protected _isLocalized: boolean;
|
|
52
|
-
/** @ignore */ protected readonly _eventsSubject: Subject<FormFieldEvent<
|
|
52
|
+
/** @ignore */ protected readonly _eventsSubject: Subject<FormFieldEvent<FieldValue, EditorModel, ParentEditorModel>>;
|
|
53
53
|
protected constructor(editor: IEditorDescriptor<EditorModel>, property: string);
|
|
54
54
|
get property(): string;
|
|
55
55
|
get label(): string | null | undefined;
|
|
@@ -116,7 +116,7 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
116
116
|
* This new table view shows all available translations for specific property and allows editing it.
|
|
117
117
|
*/
|
|
118
118
|
localized(): this;
|
|
119
|
-
nextEvent(type: FormFieldEventTypeEnum, component: FieldType<CommonsFormlyFieldConfig<
|
|
120
|
-
get events$(): Observable<FormFieldEvent<
|
|
119
|
+
nextEvent(type: FormFieldEventTypeEnum, component: FieldType<CommonsFormlyFieldConfig<FieldValue, EditorModel, any>>, data?: FormFieldEventData<FieldValue, EditorModel>): void;
|
|
120
|
+
get events$(): Observable<FormFieldEvent<FieldValue, EditorModel, ParentEditorModel>>;
|
|
121
121
|
protected copyFieldsTo(obj: AFieldDescriptor<FieldModel, EditorModel, FieldValue>): void;
|
|
122
122
|
}
|
|
@@ -34,7 +34,7 @@ export declare class FieldLookupDescriptor<FieldModel, EditorModel, Service = an
|
|
|
34
34
|
protected _autocompleteAutoClear?: boolean;
|
|
35
35
|
protected _autocompleteSelectFirst?: boolean;
|
|
36
36
|
protected _autocompleteInputTrim?: InputTrimType;
|
|
37
|
-
protected _dialogTableDescriptor?: TableDescriptorInst<FieldModel>;
|
|
37
|
+
protected _dialogTableDescriptor?: TableDescriptorInst<FieldModel, any, any>;
|
|
38
38
|
protected _dialogTableDataProvider?: ITableDataProvider<FieldModel, any, any, any>;
|
|
39
39
|
protected _customComponentName?: string;
|
|
40
40
|
constructor(editor: IEditorDescriptor<EditorModel>, property: string, cfg?: FieldLookupDescriptorConstructorOptsType<FieldModel, Service>);
|
|
@@ -50,7 +50,7 @@ export declare class FieldLookupDescriptor<FieldModel, EditorModel, Service = an
|
|
|
50
50
|
get autocompleteAutoClear(): boolean | undefined;
|
|
51
51
|
get autocompleteSelectFirst(): boolean | undefined;
|
|
52
52
|
get dropdownClassName(): string;
|
|
53
|
-
get dialogTableDescriptor(): TableDescriptorInst<FieldModel,
|
|
53
|
+
get dialogTableDescriptor(): TableDescriptorInst<FieldModel, any, any> | undefined;
|
|
54
54
|
get dialogTableDataProvider(): ITableDataProvider<FieldModel, any, any, any> | undefined;
|
|
55
55
|
get customComponentName(): string | undefined;
|
|
56
56
|
get trimOption(): InputTrimType | undefined;
|
|
@@ -64,7 +64,7 @@ export declare class FieldLookupDescriptor<FieldModel, EditorModel, Service = an
|
|
|
64
64
|
withInputTrim(trimOption?: InputTrimType): this;
|
|
65
65
|
withConfig(config: FieldLookupConfig): this;
|
|
66
66
|
asAutocomplete(opts?: FieldLookupAutocompleteOptsType): this;
|
|
67
|
-
asDialog(lookupTableDescriptor: TableDescriptorInst<FieldModel>, tableDataProvider?: ITableDataProvider<FieldModel, any, any, any>): this;
|
|
67
|
+
asDialog(lookupTableDescriptor: TableDescriptorInst<FieldModel, any, any>, tableDataProvider?: ITableDataProvider<FieldModel, any, any, any>): this;
|
|
68
68
|
asCustomComponent(customComponentName: string): this;
|
|
69
69
|
copy(): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue>;
|
|
70
70
|
}
|
|
@@ -37,7 +37,8 @@ export declare class FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Se
|
|
|
37
37
|
withActions(actions?: Array<FieldManyToManyEditorActionEnum>): this;
|
|
38
38
|
withLookupExclude(filterProperty: keyof FieldModel, valueProperty: keyof FieldModel, hasLookupExclude?: boolean): this;
|
|
39
39
|
withLookupExcludeUnsafe(filterProperty: string, valueProperty: string, hasLookupExclude?: boolean): this;
|
|
40
|
-
withSearch(enabled?: boolean, searchFields?:
|
|
40
|
+
withSearch(enabled?: boolean, searchFields?: (keyof FieldModel)[]): this;
|
|
41
|
+
withSearchUnsafe(enabled?: boolean, searchFields?: string[]): this;
|
|
41
42
|
copy(): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue>;
|
|
42
43
|
}
|
|
43
44
|
export declare class FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue = FieldModel[], ParentEditorModel = undefined> extends AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
|
-
import { IEditorDescriptor } from '@mediusinc/mng-commons/core';
|
|
3
|
+
import { IEditorDescriptor, ItemOrObservable } from '@mediusinc/mng-commons/core';
|
|
4
4
|
import { InputTrimType } from '@mediusinc/mng-commons/form/api';
|
|
5
5
|
import { EnumDescriptor } from '@mediusinc/mng-commons/model';
|
|
6
6
|
import { FieldInputTypeEnum } from '../models/field.model';
|
|
7
7
|
import { AFormlyCustomFieldComponent } from '../models/formly-custom-field.model';
|
|
8
|
+
import { CommonsFormlyFieldConfig } from '../models/formly-field.model';
|
|
8
9
|
import { RadioValue } from '../models/radio.model';
|
|
9
10
|
import { AFieldDescriptor } from './field-base.descriptor';
|
|
10
11
|
export type FieldInputDescriptorType = string | string[] | number | boolean | Date | File | File[];
|
|
@@ -41,10 +42,10 @@ export type FieldInputNumberFractionOptsType = {
|
|
|
41
42
|
export type FieldInputLocaleOptsType = {
|
|
42
43
|
locale?: string;
|
|
43
44
|
};
|
|
44
|
-
export type FieldInputDatePickerOptsType = {
|
|
45
|
+
export type FieldInputDatePickerOptsType<FieldValue, EditorModel, ParentEditorModel> = {
|
|
45
46
|
format?: string;
|
|
46
|
-
min?: Date
|
|
47
|
-
max?: Date
|
|
47
|
+
min?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;
|
|
48
|
+
max?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;
|
|
48
49
|
showTime?: boolean;
|
|
49
50
|
showSeconds?: boolean;
|
|
50
51
|
} & DateOptsType;
|
|
@@ -70,6 +71,7 @@ export type FieldInputComponentOpts = {
|
|
|
70
71
|
inputs?: Record<string, any>;
|
|
71
72
|
};
|
|
72
73
|
export type FieldInputFileOnSelectHandlerFnType = (file: File[] | null, control: AbstractControl) => void;
|
|
74
|
+
export type FieldInputDatePickerDynamicMinMaxFnType<Value, FormValue, ParentFormValue> = (control: AbstractControl<Value>, field: CommonsFormlyFieldConfig<Value, FormValue, ParentFormValue>) => ItemOrObservable<Date | undefined>;
|
|
73
75
|
export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDescriptorType, FieldValue = FieldModel, ParentEditorModel = undefined> extends AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {
|
|
74
76
|
private _fieldType;
|
|
75
77
|
private _rows?;
|
|
@@ -98,6 +100,7 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
98
100
|
private _minLength?;
|
|
99
101
|
private _pattern?;
|
|
100
102
|
private _inputTrim?;
|
|
103
|
+
private _validationEmail?;
|
|
101
104
|
private _mask?;
|
|
102
105
|
private _slotChar?;
|
|
103
106
|
private _fileMultiple?;
|
|
@@ -127,8 +130,8 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
127
130
|
get numberUseGrouping(): boolean;
|
|
128
131
|
get radioOptions(): RadioValue<string | number | boolean>[];
|
|
129
132
|
get datePickerFormat(): string | undefined;
|
|
130
|
-
get datePickerMin(): Date | undefined;
|
|
131
|
-
get datePickerMax(): Date | undefined;
|
|
133
|
+
get datePickerMin(): Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel> | undefined;
|
|
134
|
+
get datePickerMax(): Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel> | undefined;
|
|
132
135
|
get datePickerShowTime(): boolean | undefined;
|
|
133
136
|
get datePickerShowSeconds(): boolean | undefined;
|
|
134
137
|
get datePickerValueUtc(): boolean | undefined;
|
|
@@ -139,6 +142,7 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
139
142
|
get minLength(): number | undefined;
|
|
140
143
|
get pattern(): string | RegExp | undefined;
|
|
141
144
|
get trimOption(): InputTrimType | undefined;
|
|
145
|
+
get validationEmail(): boolean | undefined;
|
|
142
146
|
get mask(): string | undefined;
|
|
143
147
|
get slotChar(): string | undefined;
|
|
144
148
|
get fileMultiple(): boolean | undefined;
|
|
@@ -147,7 +151,7 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
147
151
|
get fileOnSelectHandler(): FieldInputFileOnSelectHandlerFnType | undefined;
|
|
148
152
|
get imagePreview(): boolean | undefined;
|
|
149
153
|
get imageUrlInputVisibleOnDisabled(): boolean | undefined;
|
|
150
|
-
get customComponentType(): Type<AFormlyCustomFieldComponent
|
|
154
|
+
get customComponentType(): Type<AFormlyCustomFieldComponent<FieldValue, EditorModel, ParentEditorModel>> | undefined;
|
|
151
155
|
get customComponentInputs(): Record<string, any> | undefined;
|
|
152
156
|
get customComponentWrappers(): string[] | undefined;
|
|
153
157
|
get locale(): string | undefined;
|
|
@@ -164,12 +168,12 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
164
168
|
asSwitch(): this;
|
|
165
169
|
asRadio(options: Array<string | number | boolean>, optionsTitlePath?: string): this;
|
|
166
170
|
asRadioFromEnum<Enum>(enumModel: EnumDescriptor<Enum>, values?: Array<Enum>): this;
|
|
167
|
-
asDatePicker(opts?: FieldInputDatePickerOptsType): this;
|
|
171
|
+
asDatePicker(opts?: FieldInputDatePickerOptsType<FieldValue, EditorModel, ParentEditorModel>): this;
|
|
168
172
|
asMask(mask: string, slotChar: string): this;
|
|
169
173
|
asFile(opts?: FieldInputFileOpts): this;
|
|
170
174
|
asImageFile(opts?: FieldInputFileOpts): this;
|
|
171
175
|
asImageUrl(opts?: FieldInputImageUrlOpts): this;
|
|
172
|
-
asCustomComponent(component: Type<AFormlyCustomFieldComponent
|
|
176
|
+
asCustomComponent(component: Type<AFormlyCustomFieldComponent<FieldValue, EditorModel, ParentEditorModel>>, opts?: FieldInputComponentOpts): this;
|
|
173
177
|
withNumberValidation(opts?: FieldInputNumberValidationOptsType): this;
|
|
174
178
|
withLocale(locale?: string): this;
|
|
175
179
|
withNumberFractions(opts?: FieldInputNumberFractionOptsType): this;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
|
|
2
|
-
import { FormlyFormOptions } from '@ngx-formly/core';
|
|
3
2
|
import { FieldActionDescriptor } from '../descriptors/field-action.descriptor';
|
|
4
3
|
import { IFormEditorComponent } from './form-editor.interface';
|
|
5
4
|
import { CommonsFormlyFieldProps } from './formly-field.model';
|
|
5
|
+
import { CommonsFormlyFormOptions, CommonsFormlyFormState } from './formly-options.model';
|
|
6
6
|
export interface FieldActionContext<EditorModel, ParentEditorModel = undefined> {
|
|
7
7
|
descriptor: FieldActionDescriptor<EditorModel>;
|
|
8
8
|
formEditorComponent: IFormEditorComponent<EditorModel, ParentEditorModel>;
|
|
@@ -12,9 +12,9 @@ export interface FieldActionContext<EditorModel, ParentEditorModel = undefined>
|
|
|
12
12
|
form: FormGroup<{
|
|
13
13
|
[K in keyof EditorModel]: AbstractControl<EditorModel[K]>;
|
|
14
14
|
}>;
|
|
15
|
-
options:
|
|
15
|
+
options: CommonsFormlyFormOptions<EditorModel>;
|
|
16
16
|
props: CommonsFormlyFieldProps<void, EditorModel, ParentEditorModel>;
|
|
17
|
-
formState:
|
|
17
|
+
formState: CommonsFormlyFormState<EditorModel>;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
export interface FieldActionResult {
|
|
@@ -22,5 +22,5 @@ export interface FieldActionResult {
|
|
|
22
22
|
}
|
|
23
23
|
export interface FieldActionResultMessage {
|
|
24
24
|
content: string;
|
|
25
|
-
severity?: 'success' | '
|
|
25
|
+
severity?: 'success' | 'warning' | 'danger';
|
|
26
26
|
}
|