ngx-formly-zorro-antd 17.4.3 → 18.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cascader/cascader.type.d.ts +1 -0
- package/datepicker/datepicker.props.d.ts +26 -20
- package/esm2022/button/button.module.mjs +5 -5
- package/esm2022/button/button.type.mjs +4 -4
- package/esm2022/button-group/button-group.module.mjs +5 -5
- package/esm2022/button-group/button-group.type.mjs +8 -8
- package/esm2022/card/card.module.mjs +5 -5
- package/esm2022/card/card.type.mjs +4 -4
- package/esm2022/card-wrapper/card-wrapper.module.mjs +5 -5
- package/esm2022/card-wrapper/card.wrapper.mjs +4 -4
- package/esm2022/cascader/cascader.module.mjs +5 -5
- package/esm2022/cascader/cascader.type.mjs +5 -4
- package/esm2022/checkbox/checkbox.module.mjs +5 -5
- package/esm2022/checkbox/checkbox.type.mjs +4 -4
- package/esm2022/common/common.module.mjs +5 -5
- package/esm2022/common/formly-box-templates.directive.mjs +4 -4
- package/esm2022/common/formly-utils.mjs +1 -1
- package/esm2022/datepicker/datepicker.module.mjs +5 -5
- package/esm2022/datepicker/datepicker.props.mjs +1 -1
- package/esm2022/datepicker/datepicker.type.mjs +9 -5
- package/esm2022/extension/value-changes-extension.mjs +1 -1
- package/esm2022/flex/flex.module.mjs +5 -5
- package/esm2022/flex/flex.type.mjs +4 -4
- package/esm2022/form-field/form-field.module.mjs +5 -5
- package/esm2022/form-field/form-field.props.mjs +1 -1
- package/esm2022/form-field/form-field.wrapper.mjs +6 -6
- package/esm2022/grid/grid.module.mjs +5 -5
- package/esm2022/grid/grid.type.mjs +4 -4
- package/esm2022/input/input.module.mjs +5 -5
- package/esm2022/input/input.type.mjs +4 -4
- package/esm2022/input-group/input-group.module.mjs +5 -5
- package/esm2022/input-group/input-group.type.mjs +4 -4
- package/esm2022/input-number/input-number.module.mjs +5 -5
- package/esm2022/input-number/input-number.type.mjs +4 -4
- package/esm2022/lib/ui-ng-zorro-antd.module.mjs +5 -5
- package/esm2022/radio/radio.module.mjs +5 -5
- package/esm2022/radio/radio.type.mjs +4 -4
- package/esm2022/rate/rate.module.mjs +5 -5
- package/esm2022/rate/rate.type.mjs +4 -4
- package/esm2022/ref-template/ref-template.module.mjs +5 -5
- package/esm2022/ref-template/ref-template.type.mjs +4 -4
- package/esm2022/select/select.module.mjs +5 -5
- package/esm2022/select/select.type.mjs +4 -4
- package/esm2022/slider/slider.module.mjs +5 -5
- package/esm2022/slider/slider.type.mjs +4 -4
- package/esm2022/space/space.module.mjs +5 -5
- package/esm2022/space/space.type.mjs +4 -4
- package/esm2022/switch/switch.module.mjs +5 -5
- package/esm2022/switch/switch.type.mjs +4 -4
- package/esm2022/tabs/tabs.module.mjs +5 -5
- package/esm2022/tabs/tabs.props.mjs +1 -1
- package/esm2022/tabs/tabs.wrapper.mjs +18 -11
- package/esm2022/text-value/text-value.module.mjs +5 -5
- package/esm2022/text-value/text-value.type.mjs +4 -4
- package/esm2022/textarea/textarea.module.mjs +5 -5
- package/esm2022/textarea/textarea.type.mjs +4 -4
- package/esm2022/timepicker/timepicker.module.mjs +5 -5
- package/esm2022/timepicker/timepicker.type.mjs +4 -4
- package/esm2022/transfer/transfer.component.mjs +4 -4
- package/esm2022/transfer/transfer.module.mjs +5 -5
- package/esm2022/transfer/transfer.type.mjs +5 -4
- package/esm2022/tree-select/tree-select.module.mjs +5 -5
- package/esm2022/tree-select/tree-select.type.mjs +9 -6
- package/esm2022/upload/upload.component.mjs +4 -4
- package/esm2022/upload/upload.module.mjs +5 -5
- package/esm2022/upload/upload.type.mjs +4 -4
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs +11 -11
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-button.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-card.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +8 -7
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-common.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +12 -8
- package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-extension.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-flex.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-flex.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +9 -9
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-grid.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input-group.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input-number.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-select.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-space.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-switch.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-tabs.mjs +21 -14
- package/fesm2022/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-text-value.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-text-value.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +7 -7
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs +11 -10
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +12 -9
- package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-upload.mjs +10 -10
- package/fesm2022/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd.mjs +4 -4
- package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
- package/form-field/form-field.props.d.ts +5 -0
- package/package.json +20 -20
- package/tabs/tabs.props.d.ts +46 -32
- package/tabs/tabs.wrapper.d.ts +1 -0
- package/timepicker/timepicker.type.d.ts +2 -1
- package/transfer/transfer.type.d.ts +1 -0
- package/tree-select/tree-select.type.d.ts +3 -1
@@ -29,8 +29,8 @@ class FormlyFieldSlider extends FieldType {
|
|
29
29
|
}
|
30
30
|
};
|
31
31
|
}
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldSlider, selector: "formly-field-slider", usesInheritance: true, ngImport: i0, template: `<nz-slider
|
34
34
|
#slider
|
35
35
|
[formControl]="formControl"
|
36
36
|
[nzDots]="!!props['dots']"
|
@@ -47,7 +47,7 @@ class FormlyFieldSlider extends FieldType {
|
|
47
47
|
(nzOnAfterChange)="props['afterChange']?.(field, $event)"
|
48
48
|
></nz-slider>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzSliderComponent, selector: "nz-slider", inputs: ["nzDisabled", "nzDots", "nzIncluded", "nzRange", "nzVertical", "nzReverse", "nzDefaultValue", "nzMarks", "nzMax", "nzMin", "nzStep", "nzTooltipVisible", "nzTooltipPlacement", "nzTipFormatter"], outputs: ["nzOnAfterChange"], exportAs: ["nzSlider"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
49
49
|
}
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldSlider, decorators: [{
|
51
51
|
type: Component,
|
52
52
|
args: [{
|
53
53
|
selector: 'formly-field-slider',
|
@@ -72,12 +72,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
72
72
|
}] });
|
73
73
|
|
74
74
|
class FormlyNzSliderModule {
|
75
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
76
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
76
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
|
77
77
|
ReactiveFormsModule,
|
78
78
|
FormlyNzFormFieldModule,
|
79
79
|
NzSliderModule, i1$1.FormlyModule] }); }
|
80
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
80
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSliderModule, imports: [CommonModule,
|
81
81
|
ReactiveFormsModule,
|
82
82
|
FormlyNzFormFieldModule,
|
83
83
|
NzSliderModule,
|
@@ -91,7 +91,7 @@ class FormlyNzSliderModule {
|
|
91
91
|
]
|
92
92
|
})] }); }
|
93
93
|
}
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSliderModule, decorators: [{
|
95
95
|
type: NgModule,
|
96
96
|
args: [{
|
97
97
|
declarations: [FormlyFieldSlider],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-slider.mjs","sources":["../../../../packages/formlyantd/slider/src/slider.type.ts","../../../../packages/formlyantd/slider/src/slider.module.ts","../../../../packages/formlyantd/slider/src/ngx-formly-zorro-antd-slider.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig, FormlyAttributeEvent } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzSliderShowTooltip } from 'ng-zorro-antd/slider';\n\n/**\n * @publicApi\n */\nexport interface SlideProps extends FormlyFieldProps {\n /**\n * 是否只能拖拽到刻度上\n * @default false\n */\n dots?: boolean;\n\n /**\n * marks 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列\n * @default true\n */\n included?: boolean;\n\n /**\n * 刻度标记,key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式\n * @default\n * { number: string/HTML } or { number: { style: object, label: string/HTML } }\n */\n marks?: object;\n\n /**\n * 双滑块模式\n * @default false\n */\n range?: boolean;\n\n /**\n * Slider 会把当前值传给 nzTipFormatter,并在 Tooltip 中显示 nzTipFormatter 的返回值,若为 null,则隐藏 Tooltip。\n */\n tipFormatter?: (value: number) => string;\n\n /**\n * 值为 true 时,Slider 为垂直方向\n * @default false\n */\n vertical?: boolean;\n\n /**\n * 反向坐标轴\n * @default false\n */\n reverse?: boolean;\n\n /**\n * 值为 always 时总是显示,值为 never 时在任何情况下都不显示\n * @default default\n */\n tooltipVisible?: NzSliderShowTooltip;\n\n /**\n * 设置 Tooltip 的默认位置。\n */\n tooltipPlacement?: string;\n\n /**\n * 与 onmouseup 触发时机一致,把当前值作为参数传入。\n */\n afterChange?: FormlyAttributeEvent<number[] | number>;\n}\n\nexport interface FormlySlideFieldConfig extends NzFormlyFieldConfig<SlideProps> {\n type: 'slider' | Type<FormlyFieldSlider>;\n}\n/**\n * @private\n */\n@Component({\n selector: 'formly-field-slider',\n template: `<nz-slider\n #slider\n [formControl]=\"formControl\"\n [nzDots]=\"!!props['dots']\"\n [nzIncluded]=\"!!props['included']\"\n [nzMax]=\"props.max\"\n [nzMin]=\"props.min\"\n [nzRange]=\"!!props['range']\"\n [nzStep]=\"props.step\"\n [nzTipFormatter]=\"props['tipFormatter']\"\n [nzVertical]=\"!!props['vertical']\"\n [nzReverse]=\"!!props['reverse']\"\n [nzTooltipVisible]=\"props['tooltipVisible']!\"\n (ngModelChange)=\"props.change?.(field, $event)\"\n (nzOnAfterChange)=\"props['afterChange']?.(field, $event)\"\n ></nz-slider>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SlideProps>> {\n override defaultOptions = {\n props: {\n max: 100,\n min: 0,\n step: 1,\n dots: false,\n included: true,\n range: false,\n vertical: false,\n reverse: false,\n tooltipVisible: 'default' as const\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 { FormlyFieldSlider } from './slider.type';\nimport { NzSliderModule } from 'ng-zorro-antd/slider';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzSliderModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAwEA;;AAEG;AAqBG,MAAO,iBAAkB,SAAQ,SAAsC,CAAA;AApB7E,IAAA,WAAA,GAAA;;AAqBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,GAAG;AACR,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,SAAkB;AACnC,aAAA;SACF,CAAC;AACH,KAAA
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-slider.mjs","sources":["../../../../packages/formlyantd/slider/src/slider.type.ts","../../../../packages/formlyantd/slider/src/slider.module.ts","../../../../packages/formlyantd/slider/src/ngx-formly-zorro-antd-slider.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig, FormlyAttributeEvent } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzSliderShowTooltip } from 'ng-zorro-antd/slider';\n\n/**\n * @publicApi\n */\nexport interface SlideProps extends FormlyFieldProps {\n /**\n * 是否只能拖拽到刻度上\n * @default false\n */\n dots?: boolean;\n\n /**\n * marks 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列\n * @default true\n */\n included?: boolean;\n\n /**\n * 刻度标记,key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式\n * @default\n * { number: string/HTML } or { number: { style: object, label: string/HTML } }\n */\n marks?: object;\n\n /**\n * 双滑块模式\n * @default false\n */\n range?: boolean;\n\n /**\n * Slider 会把当前值传给 nzTipFormatter,并在 Tooltip 中显示 nzTipFormatter 的返回值,若为 null,则隐藏 Tooltip。\n */\n tipFormatter?: (value: number) => string;\n\n /**\n * 值为 true 时,Slider 为垂直方向\n * @default false\n */\n vertical?: boolean;\n\n /**\n * 反向坐标轴\n * @default false\n */\n reverse?: boolean;\n\n /**\n * 值为 always 时总是显示,值为 never 时在任何情况下都不显示\n * @default default\n */\n tooltipVisible?: NzSliderShowTooltip;\n\n /**\n * 设置 Tooltip 的默认位置。\n */\n tooltipPlacement?: string;\n\n /**\n * 与 onmouseup 触发时机一致,把当前值作为参数传入。\n */\n afterChange?: FormlyAttributeEvent<number[] | number>;\n}\n\nexport interface FormlySlideFieldConfig extends NzFormlyFieldConfig<SlideProps> {\n type: 'slider' | Type<FormlyFieldSlider>;\n}\n/**\n * @private\n */\n@Component({\n selector: 'formly-field-slider',\n template: `<nz-slider\n #slider\n [formControl]=\"formControl\"\n [nzDots]=\"!!props['dots']\"\n [nzIncluded]=\"!!props['included']\"\n [nzMax]=\"props.max\"\n [nzMin]=\"props.min\"\n [nzRange]=\"!!props['range']\"\n [nzStep]=\"props.step\"\n [nzTipFormatter]=\"props['tipFormatter']\"\n [nzVertical]=\"!!props['vertical']\"\n [nzReverse]=\"!!props['reverse']\"\n [nzTooltipVisible]=\"props['tooltipVisible']!\"\n (ngModelChange)=\"props.change?.(field, $event)\"\n (nzOnAfterChange)=\"props['afterChange']?.(field, $event)\"\n ></nz-slider>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SlideProps>> {\n override defaultOptions = {\n props: {\n max: 100,\n min: 0,\n step: 1,\n dots: false,\n included: true,\n range: false,\n vertical: false,\n reverse: false,\n tooltipVisible: 'default' as const\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 { FormlyFieldSlider } from './slider.type';\nimport { NzSliderModule } from 'ng-zorro-antd/slider';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzSliderModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAwEA;;AAEG;AAqBG,MAAO,iBAAkB,SAAQ,SAAsC,CAAA;AApB7E,IAAA,WAAA,GAAA;;AAqBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,GAAG;AACR,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,SAAkB;AACnC,aAAA;SACF,CAAC;AACH,KAAA;+GAdY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,EAlBlB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;AAeI,eAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,E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A,EAAA;AAaL,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAhB7B,YAAY;YACZ,mBAAmB;YACnB,uBAAuB;YACvB,cAAc;YAEd,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGO,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAnBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBAEd,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
@@ -24,8 +24,8 @@ class FormlyFieldSpace extends FieldType {
|
|
24
24
|
get nzSplit() {
|
25
25
|
return resolveTplName(this.props, this.fieldTemplates, 'split');
|
26
26
|
}
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldSpace, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldSpace, selector: "formly-field-space", usesInheritance: true, ngImport: i0, template: `
|
29
29
|
<nz-space
|
30
30
|
[nzSize]="props.size!"
|
31
31
|
[nzAlign]="props.align"
|
@@ -39,7 +39,7 @@ class FormlyFieldSpace extends FieldType {
|
|
39
39
|
</nz-space>
|
40
40
|
`, isInline: true, dependencies: [{ kind: "component", type: i2.NzSpaceComponent, selector: "nz-space, [nz-space]", inputs: ["nzDirection", "nzAlign", "nzSplit", "nzWrap", "nzSize"], exportAs: ["NzSpace"] }, { kind: "directive", type: i2.NzSpaceItemDirective, selector: "[nzSpaceItem]" }, { kind: "component", type: i3.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
41
41
|
}
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldSpace, decorators: [{
|
43
43
|
type: Component,
|
44
44
|
args: [{
|
45
45
|
selector: 'formly-field-space',
|
@@ -63,10 +63,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
63
63
|
}] }] });
|
64
64
|
|
65
65
|
class FormlyNzSpaceModule {
|
66
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
67
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
66
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSpaceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
67
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSpaceModule, declarations: [FormlyFieldSpace], imports: [CommonModule,
|
68
68
|
NzSpaceModule, i3.FormlyModule] }); }
|
69
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
69
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSpaceModule, imports: [CommonModule,
|
70
70
|
NzSpaceModule,
|
71
71
|
FormlyModule.forChild({
|
72
72
|
types: [
|
@@ -77,7 +77,7 @@ class FormlyNzSpaceModule {
|
|
77
77
|
]
|
78
78
|
})] }); }
|
79
79
|
}
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSpaceModule, decorators: [{
|
81
81
|
type: NgModule,
|
82
82
|
args: [{
|
83
83
|
declarations: [FormlyFieldSpace],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\n\n/**\n * @publicApi\n */\nexport interface SpaceProps extends FormlyFieldProps {\n /**\n * 间距大小\n * @default small\n */\n size?: NzSpaceSize;\n /**\n * 间距方向\n * @default horizontal\n */\n direction?: NzSpaceDirection;\n /**\n * 对齐方式\n */\n align?: NzSpaceAlign;\n /**\n * 是否自动换行,仅在 horizontal 时有效\n */\n wrap?: boolean;\n /**\n * 设置分隔符\n */\n split?: TemplateRef<{\n $implicit: number;\n }> | null;\n splitName?: string;\n}\n\nexport interface FormlySpaceFieldConfig extends NzFormlyFieldConfig<SpaceProps> {\n type: 'space' | Type<FormlyFieldSpace>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-space',\n template: `\n <nz-space\n [nzSize]=\"props.size!\"\n [nzAlign]=\"props.align\"\n [nzDirection]=\"props.direction!\"\n [nzSplit]=\"nzSplit ?? null\"\n [nzWrap]=\"!!props.wrap\"\n >\n @for (g of field.fieldGroup; track g.id) {\n <formly-field *nzSpaceItem [field]=\"g\"></formly-field>\n }\n </nz-space>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSpace extends FieldType<FieldTypeConfig<SpaceProps>> {\n override defaultOptions = {\n props: {\n size: 'small' as const,\n direction: 'horizontal' as const,\n wrap: false\n }\n };\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n get nzSplit() {\n return resolveTplName(this.props, this.fieldTemplates, 'split');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldSpace } from './space.type';\n\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\n\n@NgModule({\n declarations: [FormlyFieldSpace],\n imports: [\n CommonModule,\n NzSpaceModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'space',\n component: FormlyFieldSpace\n }\n ]\n })\n ]\n})\nexport class FormlyNzSpaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAyCA;AAkBM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAQ1E,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAPxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,OAAgB;AACtB,gBAAA,SAAS,EAAE,YAAqB;AAChC,gBAAA,IAAI,EAAE,KAAK;AACZ,aAAA;SACF,CAAC;KAGD;AACD,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACjE
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\n\n/**\n * @publicApi\n */\nexport interface SpaceProps extends FormlyFieldProps {\n /**\n * 间距大小\n * @default small\n */\n size?: NzSpaceSize;\n /**\n * 间距方向\n * @default horizontal\n */\n direction?: NzSpaceDirection;\n /**\n * 对齐方式\n */\n align?: NzSpaceAlign;\n /**\n * 是否自动换行,仅在 horizontal 时有效\n */\n wrap?: boolean;\n /**\n * 设置分隔符\n */\n split?: TemplateRef<{\n $implicit: number;\n }> | null;\n splitName?: string;\n}\n\nexport interface FormlySpaceFieldConfig extends NzFormlyFieldConfig<SpaceProps> {\n type: 'space' | Type<FormlyFieldSpace>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-space',\n template: `\n <nz-space\n [nzSize]=\"props.size!\"\n [nzAlign]=\"props.align\"\n [nzDirection]=\"props.direction!\"\n [nzSplit]=\"nzSplit ?? null\"\n [nzWrap]=\"!!props.wrap\"\n >\n @for (g of field.fieldGroup; track g.id) {\n <formly-field *nzSpaceItem [field]=\"g\"></formly-field>\n }\n </nz-space>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSpace extends FieldType<FieldTypeConfig<SpaceProps>> {\n override defaultOptions = {\n props: {\n size: 'small' as const,\n direction: 'horizontal' as const,\n wrap: false\n }\n };\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n get nzSplit() {\n return resolveTplName(this.props, this.fieldTemplates, 'split');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldSpace } from './space.type';\n\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\n\n@NgModule({\n declarations: [FormlyFieldSpace],\n imports: [\n CommonModule,\n NzSpaceModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'space',\n component: FormlyFieldSpace\n }\n ]\n })\n ]\n})\nexport class FormlyNzSpaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAyCA;AAkBM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAQ1E,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAPxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,OAAgB;AACtB,gBAAA,SAAS,EAAE,YAAqB;A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AAC5B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
@@ -21,8 +21,8 @@ class FormlyFieldSwitch extends FieldType {
|
|
21
21
|
}
|
22
22
|
};
|
23
23
|
}
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldSwitch, selector: "formly-field-switch", usesInheritance: true, ngImport: i0, template: `
|
26
26
|
<nz-switch
|
27
27
|
[formControl]="formControl"
|
28
28
|
[nzId]="id"
|
@@ -35,7 +35,7 @@ class FormlyFieldSwitch extends FieldType {
|
|
35
35
|
></nz-switch>
|
36
36
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
37
37
|
}
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldSwitch, decorators: [{
|
39
39
|
type: Component,
|
40
40
|
args: [{
|
41
41
|
selector: 'formly-field-switch',
|
@@ -56,12 +56,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
56
56
|
}] });
|
57
57
|
|
58
58
|
class FormlyNzSwitchModule {
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
60
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
60
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSwitchModule, declarations: [FormlyFieldSwitch], imports: [CommonModule,
|
61
61
|
ReactiveFormsModule,
|
62
62
|
FormlyNzFormFieldModule,
|
63
63
|
NzSwitchModule, i1$1.FormlyModule] }); }
|
64
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
64
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSwitchModule, imports: [CommonModule,
|
65
65
|
ReactiveFormsModule,
|
66
66
|
FormlyNzFormFieldModule,
|
67
67
|
NzSwitchModule,
|
@@ -75,7 +75,7 @@ class FormlyNzSwitchModule {
|
|
75
75
|
]
|
76
76
|
})] }); }
|
77
77
|
}
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzSwitchModule, decorators: [{
|
79
79
|
type: NgModule,
|
80
80
|
args: [{
|
81
81
|
declarations: [FormlyFieldSwitch],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-switch.mjs","sources":["../../../../packages/formlyantd/switch/src/switch.type.ts","../../../../packages/formlyantd/switch/src/switch.module.ts","../../../../packages/formlyantd/switch/src/ngx-formly-zorro-antd-switch.ts"],"sourcesContent":["import { Component, Type, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { NzSizeDSType } from 'ng-zorro-antd/core/types';\n\n/**\n * @publicApi\n */\nexport interface SwitchProps extends FormlyFieldProps {\n /**\n * 选中时的内容\n */\n checkedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 非选中时的内容\n */\n unCheckedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 开关大小\n */\n size?: NzSizeDSType;\n\n /**\n * 加载中的开关\n * @default false\n */\n loading?: boolean;\n\n /**\n * 是否完全由用户控制状态\n * @default false\n */\n control?: boolean;\n}\n\nexport interface FormlySwitchFieldConfig extends NzFormlyFieldConfig<SwitchProps> {\n type: 'switch' | Type<FormlyFieldSwitch>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-switch',\n template: `\n <nz-switch\n [formControl]=\"formControl\"\n [nzId]=\"id\"\n [nzCheckedChildren]=\"props['checkedChildren'] ?? null\"\n [nzUnCheckedChildren]=\"props['unCheckedChildren'] ?? null\"\n [nzSize]=\"props['size']!\"\n [nzLoading]=\"!!props['loading']\"\n [nzControl]=\"!!props['control']\"\n (ngModelChange)=\"props.change?.(field, $event)\"\n ></nz-switch>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSwitch extends FieldType<FieldTypeConfig<SwitchProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n loading: false,\n control: false\n }\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 { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldSwitch } from './switch.type';\n\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\n\n@NgModule({\n declarations: [FormlyFieldSwitch],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n\n NzSwitchModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'switch',\n component: FormlyFieldSwitch,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA0CA;AAiBM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAhB9E,IAAA,WAAA,GAAA;;AAiBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,KAAK;AACf,aAAA;SACF,CAAC;AACH,KAAA
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-switch.mjs","sources":["../../../../packages/formlyantd/switch/src/switch.type.ts","../../../../packages/formlyantd/switch/src/switch.module.ts","../../../../packages/formlyantd/switch/src/ngx-formly-zorro-antd-switch.ts"],"sourcesContent":["import { Component, Type, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { NzSizeDSType } from 'ng-zorro-antd/core/types';\n\n/**\n * @publicApi\n */\nexport interface SwitchProps extends FormlyFieldProps {\n /**\n * 选中时的内容\n */\n checkedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 非选中时的内容\n */\n unCheckedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 开关大小\n */\n size?: NzSizeDSType;\n\n /**\n * 加载中的开关\n * @default false\n */\n loading?: boolean;\n\n /**\n * 是否完全由用户控制状态\n * @default false\n */\n control?: boolean;\n}\n\nexport interface FormlySwitchFieldConfig extends NzFormlyFieldConfig<SwitchProps> {\n type: 'switch' | Type<FormlyFieldSwitch>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-switch',\n template: `\n <nz-switch\n [formControl]=\"formControl\"\n [nzId]=\"id\"\n [nzCheckedChildren]=\"props['checkedChildren'] ?? null\"\n [nzUnCheckedChildren]=\"props['unCheckedChildren'] ?? null\"\n [nzSize]=\"props['size']!\"\n [nzLoading]=\"!!props['loading']\"\n [nzControl]=\"!!props['control']\"\n (ngModelChange)=\"props.change?.(field, $event)\"\n ></nz-switch>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSwitch extends FieldType<FieldTypeConfig<SwitchProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n loading: false,\n control: false\n }\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 { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldSwitch } from './switch.type';\n\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\n\n@NgModule({\n declarations: [FormlyFieldSwitch],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n\n NzSwitchModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'switch',\n component: FormlyFieldSwitch,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA0CA;AAiBM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAhB9E,IA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;wBACZ,mBAAmB;wBACnB,uBAAuB;wBAEvB,cAAc;wBACd,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
|
@@ -20,6 +20,7 @@ class FormlyWrapperTabs extends FieldWrapper {
|
|
20
20
|
linkExact: true,
|
21
21
|
centered: false,
|
22
22
|
hideAdd: false,
|
23
|
+
selectedIndex: null,
|
23
24
|
tab: {
|
24
25
|
forceRender: false,
|
25
26
|
disabled: false
|
@@ -27,9 +28,9 @@ class FormlyWrapperTabs extends FieldWrapper {
|
|
27
28
|
}
|
28
29
|
};
|
29
30
|
}
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
32
|
-
[(nzSelectedIndex)]="props['selectedIndex']"
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyWrapperTabs, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyWrapperTabs, selector: "formly-wrapper-tabs", usesInheritance: true, ngImport: i0, template: `<nz-tabset
|
33
|
+
[(nzSelectedIndex)]="props['selectedIndex']!"
|
33
34
|
[nzAnimated]="props['animated'] ?? true"
|
34
35
|
[nzSize]="props['size']!"
|
35
36
|
[nzTabBarExtraContent]="props['tabBarExtraContent']"
|
@@ -41,6 +42,8 @@ class FormlyWrapperTabs extends FieldWrapper {
|
|
41
42
|
[nzLinkRouter]="!!props['linkRouter']"
|
42
43
|
[nzLinkExact]="!!props['linkExact']"
|
43
44
|
[nzCanDeactivate]="props['canDeactivate'] ?? null"
|
45
|
+
[nzCentered]="!!props['centered']"
|
46
|
+
[nzDestroyInactiveTabPane]="!!props['destroyInactiveTabPane']"
|
44
47
|
[nzHideAdd]="!!props['hideAdd']"
|
45
48
|
[nzAddIcon]="props['addIcon']!"
|
46
49
|
(nzSelectedIndexChange)="props['selectedIndexChange']?.(field, $event)"
|
@@ -50,9 +53,10 @@ class FormlyWrapperTabs extends FieldWrapper {
|
|
50
53
|
>
|
51
54
|
@for (tab of field.fieldGroup; track tab.id) {
|
52
55
|
<nz-tab
|
53
|
-
[nzTitle]="tab.props?.label
|
56
|
+
[nzTitle]="tab.props?.label ?? ''"
|
54
57
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
55
|
-
[nzDisabled]="tab.props!['tab']?.disabled"
|
58
|
+
[nzDisabled]="!!tab.props!['tab']?.disabled"
|
59
|
+
[nzClosable]="!!tab.props!['tab']?.closable"
|
56
60
|
(nzClick)="tab.props!['tab']?.click?.(field)"
|
57
61
|
(nzContextmenu)="tab.props!['tab']?.contextmenu?.(field, $event)"
|
58
62
|
(nzSelect)="tab.props!['tab']?.select?.(field)"
|
@@ -61,14 +65,14 @@ class FormlyWrapperTabs extends FieldWrapper {
|
|
61
65
|
<formly-field [field]="tab"></formly-field>
|
62
66
|
</nz-tab>
|
63
67
|
}
|
64
|
-
</nz-tabset>`, isInline: true, dependencies: [{ kind: "component", type: i1.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i1.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: i2.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
68
|
+
</nz-tabset>`, isInline: true, dependencies: [{ kind: "component", type: i1.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i1.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: i2.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
65
69
|
}
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyWrapperTabs, decorators: [{
|
67
71
|
type: Component,
|
68
72
|
args: [{
|
69
73
|
selector: 'formly-wrapper-tabs',
|
70
74
|
template: `<nz-tabset
|
71
|
-
[(nzSelectedIndex)]="props['selectedIndex']"
|
75
|
+
[(nzSelectedIndex)]="props['selectedIndex']!"
|
72
76
|
[nzAnimated]="props['animated'] ?? true"
|
73
77
|
[nzSize]="props['size']!"
|
74
78
|
[nzTabBarExtraContent]="props['tabBarExtraContent']"
|
@@ -80,6 +84,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
80
84
|
[nzLinkRouter]="!!props['linkRouter']"
|
81
85
|
[nzLinkExact]="!!props['linkExact']"
|
82
86
|
[nzCanDeactivate]="props['canDeactivate'] ?? null"
|
87
|
+
[nzCentered]="!!props['centered']"
|
88
|
+
[nzDestroyInactiveTabPane]="!!props['destroyInactiveTabPane']"
|
83
89
|
[nzHideAdd]="!!props['hideAdd']"
|
84
90
|
[nzAddIcon]="props['addIcon']!"
|
85
91
|
(nzSelectedIndexChange)="props['selectedIndexChange']?.(field, $event)"
|
@@ -89,9 +95,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
89
95
|
>
|
90
96
|
@for (tab of field.fieldGroup; track tab.id) {
|
91
97
|
<nz-tab
|
92
|
-
[nzTitle]="tab.props?.label
|
98
|
+
[nzTitle]="tab.props?.label ?? ''"
|
93
99
|
[nzForceRender]="tab.props!['tab']?.forceRender"
|
94
|
-
[nzDisabled]="tab.props!['tab']?.disabled"
|
100
|
+
[nzDisabled]="!!tab.props!['tab']?.disabled"
|
101
|
+
[nzClosable]="!!tab.props!['tab']?.closable"
|
95
102
|
(nzClick)="tab.props!['tab']?.click?.(field)"
|
96
103
|
(nzContextmenu)="tab.props!['tab']?.contextmenu?.(field, $event)"
|
97
104
|
(nzSelect)="tab.props!['tab']?.select?.(field)"
|
@@ -106,10 +113,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
106
113
|
}] });
|
107
114
|
|
108
115
|
class FormlyNzTabsModule {
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
110
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
117
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTabsModule, declarations: [FormlyWrapperTabs], imports: [CommonModule,
|
111
118
|
NzTabsModule, i2.FormlyModule] }); }
|
112
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
119
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTabsModule, imports: [CommonModule,
|
113
120
|
NzTabsModule,
|
114
121
|
FormlyModule.forChild({
|
115
122
|
wrappers: [
|
@@ -120,7 +127,7 @@ class FormlyNzTabsModule {
|
|
120
127
|
]
|
121
128
|
})] }); }
|
122
129
|
}
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTabsModule, decorators: [{
|
124
131
|
type: NgModule,
|
125
132
|
args: [{
|
126
133
|
declarations: [FormlyWrapperTabs],
|
@@ -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 } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { TabsProps } from './tabs.props';\n\nexport interface FormlyTabsWrapperConfig extends NzFormlyFieldConfig<TabsProps> {\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\n}\n/** @private */\n@Component({\n selector: 'formly-wrapper-tabs',\n template: `<nz-tabset\n [(nzSelectedIndex)]=\"props['selectedIndex']
|
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 } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { TabsProps } from './tabs.props';\n\nexport interface FormlyTabsWrapperConfig extends NzFormlyFieldConfig<TabsProps> {\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\n}\n/** @private */\n@Component({\n selector: 'formly-wrapper-tabs',\n template: `<nz-tabset\n [(nzSelectedIndex)]=\"props['selectedIndex']!\"\n [nzAnimated]=\"props['animated'] ?? true\"\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 [nzCentered]=\"!!props['centered']\"\n [nzDestroyInactiveTabPane]=\"!!props['destroyInactiveTabPane']\"\n [nzHideAdd]=\"!!props['hideAdd']\"\n [nzAddIcon]=\"props['addIcon']!\"\n (nzSelectedIndexChange)=\"props['selectedIndexChange']?.(field, $event)\"\n (nzSelectChange)=\"props['selectChange']?.(field, $event.index, $event.tab)\"\n (nzAdd)=\"props['onAdd']?.(field)\"\n (nzClose)=\"props['onClose']?.(field, $event.index)\"\n >\n @for (tab of field.fieldGroup; track tab.id) {\n <nz-tab\n [nzTitle]=\"tab.props?.label ?? ''\"\n [nzForceRender]=\"tab.props!['tab']?.forceRender\"\n [nzDisabled]=\"!!tab.props!['tab']?.disabled\"\n [nzClosable]=\"!!tab.props!['tab']?.closable\"\n (nzClick)=\"tab.props!['tab']?.click?.(field)\"\n (nzContextmenu)=\"tab.props!['tab']?.contextmenu?.(field, $event)\"\n (nzSelect)=\"tab.props!['tab']?.select?.(field)\"\n (nzDeselect)=\"tab.props!['tab']?.deselect?.(field)\"\n >\n <formly-field [field]=\"tab\"></formly-field>\n </nz-tab>\n }\n </nz-tabset>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyWrapperTabs extends FieldWrapper<NzFormlyFieldConfig<TabsProps>> {\n override defaultOptions = {\n props: {\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 selectedIndex: null,\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":";;;;;;;;AAQA;AA0CM,MAAO,iBAAkB,SAAQ,YAA4C,CAAA;AAzCnF,IAAA,WAAA,GAAA;;AA0CW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,IAAI,EAAE,MA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AAA,IAAA,EAAA,kBAAkB,YAd3B,YAAY;YAEZ,YAAY;YAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,iBAAiB;AAC7B,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAjB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBAEZ,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,QAAQ,EAAE;AACR,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,iBAAiB;AAC7B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
@@ -44,8 +44,8 @@ class FormlyFieldTextValue extends FieldType {
|
|
44
44
|
ngOnDestroy() {
|
45
45
|
this.subscription?.unsubscribe();
|
46
46
|
}
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTextValue, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: FormlyFieldTextValue, selector: "formly-field-text-value", usesInheritance: true, ngImport: i0, template: `
|
49
49
|
<nz-form-text
|
50
50
|
class="wrap-text"
|
51
51
|
[formlyAttributes]="field"
|
@@ -56,7 +56,7 @@ class FormlyFieldTextValue extends FieldType {
|
|
56
56
|
</nz-form-text>
|
57
57
|
`, isInline: true, styles: [".wrap-text{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NzFormTextComponent, selector: "nz-form-text", exportAs: ["nzFormText"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DefaultifyPipe, name: "defaultify" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
58
58
|
}
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTextValue, decorators: [{
|
60
60
|
type: Component,
|
61
61
|
args: [{ selector: 'formly-field-text-value', template: `
|
62
62
|
<nz-form-text
|
@@ -71,11 +71,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
71
71
|
}] });
|
72
72
|
|
73
73
|
class FormlyNzTextValueModule {
|
74
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
75
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
74
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextValueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
75
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextValueModule, declarations: [FormlyFieldTextValue], imports: [CommonModule,
|
76
76
|
NzFormModule,
|
77
77
|
DefaultifyPipe, i3.FormlyModule] }); }
|
78
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
78
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextValueModule, imports: [CommonModule,
|
79
79
|
NzFormModule,
|
80
80
|
FormlyModule.forChild({
|
81
81
|
types: [
|
@@ -87,7 +87,7 @@ class FormlyNzTextValueModule {
|
|
87
87
|
]
|
88
88
|
})] }); }
|
89
89
|
}
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextValueModule, decorators: [{
|
91
91
|
type: NgModule,
|
92
92
|
args: [{
|
93
93
|
declarations: [FormlyFieldTextValue],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-text-value.mjs","sources":["../../../../packages/formlyantd/text-value/src/text-value.type.ts","../../../../packages/formlyantd/text-value/src/text-value.module.ts","../../../../packages/formlyantd/text-value/src/ngx-formly-zorro-antd-text-value.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Type, Component, OnDestroy, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport { Observable, of, Subscription, isObservable } from 'rxjs';\nimport { isPromise } from '@pkt/ng.core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\n\n/**\n * @publicApi\n */\nexport interface TextValueProps extends FormlyFieldProps {\n /**\n * 格式化函数\n * @param value 表单值\n * @param field 当前字段\n */\n format?: (\n value: NzSafeAny,\n field: NzFormlyFieldConfig<TextValueProps>\n ) => Observable<NzSafeAny> | Promise<NzSafeAny> | NzSafeAny | null;\n\n /**\n * 默认显示文本\n */\n defaultText?: string;\n}\n\nexport interface FormlyTextValueFieldConfig extends NzFormlyFieldConfig<TextValueProps> {\n type: 'text' | Type<FormlyFieldTextValue>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-text-value',\n template: `\n <nz-form-text\n class=\"wrap-text\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['ngClass']\"\n [ngStyle]=\"props['ngStyle']\"\n >\n {{ textValue$ | async | defaultify: props.defaultText }}\n </nz-form-text>\n `,\n styles: [\n `\n .wrap-text {\n word-break: break-all;\n }\n `\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTextValue<T = NzSafeAny>\n extends FieldType<FieldTypeConfig<TextValueProps>>\n implements OnInit, OnDestroy\n{\n private result?: Observable<T> | Promise<T>;\n private subscription?: Subscription;\n\n override defaultOptions = {\n props: {\n defaultText: '--'\n }\n };\n\n ngOnInit(): void {\n this.subscription = this.formControl!.valueChanges.subscribe(() => {\n this.result = undefined;\n });\n }\n\n get textValue$() {\n const value = this.formControl!.value;\n const format = this.props.format || this.formState.format;\n\n if (typeof format !== 'function') {\n return of(value);\n }\n\n if (this.result) {\n return this.result;\n }\n const result = format(value, this.field);\n if (isPromise(result) || isObservable(result)) {\n this.result = result as NzSafeAny;\n return result;\n }\n return of(result);\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { DefaultifyPipe } from '@pkt/ng.core';\nimport { FormlyFieldTextValue } from './text-value.type';\n\nimport { NzFormModule } from 'ng-zorro-antd/form';\n\n@NgModule({\n declarations: [FormlyFieldTextValue],\n imports: [\n CommonModule,\n NzFormModule,\n DefaultifyPipe,\n FormlyModule.forChild({\n types: [\n {\n name: 'text',\n component: FormlyFieldTextValue,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTextValueModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA+BA;AAsBM,MAAO,oBACX,SAAQ,SAA0C,CAAA;AAtBpD,IAAA,WAAA,GAAA;;AA4BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,IAAI;AAClB,aAAA;SACF,CAAC;AA8BH,KAAA;IA5BC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAY,CAAC,YAAY,CAAC,SAAS,CAAC,MAAK;AAChE,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC1B,SAAC,CAAC,CAAC;KACJ;AAED,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC;AACtC,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;AAE1D,QAAA,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AAChC,YAAA,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-text-value.mjs","sources":["../../../../packages/formlyantd/text-value/src/text-value.type.ts","../../../../packages/formlyantd/text-value/src/text-value.module.ts","../../../../packages/formlyantd/text-value/src/ngx-formly-zorro-antd-text-value.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Type, Component, OnDestroy, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport { Observable, of, Subscription, isObservable } from 'rxjs';\nimport { isPromise } from '@pkt/ng.core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\n\n/**\n * @publicApi\n */\nexport interface TextValueProps extends FormlyFieldProps {\n /**\n * 格式化函数\n * @param value 表单值\n * @param field 当前字段\n */\n format?: (\n value: NzSafeAny,\n field: NzFormlyFieldConfig<TextValueProps>\n ) => Observable<NzSafeAny> | Promise<NzSafeAny> | NzSafeAny | null;\n\n /**\n * 默认显示文本\n */\n defaultText?: string;\n}\n\nexport interface FormlyTextValueFieldConfig extends NzFormlyFieldConfig<TextValueProps> {\n type: 'text' | Type<FormlyFieldTextValue>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-text-value',\n template: `\n <nz-form-text\n class=\"wrap-text\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['ngClass']\"\n [ngStyle]=\"props['ngStyle']\"\n >\n {{ textValue$ | async | defaultify: props.defaultText }}\n </nz-form-text>\n `,\n styles: [\n `\n .wrap-text {\n word-break: break-all;\n }\n `\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTextValue<T = NzSafeAny>\n extends FieldType<FieldTypeConfig<TextValueProps>>\n implements OnInit, OnDestroy\n{\n private result?: Observable<T> | Promise<T>;\n private subscription?: Subscription;\n\n override defaultOptions = {\n props: {\n defaultText: '--'\n }\n };\n\n ngOnInit(): void {\n this.subscription = this.formControl!.valueChanges.subscribe(() => {\n this.result = undefined;\n });\n }\n\n get textValue$() {\n const value = this.formControl!.value;\n const format = this.props.format || this.formState.format;\n\n if (typeof format !== 'function') {\n return of(value);\n }\n\n if (this.result) {\n return this.result;\n }\n const result = format(value, this.field);\n if (isPromise(result) || isObservable(result)) {\n this.result = result as NzSafeAny;\n return result;\n }\n return of(result);\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { DefaultifyPipe } from '@pkt/ng.core';\nimport { FormlyFieldTextValue } from './text-value.type';\n\nimport { NzFormModule } from 'ng-zorro-antd/form';\n\n@NgModule({\n declarations: [FormlyFieldTextValue],\n imports: [\n CommonModule,\n NzFormModule,\n DefaultifyPipe,\n FormlyModule.forChild({\n types: [\n {\n name: 'text',\n component: FormlyFieldTextValue,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTextValueModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA+BA;AAsBM,MAAO,oBACX,SAAQ,SAA0C,CAAA;AAtBpD,IAAA,WAAA,GAAA;;AA4BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,IAAI;AAClB,aAAA;SACF,CAAC;AA8BH,KAAA;IA5BC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAY,CAAC,YAAY,CAAC,SAAS,CAAC,MAAK;AAChE,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC1B,SAAC,CAAC,CAAC;KACJ;AAED,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC;AACtC,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;AAE1D,QAAA,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AAChC,YAAA,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;SAClB;AAED,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC,MAAM,CAAC;SACpB;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;AAC7C,YAAA,IAAI,CAAC,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uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAjBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,cAAc;wBACd,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,oBAAoB;oCAC/B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
|
@@ -24,8 +24,8 @@ class FormlyFieldTextarea extends FieldType {
|
|
24
24
|
}
|
25
25
|
};
|
26
26
|
}
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
|
29
29
|
@switch (props.type) {
|
30
30
|
@case ('count') {
|
31
31
|
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
@@ -80,7 +80,7 @@ class FormlyFieldTextarea extends FieldType {
|
|
80
80
|
</ng-template>
|
81
81
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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", "nzStepperless", "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 }); }
|
82
82
|
}
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyFieldTextarea, decorators: [{
|
84
84
|
type: Component,
|
85
85
|
args: [{
|
86
86
|
selector: 'formly-field-textarea',
|
@@ -143,13 +143,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
143
143
|
}] });
|
144
144
|
|
145
145
|
class FormlyNzTextareaModule {
|
146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
147
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextareaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
147
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextareaModule, declarations: [FormlyFieldTextarea], imports: [CommonModule,
|
148
148
|
ReactiveFormsModule,
|
149
149
|
FormlyNzFormFieldModule,
|
150
150
|
NzInputModule,
|
151
151
|
NzIconModule, i5.FormlyModule] }); }
|
152
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
152
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextareaModule, imports: [CommonModule,
|
153
153
|
ReactiveFormsModule,
|
154
154
|
FormlyNzFormFieldModule,
|
155
155
|
NzInputModule,
|
@@ -164,7 +164,7 @@ class FormlyNzTextareaModule {
|
|
164
164
|
]
|
165
165
|
})] }); }
|
166
166
|
}
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FormlyNzTextareaModule, decorators: [{
|
168
168
|
type: NgModule,
|
169
169
|
args: [{
|
170
170
|
declarations: [FormlyFieldTextarea],
|
@@ -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 } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\n/**\n * @publicApi\n */\nexport interface 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 NzFormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-textarea',\n template: `\n @switch (props.type) {\n @case ('count') {\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['ngClass']\"\n [ngStyle]=\"props['ngStyle']\"\n [attr.rows]=\"props.rows\"\n [attr.cols]=\"props.cols\"\n [nzBorderless]=\"!!props['borderless']\"\n [nzAutosize]=\"!!props['autosize']\"\n nz-input\n ></textarea>\n </nz-textarea-count>\n }\n @case ('clear') {\n <nz-input-group class=\"ant-input-affix-wrapper-textarea-with-clear-btn\" [nzSuffix]=\"textAreaClearTpl\">\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </nz-input-group>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n }\n }\n\n <ng-template #textareaTpl>\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['ngClass']\"\n [ngStyle]=\"props['ngStyle']\"\n [attr.rows]=\"props.rows\"\n [attr.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 @if (formControl.value && !props['disabled'] && !props['readonly']) {\n <span\n nz-icon\n class=\"ant-input-clear-icon\"\n nzTheme=\"fill\"\n nzType=\"close-circle\"\n (click)=\"formControl.reset()\"\n ></span>\n }\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":";;;;;;;;;;;;;;AAgCA;AA2DM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA1DlF,IAAA,WAAA,GAAA;;AA2DW,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
|
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 } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\n/**\n * @publicApi\n */\nexport interface 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 NzFormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-textarea',\n template: `\n @switch (props.type) {\n @case ('count') {\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['ngClass']\"\n [ngStyle]=\"props['ngStyle']\"\n [attr.rows]=\"props.rows\"\n [attr.cols]=\"props.cols\"\n [nzBorderless]=\"!!props['borderless']\"\n [nzAutosize]=\"!!props['autosize']\"\n nz-input\n ></textarea>\n </nz-textarea-count>\n }\n @case ('clear') {\n <nz-input-group class=\"ant-input-affix-wrapper-textarea-with-clear-btn\" [nzSuffix]=\"textAreaClearTpl\">\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </nz-input-group>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n }\n }\n\n <ng-template #textareaTpl>\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['ngClass']\"\n [ngStyle]=\"props['ngStyle']\"\n [attr.rows]=\"props.rows\"\n [attr.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 @if (formControl.value && !props['disabled'] && !props['readonly']) {\n <span\n nz-icon\n class=\"ant-input-clear-icon\"\n nzTheme=\"fill\"\n nzType=\"close-circle\"\n (click)=\"formControl.reset()\"\n ></span>\n }\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":";;;;;;;;;;;;;;AAgCA;AA2DM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA1DlF,IAAA,WAAA,GAAA;;AA2DW,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;+GARY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,EAxDpB,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EA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