ngx-formly-zorro-antd 17.1.0 → 17.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/autocomplete/package.json +3 -0
- package/button/package.json +3 -0
- package/button-group/package.json +3 -0
- package/card/card.module.d.ts +1 -1
- package/card/package.json +3 -0
- package/card-wrapper/package.json +3 -0
- package/cascader/package.json +3 -0
- package/checkbox/package.json +3 -0
- package/common/package.json +3 -0
- package/datepicker/package.json +3 -0
- package/esm2022/autocomplete/autocomplete.props.mjs +1 -1
- package/esm2022/autocomplete/public_api.mjs +1 -1
- package/esm2022/button/button.module.mjs +1 -1
- package/esm2022/button/button.type.mjs +123 -123
- package/esm2022/button/public_api.mjs +1 -1
- package/esm2022/button-group/button-group.module.mjs +1 -1
- package/esm2022/button-group/button-group.type.mjs +67 -67
- package/esm2022/button-group/public_api.mjs +1 -1
- package/esm2022/card/card.module.mjs +3 -4
- package/esm2022/card/card.type.mjs +51 -51
- package/esm2022/card/public_api.mjs +1 -1
- package/esm2022/card-wrapper/card-wrapper.module.mjs +1 -1
- package/esm2022/card-wrapper/card-wrapper.props.mjs +1 -1
- package/esm2022/card-wrapper/card.wrapper.mjs +37 -37
- package/esm2022/card-wrapper/public_api.mjs +1 -1
- package/esm2022/cascader/cascader.module.mjs +1 -1
- package/esm2022/cascader/cascader.type.mjs +65 -65
- package/esm2022/cascader/public_api.mjs +1 -1
- package/esm2022/checkbox/checkbox.module.mjs +1 -1
- package/esm2022/checkbox/checkbox.type.mjs +39 -39
- package/esm2022/checkbox/public_api.mjs +1 -1
- package/esm2022/common/common.module.mjs +1 -1
- package/esm2022/common/formly-box-templates.directive.mjs +1 -1
- package/esm2022/common/formly-utils.mjs +1 -1
- package/esm2022/common/interface.mjs +1 -1
- package/esm2022/common/public_api.mjs +1 -1
- package/esm2022/datepicker/datepicker.module.mjs +1 -1
- package/esm2022/datepicker/datepicker.props.mjs +1 -1
- package/esm2022/datepicker/datepicker.type.mjs +149 -149
- package/esm2022/datepicker/public_api.mjs +1 -1
- package/esm2022/extension/public_api.mjs +1 -1
- package/esm2022/extension/value-changes-extension.mjs +1 -1
- package/esm2022/form-field/form-field.module.mjs +1 -1
- package/esm2022/form-field/form-field.props.mjs +1 -1
- package/esm2022/form-field/form-field.wrapper.mjs +159 -125
- package/esm2022/form-field/public_api.mjs +1 -1
- package/esm2022/grid/grid.module.mjs +1 -1
- package/esm2022/grid/grid.props.mjs +1 -1
- package/esm2022/grid/grid.type.mjs +59 -59
- package/esm2022/grid/public_api.mjs +1 -1
- package/esm2022/index.mjs +1 -1
- package/esm2022/input/input.module.mjs +1 -1
- package/esm2022/input/input.props.mjs +1 -1
- package/esm2022/input/input.type.mjs +275 -275
- package/esm2022/input/public_api.mjs +1 -1
- package/esm2022/input-group/input-group.module.mjs +1 -1
- package/esm2022/input-group/input-group.props.mjs +1 -1
- package/esm2022/input-group/input-group.type.mjs +39 -39
- package/esm2022/input-group/public_api.mjs +1 -1
- package/esm2022/input-number/input-number.module.mjs +1 -1
- package/esm2022/input-number/input-number.props.mjs +1 -1
- package/esm2022/input-number/input-number.type.mjs +89 -89
- package/esm2022/input-number/public_api.mjs +1 -1
- package/esm2022/lib/ui-ng-zorro-antd.mjs +1 -1
- package/esm2022/lib/ui-ng-zorro-antd.module.mjs +1 -1
- package/esm2022/radio/public_api.mjs +1 -1
- package/esm2022/radio/radio.module.mjs +1 -1
- package/esm2022/radio/radio.type.mjs +81 -81
- package/esm2022/rate/public_api.mjs +1 -1
- package/esm2022/rate/rate.module.mjs +1 -1
- package/esm2022/rate/rate.type.mjs +33 -33
- package/esm2022/ref-template/public_api.mjs +1 -1
- package/esm2022/ref-template/ref-template.module.mjs +1 -1
- package/esm2022/ref-template/ref-template.type.mjs +9 -9
- package/esm2022/select/public_api.mjs +1 -1
- package/esm2022/select/select.module.mjs +1 -1
- package/esm2022/select/select.props.mjs +1 -1
- package/esm2022/select/select.type.mjs +123 -123
- package/esm2022/slider/public_api.mjs +1 -1
- package/esm2022/slider/slider.module.mjs +1 -1
- package/esm2022/slider/slider.type.mjs +33 -33
- package/esm2022/space/public_api.mjs +1 -1
- package/esm2022/space/space.module.mjs +1 -1
- package/esm2022/space/space.type.mjs +27 -27
- package/esm2022/switch/public_api.mjs +1 -1
- package/esm2022/switch/switch.module.mjs +1 -1
- package/esm2022/switch/switch.type.mjs +25 -25
- package/esm2022/tabs/public_api.mjs +1 -1
- package/esm2022/tabs/tabs.module.mjs +1 -1
- package/esm2022/tabs/tabs.props.mjs +1 -1
- package/esm2022/tabs/tabs.wrapper.mjs +79 -79
- package/esm2022/text-value/public_api.mjs +1 -1
- package/esm2022/text-value/text-value.module.mjs +1 -1
- package/esm2022/text-value/text-value.type.mjs +19 -19
- package/esm2022/textarea/public_api.mjs +1 -1
- package/esm2022/textarea/textarea.module.mjs +1 -1
- package/esm2022/textarea/textarea.type.mjs +113 -113
- package/esm2022/timepicker/public_api.mjs +1 -1
- package/esm2022/timepicker/timepicker.module.mjs +1 -1
- package/esm2022/timepicker/timepicker.type.mjs +61 -61
- package/esm2022/transfer/public_api.mjs +1 -1
- package/esm2022/transfer/transfer.component.mjs +49 -49
- package/esm2022/transfer/transfer.module.mjs +1 -1
- package/esm2022/transfer/transfer.type.mjs +47 -47
- package/esm2022/tree-select/public_api.mjs +1 -1
- package/esm2022/tree-select/tree-select.module.mjs +1 -1
- package/esm2022/tree-select/tree-select.type.mjs +69 -69
- package/esm2022/upload/public_api.mjs +1 -1
- package/esm2022/upload/upload.component.mjs +143 -143
- package/esm2022/upload/upload.module.mjs +1 -1
- package/esm2022/upload/upload.props.mjs +1 -1
- package/esm2022/upload/upload.type.mjs +83 -83
- package/extension/package.json +3 -0
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs +66 -66
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-button.mjs +122 -122
- package/fesm2022/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +36 -36
- package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-card.mjs +52 -53
- package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +64 -64
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs +38 -38
- package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +148 -148
- 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-form-field.mjs +158 -124
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-grid.mjs +58 -58
- package/fesm2022/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input-group.mjs +38 -38
- package/fesm2022/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input-number.mjs +88 -88
- package/fesm2022/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input.mjs +274 -274
- package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs +80 -80
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs +32 -32
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +8 -8
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-select.mjs +122 -122
- package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs +32 -32
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-space.mjs +26 -26
- package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-switch.mjs +24 -24
- package/fesm2022/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-tabs.mjs +78 -78
- package/fesm2022/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-text-value.mjs +18 -18
- package/fesm2022/ngx-formly-zorro-antd-text-value.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +112 -112
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +60 -60
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs +94 -94
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +68 -68
- package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-upload.mjs +224 -224
- package/fesm2022/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
- package/form-field/form-field.props.d.ts +16 -0
- package/form-field/form-field.wrapper.d.ts +4 -0
- package/form-field/package.json +3 -0
- package/grid/package.json +3 -0
- package/input/package.json +3 -0
- package/input-group/package.json +3 -0
- package/input-number/package.json +3 -0
- package/package.json +12 -12
- package/radio/package.json +3 -0
- package/rate/package.json +3 -0
- package/ref-template/package.json +3 -0
- package/select/package.json +3 -0
- package/slider/package.json +3 -0
- package/space/package.json +3 -0
- package/switch/package.json +3 -0
- package/tabs/package.json +3 -0
- package/text-value/package.json +3 -0
- package/textarea/package.json +3 -0
- package/timepicker/package.json +3 -0
- package/transfer/package.json +3 -0
- package/tree-select/package.json +3 -0
- package/upload/package.json +3 -0
@@ -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';\
|
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\ninterface 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\n@Component({\n selector: 'formly-field-switch',\n template: `\n <nz-switch\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\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 && 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":";;;;;;;;;;;AAyDM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAjB9E,IAAA,WAAA,GAAA;;AAkBW,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;8GARY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA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oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
|
@@ -28,90 +28,90 @@ class FormlyWrapperTabs extends FieldWrapper {
|
|
28
28
|
};
|
29
29
|
}
|
30
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyWrapperTabs, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyWrapperTabs, selector: "formly-wrapper-tabs", usesInheritance: true, ngImport: i0, template: `<nz-tabset
|
32
|
-
[(nzSelectedIndex)]="props['selectedIndex']"
|
33
|
-
[nzAnimated]="props['animated']!"
|
34
|
-
[nzSize]="props['size']!"
|
35
|
-
[nzTabBarExtraContent]="props['tabBarExtraContent']"
|
36
|
-
[nzTabBarStyle]="props['tabBarStyle'] ?? null"
|
37
|
-
[nzTabPosition]="props['tabPosition']!"
|
38
|
-
[nzType]="props['type']!"
|
39
|
-
[nzTabBarGutter]="props['tabBarGutter']"
|
40
|
-
[nzHideAll]="props['hideAll']!!"
|
41
|
-
[nzLinkRouter]="props['linkRouter']!!"
|
42
|
-
[nzLinkExact]="props['linkExact']!!"
|
43
|
-
[nzCanDeactivate]="props['canDeactivate'] ?? null"
|
44
|
-
[nzHideAdd]="props['hideAdd']!!"
|
45
|
-
[nzAddIcon]="props['addIcon']!"
|
46
|
-
(nzSelectedIndexChange)="
|
47
|
-
props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
|
48
|
-
"
|
49
|
-
(nzSelectChange)="
|
50
|
-
props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
|
51
|
-
"
|
52
|
-
(nzAdd)="props['onAdd'] && props['onAdd'](field)"
|
53
|
-
(nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
|
54
|
-
>
|
55
|
-
@for (tab of field.fieldGroup; track tab.id) {
|
56
|
-
<nz-tab
|
57
|
-
[nzTitle]="tab.props?.label || ''"
|
58
|
-
[nzForceRender]="tab.props!['tab']?.forceRender"
|
59
|
-
[nzDisabled]="tab.props!['tab']?.disabled"
|
60
|
-
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
61
|
-
(nzContextmenu)="
|
62
|
-
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
63
|
-
"
|
64
|
-
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
65
|
-
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
66
|
-
>
|
67
|
-
<formly-field [field]="tab"></formly-field>
|
68
|
-
</nz-tab>
|
69
|
-
}
|
31
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyWrapperTabs, selector: "formly-wrapper-tabs", usesInheritance: true, ngImport: i0, template: `<nz-tabset
|
32
|
+
[(nzSelectedIndex)]="props['selectedIndex']"
|
33
|
+
[nzAnimated]="props['animated']!"
|
34
|
+
[nzSize]="props['size']!"
|
35
|
+
[nzTabBarExtraContent]="props['tabBarExtraContent']"
|
36
|
+
[nzTabBarStyle]="props['tabBarStyle'] ?? null"
|
37
|
+
[nzTabPosition]="props['tabPosition']!"
|
38
|
+
[nzType]="props['type']!"
|
39
|
+
[nzTabBarGutter]="props['tabBarGutter']"
|
40
|
+
[nzHideAll]="props['hideAll']!!"
|
41
|
+
[nzLinkRouter]="props['linkRouter']!!"
|
42
|
+
[nzLinkExact]="props['linkExact']!!"
|
43
|
+
[nzCanDeactivate]="props['canDeactivate'] ?? null"
|
44
|
+
[nzHideAdd]="props['hideAdd']!!"
|
45
|
+
[nzAddIcon]="props['addIcon']!"
|
46
|
+
(nzSelectedIndexChange)="
|
47
|
+
props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
|
48
|
+
"
|
49
|
+
(nzSelectChange)="
|
50
|
+
props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
|
51
|
+
"
|
52
|
+
(nzAdd)="props['onAdd'] && props['onAdd'](field)"
|
53
|
+
(nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
|
54
|
+
>
|
55
|
+
@for (tab of field.fieldGroup; track tab.id) {
|
56
|
+
<nz-tab
|
57
|
+
[nzTitle]="tab.props?.label || ''"
|
58
|
+
[nzForceRender]="tab.props!['tab']?.forceRender"
|
59
|
+
[nzDisabled]="tab.props!['tab']?.disabled"
|
60
|
+
(nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
|
61
|
+
(nzContextmenu)="
|
62
|
+
tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
|
63
|
+
"
|
64
|
+
(nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
|
65
|
+
(nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
|
66
|
+
>
|
67
|
+
<formly-field [field]="tab"></formly-field>
|
68
|
+
</nz-tab>
|
69
|
+
}
|
70
70
|
</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 }); }
|
71
71
|
}
|
72
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyWrapperTabs, decorators: [{
|
73
73
|
type: Component,
|
74
74
|
args: [{
|
75
75
|
selector: 'formly-wrapper-tabs',
|
76
|
-
template: `<nz-tabset
|
77
|
-
[(nzSelectedIndex)]="props['selectedIndex']"
|
78
|
-
[nzAnimated]="props['animated']!"
|
79
|
-
[nzSize]="props['size']!"
|
80
|
-
[nzTabBarExtraContent]="props['tabBarExtraContent']"
|
81
|
-
[nzTabBarStyle]="props['tabBarStyle'] ?? null"
|
82
|
-
[nzTabPosition]="props['tabPosition']!"
|
83
|
-
[nzType]="props['type']!"
|
84
|
-
[nzTabBarGutter]="props['tabBarGutter']"
|
85
|
-
[nzHideAll]="props['hideAll']!!"
|
86
|
-
[nzLinkRouter]="props['linkRouter']!!"
|
87
|
-
[nzLinkExact]="props['linkExact']!!"
|
88
|
-
[nzCanDeactivate]="props['canDeactivate'] ?? null"
|
89
|
-
[nzHideAdd]="props['hideAdd']!!"
|
90
|
-
[nzAddIcon]="props['addIcon']!"
|
91
|
-
(nzSelectedIndexChange)="
|
92
|
-
props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
|
93
|
-
"
|
94
|
-
(nzSelectChange)="
|
95
|
-
props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
|
96
|
-
"
|
97
|
-
(nzAdd)="props['onAdd'] && props['onAdd'](field)"
|
98
|
-
(nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
|
99
|
-
>
|
100
|
-
@for (tab of field.fieldGroup; track tab.id) {
|
101
|
-
<nz-tab
|
102
|
-
[nzTitle]="tab.props?.label || ''"
|
103
|
-
[nzForceRender]="tab.props!['tab']?.forceRender"
|
104
|
-
[nzDisabled]="tab.props!['tab']?.disabled"
|
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)"
|
111
|
-
>
|
112
|
-
<formly-field [field]="tab"></formly-field>
|
113
|
-
</nz-tab>
|
114
|
-
}
|
76
|
+
template: `<nz-tabset
|
77
|
+
[(nzSelectedIndex)]="props['selectedIndex']"
|
78
|
+
[nzAnimated]="props['animated']!"
|
79
|
+
[nzSize]="props['size']!"
|
80
|
+
[nzTabBarExtraContent]="props['tabBarExtraContent']"
|
81
|
+
[nzTabBarStyle]="props['tabBarStyle'] ?? null"
|
82
|
+
[nzTabPosition]="props['tabPosition']!"
|
83
|
+
[nzType]="props['type']!"
|
84
|
+
[nzTabBarGutter]="props['tabBarGutter']"
|
85
|
+
[nzHideAll]="props['hideAll']!!"
|
86
|
+
[nzLinkRouter]="props['linkRouter']!!"
|
87
|
+
[nzLinkExact]="props['linkExact']!!"
|
88
|
+
[nzCanDeactivate]="props['canDeactivate'] ?? null"
|
89
|
+
[nzHideAdd]="props['hideAdd']!!"
|
90
|
+
[nzAddIcon]="props['addIcon']!"
|
91
|
+
(nzSelectedIndexChange)="
|
92
|
+
props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
|
93
|
+
"
|
94
|
+
(nzSelectChange)="
|
95
|
+
props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
|
96
|
+
"
|
97
|
+
(nzAdd)="props['onAdd'] && props['onAdd'](field)"
|
98
|
+
(nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
|
99
|
+
>
|
100
|
+
@for (tab of field.fieldGroup; track tab.id) {
|
101
|
+
<nz-tab
|
102
|
+
[nzTitle]="tab.props?.label || ''"
|
103
|
+
[nzForceRender]="tab.props!['tab']?.forceRender"
|
104
|
+
[nzDisabled]="tab.props!['tab']?.disabled"
|
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)"
|
111
|
+
>
|
112
|
+
<formly-field [field]="tab"></formly-field>
|
113
|
+
</nz-tab>
|
114
|
+
}
|
115
115
|
</nz-tabset>`,
|
116
116
|
changeDetection: ChangeDetectionStrategy.OnPush
|
117
117
|
}]
|
@@ -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';\
|
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\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 @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 (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 }\n </nz-tabset>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyWrapperTabs extends FieldWrapper<NzFormlyFieldConfig<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":";;;;;;;;AAqDM,MAAO,iBAAkB,SAAQ,YAA4C,CAAA;AA5CnF,IAAA,WAAA,GAAA;;AA6CW,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,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EA1Cl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F,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
@@ -44,28 +44,28 @@ class FormlyFieldTextValue extends FieldType {
|
|
44
44
|
this.subscription?.unsubscribe();
|
45
45
|
}
|
46
46
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextValue, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FormlyFieldTextValue, selector: "formly-field-text-value", usesInheritance: true, ngImport: i0, template: `
|
48
|
-
<nz-form-text
|
49
|
-
class="wrap-text"
|
50
|
-
[formlyAttributes]="field"
|
51
|
-
[ngClass]="props['ngClass']"
|
52
|
-
[ngStyle]="props['ngStyle']"
|
53
|
-
>
|
54
|
-
{{ textValue$ | async | defaultify: props.defaultText }}
|
55
|
-
</nz-form-text>
|
47
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FormlyFieldTextValue, selector: "formly-field-text-value", usesInheritance: true, ngImport: i0, template: `
|
48
|
+
<nz-form-text
|
49
|
+
class="wrap-text"
|
50
|
+
[formlyAttributes]="field"
|
51
|
+
[ngClass]="props['ngClass']"
|
52
|
+
[ngStyle]="props['ngStyle']"
|
53
|
+
>
|
54
|
+
{{ textValue$ | async | defaultify: props.defaultText }}
|
55
|
+
</nz-form-text>
|
56
56
|
`, 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 }); }
|
57
57
|
}
|
58
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextValue, decorators: [{
|
59
59
|
type: Component,
|
60
|
-
args: [{ selector: 'formly-field-text-value', template: `
|
61
|
-
<nz-form-text
|
62
|
-
class="wrap-text"
|
63
|
-
[formlyAttributes]="field"
|
64
|
-
[ngClass]="props['ngClass']"
|
65
|
-
[ngStyle]="props['ngStyle']"
|
66
|
-
>
|
67
|
-
{{ textValue$ | async | defaultify: props.defaultText }}
|
68
|
-
</nz-form-text>
|
60
|
+
args: [{ selector: 'formly-field-text-value', template: `
|
61
|
+
<nz-form-text
|
62
|
+
class="wrap-text"
|
63
|
+
[formlyAttributes]="field"
|
64
|
+
[ngClass]="props['ngClass']"
|
65
|
+
[ngStyle]="props['ngStyle']"
|
66
|
+
>
|
67
|
+
{{ textValue$ | async | defaultify: props.defaultText }}
|
68
|
+
</nz-form-text>
|
69
69
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".wrap-text{word-break:break-all}\n"] }]
|
70
70
|
}] });
|
71
71
|
|
@@ -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';\
|
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\ninterface 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\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":";;;;;;;;;;;;AAkDM,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;AAClB,SAAA;QAED,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAA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AC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,oBAAoB;wBAC/B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,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,124 +24,124 @@ class FormlyFieldTextarea extends FieldType {
|
|
24
24
|
};
|
25
25
|
}
|
26
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
|
28
|
-
@switch (props.type) {
|
29
|
-
@case ('count') {
|
30
|
-
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
31
|
-
<textarea
|
32
|
-
[formControl]="formControl"
|
33
|
-
[formlyAttributes]="field"
|
34
|
-
[ngClass]="props['ngClass']"
|
35
|
-
[ngStyle]="props['ngStyle']"
|
36
|
-
[attr.rows]="props.rows"
|
37
|
-
[attr.cols]="props.cols"
|
38
|
-
[nzBorderless]="props['borderless']!!"
|
39
|
-
[nzAutosize]="props['autosize']!!"
|
40
|
-
nz-input
|
41
|
-
></textarea>
|
42
|
-
</nz-textarea-count>
|
43
|
-
}
|
44
|
-
@case ('clear') {
|
45
|
-
<nz-input-group
|
46
|
-
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
47
|
-
[nzSuffix]="textAreaClearTpl"
|
48
|
-
>
|
49
|
-
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
50
|
-
</nz-input-group>
|
51
|
-
}
|
52
|
-
@default {
|
53
|
-
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
<ng-template #textareaTpl>
|
58
|
-
<textarea
|
59
|
-
[formControl]="formControl"
|
60
|
-
[formlyAttributes]="field"
|
61
|
-
[ngClass]="props['ngClass']"
|
62
|
-
[ngStyle]="props['ngStyle']"
|
63
|
-
[attr.rows]="props.rows"
|
64
|
-
[attr.cols]="props.cols"
|
65
|
-
nz-input
|
66
|
-
[nzBorderless]="props['borderless']!!"
|
67
|
-
[nzAutosize]="props['autosize']!!"
|
68
|
-
></textarea>
|
69
|
-
</ng-template>
|
70
|
-
|
71
|
-
<!-- 清除数据 -->
|
72
|
-
<ng-template #textAreaClearTpl>
|
73
|
-
@if (formControl.value && !props['disabled'] && !props['readonly']) {
|
74
|
-
<span
|
75
|
-
nz-icon
|
76
|
-
class="ant-input-clear-icon"
|
77
|
-
nzTheme="fill"
|
78
|
-
nzType="close-circle"
|
79
|
-
(click)="formControl.reset()"
|
80
|
-
></span>
|
81
|
-
}
|
82
|
-
</ng-template>
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
|
28
|
+
@switch (props.type) {
|
29
|
+
@case ('count') {
|
30
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
31
|
+
<textarea
|
32
|
+
[formControl]="formControl"
|
33
|
+
[formlyAttributes]="field"
|
34
|
+
[ngClass]="props['ngClass']"
|
35
|
+
[ngStyle]="props['ngStyle']"
|
36
|
+
[attr.rows]="props.rows"
|
37
|
+
[attr.cols]="props.cols"
|
38
|
+
[nzBorderless]="props['borderless']!!"
|
39
|
+
[nzAutosize]="props['autosize']!!"
|
40
|
+
nz-input
|
41
|
+
></textarea>
|
42
|
+
</nz-textarea-count>
|
43
|
+
}
|
44
|
+
@case ('clear') {
|
45
|
+
<nz-input-group
|
46
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
47
|
+
[nzSuffix]="textAreaClearTpl"
|
48
|
+
>
|
49
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
50
|
+
</nz-input-group>
|
51
|
+
}
|
52
|
+
@default {
|
53
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
<ng-template #textareaTpl>
|
58
|
+
<textarea
|
59
|
+
[formControl]="formControl"
|
60
|
+
[formlyAttributes]="field"
|
61
|
+
[ngClass]="props['ngClass']"
|
62
|
+
[ngStyle]="props['ngStyle']"
|
63
|
+
[attr.rows]="props.rows"
|
64
|
+
[attr.cols]="props.cols"
|
65
|
+
nz-input
|
66
|
+
[nzBorderless]="props['borderless']!!"
|
67
|
+
[nzAutosize]="props['autosize']!!"
|
68
|
+
></textarea>
|
69
|
+
</ng-template>
|
70
|
+
|
71
|
+
<!-- 清除数据 -->
|
72
|
+
<ng-template #textAreaClearTpl>
|
73
|
+
@if (formControl.value && !props['disabled'] && !props['readonly']) {
|
74
|
+
<span
|
75
|
+
nz-icon
|
76
|
+
class="ant-input-clear-icon"
|
77
|
+
nzTheme="fill"
|
78
|
+
nzType="close-circle"
|
79
|
+
(click)="formControl.reset()"
|
80
|
+
></span>
|
81
|
+
}
|
82
|
+
</ng-template>
|
83
83
|
`, 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 }); }
|
84
84
|
}
|
85
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextarea, decorators: [{
|
86
86
|
type: Component,
|
87
87
|
args: [{
|
88
88
|
selector: 'formly-field-textarea',
|
89
|
-
template: `
|
90
|
-
@switch (props.type) {
|
91
|
-
@case ('count') {
|
92
|
-
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
93
|
-
<textarea
|
94
|
-
[formControl]="formControl"
|
95
|
-
[formlyAttributes]="field"
|
96
|
-
[ngClass]="props['ngClass']"
|
97
|
-
[ngStyle]="props['ngStyle']"
|
98
|
-
[attr.rows]="props.rows"
|
99
|
-
[attr.cols]="props.cols"
|
100
|
-
[nzBorderless]="props['borderless']!!"
|
101
|
-
[nzAutosize]="props['autosize']!!"
|
102
|
-
nz-input
|
103
|
-
></textarea>
|
104
|
-
</nz-textarea-count>
|
105
|
-
}
|
106
|
-
@case ('clear') {
|
107
|
-
<nz-input-group
|
108
|
-
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
109
|
-
[nzSuffix]="textAreaClearTpl"
|
110
|
-
>
|
111
|
-
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
112
|
-
</nz-input-group>
|
113
|
-
}
|
114
|
-
@default {
|
115
|
-
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
116
|
-
}
|
117
|
-
}
|
118
|
-
|
119
|
-
<ng-template #textareaTpl>
|
120
|
-
<textarea
|
121
|
-
[formControl]="formControl"
|
122
|
-
[formlyAttributes]="field"
|
123
|
-
[ngClass]="props['ngClass']"
|
124
|
-
[ngStyle]="props['ngStyle']"
|
125
|
-
[attr.rows]="props.rows"
|
126
|
-
[attr.cols]="props.cols"
|
127
|
-
nz-input
|
128
|
-
[nzBorderless]="props['borderless']!!"
|
129
|
-
[nzAutosize]="props['autosize']!!"
|
130
|
-
></textarea>
|
131
|
-
</ng-template>
|
132
|
-
|
133
|
-
<!-- 清除数据 -->
|
134
|
-
<ng-template #textAreaClearTpl>
|
135
|
-
@if (formControl.value && !props['disabled'] && !props['readonly']) {
|
136
|
-
<span
|
137
|
-
nz-icon
|
138
|
-
class="ant-input-clear-icon"
|
139
|
-
nzTheme="fill"
|
140
|
-
nzType="close-circle"
|
141
|
-
(click)="formControl.reset()"
|
142
|
-
></span>
|
143
|
-
}
|
144
|
-
</ng-template>
|
89
|
+
template: `
|
90
|
+
@switch (props.type) {
|
91
|
+
@case ('count') {
|
92
|
+
<nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
|
93
|
+
<textarea
|
94
|
+
[formControl]="formControl"
|
95
|
+
[formlyAttributes]="field"
|
96
|
+
[ngClass]="props['ngClass']"
|
97
|
+
[ngStyle]="props['ngStyle']"
|
98
|
+
[attr.rows]="props.rows"
|
99
|
+
[attr.cols]="props.cols"
|
100
|
+
[nzBorderless]="props['borderless']!!"
|
101
|
+
[nzAutosize]="props['autosize']!!"
|
102
|
+
nz-input
|
103
|
+
></textarea>
|
104
|
+
</nz-textarea-count>
|
105
|
+
}
|
106
|
+
@case ('clear') {
|
107
|
+
<nz-input-group
|
108
|
+
class="ant-input-affix-wrapper-textarea-with-clear-btn"
|
109
|
+
[nzSuffix]="textAreaClearTpl"
|
110
|
+
>
|
111
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
112
|
+
</nz-input-group>
|
113
|
+
}
|
114
|
+
@default {
|
115
|
+
<ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
<ng-template #textareaTpl>
|
120
|
+
<textarea
|
121
|
+
[formControl]="formControl"
|
122
|
+
[formlyAttributes]="field"
|
123
|
+
[ngClass]="props['ngClass']"
|
124
|
+
[ngStyle]="props['ngStyle']"
|
125
|
+
[attr.rows]="props.rows"
|
126
|
+
[attr.cols]="props.cols"
|
127
|
+
nz-input
|
128
|
+
[nzBorderless]="props['borderless']!!"
|
129
|
+
[nzAutosize]="props['autosize']!!"
|
130
|
+
></textarea>
|
131
|
+
</ng-template>
|
132
|
+
|
133
|
+
<!-- 清除数据 -->
|
134
|
+
<ng-template #textAreaClearTpl>
|
135
|
+
@if (formControl.value && !props['disabled'] && !props['readonly']) {
|
136
|
+
<span
|
137
|
+
nz-icon
|
138
|
+
class="ant-input-clear-icon"
|
139
|
+
nzTheme="fill"
|
140
|
+
nzType="close-circle"
|
141
|
+
(click)="formControl.reset()"
|
142
|
+
></span>
|
143
|
+
}
|
144
|
+
</ng-template>
|
145
145
|
`,
|
146
146
|
changeDetection: ChangeDetectionStrategy.OnPush
|
147
147
|
}]
|