ngx-formly-zorro-antd 16.1.3 → 16.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,146 +1,179 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
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 i4 from '@ngx-formly/core';
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 i3 from 'ng-zorro-antd/form';
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 i2 from 'ng-zorro-antd/grid';
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
- get errorState() {
14
- return this.showError ? 'error' : 'success';
17
+ constructor(fieldTemplates) {
18
+ super();
19
+ this.fieldTemplates = fieldTemplates;
15
20
  }
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyWrapperFormField, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
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="props.label && props['hideLabel'] !== true">
42
+ <ng-container *ngIf="hasLabel && props['hideLabel'] !== true">
20
43
  <nz-form-label
21
- [nzFlex]="props['grid']?.labelFlex ?? null"
22
- [nzOffset]="props['grid']?.labelOffset ?? null"
23
- [nzOrder]="props['grid']?.labelOrder ?? null"
24
- [nzPull]="props['grid']?.labelPull ?? null"
25
- [nzPush]="props['grid']?.labelPush ?? null"
26
- [nzSpan]="props['grid']?.labelSpan ?? null"
27
- [nzXs]="props['grid']?.labelXs ?? null"
28
- [nzSm]="props['grid']?.labelSm ?? null"
29
- [nzMd]="props['grid']?.labelMd ?? null"
30
- [nzLg]="props['grid']?.labelLg ?? null"
31
- [nzXl]="props['grid']?.labelXl ?? null"
32
- [nzXXl]="props['grid']?.labelXXl ?? null"
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]="props['tooltipTitle']"
60
+ [nzTooltipTitle]="nzTooltipTitle"
38
61
  [nzTooltipIcon]="props['tooltipIcon']!"
39
62
  [nzLabelAlign]="props['labelAlign'] ?? 'right'"
40
63
  [nzLabelWrap]="props['labelWrap']!!"
41
64
  >
42
- <span class="formly-label-text">
43
- {{ props.label }}
44
- </span>
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]="errorState"
73
+ [nzValidateStatus]="validateStatus"
49
74
  [nzHasFeedback]="props['hasFeedback']!!"
50
- [nzExtra]="props['controlExtra']"
51
- [nzErrorTip]="errorTpl"
75
+ [nzExtra]="props.description || nzExtra"
76
+ [nzErrorTip]="errorTip"
52
77
  [ngClass]="props.controlClass!"
53
- [nzFlex]="props['grid']?.controlFlex ?? null"
54
- [nzOffset]="props['grid']?.controlOffset ?? null"
55
- [nzOrder]="props['grid']?.controlOrder ?? null"
56
- [nzPull]="props['grid']?.controlPull ?? null"
57
- [nzPush]="props['grid']?.controlPush ?? null"
58
- [nzSpan]="props['grid']?.controlSpan ?? null"
59
- [nzXs]="props['grid']?.controlXs ?? null"
60
- [nzSm]="props['grid']?.controlSm ?? null"
61
- [nzMd]="props['grid']?.controlMd ?? null"
62
- [nzLg]="props['grid']?.controlLg ?? null"
63
- [nzXl]="props['grid']?.controlXl ?? null"
64
- [nzXXl]="props['grid']?.controlXXl ?? null"
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 #errorTpl let-control>
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: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i3.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i3.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i3.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "component", type: i4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }] }); }
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="props.label && props['hideLabel'] !== true">
104
+ <ng-container *ngIf="hasLabel && props['hideLabel'] !== true">
80
105
  <nz-form-label
81
- [nzFlex]="props['grid']?.labelFlex ?? null"
82
- [nzOffset]="props['grid']?.labelOffset ?? null"
83
- [nzOrder]="props['grid']?.labelOrder ?? null"
84
- [nzPull]="props['grid']?.labelPull ?? null"
85
- [nzPush]="props['grid']?.labelPush ?? null"
86
- [nzSpan]="props['grid']?.labelSpan ?? null"
87
- [nzXs]="props['grid']?.labelXs ?? null"
88
- [nzSm]="props['grid']?.labelSm ?? null"
89
- [nzMd]="props['grid']?.labelMd ?? null"
90
- [nzLg]="props['grid']?.labelLg ?? null"
91
- [nzXl]="props['grid']?.labelXl ?? null"
92
- [nzXXl]="props['grid']?.labelXXl ?? null"
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]="props['tooltipTitle']"
122
+ [nzTooltipTitle]="nzTooltipTitle"
98
123
  [nzTooltipIcon]="props['tooltipIcon']!"
99
124
  [nzLabelAlign]="props['labelAlign'] ?? 'right'"
100
125
  [nzLabelWrap]="props['labelWrap']!!"
101
126
  >
102
- <span class="formly-label-text">
103
- {{ props.label }}
104
- </span>
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]="errorState"
135
+ [nzValidateStatus]="validateStatus"
109
136
  [nzHasFeedback]="props['hasFeedback']!!"
110
- [nzExtra]="props['controlExtra']"
111
- [nzErrorTip]="errorTpl"
137
+ [nzExtra]="props.description || nzExtra"
138
+ [nzErrorTip]="errorTip"
112
139
  [ngClass]="props.controlClass!"
113
- [nzFlex]="props['grid']?.controlFlex ?? null"
114
- [nzOffset]="props['grid']?.controlOffset ?? null"
115
- [nzOrder]="props['grid']?.controlOrder ?? null"
116
- [nzPull]="props['grid']?.controlPull ?? null"
117
- [nzPush]="props['grid']?.controlPush ?? null"
118
- [nzSpan]="props['grid']?.controlSpan ?? null"
119
- [nzXs]="props['grid']?.controlXs ?? null"
120
- [nzSm]="props['grid']?.controlSm ?? null"
121
- [nzMd]="props['grid']?.controlMd ?? null"
122
- [nzLg]="props['grid']?.controlLg ?? null"
123
- [nzXl]="props['grid']?.controlXl ?? null"
124
- [nzXXl]="props['grid']?.controlXXl ?? null"
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 #errorTpl let-control>
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, i4.FormlyModule] }); }
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=\"props.label && props['hideLabel'] !== true\">\n <nz-form-label\n [nzFlex]=\"props['grid']?.labelFlex ?? null\"\n [nzOffset]=\"props['grid']?.labelOffset ?? null\"\n [nzOrder]=\"props['grid']?.labelOrder ?? null\"\n [nzPull]=\"props['grid']?.labelPull ?? null\"\n [nzPush]=\"props['grid']?.labelPush ?? null\"\n [nzSpan]=\"props['grid']?.labelSpan ?? null\"\n [nzXs]=\"props['grid']?.labelXs ?? null\"\n [nzSm]=\"props['grid']?.labelSm ?? null\"\n [nzMd]=\"props['grid']?.labelMd ?? null\"\n [nzLg]=\"props['grid']?.labelLg ?? null\"\n [nzXl]=\"props['grid']?.labelXl ?? null\"\n [nzXXl]=\"props['grid']?.labelXXl ?? null\"\n [ngClass]=\"props.labelClass!\"\n [nzRequired]=\"props.required && props['hideRequiredMarker'] !== true\"\n [nzFor]=\"id\"\n [nzNoColon]=\"props['noColon']!!\"\n [nzTooltipTitle]=\"props['tooltipTitle']\"\n [nzTooltipIcon]=\"props['tooltipIcon']!\"\n [nzLabelAlign]=\"props['labelAlign'] ?? 'right'\"\n [nzLabelWrap]=\"props['labelWrap']!!\"\n >\n <span class=\"formly-label-text\">\n {{ props.label }}\n </span>\n </nz-form-label>\n </ng-container>\n <nz-form-control\n [nzValidateStatus]=\"errorState\"\n [nzHasFeedback]=\"props['hasFeedback']!!\"\n [nzExtra]=\"props['controlExtra']\"\n [nzErrorTip]=\"errorTpl\"\n [ngClass]=\"props.controlClass!\"\n [nzFlex]=\"props['grid']?.controlFlex ?? null\"\n [nzOffset]=\"props['grid']?.controlOffset ?? null\"\n [nzOrder]=\"props['grid']?.controlOrder ?? null\"\n [nzPull]=\"props['grid']?.controlPull ?? null\"\n [nzPush]=\"props['grid']?.controlPush ?? null\"\n [nzSpan]=\"props['grid']?.controlSpan ?? null\"\n [nzXs]=\"props['grid']?.controlXs ?? null\"\n [nzSm]=\"props['grid']?.controlSm ?? null\"\n [nzMd]=\"props['grid']?.controlMd ?? null\"\n [nzLg]=\"props['grid']?.controlLg ?? null\"\n [nzXl]=\"props['grid']?.controlXl ?? null\"\n [nzXXl]=\"props['grid']?.controlXXl ?? null\"\n >\n <ng-container #fieldComponent></ng-container>\n\n <ng-template #errorTpl let-control>\n <formly-validation-message [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 get errorState() {\n return this.showError ? '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 { NzFormModule } from 'ng-zorro-antd/form';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzFormModule,\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":";;;;;;;;;;;AAoEM,MAAO,sBAAuB,SAAQ,YAAmD,CAAA;AAC7F,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;KAC7C;8GAHU,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EA1DvB,QAAA,EAAA,8BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,oEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA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wBAAA,SAAS,EAAE,sBAAsB;AAClC,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,YAAY;wBACZ,YAAY,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;;;ACtBD;;AAEG;;;;"}
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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,CAAA,CAAA,EAAA;+GAAvB,uBAAuB,EAAA,YAAA,EAAA,CAjBnB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAEnC,YAAY;YACZ,mBAAmB;YACnB,YAAY;YACZ,kBAAkB;YAClB,cAAc,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA,EAAA;AAWL,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAfhC,YAAY;YACZ,mBAAmB;YACnB,YAAY;YACZ,kBAAkB;YAClB,cAAc;YACd,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,IAAI,EAAE,YAAY;AAClB,wBAAA,SAAS,EAAE,sBAAsB;AAClC,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAlBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,YAAY;wBACZ,kBAAkB;wBAClB,cAAc;wBACd,YAAY,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 "@ngx-formly/core";
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
- controlExtra?: string | TemplateRef<void>;
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
- get errorState(): "error" | "success";
8
- static ɵfac: i0.ɵɵFactoryDeclaration<FormlyWrapperFormField, never>;
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",
3
+ "version": "16.1.5",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public"
@@ -13,8 +13,8 @@
13
13
  "@angular/platform-browser": "^16.0.0",
14
14
  "ng-zorro-antd": "^16.1.0",
15
15
  "@ngx-formly/core": "^6.0.0",
16
+ "@pkt/ng.core": "^4.0.3",
16
17
  "rxjs": "^6.5.3 || ^7.4.0",
17
- "@pkt/ng.core": "4.0.2",
18
18
  "@ant-design/icons-angular": "16.0.0"
19
19
  },
20
20
  "dependencies": {
@@ -44,30 +44,30 @@
44
44
  "esm": "./esm2022/button/ngx-formly-zorro-antd-button.mjs",
45
45
  "default": "./fesm2022/ngx-formly-zorro-antd-button.mjs"
46
46
  },
47
- "./checkbox": {
48
- "types": "./checkbox/index.d.ts",
49
- "esm2022": "./esm2022/checkbox/ngx-formly-zorro-antd-checkbox.mjs",
50
- "esm": "./esm2022/checkbox/ngx-formly-zorro-antd-checkbox.mjs",
51
- "default": "./fesm2022/ngx-formly-zorro-antd-checkbox.mjs"
52
- },
53
47
  "./card-wrapper": {
54
48
  "types": "./card-wrapper/index.d.ts",
55
49
  "esm2022": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
56
50
  "esm": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
57
51
  "default": "./fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs"
58
52
  },
59
- "./common": {
60
- "types": "./common/index.d.ts",
61
- "esm2022": "./esm2022/common/ngx-formly-zorro-antd-common.mjs",
62
- "esm": "./esm2022/common/ngx-formly-zorro-antd-common.mjs",
63
- "default": "./fesm2022/ngx-formly-zorro-antd-common.mjs"
64
- },
65
53
  "./cascader": {
66
54
  "types": "./cascader/index.d.ts",
67
55
  "esm2022": "./esm2022/cascader/ngx-formly-zorro-antd-cascader.mjs",
68
56
  "esm": "./esm2022/cascader/ngx-formly-zorro-antd-cascader.mjs",
69
57
  "default": "./fesm2022/ngx-formly-zorro-antd-cascader.mjs"
70
58
  },
59
+ "./checkbox": {
60
+ "types": "./checkbox/index.d.ts",
61
+ "esm2022": "./esm2022/checkbox/ngx-formly-zorro-antd-checkbox.mjs",
62
+ "esm": "./esm2022/checkbox/ngx-formly-zorro-antd-checkbox.mjs",
63
+ "default": "./fesm2022/ngx-formly-zorro-antd-checkbox.mjs"
64
+ },
65
+ "./common": {
66
+ "types": "./common/index.d.ts",
67
+ "esm2022": "./esm2022/common/ngx-formly-zorro-antd-common.mjs",
68
+ "esm": "./esm2022/common/ngx-formly-zorro-antd-common.mjs",
69
+ "default": "./fesm2022/ngx-formly-zorro-antd-common.mjs"
70
+ },
71
71
  "./card": {
72
72
  "types": "./card/index.d.ts",
73
73
  "esm2022": "./esm2022/card/ngx-formly-zorro-antd-card.mjs",
@@ -92,18 +92,18 @@
92
92
  "esm": "./esm2022/form-field/ngx-formly-zorro-antd-form-field.mjs",
93
93
  "default": "./fesm2022/ngx-formly-zorro-antd-form-field.mjs"
94
94
  },
95
- "./input": {
96
- "types": "./input/index.d.ts",
97
- "esm2022": "./esm2022/input/ngx-formly-zorro-antd-input.mjs",
98
- "esm": "./esm2022/input/ngx-formly-zorro-antd-input.mjs",
99
- "default": "./fesm2022/ngx-formly-zorro-antd-input.mjs"
100
- },
101
95
  "./grid": {
102
96
  "types": "./grid/index.d.ts",
103
97
  "esm2022": "./esm2022/grid/ngx-formly-zorro-antd-grid.mjs",
104
98
  "esm": "./esm2022/grid/ngx-formly-zorro-antd-grid.mjs",
105
99
  "default": "./fesm2022/ngx-formly-zorro-antd-grid.mjs"
106
100
  },
101
+ "./input": {
102
+ "types": "./input/index.d.ts",
103
+ "esm2022": "./esm2022/input/ngx-formly-zorro-antd-input.mjs",
104
+ "esm": "./esm2022/input/ngx-formly-zorro-antd-input.mjs",
105
+ "default": "./fesm2022/ngx-formly-zorro-antd-input.mjs"
106
+ },
107
107
  "./input-group": {
108
108
  "types": "./input-group/index.d.ts",
109
109
  "esm2022": "./esm2022/input-group/ngx-formly-zorro-antd-input-group.mjs",
@@ -122,18 +122,18 @@
122
122
  "esm": "./esm2022/radio/ngx-formly-zorro-antd-radio.mjs",
123
123
  "default": "./fesm2022/ngx-formly-zorro-antd-radio.mjs"
124
124
  },
125
- "./ref-template": {
126
- "types": "./ref-template/index.d.ts",
127
- "esm2022": "./esm2022/ref-template/ngx-formly-zorro-antd-ref-template.mjs",
128
- "esm": "./esm2022/ref-template/ngx-formly-zorro-antd-ref-template.mjs",
129
- "default": "./fesm2022/ngx-formly-zorro-antd-ref-template.mjs"
130
- },
131
125
  "./rate": {
132
126
  "types": "./rate/index.d.ts",
133
127
  "esm2022": "./esm2022/rate/ngx-formly-zorro-antd-rate.mjs",
134
128
  "esm": "./esm2022/rate/ngx-formly-zorro-antd-rate.mjs",
135
129
  "default": "./fesm2022/ngx-formly-zorro-antd-rate.mjs"
136
130
  },
131
+ "./ref-template": {
132
+ "types": "./ref-template/index.d.ts",
133
+ "esm2022": "./esm2022/ref-template/ngx-formly-zorro-antd-ref-template.mjs",
134
+ "esm": "./esm2022/ref-template/ngx-formly-zorro-antd-ref-template.mjs",
135
+ "default": "./fesm2022/ngx-formly-zorro-antd-ref-template.mjs"
136
+ },
137
137
  "./select": {
138
138
  "types": "./select/index.d.ts",
139
139
  "esm2022": "./esm2022/select/ngx-formly-zorro-antd-select.mjs",