ngx-formly-zorro-antd 14.2.0 → 14.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/tabs/tabs.props.mjs +1 -1
- package/esm2020/tabs/tabs.wrapper.mjs +13 -9
- package/esm2020/textarea/textarea.module.mjs +6 -2
- package/esm2020/textarea/textarea.type.mjs +92 -39
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs +12 -8
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs +96 -39
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs +12 -8
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs +96 -39
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/package.json +3 -3
- package/tabs/tabs.props.d.ts +4 -4
- package/textarea/textarea.module.d.ts +3 -2
- package/textarea/textarea.type.d.ts +2 -1
@@ -1,2 +1,2 @@
|
|
1
1
|
export {};
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFicy5wcm9wcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2Zvcm1seWFudGQvdGFicy9zcmMvdGFicy5wcm9wcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVGVtcGxhdGVSZWYgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB0eXBlIHsgRm9ybWx5RmllbGRDb25maWcgfSBmcm9tICdAbmd4LWZvcm1seS9jb3JlJztcblxuaW1wb3J0IHsgTnpUYWJDb21wb25lbnQgfSBmcm9tICduZy16b3Jyby1hbnRkL3RhYnMnO1xuaW1wb3J0IHR5c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hdWx0IGZhbHNlXG4gICAgICovXG4gICAgZm9yY2VSZW5kZXI/OiBib29sZWFuO1xuXG4gICAgLyoqXG4gICAgICog5piv5ZCm56aB55SoXG4gICAgICogQGRlZmF1bHQgZmFsc2VcbiAgICAgKi9cbiAgICBkaXNhYmxlZD86IGJvb2xlYW47XG5cbiAgICAvKipcbiAgICAgKiDljZXlh7sgdGl0bGUg55qE5Zue6LCD5Ye95pWwXG4gICAgICovXG4gICAgY2xpY2s/
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFicy5wcm9wcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2Zvcm1seWFudGQvdGFicy9zcmMvdGFicy5wcm9wcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVGVtcGxhdGVSZWYgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB0eXBlIHsgRm9ybWx5RmllbGRDb25maWcgfSBmcm9tICdAbmd4LWZvcm1seS9jb3JlJztcblxuaW1wb3J0IHsgTnpUYWJDb21wb25lbnQgfSBmcm9tICduZy16b3Jyby1hbnRkL3RhYnMnO1xuaW1wb3J0IHR5cGUgeyBOelNpemVMRFNUeXBlLCBOelNhZmVBbnkgfSBmcm9tICduZy16b3Jyby1hbnRkL2NvcmUvdHlwZXMnO1xuaW1wb3J0IHR5cGUge1xuICBOelRhYnNDYW5EZWFjdGl2YXRlRm4sXG4gIFRhYlRlbXBsYXRlQ29udGV4dCxcbiAgTnpUYWJUeXBlLFxuICBOelRhYlBvc2l0aW9uLFxuICBOekFuaW1hdGVkSW50ZXJmYWNlXG59IGZyb20gJ25nLXpvcnJvLWFudGQvdGFicyc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgVGFic1Byb3BzIHtcbiAgLyoqXG4gICAq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ZSuIHRpdGxlIOeahOWbnuiwg+WHveaVsFxuICAgICAqL1xuICAgIGNvbnRleHRtZW51PzogKGZpZWxkOiBGb3JtbHlGaWVsZENvbmZpZywgZXZlbnQ6IE1vdXNlRXZlbnQpID0+IHZvaWQ7XG5cbiAgICAvKipcbiAgICAgKiB0YWIg6KKr6YCJ5Lit55qE5Zue6LCD5Ye95pWwXG4gICAgICovXG4gICAgc2VsZWN0PzogKGZpZWxkOiBGb3JtbHlGaWVsZENvbmZpZykgPT4gdm9pZDtcblxuICAgIC8qKlxuICAgICAqIHRhYiDooqvlj5bmtojpgInkuK3nmoTlm57osIPlh73mlbBcbiAgICAgKi9cbiAgICBkZXNlbGVjdD86IChmaWVsZDogRm9ybWx5RmllbGRDb25maWcpID0+IHZvaWQ7XG4gIH07XG59XG4iXX0=
|
@@ -56,10 +56,12 @@ FormlyWrapperTabs.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
56
56
|
[nzTitle]="tab.props?.label || ''"
|
57
57
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
58
58
|
[nzDisabled]="tab.props!['tab']?.disabled"
|
59
|
-
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click()"
|
60
|
-
(nzContextmenu)="
|
61
|
-
|
62
|
-
|
59
|
+
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
60
|
+
(nzContextmenu)="
|
61
|
+
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
62
|
+
"
|
63
|
+
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
64
|
+
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
63
65
|
>
|
64
66
|
<formly-field [field]="tab"></formly-field>
|
65
67
|
</nz-tab>
|
@@ -97,10 +99,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
97
99
|
[nzTitle]="tab.props?.label || ''"
|
98
100
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
99
101
|
[nzDisabled]="tab.props!['tab']?.disabled"
|
100
|
-
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click()"
|
101
|
-
(nzContextmenu)="
|
102
|
-
|
103
|
-
|
102
|
+
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
103
|
+
(nzContextmenu)="
|
104
|
+
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
105
|
+
"
|
106
|
+
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
107
|
+
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
104
108
|
>
|
105
109
|
<formly-field [field]="tab"></formly-field>
|
106
110
|
</nz-tab>
|
@@ -108,4 +112,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
108
112
|
changeDetection: ChangeDetectionStrategy.OnPush
|
109
113
|
}]
|
110
114
|
}] });
|
111
|
-
//# sourceMappingURL=data:application/json;base64,
|
115
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFicy53cmFwcGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZm9ybWx5YW50ZC90YWJzL3NyYy90YWJzLndyYXBwZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBUSx1QkFBdUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6RSxPQUFPLEVBQUUsWUFBWSxFQUFxQixNQUFNLGtCQUFrQixDQUFDOzs7OztBQW1EbkUsTUFBTSxPQUFPLGlCQUFrQixTQUFRLFlBQTBDO0lBM0NqRjs7UUE0Q1csbUJBQWMsR0FBRztZQUN4QixLQUFLLEVBQUU7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yNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
|
6
6
|
import { FormlyFieldTextarea } from './textarea.type';
|
7
7
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
8
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
8
9
|
import * as i0 from "@angular/core";
|
9
10
|
import * as i1 from "@ngx-formly/core";
|
10
11
|
export class FormlyNzTextareaModule {
|
@@ -13,11 +14,13 @@ FormlyNzTextareaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
|
|
13
14
|
FormlyNzTextareaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzTextareaModule, declarations: [FormlyFieldTextarea], imports: [CommonModule,
|
14
15
|
ReactiveFormsModule,
|
15
16
|
FormlyNzFormFieldModule,
|
16
|
-
NzInputModule,
|
17
|
+
NzInputModule,
|
18
|
+
NzIconModule, i1.FormlyModule] });
|
17
19
|
FormlyNzTextareaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzTextareaModule, imports: [CommonModule,
|
18
20
|
ReactiveFormsModule,
|
19
21
|
FormlyNzFormFieldModule,
|
20
22
|
NzInputModule,
|
23
|
+
NzIconModule,
|
21
24
|
FormlyModule.forChild({
|
22
25
|
types: [
|
23
26
|
{
|
@@ -36,6 +39,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
36
39
|
ReactiveFormsModule,
|
37
40
|
FormlyNzFormFieldModule,
|
38
41
|
NzInputModule,
|
42
|
+
NzIconModule,
|
39
43
|
FormlyModule.forChild({
|
40
44
|
types: [
|
41
45
|
{
|
@@ -48,4 +52,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
48
52
|
]
|
49
53
|
}]
|
50
54
|
}] });
|
51
|
-
//# sourceMappingURL=data:application/json;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nLXpvcnJvLWFudGQvaW5wdXQnO1xuaW1wb3J0IHsgTnpJY29uTW9kdWxlIH0gZnJvbSAnbmctem9ycm8tYW50ZC9pY29uJztcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbRm9ybWx5RmllbGRUZXh0YXJlYV0sXG4gIGltcG9ydHM6IFtcbiAgICBDb21tb25Nb2R1bGUsXG4gICAgUmVhY3RpdmVGb3Jtc01vZHVsZSxcbiAgICBGb3JtbHlOekZvcm1GaWVsZE1vZHVsZSxcbiAgICBOeklucHV0TW9kdWxlLFxuICAgIE56SWNvbk1vZHVsZSxcblxuICAgIEZvcm1seU1vZHVsZS5mb3JDaGlsZCh7XG4gICAgICB0eXBlczogW1xuICAgICAgICB7XG4gICAgICAgICAgbmFtZTogJ3RleHRhcmVhJyxcbiAgICAgICAgICBjb21wb25lbnQ6IEZvcm1seUZpZWxkVGV4dGFyZWEsXG4gICAgICAgICAgd3JhcHBlcnM6IFsnZm9ybS1maWVsZCddXG4gICAgICAgIH1cbiAgICAgIF1cbiAgICB9KVxuICBdXG59KVxuZXhwb3J0IGNsYXNzIEZvcm1seU56VGV4dGFyZWFNb2R1bGUge31cbiJdfQ==
|
@@ -4,7 +4,8 @@ import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
5
5
|
import * as i2 from "@angular/forms";
|
6
6
|
import * as i3 from "ng-zorro-antd/input";
|
7
|
-
import * as i4 from "
|
7
|
+
import * as i4 from "ng-zorro-antd/icon";
|
8
|
+
import * as i5 from "@ngx-formly/core";
|
8
9
|
export class FormlyFieldTextarea extends FieldType {
|
9
10
|
constructor() {
|
10
11
|
super(...arguments);
|
@@ -19,23 +20,37 @@ export class FormlyFieldTextarea extends FieldType {
|
|
19
20
|
}
|
20
21
|
FormlyFieldTextarea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
21
22
|
FormlyFieldTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
|
22
|
-
<
|
23
|
-
*
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
23
|
+
<ng-container [ngSwitch]="props.type">
|
24
|
+
<ng-container *ngSwitchCase="'count'">
|
25
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
26
|
+
<textarea
|
27
|
+
[formControl]="formControl"
|
28
|
+
[formlyAttributes]="field"
|
29
|
+
[ngClass]="props['className']"
|
30
|
+
[rows]="props.rows"
|
31
|
+
[cols]="props.cols"
|
32
|
+
nz-input
|
33
|
+
[nzBorderless]="props['borderless']!!"
|
34
|
+
[nzAutosize]="props['autosize']!!"
|
35
|
+
></textarea>
|
36
|
+
</nz-textarea-count>
|
37
|
+
</ng-container>
|
38
|
+
|
39
|
+
<ng-container *ngSwitchCase="'clear'">
|
40
|
+
<nz-input-group
|
41
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
42
|
+
[nzSuffix]="textAreaClearTpl"
|
43
|
+
>
|
44
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
45
|
+
</nz-input-group>
|
46
|
+
</ng-container>
|
37
47
|
|
38
|
-
|
48
|
+
<ng-container *ngSwitchDefault>
|
49
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
50
|
+
</ng-container>
|
51
|
+
</ng-container>
|
52
|
+
|
53
|
+
<ng-template #textareaTpl>
|
39
54
|
<textarea
|
40
55
|
[formControl]="formControl"
|
41
56
|
[formlyAttributes]="field"
|
@@ -43,33 +58,59 @@ FormlyFieldTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
43
58
|
[rows]="props.rows"
|
44
59
|
[cols]="props.cols"
|
45
60
|
nz-input
|
46
|
-
[nzBorderless]="props['borderless']"
|
47
|
-
[nzAutosize]="props['autosize']
|
61
|
+
[nzBorderless]="props['borderless']!!"
|
62
|
+
[nzAutosize]="props['autosize']!!"
|
48
63
|
></textarea>
|
49
64
|
</ng-template>
|
50
|
-
|
65
|
+
|
66
|
+
<!-- 清除数据 -->
|
67
|
+
<ng-template #textAreaClearTpl>
|
68
|
+
<span
|
69
|
+
nz-icon
|
70
|
+
class="ant-input-clear-icon"
|
71
|
+
nzTheme="fill"
|
72
|
+
nzType="close-circle"
|
73
|
+
*ngIf="formControl.value"
|
74
|
+
(click)="formControl.reset()"
|
75
|
+
></span>
|
76
|
+
</ng-template>
|
77
|
+
`, isInline: true, 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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzTextareaCountComponent, selector: "nz-textarea-count", inputs: ["nzMaxCharacterCount", "nzComputeCharacterCount", "nzFormatter"] }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i3.NzAutosizeDirective, selector: "textarea[nzAutosize]", inputs: ["nzAutosize"], exportAs: ["nzAutosize"] }, { kind: "directive", type: i3.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "directive", type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i5.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
51
78
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldTextarea, decorators: [{
|
52
79
|
type: Component,
|
53
80
|
args: [{
|
54
81
|
selector: 'formly-field-textarea',
|
55
82
|
template: `
|
56
|
-
<
|
57
|
-
*
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
83
|
+
<ng-container [ngSwitch]="props.type">
|
84
|
+
<ng-container *ngSwitchCase="'count'">
|
85
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
86
|
+
<textarea
|
87
|
+
[formControl]="formControl"
|
88
|
+
[formlyAttributes]="field"
|
89
|
+
[ngClass]="props['className']"
|
90
|
+
[rows]="props.rows"
|
91
|
+
[cols]="props.cols"
|
92
|
+
nz-input
|
93
|
+
[nzBorderless]="props['borderless']!!"
|
94
|
+
[nzAutosize]="props['autosize']!!"
|
95
|
+
></textarea>
|
96
|
+
</nz-textarea-count>
|
97
|
+
</ng-container>
|
98
|
+
|
99
|
+
<ng-container *ngSwitchCase="'clear'">
|
100
|
+
<nz-input-group
|
101
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
102
|
+
[nzSuffix]="textAreaClearTpl"
|
103
|
+
>
|
104
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
105
|
+
</nz-input-group>
|
106
|
+
</ng-container>
|
71
107
|
|
72
|
-
|
108
|
+
<ng-container *ngSwitchDefault>
|
109
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
110
|
+
</ng-container>
|
111
|
+
</ng-container>
|
112
|
+
|
113
|
+
<ng-template #textareaTpl>
|
73
114
|
<textarea
|
74
115
|
[formControl]="formControl"
|
75
116
|
[formlyAttributes]="field"
|
@@ -77,12 +118,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
77
118
|
[rows]="props.rows"
|
78
119
|
[cols]="props.cols"
|
79
120
|
nz-input
|
80
|
-
[nzBorderless]="props['borderless']"
|
81
|
-
[nzAutosize]="props['autosize']
|
121
|
+
[nzBorderless]="props['borderless']!!"
|
122
|
+
[nzAutosize]="props['autosize']!!"
|
82
123
|
></textarea>
|
83
124
|
</ng-template>
|
125
|
+
|
126
|
+
<!-- 清除数据 -->
|
127
|
+
<ng-template #textAreaClearTpl>
|
128
|
+
<span
|
129
|
+
nz-icon
|
130
|
+
class="ant-input-clear-icon"
|
131
|
+
nzTheme="fill"
|
132
|
+
nzType="close-circle"
|
133
|
+
*ngIf="formControl.value"
|
134
|
+
(click)="formControl.reset()"
|
135
|
+
></span>
|
136
|
+
</ng-template>
|
84
137
|
`,
|
85
138
|
changeDetection: ChangeDetectionStrategy.OnPush
|
86
139
|
}]
|
87
140
|
}] });
|
88
|
-
//# sourceMappingURL=data:application/json;base64,
|
141
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dGFyZWEudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2Zvcm1seWFudGQvdGV4dGFyZWEvc3JjL3RleHRhcmVhLnR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBUSx1QkFBdUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6RSxPQUFPLEVBQUUsU0FBUyxFQUFzQyxNQUFNLGtCQUFrQixDQUFDOzs7Ozs7O0FBd0ZqRixNQUFNLE9BQU8sbUJBQW9CLFNBQVEsU0FBeUM7SUE1RGxGOztRQTZEVyxtQkFBYyxHQUFHO1lBQ3hCLEtBQUssRUFBRTtnQkFDTCxJQUFJLEVBQUUsQ0FBQztnQkFDUCxRQUFRLEVBQUUsS0FBSztnQkFDZixVQUFVLEVBQUUsS0FBSzthQUNsQjtTQUNGLENBQUM7S0FDSDs7Z0hBUlksbUJBQW1CO29HQUFuQixtQkFBbUIsb0ZBMURwQjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQXVEVDsyRkFHVSxtQkFBbUI7a0JBNUQvQixTQUFTO21CQUFDO29CQUNULFFBQVEsRUFBRSx1QkFBdUI7b0JBQ2pDLFFBQVEsRUFBRTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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gZXh0ZW5kcyBGb3JtbHlGaWVsZENvbmZpZzxUZXh0YXJlYVByb3BzPiB7XG4gIHR5cGU6ICd0ZXh0YXJlYScgfCBUeXBlPEZvcm1seUZpZWxkVGV4dGFyZWE+O1xufVxuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICdmb3JtbHktZmllbGQtdGV4dGFyZWEnLFxuICB0ZW1wbGF0ZTogYFxuICAgIDxuZy1jb250YWluZXIgW25nU3dpdGNoXT1cInByb3BzLnR5cGVcIj5cbiAgICAgIDxuZy1jb250YWluZXIgKm5nU3dpdGNoQ2FzZT1cIidjb3VudCdcIj5cbiAgICAgICAgPG56LXRleHRhcmVhLWNvdW50IFtuek1heENoYXJhY3RlckNvdW50XT1cInByb3BzWydtYXhDaGFyYWN0ZXJDb3VudCddIHx8IDBcIj5cbiAgICAgICAgICA8dGV4dGFyZWFcbiAgICAgICAgICAgIFtmb3JtQ29udHJvbF09XCJmb3JtQ29udHJvbFwiXG4gICAgICAgICAgICBbZm9ybWx5QXR0cmlidXRlc109XCJmaWVsZFwiXG4gICAgICAgICAgICBbbmdDbGFzc109XCJwcm9wc1snY2xhc3NOYW1lJ11cIlxuICAgICAgICAgICAgW3Jvd3NdPVwicHJvcHMucm93c1wiXG4gICAgICAgICAgICBbY29sc109XCJwcm9wcy5jb2xzXCJcbiAgICAgICAgICAgIG56LWlucHV0XG4gICAgICAgICAgICBbbnpCb3JkZXJsZXNzXT1cInByb3BzWydib3JkZXJsZXNzJ10hIVwiXG4gICAgICAgICAgICBbbnpBdXRvc2l6ZV09XCJwcm9wc1snYXV0b3NpemUnXSEhXCJcbiAgICAgICAgICA+PC90ZXh0YXJlYT5cbiAgICAgICAgPC9uei10ZXh0YXJlYS1jb3VudD5cbiAgICAgIDwvbmctY29udGFpbmVyPlxuXG4gICAgICA8bmctY29udGFpbmVyICpuZ1N3aXRjaENhc2U9XCInY2xlYXInXCI+XG4gICAgICAgIDxuei1pbnB1dC1ncm91cFxuICAgICA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HRBcmVhQ2xlYXJUcGw+XG4gICAgICA8c3BhblxuICAgICAgICBuei1pY29uXG4gICAgICAgIGNsYXNzPVwiYW50LWlucHV0LWNsZWFyLWljb25cIlxuICAgICAgICBuelRoZW1lPVwiZmlsbFwiXG4gICAgICAgIG56VHlwZT1cImNsb3NlLWNpcmNsZVwiXG4gICAgICAgICpuZ0lmPVwiZm9ybUNvbnRyb2wudmFsdWVcIlxuICAgICAgICAoY2xpY2spPVwiZm9ybUNvbnRyb2wucmVzZXQoKVwiXG4gICAgICA+PC9zcGFuPlxuICAgIDwvbmctdGVtcGxhdGU+XG4gIGAsXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoXG59KVxuZXhwb3J0IGNsYXNzIEZvcm1seUZpZWxkVGV4dGFyZWEgZXh0ZW5kcyBGaWVsZFR5cGU8RmllbGRUeXBlQ29uZmlnPFRleHRhcmVhUHJvcHM+PiB7XG4gIG92ZXJyaWRlIGRlZmF1bHRPcHRpb25zID0ge1xuICAgIHByb3BzOiB7XG4gICAgICByb3dzOiA0LFxuICAgICAgYXV0b3NpemU6IGZhbHNlLFxuICAgICAgYm9yZGVybGVzczogZmFsc2VcbiAgICB9XG4gIH07XG59XG4iXX0=
|
@@ -59,10 +59,12 @@ FormlyWrapperTabs.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
59
59
|
[nzTitle]="tab.props?.label || ''"
|
60
60
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
61
61
|
[nzDisabled]="tab.props!['tab']?.disabled"
|
62
|
-
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click()"
|
63
|
-
(nzContextmenu)="
|
64
|
-
|
65
|
-
|
62
|
+
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
63
|
+
(nzContextmenu)="
|
64
|
+
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
65
|
+
"
|
66
|
+
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
67
|
+
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
66
68
|
>
|
67
69
|
<formly-field [field]="tab"></formly-field>
|
68
70
|
</nz-tab>
|
@@ -100,10 +102,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
100
102
|
[nzTitle]="tab.props?.label || ''"
|
101
103
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
102
104
|
[nzDisabled]="tab.props!['tab']?.disabled"
|
103
|
-
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click()"
|
104
|
-
(nzContextmenu)="
|
105
|
-
|
106
|
-
|
105
|
+
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
106
|
+
(nzContextmenu)="
|
107
|
+
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
108
|
+
"
|
109
|
+
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
110
|
+
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
107
111
|
>
|
108
112
|
<formly-field [field]="tab"></formly-field>
|
109
113
|
</nz-tab>
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-tabs.mjs","sources":["../../../../packages/formlyantd/tabs/src/tabs.wrapper.ts","../../../../packages/formlyantd/tabs/src/tabs.module.ts","../../../../packages/formlyantd/tabs/src/ngx-formly-zorro-antd-tabs.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';\n\nimport type { TabsProps } from './tabs.props';\n\nexport interface FormlyTabsWrapperConfig extends FormlyFieldConfig<TabsProps> {\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\n}\n\n@Component({\n selector: 'formly-wrapper-tabs',\n template: `<nz-tabset\n [(nzSelectedIndex)]=\"props['selectedIndex']\"\n [nzAnimated]=\"props['animated']!\"\n [nzSize]=\"props['size']!\"\n [nzTabBarExtraContent]=\"props['tabBarExtraContent']\"\n [nzTabBarStyle]=\"props['tabBarStyle'] ?? null\"\n [nzTabPosition]=\"props['tabPosition']!\"\n [nzType]=\"props['type']!\"\n [nzTabBarGutter]=\"props['tabBarGutter']\"\n [nzHideAll]=\"props['hideAll']!!\"\n [nzLinkRouter]=\"props['linkRouter']!!\"\n [nzLinkExact]=\"props['linkExact']!!\"\n [nzCanDeactivate]=\"props['canDeactivate'] ?? null\"\n [nzHideAdd]=\"props['hideAdd']!!\"\n [nzAddIcon]=\"props['addIcon']!\"\n (nzSelectedIndexChange)=\"\n props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)\n \"\n (nzSelectChange)=\"\n props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)\n \"\n (nzAdd)=\"props['onAdd'] && props['onAdd'](field)\"\n (nzClose)=\"props['onClose'] && props['onClose'](field, $event.index)\"\n >\n <nz-tab\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [nzTitle]=\"tab.props?.label || ''\"\n [nzForceRender]=\"tab.props!['tab']?.forceRender\"\n [nzDisabled]=\"tab.props!['tab']?.disabled\"\n (nzClick)=\"tab.props!['tab']?.click && tab.props!['tab']?.click()\"\n (nzContextmenu)=\"tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu($event)\"\n (nzSelect)=\"tab.props!['tab']?.select && tab.props!['tab']?.select()\"\n (nzDeselect)=\"tab.props!['tab']?.deselect && tab.props!['tab']?.deselect()\"\n >\n <formly-field [field]=\"tab\"></formly-field>\n </nz-tab>\n </nz-tabset>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyWrapperTabs extends FieldWrapper<FormlyFieldConfig<TabsProps>> {\n override defaultOptions = {\n props: {\n animated: true,\n size: 'default' as const,\n type: 'line' as const,\n tabPosition: 'top' as const,\n hideAll: false,\n linkRouter: false,\n linkExact: true,\n centered: false,\n hideAdd: false,\n tab: {\n forceRender: false,\n disabled: false\n }\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyWrapperTabs } from './tabs.wrapper';\nimport { NzTabsModule } from 'ng-zorro-antd/tabs';\n\n@NgModule({\n declarations: [FormlyWrapperTabs],\n imports: [\n CommonModule,\n\n NzTabsModule,\n\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'tabs',\n component: FormlyWrapperTabs\n }\n ]\n })\n ]\n})\nexport class FormlyNzTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-tabs.mjs","sources":["../../../../packages/formlyantd/tabs/src/tabs.wrapper.ts","../../../../packages/formlyantd/tabs/src/tabs.module.ts","../../../../packages/formlyantd/tabs/src/ngx-formly-zorro-antd-tabs.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';\n\nimport type { TabsProps } from './tabs.props';\n\nexport interface FormlyTabsWrapperConfig extends FormlyFieldConfig<TabsProps> {\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\n}\n\n@Component({\n selector: 'formly-wrapper-tabs',\n template: `<nz-tabset\n [(nzSelectedIndex)]=\"props['selectedIndex']\"\n [nzAnimated]=\"props['animated']!\"\n [nzSize]=\"props['size']!\"\n [nzTabBarExtraContent]=\"props['tabBarExtraContent']\"\n [nzTabBarStyle]=\"props['tabBarStyle'] ?? null\"\n [nzTabPosition]=\"props['tabPosition']!\"\n [nzType]=\"props['type']!\"\n [nzTabBarGutter]=\"props['tabBarGutter']\"\n [nzHideAll]=\"props['hideAll']!!\"\n [nzLinkRouter]=\"props['linkRouter']!!\"\n [nzLinkExact]=\"props['linkExact']!!\"\n [nzCanDeactivate]=\"props['canDeactivate'] ?? null\"\n [nzHideAdd]=\"props['hideAdd']!!\"\n [nzAddIcon]=\"props['addIcon']!\"\n (nzSelectedIndexChange)=\"\n props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)\n \"\n (nzSelectChange)=\"\n props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)\n \"\n (nzAdd)=\"props['onAdd'] && props['onAdd'](field)\"\n (nzClose)=\"props['onClose'] && props['onClose'](field, $event.index)\"\n >\n <nz-tab\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [nzTitle]=\"tab.props?.label || ''\"\n [nzForceRender]=\"tab.props!['tab']?.forceRender\"\n [nzDisabled]=\"tab.props!['tab']?.disabled\"\n (nzClick)=\"tab.props!['tab']?.click && tab.props!['tab']?.click(field)\"\n (nzContextmenu)=\"\n tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)\n \"\n (nzSelect)=\"tab.props!['tab']?.select && tab.props!['tab']?.select(field)\"\n (nzDeselect)=\"tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)\"\n >\n <formly-field [field]=\"tab\"></formly-field>\n </nz-tab>\n </nz-tabset>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyWrapperTabs extends FieldWrapper<FormlyFieldConfig<TabsProps>> {\n override defaultOptions = {\n props: {\n animated: true,\n size: 'default' as const,\n type: 'line' as const,\n tabPosition: 'top' as const,\n hideAll: false,\n linkRouter: false,\n linkExact: true,\n centered: false,\n hideAdd: false,\n tab: {\n forceRender: false,\n disabled: false\n }\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyWrapperTabs } from './tabs.wrapper';\nimport { NzTabsModule } from 'ng-zorro-antd/tabs';\n\n@NgModule({\n declarations: [FormlyWrapperTabs],\n imports: [\n CommonModule,\n\n NzTabsModule,\n\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'tabs',\n component: FormlyWrapperTabs\n }\n ]\n })\n ]\n})\nexport class FormlyNzTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAoDM,MAAO,iBAAkB,SAAQ,YAA0C,CAAA;AA3CjF,IAAA,WAAA,GAAA;;QA4CW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,IAAI,EAAE,MAAe;AACrB,gBAAA,WAAW,EAAE,KAAc;AAC3B,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,GAAG,EAAE;AACH,oBAAA,WAAW,EAAE,KAAK;AAClB,oBAAA,QAAQ,EAAE,KAAK;AAChB,iBAAA;AACF,aAAA;SACF,CAAC;KACH;;8GAlBY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAzClB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,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activeFormsModule } from '@angular/forms';
|
7
|
-
import * as
|
7
|
+
import * as i5 from '@ngx-formly/core';
|
8
8
|
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
9
9
|
import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
|
10
10
|
import * as i3 from 'ng-zorro-antd/input';
|
11
11
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
12
|
+
import * as i4 from 'ng-zorro-antd/icon';
|
13
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
12
14
|
|
13
15
|
class FormlyFieldTextarea extends FieldType {
|
14
16
|
constructor() {
|
@@ -24,23 +26,37 @@ class FormlyFieldTextarea extends FieldType {
|
|
24
26
|
}
|
25
27
|
FormlyFieldTextarea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
26
28
|
FormlyFieldTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
|
27
|
-
<
|
28
|
-
*
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
29
|
+
<ng-container [ngSwitch]="props.type">
|
30
|
+
<ng-container *ngSwitchCase="'count'">
|
31
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
32
|
+
<textarea
|
33
|
+
[formControl]="formControl"
|
34
|
+
[formlyAttributes]="field"
|
35
|
+
[ngClass]="props['className']"
|
36
|
+
[rows]="props.rows"
|
37
|
+
[cols]="props.cols"
|
38
|
+
nz-input
|
39
|
+
[nzBorderless]="props['borderless']!!"
|
40
|
+
[nzAutosize]="props['autosize']!!"
|
41
|
+
></textarea>
|
42
|
+
</nz-textarea-count>
|
43
|
+
</ng-container>
|
44
|
+
|
45
|
+
<ng-container *ngSwitchCase="'clear'">
|
46
|
+
<nz-input-group
|
47
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
48
|
+
[nzSuffix]="textAreaClearTpl"
|
49
|
+
>
|
50
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
51
|
+
</nz-input-group>
|
52
|
+
</ng-container>
|
53
|
+
|
54
|
+
<ng-container *ngSwitchDefault>
|
55
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
56
|
+
</ng-container>
|
57
|
+
</ng-container>
|
42
58
|
|
43
|
-
<ng-template #
|
59
|
+
<ng-template #textareaTpl>
|
44
60
|
<textarea
|
45
61
|
[formControl]="formControl"
|
46
62
|
[formlyAttributes]="field"
|
@@ -48,33 +64,59 @@ FormlyFieldTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
48
64
|
[rows]="props.rows"
|
49
65
|
[cols]="props.cols"
|
50
66
|
nz-input
|
51
|
-
[nzBorderless]="props['borderless']"
|
52
|
-
[nzAutosize]="props['autosize']
|
67
|
+
[nzBorderless]="props['borderless']!!"
|
68
|
+
[nzAutosize]="props['autosize']!!"
|
53
69
|
></textarea>
|
54
70
|
</ng-template>
|
55
|
-
|
71
|
+
|
72
|
+
<!-- 清除数据 -->
|
73
|
+
<ng-template #textAreaClearTpl>
|
74
|
+
<span
|
75
|
+
nz-icon
|
76
|
+
class="ant-input-clear-icon"
|
77
|
+
nzTheme="fill"
|
78
|
+
nzType="close-circle"
|
79
|
+
*ngIf="formControl.value"
|
80
|
+
(click)="formControl.reset()"
|
81
|
+
></span>
|
82
|
+
</ng-template>
|
83
|
+
`, isInline: true, 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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzTextareaCountComponent, selector: "nz-textarea-count", inputs: ["nzMaxCharacterCount", "nzComputeCharacterCount", "nzFormatter"] }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i3.NzAutosizeDirective, selector: "textarea[nzAutosize]", inputs: ["nzAutosize"], exportAs: ["nzAutosize"] }, { kind: "directive", type: i3.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "directive", type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i5.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
56
84
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldTextarea, decorators: [{
|
57
85
|
type: Component,
|
58
86
|
args: [{
|
59
87
|
selector: 'formly-field-textarea',
|
60
88
|
template: `
|
61
|
-
<
|
62
|
-
*
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
89
|
+
<ng-container [ngSwitch]="props.type">
|
90
|
+
<ng-container *ngSwitchCase="'count'">
|
91
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
92
|
+
<textarea
|
93
|
+
[formControl]="formControl"
|
94
|
+
[formlyAttributes]="field"
|
95
|
+
[ngClass]="props['className']"
|
96
|
+
[rows]="props.rows"
|
97
|
+
[cols]="props.cols"
|
98
|
+
nz-input
|
99
|
+
[nzBorderless]="props['borderless']!!"
|
100
|
+
[nzAutosize]="props['autosize']!!"
|
101
|
+
></textarea>
|
102
|
+
</nz-textarea-count>
|
103
|
+
</ng-container>
|
104
|
+
|
105
|
+
<ng-container *ngSwitchCase="'clear'">
|
106
|
+
<nz-input-group
|
107
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
108
|
+
[nzSuffix]="textAreaClearTpl"
|
109
|
+
>
|
110
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
111
|
+
</nz-input-group>
|
112
|
+
</ng-container>
|
113
|
+
|
114
|
+
<ng-container *ngSwitchDefault>
|
115
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
116
|
+
</ng-container>
|
117
|
+
</ng-container>
|
76
118
|
|
77
|
-
<ng-template #
|
119
|
+
<ng-template #textareaTpl>
|
78
120
|
<textarea
|
79
121
|
[formControl]="formControl"
|
80
122
|
[formlyAttributes]="field"
|
@@ -82,10 +124,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
82
124
|
[rows]="props.rows"
|
83
125
|
[cols]="props.cols"
|
84
126
|
nz-input
|
85
|
-
[nzBorderless]="props['borderless']"
|
86
|
-
[nzAutosize]="props['autosize']
|
127
|
+
[nzBorderless]="props['borderless']!!"
|
128
|
+
[nzAutosize]="props['autosize']!!"
|
87
129
|
></textarea>
|
88
130
|
</ng-template>
|
131
|
+
|
132
|
+
<!-- 清除数据 -->
|
133
|
+
<ng-template #textAreaClearTpl>
|
134
|
+
<span
|
135
|
+
nz-icon
|
136
|
+
class="ant-input-clear-icon"
|
137
|
+
nzTheme="fill"
|
138
|
+
nzType="close-circle"
|
139
|
+
*ngIf="formControl.value"
|
140
|
+
(click)="formControl.reset()"
|
141
|
+
></span>
|
142
|
+
</ng-template>
|
89
143
|
`,
|
90
144
|
changeDetection: ChangeDetectionStrategy.OnPush
|
91
145
|
}]
|
@@ -97,11 +151,13 @@ FormlyNzTextareaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
|
|
97
151
|
FormlyNzTextareaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzTextareaModule, declarations: [FormlyFieldTextarea], imports: [CommonModule,
|
98
152
|
ReactiveFormsModule,
|
99
153
|
FormlyNzFormFieldModule,
|
100
|
-
NzInputModule,
|
154
|
+
NzInputModule,
|
155
|
+
NzIconModule, i5.FormlyModule] });
|
101
156
|
FormlyNzTextareaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzTextareaModule, imports: [CommonModule,
|
102
157
|
ReactiveFormsModule,
|
103
158
|
FormlyNzFormFieldModule,
|
104
159
|
NzInputModule,
|
160
|
+
NzIconModule,
|
105
161
|
FormlyModule.forChild({
|
106
162
|
types: [
|
107
163
|
{
|
@@ -120,6 +176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
120
176
|
ReactiveFormsModule,
|
121
177
|
FormlyNzFormFieldModule,
|
122
178
|
NzInputModule,
|
179
|
+
NzIconModule,
|
123
180
|
FormlyModule.forChild({
|
124
181
|
types: [
|
125
182
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-textarea.mjs","sources":["../../../../packages/formlyantd/textarea/src/textarea.type.ts","../../../../packages/formlyantd/textarea/src/textarea.module.ts","../../../../packages/formlyantd/textarea/src/ngx-formly-zorro-antd-textarea.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\ninterface TextareaProps extends FormlyFieldProps {\n /**\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\n * @default false\n */\n autosize?: boolean | { minRows: number; maxRows: number };\n\n /**\n * 是否隐藏边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * textarea 数字提示显示的最大值\n */\n maxCharacterCount?: number;\n}\n\nexport interface FormlyTextareaFieldConfig extends FormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-textarea.mjs","sources":["../../../../packages/formlyantd/textarea/src/textarea.type.ts","../../../../packages/formlyantd/textarea/src/textarea.module.ts","../../../../packages/formlyantd/textarea/src/ngx-formly-zorro-antd-textarea.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\ninterface TextareaProps extends FormlyFieldProps {\n type?: 'count' | 'clear';\n\n /**\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\n * @default false\n */\n autosize?: boolean | { minRows: number; maxRows: number };\n\n /**\n * 是否隐藏边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * textarea 数字提示显示的最大值\n */\n maxCharacterCount?: number;\n}\n\nexport interface FormlyTextareaFieldConfig extends FormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-container [ngSwitch]=\"props.type\">\n <ng-container *ngSwitchCase=\"'count'\">\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [rows]=\"props.rows\"\n [cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </nz-textarea-count>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'clear'\">\n <nz-input-group\n class=\"ant-input-affix-wrapper-textarea-with-clear-btn\"\n [nzSuffix]=\"textAreaClearTpl\"\n >\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </nz-input-group>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #textareaTpl>\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [rows]=\"props.rows\"\n [cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </ng-template>\n\n <!-- 清除数据 -->\n <ng-template #textAreaClearTpl>\n <span\n nz-icon\n class=\"ant-input-clear-icon\"\n nzTheme=\"fill\"\n nzType=\"close-circle\"\n *ngIf=\"formControl.value\"\n (click)=\"formControl.reset()\"\n ></span>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTextarea extends FieldType<FieldTypeConfig<TextareaProps>> {\n override defaultOptions = {\n props: {\n rows: 4,\n autosize: false,\n borderless: false\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldTextarea } from './textarea.type';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@NgModule({\n declarations: [FormlyFieldTextarea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzInputModule,\n NzIconModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextarea,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AAyFM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA5DlF,IAAA,WAAA,GAAA;;QA6DW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,UAAU,EAAE,KAAK;AAClB,aAAA;SACF,CAAC;KACH;;gHARY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;A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AAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAjB/B,YAAY;QACZ,mBAAmB;QACnB,uBAAuB;QACvB,aAAa;QACb,YAAY;QAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,SAAS,EAAE,mBAAmB;oBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iBAAA;AACF,aAAA;SACF,CAAC,CAAA,EAAA,CAAA,CAAA;2FAGO,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBApBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,aAAa;wBACb,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC7BD;;AAEG;;;;"}
|
@@ -59,10 +59,12 @@ FormlyWrapperTabs.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
59
59
|
[nzTitle]="tab.props?.label || ''"
|
60
60
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
61
61
|
[nzDisabled]="tab.props!['tab']?.disabled"
|
62
|
-
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click()"
|
63
|
-
(nzContextmenu)="
|
64
|
-
|
65
|
-
|
62
|
+
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
63
|
+
(nzContextmenu)="
|
64
|
+
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
65
|
+
"
|
66
|
+
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
67
|
+
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
66
68
|
>
|
67
69
|
<formly-field [field]="tab"></formly-field>
|
68
70
|
</nz-tab>
|
@@ -100,10 +102,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
100
102
|
[nzTitle]="tab.props?.label || ''"
|
101
103
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
102
104
|
[nzDisabled]="tab.props!['tab']?.disabled"
|
103
|
-
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click()"
|
104
|
-
(nzContextmenu)="
|
105
|
-
|
106
|
-
|
105
|
+
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
106
|
+
(nzContextmenu)="
|
107
|
+
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
108
|
+
"
|
109
|
+
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
110
|
+
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
107
111
|
>
|
108
112
|
<formly-field [field]="tab"></formly-field>
|
109
113
|
</nz-tab>
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-tabs.mjs","sources":["../../../../packages/formlyantd/tabs/src/tabs.wrapper.ts","../../../../packages/formlyantd/tabs/src/tabs.module.ts","../../../../packages/formlyantd/tabs/src/ngx-formly-zorro-antd-tabs.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';\n\nimport type { TabsProps } from './tabs.props';\n\nexport interface FormlyTabsWrapperConfig extends FormlyFieldConfig<TabsProps> {\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\n}\n\n@Component({\n selector: 'formly-wrapper-tabs',\n template: `<nz-tabset\n [(nzSelectedIndex)]=\"props['selectedIndex']\"\n [nzAnimated]=\"props['animated']!\"\n [nzSize]=\"props['size']!\"\n [nzTabBarExtraContent]=\"props['tabBarExtraContent']\"\n [nzTabBarStyle]=\"props['tabBarStyle'] ?? null\"\n [nzTabPosition]=\"props['tabPosition']!\"\n [nzType]=\"props['type']!\"\n [nzTabBarGutter]=\"props['tabBarGutter']\"\n [nzHideAll]=\"props['hideAll']!!\"\n [nzLinkRouter]=\"props['linkRouter']!!\"\n [nzLinkExact]=\"props['linkExact']!!\"\n [nzCanDeactivate]=\"props['canDeactivate'] ?? null\"\n [nzHideAdd]=\"props['hideAdd']!!\"\n [nzAddIcon]=\"props['addIcon']!\"\n (nzSelectedIndexChange)=\"\n props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)\n \"\n (nzSelectChange)=\"\n props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)\n \"\n (nzAdd)=\"props['onAdd'] && props['onAdd'](field)\"\n (nzClose)=\"props['onClose'] && props['onClose'](field, $event.index)\"\n >\n <nz-tab\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [nzTitle]=\"tab.props?.label || ''\"\n [nzForceRender]=\"tab.props!['tab']?.forceRender\"\n [nzDisabled]=\"tab.props!['tab']?.disabled\"\n (nzClick)=\"tab.props!['tab']?.click && tab.props!['tab']?.click()\"\n (nzContextmenu)=\"tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu($event)\"\n (nzSelect)=\"tab.props!['tab']?.select && tab.props!['tab']?.select()\"\n (nzDeselect)=\"tab.props!['tab']?.deselect && tab.props!['tab']?.deselect()\"\n >\n <formly-field [field]=\"tab\"></formly-field>\n </nz-tab>\n </nz-tabset>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyWrapperTabs extends FieldWrapper<FormlyFieldConfig<TabsProps>> {\n override defaultOptions = {\n props: {\n animated: true,\n size: 'default' as const,\n type: 'line' as const,\n tabPosition: 'top' as const,\n hideAll: false,\n linkRouter: false,\n linkExact: true,\n centered: false,\n hideAdd: false,\n tab: {\n forceRender: false,\n disabled: false\n }\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyWrapperTabs } from './tabs.wrapper';\nimport { NzTabsModule } from 'ng-zorro-antd/tabs';\n\n@NgModule({\n declarations: [FormlyWrapperTabs],\n imports: [\n CommonModule,\n\n NzTabsModule,\n\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'tabs',\n component: FormlyWrapperTabs\n }\n ]\n })\n ]\n})\nexport class FormlyNzTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-tabs.mjs","sources":["../../../../packages/formlyantd/tabs/src/tabs.wrapper.ts","../../../../packages/formlyantd/tabs/src/tabs.module.ts","../../../../packages/formlyantd/tabs/src/ngx-formly-zorro-antd-tabs.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';\n\nimport type { TabsProps } from './tabs.props';\n\nexport interface FormlyTabsWrapperConfig extends FormlyFieldConfig<TabsProps> {\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\n}\n\n@Component({\n selector: 'formly-wrapper-tabs',\n template: `<nz-tabset\n [(nzSelectedIndex)]=\"props['selectedIndex']\"\n [nzAnimated]=\"props['animated']!\"\n [nzSize]=\"props['size']!\"\n [nzTabBarExtraContent]=\"props['tabBarExtraContent']\"\n [nzTabBarStyle]=\"props['tabBarStyle'] ?? null\"\n [nzTabPosition]=\"props['tabPosition']!\"\n [nzType]=\"props['type']!\"\n [nzTabBarGutter]=\"props['tabBarGutter']\"\n [nzHideAll]=\"props['hideAll']!!\"\n [nzLinkRouter]=\"props['linkRouter']!!\"\n [nzLinkExact]=\"props['linkExact']!!\"\n [nzCanDeactivate]=\"props['canDeactivate'] ?? null\"\n [nzHideAdd]=\"props['hideAdd']!!\"\n [nzAddIcon]=\"props['addIcon']!\"\n (nzSelectedIndexChange)=\"\n props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)\n \"\n (nzSelectChange)=\"\n props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)\n \"\n (nzAdd)=\"props['onAdd'] && props['onAdd'](field)\"\n (nzClose)=\"props['onClose'] && props['onClose'](field, $event.index)\"\n >\n <nz-tab\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [nzTitle]=\"tab.props?.label || ''\"\n [nzForceRender]=\"tab.props!['tab']?.forceRender\"\n [nzDisabled]=\"tab.props!['tab']?.disabled\"\n (nzClick)=\"tab.props!['tab']?.click && tab.props!['tab']?.click(field)\"\n (nzContextmenu)=\"\n tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)\n \"\n (nzSelect)=\"tab.props!['tab']?.select && tab.props!['tab']?.select(field)\"\n (nzDeselect)=\"tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)\"\n >\n <formly-field [field]=\"tab\"></formly-field>\n </nz-tab>\n </nz-tabset>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyWrapperTabs extends FieldWrapper<FormlyFieldConfig<TabsProps>> {\n override defaultOptions = {\n props: {\n animated: true,\n size: 'default' as const,\n type: 'line' as const,\n tabPosition: 'top' as const,\n hideAll: false,\n linkRouter: false,\n linkExact: true,\n centered: false,\n hideAdd: false,\n tab: {\n forceRender: false,\n disabled: false\n }\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyWrapperTabs } from './tabs.wrapper';\nimport { NzTabsModule } from 'ng-zorro-antd/tabs';\n\n@NgModule({\n declarations: [FormlyWrapperTabs],\n imports: [\n CommonModule,\n\n NzTabsModule,\n\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'tabs',\n component: FormlyWrapperTabs\n }\n ]\n })\n ]\n})\nexport class FormlyNzTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAoDM,MAAO,iBAAkB,SAAQ,YAA0C,CAAA;AA3CjF,IAAA,WAAA,GAAA;;AA4CW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,IAAI,EAAE,MAAe;AACrB,gBAAA,WAAW,EAAE,KAAc;AAC3B,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,GAAG,EAAE;AACH,oBAAA,WAAW,EAAE,KAAK;AAClB,oBAAA,QAAQ,EAAE,KAAK;AAChB,iBAAA;AACF,aAAA;SACF,CAAC;AACH,KAAA;;8GAlBY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAzClB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,E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
import { CommonModule } from '@angular/common';
|
5
5
|
import * as i2 from '@angular/forms';
|
6
6
|
import { ReactiveFormsModule } from '@angular/forms';
|
7
|
-
import * as
|
7
|
+
import * as i5 from '@ngx-formly/core';
|
8
8
|
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
9
9
|
import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
|
10
10
|
import * as i3 from 'ng-zorro-antd/input';
|
11
11
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
12
|
+
import * as i4 from 'ng-zorro-antd/icon';
|
13
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
12
14
|
|
13
15
|
class FormlyFieldTextarea extends FieldType {
|
14
16
|
constructor() {
|
@@ -24,23 +26,37 @@ class FormlyFieldTextarea extends FieldType {
|
|
24
26
|
}
|
25
27
|
FormlyFieldTextarea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
26
28
|
FormlyFieldTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
|
27
|
-
<
|
28
|
-
*
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
29
|
+
<ng-container [ngSwitch]="props.type">
|
30
|
+
<ng-container *ngSwitchCase="'count'">
|
31
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
32
|
+
<textarea
|
33
|
+
[formControl]="formControl"
|
34
|
+
[formlyAttributes]="field"
|
35
|
+
[ngClass]="props['className']"
|
36
|
+
[rows]="props.rows"
|
37
|
+
[cols]="props.cols"
|
38
|
+
nz-input
|
39
|
+
[nzBorderless]="props['borderless']!!"
|
40
|
+
[nzAutosize]="props['autosize']!!"
|
41
|
+
></textarea>
|
42
|
+
</nz-textarea-count>
|
43
|
+
</ng-container>
|
44
|
+
|
45
|
+
<ng-container *ngSwitchCase="'clear'">
|
46
|
+
<nz-input-group
|
47
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
48
|
+
[nzSuffix]="textAreaClearTpl"
|
49
|
+
>
|
50
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
51
|
+
</nz-input-group>
|
52
|
+
</ng-container>
|
53
|
+
|
54
|
+
<ng-container *ngSwitchDefault>
|
55
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
56
|
+
</ng-container>
|
57
|
+
</ng-container>
|
42
58
|
|
43
|
-
<ng-template #
|
59
|
+
<ng-template #textareaTpl>
|
44
60
|
<textarea
|
45
61
|
[formControl]="formControl"
|
46
62
|
[formlyAttributes]="field"
|
@@ -48,33 +64,59 @@ FormlyFieldTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
48
64
|
[rows]="props.rows"
|
49
65
|
[cols]="props.cols"
|
50
66
|
nz-input
|
51
|
-
[nzBorderless]="props['borderless']"
|
52
|
-
[nzAutosize]="props['autosize']
|
67
|
+
[nzBorderless]="props['borderless']!!"
|
68
|
+
[nzAutosize]="props['autosize']!!"
|
53
69
|
></textarea>
|
54
70
|
</ng-template>
|
55
|
-
|
71
|
+
|
72
|
+
<!-- 清除数据 -->
|
73
|
+
<ng-template #textAreaClearTpl>
|
74
|
+
<span
|
75
|
+
nz-icon
|
76
|
+
class="ant-input-clear-icon"
|
77
|
+
nzTheme="fill"
|
78
|
+
nzType="close-circle"
|
79
|
+
*ngIf="formControl.value"
|
80
|
+
(click)="formControl.reset()"
|
81
|
+
></span>
|
82
|
+
</ng-template>
|
83
|
+
`, isInline: true, 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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzTextareaCountComponent, selector: "nz-textarea-count", inputs: ["nzMaxCharacterCount", "nzComputeCharacterCount", "nzFormatter"] }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i3.NzAutosizeDirective, selector: "textarea[nzAutosize]", inputs: ["nzAutosize"], exportAs: ["nzAutosize"] }, { kind: "directive", type: i3.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "directive", type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i5.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
56
84
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldTextarea, decorators: [{
|
57
85
|
type: Component,
|
58
86
|
args: [{
|
59
87
|
selector: 'formly-field-textarea',
|
60
88
|
template: `
|
61
|
-
<
|
62
|
-
*
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
89
|
+
<ng-container [ngSwitch]="props.type">
|
90
|
+
<ng-container *ngSwitchCase="'count'">
|
91
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
92
|
+
<textarea
|
93
|
+
[formControl]="formControl"
|
94
|
+
[formlyAttributes]="field"
|
95
|
+
[ngClass]="props['className']"
|
96
|
+
[rows]="props.rows"
|
97
|
+
[cols]="props.cols"
|
98
|
+
nz-input
|
99
|
+
[nzBorderless]="props['borderless']!!"
|
100
|
+
[nzAutosize]="props['autosize']!!"
|
101
|
+
></textarea>
|
102
|
+
</nz-textarea-count>
|
103
|
+
</ng-container>
|
104
|
+
|
105
|
+
<ng-container *ngSwitchCase="'clear'">
|
106
|
+
<nz-input-group
|
107
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
108
|
+
[nzSuffix]="textAreaClearTpl"
|
109
|
+
>
|
110
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
111
|
+
</nz-input-group>
|
112
|
+
</ng-container>
|
113
|
+
|
114
|
+
<ng-container *ngSwitchDefault>
|
115
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
116
|
+
</ng-container>
|
117
|
+
</ng-container>
|
76
118
|
|
77
|
-
<ng-template #
|
119
|
+
<ng-template #textareaTpl>
|
78
120
|
<textarea
|
79
121
|
[formControl]="formControl"
|
80
122
|
[formlyAttributes]="field"
|
@@ -82,10 +124,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
82
124
|
[rows]="props.rows"
|
83
125
|
[cols]="props.cols"
|
84
126
|
nz-input
|
85
|
-
[nzBorderless]="props['borderless']"
|
86
|
-
[nzAutosize]="props['autosize']
|
127
|
+
[nzBorderless]="props['borderless']!!"
|
128
|
+
[nzAutosize]="props['autosize']!!"
|
87
129
|
></textarea>
|
88
130
|
</ng-template>
|
131
|
+
|
132
|
+
<!-- 清除数据 -->
|
133
|
+
<ng-template #textAreaClearTpl>
|
134
|
+
<span
|
135
|
+
nz-icon
|
136
|
+
class="ant-input-clear-icon"
|
137
|
+
nzTheme="fill"
|
138
|
+
nzType="close-circle"
|
139
|
+
*ngIf="formControl.value"
|
140
|
+
(click)="formControl.reset()"
|
141
|
+
></span>
|
142
|
+
</ng-template>
|
89
143
|
`,
|
90
144
|
changeDetection: ChangeDetectionStrategy.OnPush
|
91
145
|
}]
|
@@ -97,11 +151,13 @@ FormlyNzTextareaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
|
|
97
151
|
FormlyNzTextareaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzTextareaModule, declarations: [FormlyFieldTextarea], imports: [CommonModule,
|
98
152
|
ReactiveFormsModule,
|
99
153
|
FormlyNzFormFieldModule,
|
100
|
-
NzInputModule,
|
154
|
+
NzInputModule,
|
155
|
+
NzIconModule, i5.FormlyModule] });
|
101
156
|
FormlyNzTextareaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzTextareaModule, imports: [CommonModule,
|
102
157
|
ReactiveFormsModule,
|
103
158
|
FormlyNzFormFieldModule,
|
104
159
|
NzInputModule,
|
160
|
+
NzIconModule,
|
105
161
|
FormlyModule.forChild({
|
106
162
|
types: [
|
107
163
|
{
|
@@ -120,6 +176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
120
176
|
ReactiveFormsModule,
|
121
177
|
FormlyNzFormFieldModule,
|
122
178
|
NzInputModule,
|
179
|
+
NzIconModule,
|
123
180
|
FormlyModule.forChild({
|
124
181
|
types: [
|
125
182
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-textarea.mjs","sources":["../../../../packages/formlyantd/textarea/src/textarea.type.ts","../../../../packages/formlyantd/textarea/src/textarea.module.ts","../../../../packages/formlyantd/textarea/src/ngx-formly-zorro-antd-textarea.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\ninterface TextareaProps extends FormlyFieldProps {\n /**\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\n * @default false\n */\n autosize?: boolean | { minRows: number; maxRows: number };\n\n /**\n * 是否隐藏边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * textarea 数字提示显示的最大值\n */\n maxCharacterCount?: number;\n}\n\nexport interface FormlyTextareaFieldConfig extends FormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-textarea.mjs","sources":["../../../../packages/formlyantd/textarea/src/textarea.type.ts","../../../../packages/formlyantd/textarea/src/textarea.module.ts","../../../../packages/formlyantd/textarea/src/ngx-formly-zorro-antd-textarea.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\ninterface TextareaProps extends FormlyFieldProps {\n type?: 'count' | 'clear';\n\n /**\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\n * @default false\n */\n autosize?: boolean | { minRows: number; maxRows: number };\n\n /**\n * 是否隐藏边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * textarea 数字提示显示的最大值\n */\n maxCharacterCount?: number;\n}\n\nexport interface FormlyTextareaFieldConfig extends FormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-container [ngSwitch]=\"props.type\">\n <ng-container *ngSwitchCase=\"'count'\">\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [rows]=\"props.rows\"\n [cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </nz-textarea-count>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'clear'\">\n <nz-input-group\n class=\"ant-input-affix-wrapper-textarea-with-clear-btn\"\n [nzSuffix]=\"textAreaClearTpl\"\n >\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </nz-input-group>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #textareaTpl>\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [rows]=\"props.rows\"\n [cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </ng-template>\n\n <!-- 清除数据 -->\n <ng-template #textAreaClearTpl>\n <span\n nz-icon\n class=\"ant-input-clear-icon\"\n nzTheme=\"fill\"\n nzType=\"close-circle\"\n *ngIf=\"formControl.value\"\n (click)=\"formControl.reset()\"\n ></span>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTextarea extends FieldType<FieldTypeConfig<TextareaProps>> {\n override defaultOptions = {\n props: {\n rows: 4,\n autosize: false,\n borderless: false\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldTextarea } from './textarea.type';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@NgModule({\n declarations: [FormlyFieldTextarea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzInputModule,\n NzIconModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextarea,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AAyFM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA5DlF,IAAA,WAAA,GAAA;;AA6DW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,UAAU,EAAE,KAAK;AAClB,aAAA;SACF,CAAC;AACH,KAAA;;gHARY,mBAAmB,EAAA,IAAA,EA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;AAaH,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAjB/B,YAAY;QACZ,mBAAmB;QACnB,uBAAuB;QACvB,aAAa;QACb,YAAY;QAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,SAAS,EAAE,mBAAmB;oBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iBAAA;AACF,aAAA;SACF,CAAC,CAAA,EAAA,CAAA,CAAA;2FAGO,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBApBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,aAAa;wBACb,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ngx-formly-zorro-antd",
|
3
|
-
"version": "14.2.
|
3
|
+
"version": "14.2.2",
|
4
4
|
"publishConfig": {
|
5
5
|
"registry": "https://registry.npmjs.org",
|
6
6
|
"access": "public"
|
@@ -11,8 +11,8 @@
|
|
11
11
|
"@angular/common": "^14.1.0",
|
12
12
|
"@angular/forms": "^14.1.0",
|
13
13
|
"@angular/platform-browser": "^14.1.0",
|
14
|
-
"ng-zorro-antd": "^14.
|
15
|
-
"@ngx-formly/core": "
|
14
|
+
"ng-zorro-antd": "^14.2.0",
|
15
|
+
"@ngx-formly/core": "^6.0.4",
|
16
16
|
"rxjs": ">=7.0.1"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
package/tabs/tabs.props.d.ts
CHANGED
@@ -109,18 +109,18 @@ export interface TabsProps {
|
|
109
109
|
/**
|
110
110
|
* 单击 title 的回调函数
|
111
111
|
*/
|
112
|
-
click?: () => void;
|
112
|
+
click?: (field: FormlyFieldConfig) => void;
|
113
113
|
/**
|
114
114
|
* 右键 title 的回调函数
|
115
115
|
*/
|
116
|
-
contextmenu?: (event: MouseEvent) => void;
|
116
|
+
contextmenu?: (field: FormlyFieldConfig, event: MouseEvent) => void;
|
117
117
|
/**
|
118
118
|
* tab 被选中的回调函数
|
119
119
|
*/
|
120
|
-
select?: () => void;
|
120
|
+
select?: (field: FormlyFieldConfig) => void;
|
121
121
|
/**
|
122
122
|
* tab 被取消选中的回调函数
|
123
123
|
*/
|
124
|
-
deselect?: () => void;
|
124
|
+
deselect?: (field: FormlyFieldConfig) => void;
|
125
125
|
};
|
126
126
|
}
|
@@ -4,9 +4,10 @@ import * as i2 from "@angular/common";
|
|
4
4
|
import * as i3 from "@angular/forms";
|
5
5
|
import * as i4 from "ngx-formly-zorro-antd/form-field";
|
6
6
|
import * as i5 from "ng-zorro-antd/input";
|
7
|
-
import * as i6 from "
|
7
|
+
import * as i6 from "ng-zorro-antd/icon";
|
8
|
+
import * as i7 from "@ngx-formly/core";
|
8
9
|
export declare class FormlyNzTextareaModule {
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyNzTextareaModule, never>;
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyNzTextareaModule, [typeof i1.FormlyFieldTextarea], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.FormlyNzFormFieldModule, typeof i5.NzInputModule, typeof i6.FormlyModule], never>;
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyNzTextareaModule, [typeof i1.FormlyFieldTextarea], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.FormlyNzFormFieldModule, typeof i5.NzInputModule, typeof i6.NzIconModule, typeof i7.FormlyModule], never>;
|
11
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormlyNzTextareaModule>;
|
12
13
|
}
|
@@ -3,6 +3,7 @@ import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core'
|
|
3
3
|
import type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
interface TextareaProps extends FormlyFieldProps {
|
6
|
+
type?: 'count' | 'clear';
|
6
7
|
/**
|
7
8
|
* 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }
|
8
9
|
* @default false
|
@@ -24,7 +25,7 @@ interface TextareaProps extends FormlyFieldProps {
|
|
24
25
|
export interface FormlyTextareaFieldConfig extends FormlyFieldConfig<TextareaProps> {
|
25
26
|
type: 'textarea' | Type<FormlyFieldTextarea>;
|
26
27
|
}
|
27
|
-
export declare class FormlyFieldTextarea extends FieldType<FieldTypeConfig
|
28
|
+
export declare class FormlyFieldTextarea extends FieldType<FieldTypeConfig<TextareaProps>> {
|
28
29
|
defaultOptions: {
|
29
30
|
props: {
|
30
31
|
rows: number;
|