ngx-formly-zorro-antd 16.1.4 → 16.1.5
Sign up to get free protection for your applications and to get access to all the features.
- package/common/formly-utils.d.ts +7 -0
- package/esm2022/common/formly-utils.mjs +11 -1
- package/esm2022/form-field/form-field.module.mjs +10 -2
- package/esm2022/form-field/form-field.props.mjs +1 -1
- package/esm2022/form-field/form-field.wrapper.mjs +109 -81
- package/fesm2022/ngx-formly-zorro-antd-common.mjs +11 -1
- package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +116 -81
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/form-field/form-field.module.d.ts +4 -2
- package/form-field/form-field.props.d.ts +7 -2
- package/form-field/form-field.wrapper.d.ts +10 -2
- package/package.json +7 -7
package/common/formly-utils.d.ts
CHANGED
@@ -6,6 +6,13 @@ import { FormlyBoxTemplates } from './formly-box-templates.directive';
|
|
6
6
|
* @param propName 属性名
|
7
7
|
*/
|
8
8
|
export declare function getTplName(propName: string): string;
|
9
|
+
/**
|
10
|
+
* 获取模板名称
|
11
|
+
* @param value
|
12
|
+
* @param propName
|
13
|
+
* @param propTemplateName 模板属性名称
|
14
|
+
*/
|
15
|
+
export declare function hasTplNameValue(value: NzSafeAny, propName: string, propTemplateName?: string): boolean;
|
9
16
|
/**
|
10
17
|
* 处理属性为模板类型, 根据模板名称处理成模板对象
|
11
18
|
* @param value 数据对象
|
@@ -5,6 +5,16 @@
|
|
5
5
|
export function getTplName(propName) {
|
6
6
|
return `${propName}Name`;
|
7
7
|
}
|
8
|
+
/**
|
9
|
+
* 获取模板名称
|
10
|
+
* @param value
|
11
|
+
* @param propName
|
12
|
+
* @param propTemplateName 模板属性名称
|
13
|
+
*/
|
14
|
+
export function hasTplNameValue(value, propName, propTemplateName) {
|
15
|
+
const tplName = propTemplateName || getTplName(propName);
|
16
|
+
return value[propName] || value[tplName];
|
17
|
+
}
|
8
18
|
/**
|
9
19
|
* 处理属性为模板类型, 根据模板名称处理成模板对象
|
10
20
|
* @param value 数据对象
|
@@ -43,4 +53,4 @@ export function resolveTplNameArray(value, fieldTemplates, propName, propTemplat
|
|
43
53
|
}
|
44
54
|
return [];
|
45
55
|
}
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWx5LXV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZm9ybWx5YW50ZC9jb21tb24vZm9ybWx5LXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBOzs7R0FHRztBQUNILE1BQU0sVUFBVSxVQUFVLENBQUMsUUFBZ0I7SUFDekMsT0FBTyxHQUFHLFFBQVEsTUFBTSxDQUFDO0FBQzNCLENBQUM7QUFFRDs7Ozs7R0FLRztBQUNILE1BQU0sVUFBVSxlQUFlLENBQzdCLEtBQWdCLEVBQ2hCLFFBQWdCLEVBQ2hCLGdCQUF5QjtJQUV6QixNQUFNLE9BQU8sR0FBRyxnQkFBZ0IsSUFBSSxVQUFVLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDekQsT0FBTyxLQUFLLENBQUMsUUFBUSxDQUFDLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBQzNDLENBQUM7QUFFRDs7Ozs7O0dBTUc7QUFDSCxNQUFNLFVBQVUsY0FBYyxDQUM1QixLQUFnQixFQUNoQixjQUFrQyxFQUNsQyxRQUFnQixFQUNoQixnQkFBeUI7SUFFekIsSUFBSSxLQUFLLENBQUMsUUFBUSxDQUFDLEVBQUU7UUFDbkIsT0FBTyxLQUFLLENBQUMsUUFBUSxDQUFDLENBQUM7S0FDeEI7SUFDRCxJQUFJLENBQUMsY0FBYyxFQUFFO1FBQ25CLE9BQU8sU0FBUyxDQUFDO0tBQ2xCO0lBQ0QsTUFBTS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zdHJpbmcsXG4gIHByb3BUZW1wbGF0ZU5hbWU/OiBzdHJpbmdcbik6IFRlbXBsYXRlUmVmPFQ+W10ge1xuICBpZiAodmFsdWVbcHJvcE5hbWVdICE9IG51bGwpIHtcbiAgICByZXR1cm4gdmFsdWVbcHJvcE5hbWVdO1xuICB9XG4gIGlmICghZmllbGRUZW1wbGF0ZXMpIHtcbiAgICByZXR1cm4gW107XG4gIH1cbiAgY29uc3QgdHBsTmFtZSA9IHByb3BUZW1wbGF0ZU5hbWUgfHwgZ2V0VHBsTmFtZShwcm9wTmFtZSk7XG4gIGNvbnN0IHRwbFZhbHVlID0gdmFsdWVbdHBsTmFtZV07XG4gIGlmIChBcnJheS5pc0FycmF5KHRwbFZhbHVlKSkge1xuICAgIHJldHVybiB0cGxWYWx1ZS5tYXAoa2V5ID0+IGZpZWxkVGVtcGxhdGVzLmdldChrZXkpKS5maWx0ZXIodHBsID0+IHRwbCkgYXMgVGVtcGxhdGVSZWY8VD5bXTtcbiAgfVxuICByZXR1cm4gW107XG59XG4iXX0=
|
@@ -2,18 +2,24 @@ import { NgModule } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import { FormlyModule } from '@ngx-formly/core';
|
4
4
|
import { ReactiveFormsModule } from '@angular/forms';
|
5
|
+
import { FormlyCommonModule } from 'ngx-formly-zorro-antd/common';
|
5
6
|
import { NzFormModule } from 'ng-zorro-antd/form';
|
6
7
|
import { FormlyWrapperFormField } from './form-field.wrapper';
|
8
|
+
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
|
7
9
|
import * as i0 from "@angular/core";
|
8
10
|
import * as i1 from "@ngx-formly/core";
|
9
11
|
export class FormlyNzFormFieldModule {
|
10
12
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
11
13
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule,
|
12
14
|
ReactiveFormsModule,
|
13
|
-
NzFormModule,
|
15
|
+
NzFormModule,
|
16
|
+
FormlyCommonModule,
|
17
|
+
NzOutletModule, i1.FormlyModule] }); }
|
14
18
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzFormFieldModule, imports: [CommonModule,
|
15
19
|
ReactiveFormsModule,
|
16
20
|
NzFormModule,
|
21
|
+
FormlyCommonModule,
|
22
|
+
NzOutletModule,
|
17
23
|
FormlyModule.forChild({
|
18
24
|
wrappers: [
|
19
25
|
{
|
@@ -31,6 +37,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
31
37
|
CommonModule,
|
32
38
|
ReactiveFormsModule,
|
33
39
|
NzFormModule,
|
40
|
+
FormlyCommonModule,
|
41
|
+
NzOutletModule,
|
34
42
|
FormlyModule.forChild({
|
35
43
|
wrappers: [
|
36
44
|
{
|
@@ -42,4 +50,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
42
50
|
]
|
43
51
|
}]
|
44
52
|
}] });
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9mb3JtbHlhbnRkL2Zvcm0tZmllbGQvc3JjL2Zvcm0tZmllbGQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMs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nVsbDtcbiAgICAvKiog4omlMTYwMHB4IOWTjeW6lOW8j+agheagvO+8jOWPr+S4uuagheagvOaVsOaIluS4gOS4quWMheWQq+WFtuS7luWxnuaAp+eahOWvueixoSAqL1xuICAgIGNvbnRyb2xYWGw/OiBzdHJpbmcgfCBudW1iZXIgfCBFbWJlZGRlZFByb3BlcnR5IHwgbnVsbDtcbiAgfTtcbn1cbiJdfQ==
|
@@ -1,131 +1,159 @@
|
|
1
|
-
import { Component } from '@angular/core';
|
1
|
+
import { Component, Optional } from '@angular/core';
|
2
2
|
import { FieldWrapper } from '@ngx-formly/core';
|
3
|
+
import { resolveTplName, hasTplNameValue, FormlyBoxTemplates } from 'ngx-formly-zorro-antd/common';
|
3
4
|
import * as i0 from "@angular/core";
|
4
|
-
import * as i1 from "
|
5
|
-
import * as i2 from "
|
6
|
-
import * as i3 from "ng-zorro-antd/
|
7
|
-
import * as i4 from "
|
5
|
+
import * as i1 from "ngx-formly-zorro-antd/common";
|
6
|
+
import * as i2 from "@angular/common";
|
7
|
+
import * as i3 from "ng-zorro-antd/grid";
|
8
|
+
import * as i4 from "ng-zorro-antd/form";
|
9
|
+
import * as i5 from "ng-zorro-antd/core/outlet";
|
10
|
+
import * as i6 from "@ngx-formly/core";
|
8
11
|
export class FormlyWrapperFormField extends FieldWrapper {
|
9
|
-
|
10
|
-
|
12
|
+
constructor(fieldTemplates) {
|
13
|
+
super();
|
14
|
+
this.fieldTemplates = fieldTemplates;
|
11
15
|
}
|
12
|
-
|
16
|
+
get nzTooltipTitle() {
|
17
|
+
return resolveTplName(this.props, this.fieldTemplates, 'tooltipTitle');
|
18
|
+
}
|
19
|
+
get nzExtra() {
|
20
|
+
return resolveTplName(this.props, this.fieldTemplates, 'extra');
|
21
|
+
}
|
22
|
+
get hasLabel() {
|
23
|
+
return hasTplNameValue(this.props, 'label');
|
24
|
+
}
|
25
|
+
get label() {
|
26
|
+
return resolveTplName(this.props, this.fieldTemplates, 'label');
|
27
|
+
}
|
28
|
+
get hasError() {
|
29
|
+
return (this.formControl?.dirty || this.formControl?.touched) && this.formControl.errors;
|
30
|
+
}
|
31
|
+
get validateStatus() {
|
32
|
+
return this.hasError ? 'error' : 'success';
|
33
|
+
}
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyWrapperFormField, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
13
35
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: FormlyWrapperFormField, selector: "formly-wrapper-nz-form-field", usesInheritance: true, ngImport: i0, template: `
|
14
36
|
<nz-form-item [ngClass]="props.itemClass!">
|
15
|
-
<ng-container *ngIf="
|
37
|
+
<ng-container *ngIf="hasLabel && props['hideLabel'] !== true">
|
16
38
|
<nz-form-label
|
17
|
-
[nzFlex]="props['grid']?.labelFlex
|
18
|
-
[nzOffset]="props['grid']?.labelOffset
|
19
|
-
[nzOrder]="props['grid']?.labelOrder
|
20
|
-
[nzPull]="props['grid']?.labelPull
|
21
|
-
[nzPush]="props['grid']?.labelPush
|
22
|
-
[nzSpan]="props['grid']?.labelSpan
|
23
|
-
[nzXs]="props['grid']?.labelXs
|
24
|
-
[nzSm]="props['grid']?.labelSm
|
25
|
-
[nzMd]="props['grid']?.labelMd
|
26
|
-
[nzLg]="props['grid']?.labelLg
|
27
|
-
[nzXl]="props['grid']?.labelXl
|
28
|
-
[nzXXl]="props['grid']?.labelXXl
|
29
|
-
[ngClass]="props.labelClass
|
39
|
+
[nzFlex]="props['grid']?.labelFlex || formState.labelFlex"
|
40
|
+
[nzOffset]="props['grid']?.labelOffset || formState.labelOffset"
|
41
|
+
[nzOrder]="props['grid']?.labelOrder || formState.labelOrder"
|
42
|
+
[nzPull]="props['grid']?.labelPull || formState.labelPull"
|
43
|
+
[nzPush]="props['grid']?.labelPush || formState.labelPush"
|
44
|
+
[nzSpan]="props['grid']?.labelSpan || formState.labelSpan"
|
45
|
+
[nzXs]="props['grid']?.labelXs || formState.labelXs"
|
46
|
+
[nzSm]="props['grid']?.labelSm || formState.labelSm"
|
47
|
+
[nzMd]="props['grid']?.labelMd || formState.labelMd"
|
48
|
+
[nzLg]="props['grid']?.labelLg || formState.labelLg"
|
49
|
+
[nzXl]="props['grid']?.labelXl || formState.labelXl"
|
50
|
+
[nzXXl]="props['grid']?.labelXXl || formState.labelXXl"
|
51
|
+
[ngClass]="props.labelClass || formState.labelClass"
|
30
52
|
[nzRequired]="props.required && props['hideRequiredMarker'] !== true"
|
31
53
|
[nzFor]="id"
|
32
54
|
[nzNoColon]="props['noColon']!!"
|
33
|
-
[nzTooltipTitle]="
|
55
|
+
[nzTooltipTitle]="nzTooltipTitle"
|
34
56
|
[nzTooltipIcon]="props['tooltipIcon']!"
|
35
57
|
[nzLabelAlign]="props['labelAlign'] ?? 'right'"
|
36
58
|
[nzLabelWrap]="props['labelWrap']!!"
|
37
59
|
>
|
38
|
-
<
|
39
|
-
{
|
40
|
-
|
60
|
+
<ng-container
|
61
|
+
*nzStringTemplateOutlet="label; context: { $implicit: field, options: props }"
|
62
|
+
>
|
63
|
+
<div class="formly-label-text" [attr.title]="label" [innerHTML]="label"></div>
|
64
|
+
</ng-container>
|
41
65
|
</nz-form-label>
|
42
66
|
</ng-container>
|
43
67
|
<nz-form-control
|
44
|
-
[nzValidateStatus]="
|
68
|
+
[nzValidateStatus]="validateStatus"
|
45
69
|
[nzHasFeedback]="props['hasFeedback']!!"
|
46
|
-
[nzExtra]="props
|
47
|
-
[nzErrorTip]="
|
70
|
+
[nzExtra]="props.description || nzExtra"
|
71
|
+
[nzErrorTip]="errorTip"
|
48
72
|
[ngClass]="props.controlClass!"
|
49
|
-
[nzFlex]="props['grid']?.controlFlex
|
50
|
-
[nzOffset]="props['grid']?.controlOffset
|
51
|
-
[nzOrder]="props['grid']?.controlOrder
|
52
|
-
[nzPull]="props['grid']?.controlPull
|
53
|
-
[nzPush]="props['grid']?.controlPush
|
54
|
-
[nzSpan]="props['grid']?.controlSpan
|
55
|
-
[nzXs]="props['grid']?.controlXs
|
56
|
-
[nzSm]="props['grid']?.controlSm
|
57
|
-
[nzMd]="props['grid']?.controlMd
|
58
|
-
[nzLg]="props['grid']?.controlLg
|
59
|
-
[nzXl]="props['grid']?.controlXl
|
60
|
-
[nzXXl]="props['grid']?.controlXXl
|
73
|
+
[nzFlex]="props['grid']?.controlFlex || formState.controlFlex"
|
74
|
+
[nzOffset]="props['grid']?.controlOffset || formState.controlOffset"
|
75
|
+
[nzOrder]="props['grid']?.controlOrder || formState.controlOrder"
|
76
|
+
[nzPull]="props['grid']?.controlPull || formState.controlPull"
|
77
|
+
[nzPush]="props['grid']?.controlPush || formState.controlPush"
|
78
|
+
[nzSpan]="props['grid']?.controlSpan || formState.controlSpan"
|
79
|
+
[nzXs]="props['grid']?.controlXs || formState.controlXs"
|
80
|
+
[nzSm]="props['grid']?.controlSm || formState.controlSm"
|
81
|
+
[nzMd]="props['grid']?.controlMd || formState.controlMd"
|
82
|
+
[nzLg]="props['grid']?.controlLg || formState.controlLg"
|
83
|
+
[nzXl]="props['grid']?.controlXl || formState.controlXl"
|
84
|
+
[nzXXl]="props['grid']?.controlXXl || formState.controlXXl"
|
61
85
|
>
|
62
86
|
<ng-container #fieldComponent></ng-container>
|
63
87
|
|
64
|
-
<ng-template #
|
65
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
88
|
+
<ng-template #errorTip let-control>
|
89
|
+
<formly-validation-message *ngIf="hasError" [field]="field"></formly-validation-message>
|
66
90
|
</ng-template>
|
67
91
|
</nz-form-control>
|
68
92
|
</nz-form-item>
|
69
|
-
`, isInline: true, styles: [":host .formly-label-text{overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type:
|
93
|
+
`, isInline: true, styles: [":host .formly-label-text{overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i4.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: i5.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: i6.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }] }); }
|
70
94
|
}
|
71
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
|
72
96
|
type: Component,
|
73
97
|
args: [{ selector: 'formly-wrapper-nz-form-field', template: `
|
74
98
|
<nz-form-item [ngClass]="props.itemClass!">
|
75
|
-
<ng-container *ngIf="
|
99
|
+
<ng-container *ngIf="hasLabel && props['hideLabel'] !== true">
|
76
100
|
<nz-form-label
|
77
|
-
[nzFlex]="props['grid']?.labelFlex
|
78
|
-
[nzOffset]="props['grid']?.labelOffset
|
79
|
-
[nzOrder]="props['grid']?.labelOrder
|
80
|
-
[nzPull]="props['grid']?.labelPull
|
81
|
-
[nzPush]="props['grid']?.labelPush
|
82
|
-
[nzSpan]="props['grid']?.labelSpan
|
83
|
-
[nzXs]="props['grid']?.labelXs
|
84
|
-
[nzSm]="props['grid']?.labelSm
|
85
|
-
[nzMd]="props['grid']?.labelMd
|
86
|
-
[nzLg]="props['grid']?.labelLg
|
87
|
-
[nzXl]="props['grid']?.labelXl
|
88
|
-
[nzXXl]="props['grid']?.labelXXl
|
89
|
-
[ngClass]="props.labelClass
|
101
|
+
[nzFlex]="props['grid']?.labelFlex || formState.labelFlex"
|
102
|
+
[nzOffset]="props['grid']?.labelOffset || formState.labelOffset"
|
103
|
+
[nzOrder]="props['grid']?.labelOrder || formState.labelOrder"
|
104
|
+
[nzPull]="props['grid']?.labelPull || formState.labelPull"
|
105
|
+
[nzPush]="props['grid']?.labelPush || formState.labelPush"
|
106
|
+
[nzSpan]="props['grid']?.labelSpan || formState.labelSpan"
|
107
|
+
[nzXs]="props['grid']?.labelXs || formState.labelXs"
|
108
|
+
[nzSm]="props['grid']?.labelSm || formState.labelSm"
|
109
|
+
[nzMd]="props['grid']?.labelMd || formState.labelMd"
|
110
|
+
[nzLg]="props['grid']?.labelLg || formState.labelLg"
|
111
|
+
[nzXl]="props['grid']?.labelXl || formState.labelXl"
|
112
|
+
[nzXXl]="props['grid']?.labelXXl || formState.labelXXl"
|
113
|
+
[ngClass]="props.labelClass || formState.labelClass"
|
90
114
|
[nzRequired]="props.required && props['hideRequiredMarker'] !== true"
|
91
115
|
[nzFor]="id"
|
92
116
|
[nzNoColon]="props['noColon']!!"
|
93
|
-
[nzTooltipTitle]="
|
117
|
+
[nzTooltipTitle]="nzTooltipTitle"
|
94
118
|
[nzTooltipIcon]="props['tooltipIcon']!"
|
95
119
|
[nzLabelAlign]="props['labelAlign'] ?? 'right'"
|
96
120
|
[nzLabelWrap]="props['labelWrap']!!"
|
97
121
|
>
|
98
|
-
<
|
99
|
-
{
|
100
|
-
|
122
|
+
<ng-container
|
123
|
+
*nzStringTemplateOutlet="label; context: { $implicit: field, options: props }"
|
124
|
+
>
|
125
|
+
<div class="formly-label-text" [attr.title]="label" [innerHTML]="label"></div>
|
126
|
+
</ng-container>
|
101
127
|
</nz-form-label>
|
102
128
|
</ng-container>
|
103
129
|
<nz-form-control
|
104
|
-
[nzValidateStatus]="
|
130
|
+
[nzValidateStatus]="validateStatus"
|
105
131
|
[nzHasFeedback]="props['hasFeedback']!!"
|
106
|
-
[nzExtra]="props
|
107
|
-
[nzErrorTip]="
|
132
|
+
[nzExtra]="props.description || nzExtra"
|
133
|
+
[nzErrorTip]="errorTip"
|
108
134
|
[ngClass]="props.controlClass!"
|
109
|
-
[nzFlex]="props['grid']?.controlFlex
|
110
|
-
[nzOffset]="props['grid']?.controlOffset
|
111
|
-
[nzOrder]="props['grid']?.controlOrder
|
112
|
-
[nzPull]="props['grid']?.controlPull
|
113
|
-
[nzPush]="props['grid']?.controlPush
|
114
|
-
[nzSpan]="props['grid']?.controlSpan
|
115
|
-
[nzXs]="props['grid']?.controlXs
|
116
|
-
[nzSm]="props['grid']?.controlSm
|
117
|
-
[nzMd]="props['grid']?.controlMd
|
118
|
-
[nzLg]="props['grid']?.controlLg
|
119
|
-
[nzXl]="props['grid']?.controlXl
|
120
|
-
[nzXXl]="props['grid']?.controlXXl
|
135
|
+
[nzFlex]="props['grid']?.controlFlex || formState.controlFlex"
|
136
|
+
[nzOffset]="props['grid']?.controlOffset || formState.controlOffset"
|
137
|
+
[nzOrder]="props['grid']?.controlOrder || formState.controlOrder"
|
138
|
+
[nzPull]="props['grid']?.controlPull || formState.controlPull"
|
139
|
+
[nzPush]="props['grid']?.controlPush || formState.controlPush"
|
140
|
+
[nzSpan]="props['grid']?.controlSpan || formState.controlSpan"
|
141
|
+
[nzXs]="props['grid']?.controlXs || formState.controlXs"
|
142
|
+
[nzSm]="props['grid']?.controlSm || formState.controlSm"
|
143
|
+
[nzMd]="props['grid']?.controlMd || formState.controlMd"
|
144
|
+
[nzLg]="props['grid']?.controlLg || formState.controlLg"
|
145
|
+
[nzXl]="props['grid']?.controlXl || formState.controlXl"
|
146
|
+
[nzXXl]="props['grid']?.controlXXl || formState.controlXXl"
|
121
147
|
>
|
122
148
|
<ng-container #fieldComponent></ng-container>
|
123
149
|
|
124
|
-
<ng-template #
|
125
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
150
|
+
<ng-template #errorTip let-control>
|
151
|
+
<formly-validation-message *ngIf="hasError" [field]="field"></formly-validation-message>
|
126
152
|
</ng-template>
|
127
153
|
</nz-form-control>
|
128
154
|
</nz-form-item>
|
129
155
|
`, styles: [":host .formly-label-text{overflow:hidden;text-overflow:ellipsis}\n"] }]
|
130
|
-
}]
|
131
|
-
|
156
|
+
}], ctorParameters: function () { return [{ type: i1.FormlyBoxTemplates, decorators: [{
|
157
|
+
type: Optional
|
158
|
+
}] }]; } });
|
159
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC53cmFwcGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZm9ybWx5YW50ZC9mb3JtLWZpZWxkL3NyYy9mb3JtLWZpZWxkLndyYXBwZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBR2hELE9BQU8sRUFBRSxjQUFjLEVBQUUsZUFBZSxFQUFFLGtCQUFrQixFQUFFLE1BQU0sOEJBQThCLENBQUM7Ozs7Ozs7O0F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hpcy5maWVsZFRlbXBsYXRlcywgJ3Rvb2x0aXBUaXRsZScpO1xuICB9XG4gIGdldCBuekV4dHJhKCkge1xuICAgIHJldHVybiByZXNvbHZlVHBsTmFtZSh0aGlzLnByb3BzLCB0aGlzLmZpZWxkVGVtcGxhdGVzLCAnZXh0cmEnKTtcbiAgfVxuICBnZXQgaGFzTGFiZWwoKSB7XG4gICAgcmV0dXJuIGhhc1RwbE5hbWVWYWx1ZSh0aGlzLnByb3BzLCAnbGFiZWwnKTtcbiAgfVxuXG4gIGdldCBsYWJlbCgpIHtcbiAgICByZXR1cm4gcmVzb2x2ZVRwbE5hbWUodGhpcy5wcm9wcywgdGhpcy5maWVsZFRlbXBsYXRlcywgJ2xhYmVsJyk7XG4gIH1cblxuICBnZXQgaGFzRXJyb3IoKSB7XG4gICAgcmV0dXJuICh0aGlzLmZvcm1Db250cm9sPy5kaXJ0eSB8fCB0aGlzLmZvcm1Db250cm9sPy50b3VjaGVkKSAmJiB0aGlzLmZvcm1Db250cm9sLmVycm9ycztcbiAgfVxuICBnZXQgdmFsaWRhdGVTdGF0dXMoKSB7XG4gICAgcmV0dXJuIHRoaXMuaGFzRXJyb3IgPyAnZXJyb3InIDogJ3N1Y2Nlc3MnO1xuICB9XG59XG4iXX0=
|
@@ -127,6 +127,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
127
127
|
function getTplName(propName) {
|
128
128
|
return `${propName}Name`;
|
129
129
|
}
|
130
|
+
/**
|
131
|
+
* 获取模板名称
|
132
|
+
* @param value
|
133
|
+
* @param propName
|
134
|
+
* @param propTemplateName 模板属性名称
|
135
|
+
*/
|
136
|
+
function hasTplNameValue(value, propName, propTemplateName) {
|
137
|
+
const tplName = propTemplateName || getTplName(propName);
|
138
|
+
return value[propName] || value[tplName];
|
139
|
+
}
|
130
140
|
/**
|
131
141
|
* 处理属性为模板类型, 根据模板名称处理成模板对象
|
132
142
|
* @param value 数据对象
|
@@ -170,5 +180,5 @@ function resolveTplNameArray(value, fieldTemplates, propName, propTemplateName)
|
|
170
180
|
* Generated bundle index. Do not edit.
|
171
181
|
*/
|
172
182
|
|
173
|
-
export { FormlyBoxTemplates, FormlyCommonModule, getTplName, resolveTplName, resolveTplNameArray };
|
183
|
+
export { FormlyBoxTemplates, FormlyCommonModule, getTplName, hasTplNameValue, resolveTplName, resolveTplNameArray };
|
174
184
|
//# sourceMappingURL=ngx-formly-zorro-antd-common.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-common.mjs","sources":["../../../../packages/formlyantd/common/formly-box-templates.directive.ts","../../../../packages/formlyantd/common/common.module.ts","../../../../packages/formlyantd/common/formly-utils.ts","../../../../packages/formlyantd/common/ngx-formly-zorro-antd-common.ts"],"sourcesContent":["import {\n AfterContentInit,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n QueryList,\n SimpleChange,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport { NamedTemplate } from '@pkt/ng.core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[formly-box]',\n standalone: true,\n exportAs: 'FormlyBox'\n})\nexport class FormlyBoxTemplates implements AfterContentInit, OnChanges {\n private tplMap = new Map<string, TemplateRef<NzSafeAny>>();\n @Input('formly-box') templateList?: TemplateList;\n @Output() templateChange = new EventEmitter<Map<string, TemplateRef<NzSafeAny>>>();\n @ContentChildren(NamedTemplate) namedTemplate!: QueryList<NamedTemplate<NzSafeAny>>;\n\n get templates(): Map<string, TemplateRef<NzSafeAny>> {\n return this.tplMap;\n }\n\n /**\n * 根据模板名称获取TemplateRef\n * @param templateName 模板名称\n */\n get(templateName: string): TemplateRef<NzSafeAny> | undefined {\n return this.tplMap.get(templateName);\n }\n\n ngAfterContentInit(): void {\n this.update();\n this.namedTemplate.changes.subscribe(() => {\n this.update();\n });\n }\n update(emitChange = true) {\n this.tplMap.clear();\n this.mergeTemplate(this.tplMap, emitChange);\n }\n\n ngOnChanges(changes: { [K in keyof this]?: SimpleChange } & SimpleChanges): void {\n if (changes.templateList && !changes.templateList.isFirstChange()) {\n this.update();\n }\n }\n\n /**\n * 合并参数模板\n * @param tplMap\n * @param emitChange\n */\n mergeTemplate(tplMap: Map<string, TemplateRef<NzSafeAny>>, emitChange = true) {\n this.mergeTemplates(tplMap, this.templateList);\n this.mergeQueryTemplate(tplMap, this.namedTemplate);\n\n if (emitChange) {\n this.templateChange.emit(tplMap);\n }\n }\n\n /**\n * 合并content 模板\n * @param tplMap\n * @param templateList\n * @private\n */\n private mergeQueryTemplate(\n tplMap: Map<string, TemplateRef<NzSafeAny>>,\n templateList?: QueryList<NamedTemplate<NzSafeAny>>\n ): void {\n if (templateList) {\n templateList.forEach(v => {\n tplMap.set(v.named, v.template);\n });\n }\n }\n\n /**\n * 合并模板列表\n * @param tplMap 模板Map\n * @param templateList\n */\n private mergeTemplates(\n tplMap: Map<string, TemplateRef<NzSafeAny>>,\n templateList?: TemplateList\n ): void {\n if (!templateList) {\n return;\n }\n\n if (templateList instanceof TemplateRef) {\n const namedTpl = new NamedTemplate(templateList);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named, namedTpl.template);\n return;\n }\n\n templateList.forEach(v => {\n if (v instanceof NamedTemplate) {\n tplMap.set(v.named, v.template);\n } else {\n const namedTpl = new NamedTemplate(v);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named, namedTpl.template);\n }\n });\n\n return;\n }\n}\n\n/**\n * 模板列表\n */\nexport type TemplateList =\n | QueryList<TemplateRef<NzSafeAny>>\n | QueryList<NamedTemplate<NzSafeAny>>\n | NamedTemplate<NzSafeAny>[]\n | TemplateRef<NzSafeAny>;\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\nimport { NamedTemplate } from '@pkt/ng.core';\n\nconst COMPONENT = [FormlyBoxTemplates, NamedTemplate];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENT],\n exports: COMPONENT\n})\nexport class FormlyCommonModule {}\n","import { TemplateRef } from '@angular/core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\n\n/**\n * 根据属性名获取模板名称\n * @param propName 属性名\n */\nexport function getTplName(propName: string) {\n return `${propName}Name`;\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplName<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T> | undefined {\n if (value[propName]) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return undefined;\n }\n const tplName = propTemplateName || getTplName(propName);\n return fieldTemplates.get(value[tplName]);\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象列表\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplNameArray<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T>[] {\n if (value[propName] != null) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return [];\n }\n const tplName = propTemplateName || getTplName(propName);\n const tplValue = value[tplName];\n if (Array.isArray(tplValue)) {\n return tplValue.map(key => fieldTemplates.get(key)).filter(tpl => tpl) as TemplateRef<T>[];\n }\n return [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAsBa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,GAAG,EAAkC,CAAC;AAEjD,QAAA,IAAA,CAAA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;;AC5DA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-common.mjs","sources":["../../../../packages/formlyantd/common/formly-box-templates.directive.ts","../../../../packages/formlyantd/common/common.module.ts","../../../../packages/formlyantd/common/formly-utils.ts","../../../../packages/formlyantd/common/ngx-formly-zorro-antd-common.ts"],"sourcesContent":["import {\n AfterContentInit,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n QueryList,\n SimpleChange,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport { NamedTemplate } from '@pkt/ng.core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[formly-box]',\n standalone: true,\n exportAs: 'FormlyBox'\n})\nexport class FormlyBoxTemplates implements AfterContentInit, OnChanges {\n private tplMap = new Map<string, TemplateRef<NzSafeAny>>();\n @Input('formly-box') templateList?: TemplateList;\n @Output() templateChange = new EventEmitter<Map<string, TemplateRef<NzSafeAny>>>();\n @ContentChildren(NamedTemplate) namedTemplate!: QueryList<NamedTemplate<NzSafeAny>>;\n\n get templates(): Map<string, TemplateRef<NzSafeAny>> {\n return this.tplMap;\n }\n\n /**\n * 根据模板名称获取TemplateRef\n * @param templateName 模板名称\n */\n get(templateName: string): TemplateRef<NzSafeAny> | undefined {\n return this.tplMap.get(templateName);\n }\n\n ngAfterContentInit(): void {\n this.update();\n this.namedTemplate.changes.subscribe(() => {\n this.update();\n });\n }\n update(emitChange = true) {\n this.tplMap.clear();\n this.mergeTemplate(this.tplMap, emitChange);\n }\n\n ngOnChanges(changes: { [K in keyof this]?: SimpleChange } & SimpleChanges): void {\n if (changes.templateList && !changes.templateList.isFirstChange()) {\n this.update();\n }\n }\n\n /**\n * 合并参数模板\n * @param tplMap\n * @param emitChange\n */\n mergeTemplate(tplMap: Map<string, TemplateRef<NzSafeAny>>, emitChange = true) {\n this.mergeTemplates(tplMap, this.templateList);\n this.mergeQueryTemplate(tplMap, this.namedTemplate);\n\n if (emitChange) {\n this.templateChange.emit(tplMap);\n }\n }\n\n /**\n * 合并content 模板\n * @param tplMap\n * @param templateList\n * @private\n */\n private mergeQueryTemplate(\n tplMap: Map<string, TemplateRef<NzSafeAny>>,\n templateList?: QueryList<NamedTemplate<NzSafeAny>>\n ): void {\n if (templateList) {\n templateList.forEach(v => {\n tplMap.set(v.named, v.template);\n });\n }\n }\n\n /**\n * 合并模板列表\n * @param tplMap 模板Map\n * @param templateList\n */\n private mergeTemplates(\n tplMap: Map<string, TemplateRef<NzSafeAny>>,\n templateList?: TemplateList\n ): void {\n if (!templateList) {\n return;\n }\n\n if (templateList instanceof TemplateRef) {\n const namedTpl = new NamedTemplate(templateList);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named, namedTpl.template);\n return;\n }\n\n templateList.forEach(v => {\n if (v instanceof NamedTemplate) {\n tplMap.set(v.named, v.template);\n } else {\n const namedTpl = new NamedTemplate(v);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named, namedTpl.template);\n }\n });\n\n return;\n }\n}\n\n/**\n * 模板列表\n */\nexport type TemplateList =\n | QueryList<TemplateRef<NzSafeAny>>\n | QueryList<NamedTemplate<NzSafeAny>>\n | NamedTemplate<NzSafeAny>[]\n | TemplateRef<NzSafeAny>;\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\nimport { NamedTemplate } from '@pkt/ng.core';\n\nconst COMPONENT = [FormlyBoxTemplates, NamedTemplate];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENT],\n exports: COMPONENT\n})\nexport class FormlyCommonModule {}\n","import { TemplateRef } from '@angular/core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\n\n/**\n * 根据属性名获取模板名称\n * @param propName 属性名\n */\nexport function getTplName(propName: string) {\n return `${propName}Name`;\n}\n\n/**\n * 获取模板名称\n * @param value\n * @param propName\n * @param propTemplateName 模板属性名称\n */\nexport function hasTplNameValue(\n value: NzSafeAny,\n propName: string,\n propTemplateName?: string\n): boolean {\n const tplName = propTemplateName || getTplName(propName);\n return value[propName] || value[tplName];\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplName<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T> | undefined {\n if (value[propName]) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return undefined;\n }\n const tplName = propTemplateName || getTplName(propName);\n return fieldTemplates.get(value[tplName]);\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象列表\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplNameArray<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T>[] {\n if (value[propName] != null) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return [];\n }\n const tplName = propTemplateName || getTplName(propName);\n const tplValue = value[tplName];\n if (Array.isArray(tplValue)) {\n return tplValue.map(key => fieldTemplates.get(key)).filter(tpl => tpl) as TemplateRef<T>[];\n }\n return [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAsBa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,GAAG,EAAkC,CAAC;AAEjD,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,YAAY,EAAuC,CAAC;AA+FpF,KAAA;AA5FC,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;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CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAqB,CAAC;AAC5F,KAAA;AACD,IAAA,OAAO,EAAE,CAAC;AACZ;;AC3EA;;AAEG;;;;"}
|
@@ -1,146 +1,179 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, NgModule } from '@angular/core';
|
3
|
-
import * as
|
2
|
+
import { Component, Optional, NgModule } from '@angular/core';
|
3
|
+
import * as i2 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
|
-
import * as
|
5
|
+
import * as i6 from '@ngx-formly/core';
|
6
6
|
import { FieldWrapper, FormlyModule } from '@ngx-formly/core';
|
7
7
|
import { ReactiveFormsModule } from '@angular/forms';
|
8
|
-
import * as
|
8
|
+
import * as i1 from 'ngx-formly-zorro-antd/common';
|
9
|
+
import { resolveTplName, hasTplNameValue, FormlyCommonModule } from 'ngx-formly-zorro-antd/common';
|
10
|
+
import * as i4 from 'ng-zorro-antd/form';
|
9
11
|
import { NzFormModule } from 'ng-zorro-antd/form';
|
10
|
-
import * as
|
12
|
+
import * as i3 from 'ng-zorro-antd/grid';
|
13
|
+
import * as i5 from 'ng-zorro-antd/core/outlet';
|
14
|
+
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
|
11
15
|
|
12
16
|
class FormlyWrapperFormField extends FieldWrapper {
|
13
|
-
|
14
|
-
|
17
|
+
constructor(fieldTemplates) {
|
18
|
+
super();
|
19
|
+
this.fieldTemplates = fieldTemplates;
|
15
20
|
}
|
16
|
-
|
21
|
+
get nzTooltipTitle() {
|
22
|
+
return resolveTplName(this.props, this.fieldTemplates, 'tooltipTitle');
|
23
|
+
}
|
24
|
+
get nzExtra() {
|
25
|
+
return resolveTplName(this.props, this.fieldTemplates, 'extra');
|
26
|
+
}
|
27
|
+
get hasLabel() {
|
28
|
+
return hasTplNameValue(this.props, 'label');
|
29
|
+
}
|
30
|
+
get label() {
|
31
|
+
return resolveTplName(this.props, this.fieldTemplates, 'label');
|
32
|
+
}
|
33
|
+
get hasError() {
|
34
|
+
return (this.formControl?.dirty || this.formControl?.touched) && this.formControl.errors;
|
35
|
+
}
|
36
|
+
get validateStatus() {
|
37
|
+
return this.hasError ? 'error' : 'success';
|
38
|
+
}
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyWrapperFormField, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
17
40
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: FormlyWrapperFormField, selector: "formly-wrapper-nz-form-field", usesInheritance: true, ngImport: i0, template: `
|
18
41
|
<nz-form-item [ngClass]="props.itemClass!">
|
19
|
-
<ng-container *ngIf="
|
42
|
+
<ng-container *ngIf="hasLabel && props['hideLabel'] !== true">
|
20
43
|
<nz-form-label
|
21
|
-
[nzFlex]="props['grid']?.labelFlex
|
22
|
-
[nzOffset]="props['grid']?.labelOffset
|
23
|
-
[nzOrder]="props['grid']?.labelOrder
|
24
|
-
[nzPull]="props['grid']?.labelPull
|
25
|
-
[nzPush]="props['grid']?.labelPush
|
26
|
-
[nzSpan]="props['grid']?.labelSpan
|
27
|
-
[nzXs]="props['grid']?.labelXs
|
28
|
-
[nzSm]="props['grid']?.labelSm
|
29
|
-
[nzMd]="props['grid']?.labelMd
|
30
|
-
[nzLg]="props['grid']?.labelLg
|
31
|
-
[nzXl]="props['grid']?.labelXl
|
32
|
-
[nzXXl]="props['grid']?.labelXXl
|
33
|
-
[ngClass]="props.labelClass
|
44
|
+
[nzFlex]="props['grid']?.labelFlex || formState.labelFlex"
|
45
|
+
[nzOffset]="props['grid']?.labelOffset || formState.labelOffset"
|
46
|
+
[nzOrder]="props['grid']?.labelOrder || formState.labelOrder"
|
47
|
+
[nzPull]="props['grid']?.labelPull || formState.labelPull"
|
48
|
+
[nzPush]="props['grid']?.labelPush || formState.labelPush"
|
49
|
+
[nzSpan]="props['grid']?.labelSpan || formState.labelSpan"
|
50
|
+
[nzXs]="props['grid']?.labelXs || formState.labelXs"
|
51
|
+
[nzSm]="props['grid']?.labelSm || formState.labelSm"
|
52
|
+
[nzMd]="props['grid']?.labelMd || formState.labelMd"
|
53
|
+
[nzLg]="props['grid']?.labelLg || formState.labelLg"
|
54
|
+
[nzXl]="props['grid']?.labelXl || formState.labelXl"
|
55
|
+
[nzXXl]="props['grid']?.labelXXl || formState.labelXXl"
|
56
|
+
[ngClass]="props.labelClass || formState.labelClass"
|
34
57
|
[nzRequired]="props.required && props['hideRequiredMarker'] !== true"
|
35
58
|
[nzFor]="id"
|
36
59
|
[nzNoColon]="props['noColon']!!"
|
37
|
-
[nzTooltipTitle]="
|
60
|
+
[nzTooltipTitle]="nzTooltipTitle"
|
38
61
|
[nzTooltipIcon]="props['tooltipIcon']!"
|
39
62
|
[nzLabelAlign]="props['labelAlign'] ?? 'right'"
|
40
63
|
[nzLabelWrap]="props['labelWrap']!!"
|
41
64
|
>
|
42
|
-
<
|
43
|
-
{
|
44
|
-
|
65
|
+
<ng-container
|
66
|
+
*nzStringTemplateOutlet="label; context: { $implicit: field, options: props }"
|
67
|
+
>
|
68
|
+
<div class="formly-label-text" [attr.title]="label" [innerHTML]="label"></div>
|
69
|
+
</ng-container>
|
45
70
|
</nz-form-label>
|
46
71
|
</ng-container>
|
47
72
|
<nz-form-control
|
48
|
-
[nzValidateStatus]="
|
73
|
+
[nzValidateStatus]="validateStatus"
|
49
74
|
[nzHasFeedback]="props['hasFeedback']!!"
|
50
|
-
[nzExtra]="props
|
51
|
-
[nzErrorTip]="
|
75
|
+
[nzExtra]="props.description || nzExtra"
|
76
|
+
[nzErrorTip]="errorTip"
|
52
77
|
[ngClass]="props.controlClass!"
|
53
|
-
[nzFlex]="props['grid']?.controlFlex
|
54
|
-
[nzOffset]="props['grid']?.controlOffset
|
55
|
-
[nzOrder]="props['grid']?.controlOrder
|
56
|
-
[nzPull]="props['grid']?.controlPull
|
57
|
-
[nzPush]="props['grid']?.controlPush
|
58
|
-
[nzSpan]="props['grid']?.controlSpan
|
59
|
-
[nzXs]="props['grid']?.controlXs
|
60
|
-
[nzSm]="props['grid']?.controlSm
|
61
|
-
[nzMd]="props['grid']?.controlMd
|
62
|
-
[nzLg]="props['grid']?.controlLg
|
63
|
-
[nzXl]="props['grid']?.controlXl
|
64
|
-
[nzXXl]="props['grid']?.controlXXl
|
78
|
+
[nzFlex]="props['grid']?.controlFlex || formState.controlFlex"
|
79
|
+
[nzOffset]="props['grid']?.controlOffset || formState.controlOffset"
|
80
|
+
[nzOrder]="props['grid']?.controlOrder || formState.controlOrder"
|
81
|
+
[nzPull]="props['grid']?.controlPull || formState.controlPull"
|
82
|
+
[nzPush]="props['grid']?.controlPush || formState.controlPush"
|
83
|
+
[nzSpan]="props['grid']?.controlSpan || formState.controlSpan"
|
84
|
+
[nzXs]="props['grid']?.controlXs || formState.controlXs"
|
85
|
+
[nzSm]="props['grid']?.controlSm || formState.controlSm"
|
86
|
+
[nzMd]="props['grid']?.controlMd || formState.controlMd"
|
87
|
+
[nzLg]="props['grid']?.controlLg || formState.controlLg"
|
88
|
+
[nzXl]="props['grid']?.controlXl || formState.controlXl"
|
89
|
+
[nzXXl]="props['grid']?.controlXXl || formState.controlXXl"
|
65
90
|
>
|
66
91
|
<ng-container #fieldComponent></ng-container>
|
67
92
|
|
68
|
-
<ng-template #
|
69
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
93
|
+
<ng-template #errorTip let-control>
|
94
|
+
<formly-validation-message *ngIf="hasError" [field]="field"></formly-validation-message>
|
70
95
|
</ng-template>
|
71
96
|
</nz-form-control>
|
72
97
|
</nz-form-item>
|
73
|
-
`, isInline: true, styles: [":host .formly-label-text{overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type:
|
98
|
+
`, isInline: true, styles: [":host .formly-label-text{overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i4.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: i5.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: i6.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }] }); }
|
74
99
|
}
|
75
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
|
76
101
|
type: Component,
|
77
102
|
args: [{ selector: 'formly-wrapper-nz-form-field', template: `
|
78
103
|
<nz-form-item [ngClass]="props.itemClass!">
|
79
|
-
<ng-container *ngIf="
|
104
|
+
<ng-container *ngIf="hasLabel && props['hideLabel'] !== true">
|
80
105
|
<nz-form-label
|
81
|
-
[nzFlex]="props['grid']?.labelFlex
|
82
|
-
[nzOffset]="props['grid']?.labelOffset
|
83
|
-
[nzOrder]="props['grid']?.labelOrder
|
84
|
-
[nzPull]="props['grid']?.labelPull
|
85
|
-
[nzPush]="props['grid']?.labelPush
|
86
|
-
[nzSpan]="props['grid']?.labelSpan
|
87
|
-
[nzXs]="props['grid']?.labelXs
|
88
|
-
[nzSm]="props['grid']?.labelSm
|
89
|
-
[nzMd]="props['grid']?.labelMd
|
90
|
-
[nzLg]="props['grid']?.labelLg
|
91
|
-
[nzXl]="props['grid']?.labelXl
|
92
|
-
[nzXXl]="props['grid']?.labelXXl
|
93
|
-
[ngClass]="props.labelClass
|
106
|
+
[nzFlex]="props['grid']?.labelFlex || formState.labelFlex"
|
107
|
+
[nzOffset]="props['grid']?.labelOffset || formState.labelOffset"
|
108
|
+
[nzOrder]="props['grid']?.labelOrder || formState.labelOrder"
|
109
|
+
[nzPull]="props['grid']?.labelPull || formState.labelPull"
|
110
|
+
[nzPush]="props['grid']?.labelPush || formState.labelPush"
|
111
|
+
[nzSpan]="props['grid']?.labelSpan || formState.labelSpan"
|
112
|
+
[nzXs]="props['grid']?.labelXs || formState.labelXs"
|
113
|
+
[nzSm]="props['grid']?.labelSm || formState.labelSm"
|
114
|
+
[nzMd]="props['grid']?.labelMd || formState.labelMd"
|
115
|
+
[nzLg]="props['grid']?.labelLg || formState.labelLg"
|
116
|
+
[nzXl]="props['grid']?.labelXl || formState.labelXl"
|
117
|
+
[nzXXl]="props['grid']?.labelXXl || formState.labelXXl"
|
118
|
+
[ngClass]="props.labelClass || formState.labelClass"
|
94
119
|
[nzRequired]="props.required && props['hideRequiredMarker'] !== true"
|
95
120
|
[nzFor]="id"
|
96
121
|
[nzNoColon]="props['noColon']!!"
|
97
|
-
[nzTooltipTitle]="
|
122
|
+
[nzTooltipTitle]="nzTooltipTitle"
|
98
123
|
[nzTooltipIcon]="props['tooltipIcon']!"
|
99
124
|
[nzLabelAlign]="props['labelAlign'] ?? 'right'"
|
100
125
|
[nzLabelWrap]="props['labelWrap']!!"
|
101
126
|
>
|
102
|
-
<
|
103
|
-
{
|
104
|
-
|
127
|
+
<ng-container
|
128
|
+
*nzStringTemplateOutlet="label; context: { $implicit: field, options: props }"
|
129
|
+
>
|
130
|
+
<div class="formly-label-text" [attr.title]="label" [innerHTML]="label"></div>
|
131
|
+
</ng-container>
|
105
132
|
</nz-form-label>
|
106
133
|
</ng-container>
|
107
134
|
<nz-form-control
|
108
|
-
[nzValidateStatus]="
|
135
|
+
[nzValidateStatus]="validateStatus"
|
109
136
|
[nzHasFeedback]="props['hasFeedback']!!"
|
110
|
-
[nzExtra]="props
|
111
|
-
[nzErrorTip]="
|
137
|
+
[nzExtra]="props.description || nzExtra"
|
138
|
+
[nzErrorTip]="errorTip"
|
112
139
|
[ngClass]="props.controlClass!"
|
113
|
-
[nzFlex]="props['grid']?.controlFlex
|
114
|
-
[nzOffset]="props['grid']?.controlOffset
|
115
|
-
[nzOrder]="props['grid']?.controlOrder
|
116
|
-
[nzPull]="props['grid']?.controlPull
|
117
|
-
[nzPush]="props['grid']?.controlPush
|
118
|
-
[nzSpan]="props['grid']?.controlSpan
|
119
|
-
[nzXs]="props['grid']?.controlXs
|
120
|
-
[nzSm]="props['grid']?.controlSm
|
121
|
-
[nzMd]="props['grid']?.controlMd
|
122
|
-
[nzLg]="props['grid']?.controlLg
|
123
|
-
[nzXl]="props['grid']?.controlXl
|
124
|
-
[nzXXl]="props['grid']?.controlXXl
|
140
|
+
[nzFlex]="props['grid']?.controlFlex || formState.controlFlex"
|
141
|
+
[nzOffset]="props['grid']?.controlOffset || formState.controlOffset"
|
142
|
+
[nzOrder]="props['grid']?.controlOrder || formState.controlOrder"
|
143
|
+
[nzPull]="props['grid']?.controlPull || formState.controlPull"
|
144
|
+
[nzPush]="props['grid']?.controlPush || formState.controlPush"
|
145
|
+
[nzSpan]="props['grid']?.controlSpan || formState.controlSpan"
|
146
|
+
[nzXs]="props['grid']?.controlXs || formState.controlXs"
|
147
|
+
[nzSm]="props['grid']?.controlSm || formState.controlSm"
|
148
|
+
[nzMd]="props['grid']?.controlMd || formState.controlMd"
|
149
|
+
[nzLg]="props['grid']?.controlLg || formState.controlLg"
|
150
|
+
[nzXl]="props['grid']?.controlXl || formState.controlXl"
|
151
|
+
[nzXXl]="props['grid']?.controlXXl || formState.controlXXl"
|
125
152
|
>
|
126
153
|
<ng-container #fieldComponent></ng-container>
|
127
154
|
|
128
|
-
<ng-template #
|
129
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
155
|
+
<ng-template #errorTip let-control>
|
156
|
+
<formly-validation-message *ngIf="hasError" [field]="field"></formly-validation-message>
|
130
157
|
</ng-template>
|
131
158
|
</nz-form-control>
|
132
159
|
</nz-form-item>
|
133
160
|
`, styles: [":host .formly-label-text{overflow:hidden;text-overflow:ellipsis}\n"] }]
|
134
|
-
}]
|
161
|
+
}], ctorParameters: function () { return [{ type: i1.FormlyBoxTemplates, decorators: [{
|
162
|
+
type: Optional
|
163
|
+
}] }]; } });
|
135
164
|
|
136
165
|
class FormlyNzFormFieldModule {
|
137
166
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
138
167
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule,
|
139
168
|
ReactiveFormsModule,
|
140
|
-
NzFormModule,
|
169
|
+
NzFormModule,
|
170
|
+
FormlyCommonModule,
|
171
|
+
NzOutletModule, i6.FormlyModule] }); }
|
141
172
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzFormFieldModule, imports: [CommonModule,
|
142
173
|
ReactiveFormsModule,
|
143
174
|
NzFormModule,
|
175
|
+
FormlyCommonModule,
|
176
|
+
NzOutletModule,
|
144
177
|
FormlyModule.forChild({
|
145
178
|
wrappers: [
|
146
179
|
{
|
@@ -158,6 +191,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
158
191
|
CommonModule,
|
159
192
|
ReactiveFormsModule,
|
160
193
|
NzFormModule,
|
194
|
+
FormlyCommonModule,
|
195
|
+
NzOutletModule,
|
161
196
|
FormlyModule.forChild({
|
162
197
|
wrappers: [
|
163
198
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-form-field.mjs","sources":["../../../../packages/formlyantd/form-field/src/form-field.wrapper.ts","../../../../packages/formlyantd/form-field/src/form-field.module.ts","../../../../packages/formlyantd/form-field/src/ngx-formly-zorro-antd-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\nimport type { NzFormWrapperProps } from './form-field.props';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\n\nexport type FormlyFieldProps = NzFormWrapperProps;\n\n@Component({\n selector: 'formly-wrapper-nz-form-field',\n styleUrls: ['./form-field.wrapper.scss'],\n template: `\n <nz-form-item [ngClass]=\"props.itemClass!\">\n <ng-container *ngIf=\"
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-form-field.mjs","sources":["../../../../packages/formlyantd/form-field/src/form-field.wrapper.ts","../../../../packages/formlyantd/form-field/src/form-field.module.ts","../../../../packages/formlyantd/form-field/src/ngx-formly-zorro-antd-form-field.ts"],"sourcesContent":["import { Component, Optional } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\nimport type { NzFormWrapperProps } from './form-field.props';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { resolveTplName, hasTplNameValue, FormlyBoxTemplates } from 'ngx-formly-zorro-antd/common';\n\nexport type FormlyFieldProps = NzFormWrapperProps;\n\n@Component({\n selector: 'formly-wrapper-nz-form-field',\n styleUrls: ['./form-field.wrapper.scss'],\n template: `\n <nz-form-item [ngClass]=\"props.itemClass!\">\n <ng-container *ngIf=\"hasLabel && props['hideLabel'] !== true\">\n <nz-form-label\n [nzFlex]=\"props['grid']?.labelFlex || formState.labelFlex\"\n [nzOffset]=\"props['grid']?.labelOffset || formState.labelOffset\"\n [nzOrder]=\"props['grid']?.labelOrder || formState.labelOrder\"\n [nzPull]=\"props['grid']?.labelPull || formState.labelPull\"\n [nzPush]=\"props['grid']?.labelPush || formState.labelPush\"\n [nzSpan]=\"props['grid']?.labelSpan || formState.labelSpan\"\n [nzXs]=\"props['grid']?.labelXs || formState.labelXs\"\n [nzSm]=\"props['grid']?.labelSm || formState.labelSm\"\n [nzMd]=\"props['grid']?.labelMd || formState.labelMd\"\n [nzLg]=\"props['grid']?.labelLg || formState.labelLg\"\n [nzXl]=\"props['grid']?.labelXl || formState.labelXl\"\n [nzXXl]=\"props['grid']?.labelXXl || formState.labelXXl\"\n [ngClass]=\"props.labelClass || formState.labelClass\"\n [nzRequired]=\"props.required && props['hideRequiredMarker'] !== true\"\n [nzFor]=\"id\"\n [nzNoColon]=\"props['noColon']!!\"\n [nzTooltipTitle]=\"nzTooltipTitle\"\n [nzTooltipIcon]=\"props['tooltipIcon']!\"\n [nzLabelAlign]=\"props['labelAlign'] ?? 'right'\"\n [nzLabelWrap]=\"props['labelWrap']!!\"\n >\n <ng-container\n *nzStringTemplateOutlet=\"label; context: { $implicit: field, options: props }\"\n >\n <div class=\"formly-label-text\" [attr.title]=\"label\" [innerHTML]=\"label\"></div>\n </ng-container>\n </nz-form-label>\n </ng-container>\n <nz-form-control\n [nzValidateStatus]=\"validateStatus\"\n [nzHasFeedback]=\"props['hasFeedback']!!\"\n [nzExtra]=\"props.description || nzExtra\"\n [nzErrorTip]=\"errorTip\"\n [ngClass]=\"props.controlClass!\"\n [nzFlex]=\"props['grid']?.controlFlex || formState.controlFlex\"\n [nzOffset]=\"props['grid']?.controlOffset || formState.controlOffset\"\n [nzOrder]=\"props['grid']?.controlOrder || formState.controlOrder\"\n [nzPull]=\"props['grid']?.controlPull || formState.controlPull\"\n [nzPush]=\"props['grid']?.controlPush || formState.controlPush\"\n [nzSpan]=\"props['grid']?.controlSpan || formState.controlSpan\"\n [nzXs]=\"props['grid']?.controlXs || formState.controlXs\"\n [nzSm]=\"props['grid']?.controlSm || formState.controlSm\"\n [nzMd]=\"props['grid']?.controlMd || formState.controlMd\"\n [nzLg]=\"props['grid']?.controlLg || formState.controlLg\"\n [nzXl]=\"props['grid']?.controlXl || formState.controlXl\"\n [nzXXl]=\"props['grid']?.controlXXl || formState.controlXXl\"\n >\n <ng-container #fieldComponent></ng-container>\n\n <ng-template #errorTip let-control>\n <formly-validation-message *ngIf=\"hasError\" [field]=\"field\"></formly-validation-message>\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n `\n})\nexport class FormlyWrapperFormField extends FieldWrapper<NzFormlyFieldConfig<FormlyFieldProps>> {\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n\n get nzTooltipTitle() {\n return resolveTplName(this.props, this.fieldTemplates, 'tooltipTitle');\n }\n get nzExtra() {\n return resolveTplName(this.props, this.fieldTemplates, 'extra');\n }\n get hasLabel() {\n return hasTplNameValue(this.props, 'label');\n }\n\n get label() {\n return resolveTplName(this.props, this.fieldTemplates, 'label');\n }\n\n get hasError() {\n return (this.formControl?.dirty || this.formControl?.touched) && this.formControl.errors;\n }\n get validateStatus() {\n return this.hasError ? 'error' : 'success';\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyCommonModule } from 'ngx-formly-zorro-antd/common';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzFormModule,\n FormlyCommonModule,\n NzOutletModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField\n }\n ]\n })\n ]\n})\nexport class FormlyNzFormFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAuEM,MAAO,sBAAuB,SAAQ,YAAmD,CAAA;AAC7F,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;KAEhE;AAED,IAAA,IAAI,cAAc,GAAA;AAChB,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;KACxE;AACD,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACjE;AACD,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;KAC7C;AAED,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACjE;AAED,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;KAC1F;AACD,IAAA,IAAI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,GAAG,OAAO,GAAG,S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Y,CAAC,QAAQ,CAAC;AACpB,4BAAA,QAAQ,EAAE;AACR,gCAAA;AACE,oCAAA,IAAI,EAAE,YAAY;AAClB,oCAAA,SAAS,EAAE,sBAAsB;AAClC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC1BD;;AAEG;;;;"}
|
@@ -3,9 +3,11 @@ import * as i1 from "./form-field.wrapper";
|
|
3
3
|
import * as i2 from "@angular/common";
|
4
4
|
import * as i3 from "@angular/forms";
|
5
5
|
import * as i4 from "ng-zorro-antd/form";
|
6
|
-
import * as i5 from "
|
6
|
+
import * as i5 from "ngx-formly-zorro-antd/common";
|
7
|
+
import * as i6 from "ng-zorro-antd/core/outlet";
|
8
|
+
import * as i7 from "@ngx-formly/core";
|
7
9
|
export declare class FormlyNzFormFieldModule {
|
8
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyNzFormFieldModule, never>;
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyNzFormFieldModule, [typeof i1.FormlyWrapperFormField], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.NzFormModule, typeof i5.FormlyModule], never>;
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyNzFormFieldModule, [typeof i1.FormlyWrapperFormField], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.NzFormModule, typeof i5.FormlyCommonModule, typeof i6.NzOutletModule, typeof i7.FormlyModule], never>;
|
10
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormlyNzFormFieldModule>;
|
11
13
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
2
1
|
import type { EmbeddedProperty } from 'ng-zorro-antd/grid';
|
3
2
|
import type { NzFormTooltipIcon, NzLabelAlignType } from 'ng-zorro-antd/form';
|
4
3
|
import type { NzTSType } from 'ng-zorro-antd/core/types';
|
@@ -37,6 +36,7 @@ export interface NzFormWrapperProps extends ControlOptions {
|
|
37
36
|
* 配置提示信息
|
38
37
|
*/
|
39
38
|
tooltipTitle?: NzTSType;
|
39
|
+
tooltipTitleName?: string;
|
40
40
|
/**
|
41
41
|
* 配置提示信息的图标
|
42
42
|
*/
|
@@ -54,10 +54,15 @@ export interface NzFormWrapperProps extends ControlOptions {
|
|
54
54
|
* @default false
|
55
55
|
*/
|
56
56
|
hasFeedback?: boolean;
|
57
|
+
/**
|
58
|
+
* 描述
|
59
|
+
*/
|
60
|
+
description?: string;
|
57
61
|
/**
|
58
62
|
* 用于显示表单额外提示信息
|
59
63
|
*/
|
60
|
-
|
64
|
+
extra?: NzTSType;
|
65
|
+
extraName?: string;
|
61
66
|
/** 24 栅格系统 */
|
62
67
|
grid?: {
|
63
68
|
/** flex 布局属性 */
|
@@ -1,10 +1,18 @@
|
|
1
1
|
import { FieldWrapper } from '@ngx-formly/core';
|
2
2
|
import type { NzFormWrapperProps } from './form-field.props';
|
3
3
|
import type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';
|
4
|
+
import { FormlyBoxTemplates } from 'ngx-formly-zorro-antd/common';
|
4
5
|
import * as i0 from "@angular/core";
|
5
6
|
export type FormlyFieldProps = NzFormWrapperProps;
|
6
7
|
export declare class FormlyWrapperFormField extends FieldWrapper<NzFormlyFieldConfig<FormlyFieldProps>> {
|
7
|
-
|
8
|
-
|
8
|
+
fieldTemplates: FormlyBoxTemplates;
|
9
|
+
constructor(fieldTemplates: FormlyBoxTemplates);
|
10
|
+
get nzTooltipTitle(): import("@angular/core").TemplateRef<any> | undefined;
|
11
|
+
get nzExtra(): import("@angular/core").TemplateRef<any> | undefined;
|
12
|
+
get hasLabel(): boolean;
|
13
|
+
get label(): import("@angular/core").TemplateRef<any> | undefined;
|
14
|
+
get hasError(): false | import("@angular/forms").ValidationErrors | null;
|
15
|
+
get validateStatus(): "error" | "success";
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyWrapperFormField, [{ optional: true; }]>;
|
9
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyWrapperFormField, "formly-wrapper-nz-form-field", never, {}, {}, never, never, false, never>;
|
10
18
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ngx-formly-zorro-antd",
|
3
|
-
"version": "16.1.
|
3
|
+
"version": "16.1.5",
|
4
4
|
"publishConfig": {
|
5
5
|
"registry": "https://registry.npmjs.org",
|
6
6
|
"access": "public"
|
@@ -38,18 +38,18 @@
|
|
38
38
|
"esm": "./esm2022/autocomplete/ngx-formly-zorro-antd-autocomplete.mjs",
|
39
39
|
"default": "./fesm2022/ngx-formly-zorro-antd-autocomplete.mjs"
|
40
40
|
},
|
41
|
-
"./card-wrapper": {
|
42
|
-
"types": "./card-wrapper/index.d.ts",
|
43
|
-
"esm2022": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
|
44
|
-
"esm": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
|
45
|
-
"default": "./fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs"
|
46
|
-
},
|
47
41
|
"./button": {
|
48
42
|
"types": "./button/index.d.ts",
|
49
43
|
"esm2022": "./esm2022/button/ngx-formly-zorro-antd-button.mjs",
|
50
44
|
"esm": "./esm2022/button/ngx-formly-zorro-antd-button.mjs",
|
51
45
|
"default": "./fesm2022/ngx-formly-zorro-antd-button.mjs"
|
52
46
|
},
|
47
|
+
"./card-wrapper": {
|
48
|
+
"types": "./card-wrapper/index.d.ts",
|
49
|
+
"esm2022": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
|
50
|
+
"esm": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
|
51
|
+
"default": "./fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs"
|
52
|
+
},
|
53
53
|
"./cascader": {
|
54
54
|
"types": "./cascader/index.d.ts",
|
55
55
|
"esm2022": "./esm2022/cascader/ngx-formly-zorro-antd-cascader.mjs",
|