ngx-formly-zorro-antd 19.3.2 → 19.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs +80 -80
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-button.mjs +118 -118
- 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 +46 -46
- package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +66 -66
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs +46 -46
- 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 +142 -142
- 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 +34 -34
- package/fesm2022/ngx-formly-zorro-antd-flex.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +138 -138
- 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-helpers.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input-group.mjs +42 -42
- 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-otp.mjs +24 -24
- package/fesm2022/ngx-formly-zorro-antd-input-otp.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input.mjs +282 -282
- package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs +44 -44
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs +30 -30
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +9 -9
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-select.mjs +102 -102
- package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs +30 -30
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-space-compact.mjs +12 -12
- package/fesm2022/ngx-formly-zorro-antd-space-compact.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-space.mjs +24 -24
- 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 +72 -72
- package/fesm2022/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-text-value.mjs +8 -8
- package/fesm2022/ngx-formly-zorro-antd-text-value.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +106 -106
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +58 -58
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs +105 -109
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +70 -70
- 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/grid/grid.props.d.ts +9 -11
- package/package.json +10 -10
- package/ref-template/ref-template.type.d.ts +1 -1
- package/transfer/transfer.component.d.ts +3 -3
- package/transfer/transfer.type.d.ts +1 -1
package/README.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
# formlyantd
|
1
|
+
# formlyantd
|
@@ -34,92 +34,92 @@ class FormlyFieldButtonGroup extends FieldType {
|
|
34
34
|
this.subjectDestroy();
|
35
35
|
}
|
36
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormlyFieldButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormlyFieldButtonGroup, isStandalone: false, selector: "formly-field-button-group", usesInheritance: true, ngImport: i0, template: `
|
38
|
-
<nz-button-group
|
39
|
-
[formlyAttributes]="field"
|
40
|
-
[nzSize]="props['size'] || 'default'"
|
41
|
-
[class]="props['className']"
|
42
|
-
[style]="props['style']"
|
43
|
-
>
|
44
|
-
@for (x of props.buttons; track x) {
|
45
|
-
<ng-container *ngTemplateOutlet="btnTemplate; context: { $implicit: x }"></ng-container>
|
46
|
-
}
|
47
|
-
</nz-button-group>
|
48
|
-
|
49
|
-
<ng-template #btnTemplate let-item>
|
50
|
-
<button
|
51
|
-
nz-button
|
52
|
-
[formlyAttributes]="item"
|
53
|
-
[type]="item.type || 'button'"
|
54
|
-
[attr.title]="item.props['title']"
|
55
|
-
[disabled]="!!item.props.disabled"
|
56
|
-
[nzBlock]="!!item.props.block"
|
57
|
-
[nzDanger]="!!item.props.danger"
|
58
|
-
[nzGhost]="!!item.props.ghost"
|
59
|
-
[class]="item.props['className']"
|
60
|
-
[style]="item.props['style']"
|
61
|
-
[nzSize]="item.props.size || 'default'"
|
62
|
-
[nzLoading]="!!item.props.loading"
|
63
|
-
[nzShape]="item.props.shape ?? null"
|
64
|
-
[nzType]="item.props.nzType ?? null"
|
65
|
-
>
|
66
|
-
@if (item.props.beforeIcon) {
|
67
|
-
<span nz-icon [nzType]="item.props.beforeIcon"></span>
|
68
|
-
}
|
69
|
-
@if (item.props.text) {
|
70
|
-
<span>{{ item.props.text }}</span>
|
71
|
-
}
|
72
|
-
@if (item.props.afterIcon) {
|
73
|
-
<span nz-icon [nzType]="item.props.afterIcon"></span>
|
74
|
-
}
|
75
|
-
</button>
|
76
|
-
</ng-template>
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormlyFieldButtonGroup, isStandalone: false, selector: "formly-field-button-group", usesInheritance: true, ngImport: i0, template: `
|
38
|
+
<nz-button-group
|
39
|
+
[formlyAttributes]="field"
|
40
|
+
[nzSize]="props['size'] || 'default'"
|
41
|
+
[class]="props['className']"
|
42
|
+
[style]="props['style']"
|
43
|
+
>
|
44
|
+
@for (x of props.buttons; track x) {
|
45
|
+
<ng-container *ngTemplateOutlet="btnTemplate; context: { $implicit: x }"></ng-container>
|
46
|
+
}
|
47
|
+
</nz-button-group>
|
48
|
+
|
49
|
+
<ng-template #btnTemplate let-item>
|
50
|
+
<button
|
51
|
+
nz-button
|
52
|
+
[formlyAttributes]="item"
|
53
|
+
[type]="item.type || 'button'"
|
54
|
+
[attr.title]="item.props['title']"
|
55
|
+
[disabled]="!!item.props.disabled"
|
56
|
+
[nzBlock]="!!item.props.block"
|
57
|
+
[nzDanger]="!!item.props.danger"
|
58
|
+
[nzGhost]="!!item.props.ghost"
|
59
|
+
[class]="item.props['className']"
|
60
|
+
[style]="item.props['style']"
|
61
|
+
[nzSize]="item.props.size || 'default'"
|
62
|
+
[nzLoading]="!!item.props.loading"
|
63
|
+
[nzShape]="item.props.shape ?? null"
|
64
|
+
[nzType]="item.props.nzType ?? null"
|
65
|
+
>
|
66
|
+
@if (item.props.beforeIcon) {
|
67
|
+
<span nz-icon [nzType]="item.props.beforeIcon"></span>
|
68
|
+
}
|
69
|
+
@if (item.props.text) {
|
70
|
+
<span>{{ item.props.text }}</span>
|
71
|
+
}
|
72
|
+
@if (item.props.afterIcon) {
|
73
|
+
<span nz-icon [nzType]="item.props.afterIcon"></span>
|
74
|
+
}
|
75
|
+
</button>
|
76
|
+
</ng-template>
|
77
77
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "component", type: i2.NzButtonGroupComponent, selector: "nz-button-group", inputs: ["nzSize"], exportAs: ["nzButtonGroup"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i5.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i6.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
78
78
|
}
|
79
79
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormlyFieldButtonGroup, decorators: [{
|
80
80
|
type: Component,
|
81
81
|
args: [{
|
82
82
|
selector: 'formly-field-button-group',
|
83
|
-
template: `
|
84
|
-
<nz-button-group
|
85
|
-
[formlyAttributes]="field"
|
86
|
-
[nzSize]="props['size'] || 'default'"
|
87
|
-
[class]="props['className']"
|
88
|
-
[style]="props['style']"
|
89
|
-
>
|
90
|
-
@for (x of props.buttons; track x) {
|
91
|
-
<ng-container *ngTemplateOutlet="btnTemplate; context: { $implicit: x }"></ng-container>
|
92
|
-
}
|
93
|
-
</nz-button-group>
|
94
|
-
|
95
|
-
<ng-template #btnTemplate let-item>
|
96
|
-
<button
|
97
|
-
nz-button
|
98
|
-
[formlyAttributes]="item"
|
99
|
-
[type]="item.type || 'button'"
|
100
|
-
[attr.title]="item.props['title']"
|
101
|
-
[disabled]="!!item.props.disabled"
|
102
|
-
[nzBlock]="!!item.props.block"
|
103
|
-
[nzDanger]="!!item.props.danger"
|
104
|
-
[nzGhost]="!!item.props.ghost"
|
105
|
-
[class]="item.props['className']"
|
106
|
-
[style]="item.props['style']"
|
107
|
-
[nzSize]="item.props.size || 'default'"
|
108
|
-
[nzLoading]="!!item.props.loading"
|
109
|
-
[nzShape]="item.props.shape ?? null"
|
110
|
-
[nzType]="item.props.nzType ?? null"
|
111
|
-
>
|
112
|
-
@if (item.props.beforeIcon) {
|
113
|
-
<span nz-icon [nzType]="item.props.beforeIcon"></span>
|
114
|
-
}
|
115
|
-
@if (item.props.text) {
|
116
|
-
<span>{{ item.props.text }}</span>
|
117
|
-
}
|
118
|
-
@if (item.props.afterIcon) {
|
119
|
-
<span nz-icon [nzType]="item.props.afterIcon"></span>
|
120
|
-
}
|
121
|
-
</button>
|
122
|
-
</ng-template>
|
83
|
+
template: `
|
84
|
+
<nz-button-group
|
85
|
+
[formlyAttributes]="field"
|
86
|
+
[nzSize]="props['size'] || 'default'"
|
87
|
+
[class]="props['className']"
|
88
|
+
[style]="props['style']"
|
89
|
+
>
|
90
|
+
@for (x of props.buttons; track x) {
|
91
|
+
<ng-container *ngTemplateOutlet="btnTemplate; context: { $implicit: x }"></ng-container>
|
92
|
+
}
|
93
|
+
</nz-button-group>
|
94
|
+
|
95
|
+
<ng-template #btnTemplate let-item>
|
96
|
+
<button
|
97
|
+
nz-button
|
98
|
+
[formlyAttributes]="item"
|
99
|
+
[type]="item.type || 'button'"
|
100
|
+
[attr.title]="item.props['title']"
|
101
|
+
[disabled]="!!item.props.disabled"
|
102
|
+
[nzBlock]="!!item.props.block"
|
103
|
+
[nzDanger]="!!item.props.danger"
|
104
|
+
[nzGhost]="!!item.props.ghost"
|
105
|
+
[class]="item.props['className']"
|
106
|
+
[style]="item.props['style']"
|
107
|
+
[nzSize]="item.props.size || 'default'"
|
108
|
+
[nzLoading]="!!item.props.loading"
|
109
|
+
[nzShape]="item.props.shape ?? null"
|
110
|
+
[nzType]="item.props.nzType ?? null"
|
111
|
+
>
|
112
|
+
@if (item.props.beforeIcon) {
|
113
|
+
<span nz-icon [nzType]="item.props.beforeIcon"></span>
|
114
|
+
}
|
115
|
+
@if (item.props.text) {
|
116
|
+
<span>{{ item.props.text }}</span>
|
117
|
+
}
|
118
|
+
@if (item.props.afterIcon) {
|
119
|
+
<span nz-icon [nzType]="item.props.afterIcon"></span>
|
120
|
+
}
|
121
|
+
</button>
|
122
|
+
</ng-template>
|
123
123
|
`,
|
124
124
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
125
125
|
standalone: false
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-button-group.mjs","sources":["../../../../packages/formlyantd/button-group/src/button-group.type.ts","../../../../packages/formlyantd/button-group/src/button-group.config.ts","../../../../packages/formlyantd/button-group/src/button-group.module.ts","../../../../packages/formlyantd/button-group/src/ngx-formly-zorro-antd-button-group.ts"],"sourcesContent":["import { Component, Type, OnDestroy, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { Subject } from 'rxjs';\nimport { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { ButtonProps } from 'ngx-formly-zorro-antd/button';\n\nimport type { NzButtonGroupSize } from 'ng-zorro-antd/button';\n\n/**\n * @publicApi\n */\nexport interface ButtonGroupProps extends FormlyFieldProps {\n size?: NzButtonGroupSize;\n\n /**\n * 每个按钮配置\n */\n buttons?: NzFormlyFieldConfig<Omit<ButtonProps, 'size' | 'textName'>>[];\n}\n\n/**\n * @deprecated Will be removed in v20. Use `space-compact` instead.\n */\nexport interface FormlyButtonGroupFieldConfig extends NzFormlyFieldConfig<ButtonGroupProps> {\n type: 'button-group' | Type<FormlyFieldButtonGroup>;\n}\n/**\n * @private\n */\n@Component({\n selector: 'formly-field-button-group',\n template: `\n <nz-button-group\n [formlyAttributes]=\"field\"\n [nzSize]=\"props['size'] || 'default'\"\n [class]=\"props['className']\"\n [style]=\"props['style']\"\n >\n @for (x of props.buttons; track x) {\n <ng-container *ngTemplateOutlet=\"btnTemplate; context: { $implicit: x }\"></ng-container>\n }\n </nz-button-group>\n\n <ng-template #btnTemplate let-item>\n <button\n nz-button\n [formlyAttributes]=\"item\"\n [type]=\"item.type || 'button'\"\n [attr.title]=\"item.props['title']\"\n [disabled]=\"!!item.props.disabled\"\n [nzBlock]=\"!!item.props.block\"\n [nzDanger]=\"!!item.props.danger\"\n [nzGhost]=\"!!item.props.ghost\"\n [class]=\"item.props['className']\"\n [style]=\"item.props['style']\"\n [nzSize]=\"item.props.size || 'default'\"\n [nzLoading]=\"!!item.props.loading\"\n [nzShape]=\"item.props.shape ?? null\"\n [nzType]=\"item.props.nzType ?? null\"\n >\n @if (item.props.beforeIcon) {\n <span nz-icon [nzType]=\"item.props.beforeIcon\"></span>\n }\n @if (item.props.text) {\n <span>{{ item.props.text }}</span>\n }\n @if (item.props.afterIcon) {\n <span nz-icon [nzType]=\"item.props.afterIcon\"></span>\n }\n </button>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class FormlyFieldButtonGroup extends FieldType<FieldTypeConfig<ButtonGroupProps>> implements OnDestroy {\n destroy$ = new Subject<void>();\n override defaultOptions = {\n props: {\n size: 'default' as const,\n buttons: []\n }\n };\n\n constructor() {\n super();\n }\n\n subjectDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n ngOnDestroy(): void {\n this.subjectDestroy();\n }\n}\n","import type { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldButtonGroup } from './button-group.type';\n\nexport function withFormlyFieldButtonGroup(): ConfigOption {\n return {\n types: [\n {\n name: 'button-group',\n component: FormlyFieldButtonGroup\n }\n ]\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyFieldButtonGroup } from './button-group.type';\nimport { withFormlyFieldButtonGroup } from './button-group.config';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@NgModule({\n declarations: [FormlyFieldButtonGroup],\n imports: [CommonModule, NzButtonModule, NzIconModule, FormlyModule.forChild(withFormlyFieldButtonGroup())]\n})\nexport class FormlyNzButtonGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA2BA;;AAEG;AA+CG,MAAO,sBAAuB,SAAQ,SAA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
+
{"version":3,"file":"ngx-formly-zorro-antd-button-group.mjs","sources":["../../../../packages/formlyantd/button-group/src/button-group.type.ts","../../../../packages/formlyantd/button-group/src/button-group.config.ts","../../../../packages/formlyantd/button-group/src/button-group.module.ts","../../../../packages/formlyantd/button-group/src/ngx-formly-zorro-antd-button-group.ts"],"sourcesContent":["import { Component, Type, OnDestroy, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport { ButtonProps } from 'ngx-formly-zorro-antd/button';\r\n\r\nimport type { NzButtonGroupSize } from 'ng-zorro-antd/button';\r\n\r\n/**\r\n * @publicApi\r\n */\r\nexport interface ButtonGroupProps extends FormlyFieldProps {\r\n size?: NzButtonGroupSize;\r\n\r\n /**\r\n * 每个按钮配置\r\n */\r\n buttons?: NzFormlyFieldConfig<Omit<ButtonProps, 'size' | 'textName'>>[];\r\n}\r\n\r\n/**\r\n * @deprecated Will be removed in v20. Use `space-compact` instead.\r\n */\r\nexport interface FormlyButtonGroupFieldConfig extends NzFormlyFieldConfig<ButtonGroupProps> {\r\n type: 'button-group' | Type<FormlyFieldButtonGroup>;\r\n}\r\n/**\r\n * @private\r\n */\r\n@Component({\r\n selector: 'formly-field-button-group',\r\n template: `\r\n <nz-button-group\r\n [formlyAttributes]=\"field\"\r\n [nzSize]=\"props['size'] || 'default'\"\r\n [class]=\"props['className']\"\r\n [style]=\"props['style']\"\r\n >\r\n @for (x of props.buttons; track x) {\r\n <ng-container *ngTemplateOutlet=\"btnTemplate; context: { $implicit: x }\"></ng-container>\r\n }\r\n </nz-button-group>\r\n\r\n <ng-template #btnTemplate let-item>\r\n <button\r\n nz-button\r\n [formlyAttributes]=\"item\"\r\n [type]=\"item.type || 'button'\"\r\n [attr.title]=\"item.props['title']\"\r\n [disabled]=\"!!item.props.disabled\"\r\n [nzBlock]=\"!!item.props.block\"\r\n [nzDanger]=\"!!item.props.danger\"\r\n [nzGhost]=\"!!item.props.ghost\"\r\n [class]=\"item.props['className']\"\r\n [style]=\"item.props['style']\"\r\n [nzSize]=\"item.props.size || 'default'\"\r\n [nzLoading]=\"!!item.props.loading\"\r\n [nzShape]=\"item.props.shape ?? null\"\r\n [nzType]=\"item.props.nzType ?? null\"\r\n >\r\n @if (item.props.beforeIcon) {\r\n <span nz-icon [nzType]=\"item.props.beforeIcon\"></span>\r\n }\r\n @if (item.props.text) {\r\n <span>{{ item.props.text }}</span>\r\n }\r\n @if (item.props.afterIcon) {\r\n <span nz-icon [nzType]=\"item.props.afterIcon\"></span>\r\n }\r\n </button>\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: false\r\n})\r\nexport class FormlyFieldButtonGroup extends FieldType<FieldTypeConfig<ButtonGroupProps>> implements OnDestroy {\r\n destroy$ = new Subject<void>();\r\n override defaultOptions = {\r\n props: {\r\n size: 'default' as const,\r\n buttons: []\r\n }\r\n };\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n subjectDestroy(): void {\r\n this.destroy$.next();\r\n this.destroy$.complete();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subjectDestroy();\r\n }\r\n}\r\n","import type { ConfigOption } from '@ngx-formly/core';\r\nimport { FormlyFieldButtonGroup } from './button-group.type';\r\n\r\nexport function withFormlyFieldButtonGroup(): ConfigOption {\r\n return {\r\n types: [\r\n {\r\n name: 'button-group',\r\n component: FormlyFieldButtonGroup\r\n }\r\n ]\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\n\r\nimport { FormlyFieldButtonGroup } from './button-group.type';\r\nimport { withFormlyFieldButtonGroup } from './button-group.config';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldButtonGroup],\r\n imports: [CommonModule, NzButtonModule, NzIconModule, FormlyModule.forChild(withFormlyFieldButtonGroup())]\r\n})\r\nexport class FormlyNzButtonGroupModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA2BA;;AAEG;AA+CG,MAAO,sBAAuB,SAAQ,SAA4C,CAAA;AAStF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AATT,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;AACrB,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,OAAO,EAAE;AACV;SACF;;IAMD,cAAc,GAAA;AACZ,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;AACpB,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;;IAG1B,WAAW,GAAA;QACT,IAAI,CAAC,cAAc,EAAE;;+GAnBZ,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,EA5CvB,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IA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,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAE9F,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,0BAA0B,EAAE,CAAC;AAC1G,iBAAA;;;ACZD;;AAEG;;;;"}
|
@@ -38,130 +38,130 @@ class FormlyFieldButton extends FieldType {
|
|
38
38
|
return resolveTplName(this.props, this.fieldTemplates, 'text');
|
39
39
|
}
|
40
40
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormlyFieldButton, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
41
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormlyFieldButton, isStandalone: false, selector: "formly-field-button", usesInheritance: true, ngImport: i0, template: `
|
42
|
-
@if (props.type === 'a') {
|
43
|
-
<a
|
44
|
-
nz-button
|
45
|
-
[formlyAttributes]="field"
|
46
|
-
[attr.title]="props['title']"
|
47
|
-
[nzGhost]="!!props['ghost']"
|
48
|
-
[nzLoading]="!!props['loading']"
|
49
|
-
[nzShape]="props['shape'] ?? null"
|
50
|
-
[nzSize]="props['size']!"
|
51
|
-
[nzBlock]="!!props['block']"
|
52
|
-
[nzDanger]="!!props['danger']"
|
53
|
-
[nzType]="props['nzType'] ?? 'link'"
|
54
|
-
[class]="props['className']"
|
55
|
-
[style]="props['style']"
|
56
|
-
>
|
57
|
-
@if (props['beforeIcon']) {
|
58
|
-
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
59
|
-
}
|
60
|
-
@if (hasText) {
|
61
|
-
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
62
|
-
{{ text }}
|
63
|
-
</ng-container>
|
64
|
-
}
|
65
|
-
@if (props['afterIcon']) {
|
66
|
-
<span nz-icon [nzType]="props['afterIcon']"></span>
|
67
|
-
}
|
68
|
-
</a>
|
69
|
-
} @else {
|
70
|
-
<button
|
71
|
-
[formlyAttributes]="field"
|
72
|
-
[attr.type]="field.type"
|
73
|
-
[attr.form]="props['formName']"
|
74
|
-
[attr.title]="props['title']"
|
75
|
-
[disabled]="props['disabled'] || !!formControl.disabled"
|
76
|
-
[nzGhost]="!!props['ghost']"
|
77
|
-
[nzLoading]="!!props['loading']"
|
78
|
-
[nzShape]="props['shape'] ?? null"
|
79
|
-
[nzSize]="props['size']!"
|
80
|
-
[nzBlock]="!!props['block']"
|
81
|
-
[nzDanger]="!!props['danger']"
|
82
|
-
[nzType]="props['nzType'] ?? null"
|
83
|
-
[class]="props['className']"
|
84
|
-
[style]="props['style']"
|
85
|
-
nz-button
|
86
|
-
>
|
87
|
-
@if (props['beforeIcon']) {
|
88
|
-
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
89
|
-
}
|
90
|
-
@if (hasText) {
|
91
|
-
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
92
|
-
{{ text }}
|
93
|
-
</ng-container>
|
94
|
-
}
|
95
|
-
@if (props['afterIcon']) {
|
96
|
-
<span nz-icon [nzType]="props['afterIcon']"></span>
|
97
|
-
}
|
98
|
-
</button>
|
99
|
-
}
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormlyFieldButton, isStandalone: false, selector: "formly-field-button", usesInheritance: true, ngImport: i0, template: `
|
42
|
+
@if (props.type === 'a') {
|
43
|
+
<a
|
44
|
+
nz-button
|
45
|
+
[formlyAttributes]="field"
|
46
|
+
[attr.title]="props['title']"
|
47
|
+
[nzGhost]="!!props['ghost']"
|
48
|
+
[nzLoading]="!!props['loading']"
|
49
|
+
[nzShape]="props['shape'] ?? null"
|
50
|
+
[nzSize]="props['size']!"
|
51
|
+
[nzBlock]="!!props['block']"
|
52
|
+
[nzDanger]="!!props['danger']"
|
53
|
+
[nzType]="props['nzType'] ?? 'link'"
|
54
|
+
[class]="props['className']"
|
55
|
+
[style]="props['style']"
|
56
|
+
>
|
57
|
+
@if (props['beforeIcon']) {
|
58
|
+
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
59
|
+
}
|
60
|
+
@if (hasText) {
|
61
|
+
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
62
|
+
{{ text }}
|
63
|
+
</ng-container>
|
64
|
+
}
|
65
|
+
@if (props['afterIcon']) {
|
66
|
+
<span nz-icon [nzType]="props['afterIcon']"></span>
|
67
|
+
}
|
68
|
+
</a>
|
69
|
+
} @else {
|
70
|
+
<button
|
71
|
+
[formlyAttributes]="field"
|
72
|
+
[attr.type]="field.type"
|
73
|
+
[attr.form]="props['formName']"
|
74
|
+
[attr.title]="props['title']"
|
75
|
+
[disabled]="props['disabled'] || !!formControl.disabled"
|
76
|
+
[nzGhost]="!!props['ghost']"
|
77
|
+
[nzLoading]="!!props['loading']"
|
78
|
+
[nzShape]="props['shape'] ?? null"
|
79
|
+
[nzSize]="props['size']!"
|
80
|
+
[nzBlock]="!!props['block']"
|
81
|
+
[nzDanger]="!!props['danger']"
|
82
|
+
[nzType]="props['nzType'] ?? null"
|
83
|
+
[class]="props['className']"
|
84
|
+
[style]="props['style']"
|
85
|
+
nz-button
|
86
|
+
>
|
87
|
+
@if (props['beforeIcon']) {
|
88
|
+
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
89
|
+
}
|
90
|
+
@if (hasText) {
|
91
|
+
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
92
|
+
{{ text }}
|
93
|
+
</ng-container>
|
94
|
+
}
|
95
|
+
@if (props['afterIcon']) {
|
96
|
+
<span nz-icon [nzType]="props['afterIcon']"></span>
|
97
|
+
}
|
98
|
+
</button>
|
99
|
+
}
|
100
100
|
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i6.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i7.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
101
101
|
}
|
102
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormlyFieldButton, decorators: [{
|
103
103
|
type: Component,
|
104
104
|
args: [{
|
105
105
|
selector: 'formly-field-button',
|
106
|
-
template: `
|
107
|
-
@if (props.type === 'a') {
|
108
|
-
<a
|
109
|
-
nz-button
|
110
|
-
[formlyAttributes]="field"
|
111
|
-
[attr.title]="props['title']"
|
112
|
-
[nzGhost]="!!props['ghost']"
|
113
|
-
[nzLoading]="!!props['loading']"
|
114
|
-
[nzShape]="props['shape'] ?? null"
|
115
|
-
[nzSize]="props['size']!"
|
116
|
-
[nzBlock]="!!props['block']"
|
117
|
-
[nzDanger]="!!props['danger']"
|
118
|
-
[nzType]="props['nzType'] ?? 'link'"
|
119
|
-
[class]="props['className']"
|
120
|
-
[style]="props['style']"
|
121
|
-
>
|
122
|
-
@if (props['beforeIcon']) {
|
123
|
-
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
124
|
-
}
|
125
|
-
@if (hasText) {
|
126
|
-
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
127
|
-
{{ text }}
|
128
|
-
</ng-container>
|
129
|
-
}
|
130
|
-
@if (props['afterIcon']) {
|
131
|
-
<span nz-icon [nzType]="props['afterIcon']"></span>
|
132
|
-
}
|
133
|
-
</a>
|
134
|
-
} @else {
|
135
|
-
<button
|
136
|
-
[formlyAttributes]="field"
|
137
|
-
[attr.type]="field.type"
|
138
|
-
[attr.form]="props['formName']"
|
139
|
-
[attr.title]="props['title']"
|
140
|
-
[disabled]="props['disabled'] || !!formControl.disabled"
|
141
|
-
[nzGhost]="!!props['ghost']"
|
142
|
-
[nzLoading]="!!props['loading']"
|
143
|
-
[nzShape]="props['shape'] ?? null"
|
144
|
-
[nzSize]="props['size']!"
|
145
|
-
[nzBlock]="!!props['block']"
|
146
|
-
[nzDanger]="!!props['danger']"
|
147
|
-
[nzType]="props['nzType'] ?? null"
|
148
|
-
[class]="props['className']"
|
149
|
-
[style]="props['style']"
|
150
|
-
nz-button
|
151
|
-
>
|
152
|
-
@if (props['beforeIcon']) {
|
153
|
-
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
154
|
-
}
|
155
|
-
@if (hasText) {
|
156
|
-
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
157
|
-
{{ text }}
|
158
|
-
</ng-container>
|
159
|
-
}
|
160
|
-
@if (props['afterIcon']) {
|
161
|
-
<span nz-icon [nzType]="props['afterIcon']"></span>
|
162
|
-
}
|
163
|
-
</button>
|
164
|
-
}
|
106
|
+
template: `
|
107
|
+
@if (props.type === 'a') {
|
108
|
+
<a
|
109
|
+
nz-button
|
110
|
+
[formlyAttributes]="field"
|
111
|
+
[attr.title]="props['title']"
|
112
|
+
[nzGhost]="!!props['ghost']"
|
113
|
+
[nzLoading]="!!props['loading']"
|
114
|
+
[nzShape]="props['shape'] ?? null"
|
115
|
+
[nzSize]="props['size']!"
|
116
|
+
[nzBlock]="!!props['block']"
|
117
|
+
[nzDanger]="!!props['danger']"
|
118
|
+
[nzType]="props['nzType'] ?? 'link'"
|
119
|
+
[class]="props['className']"
|
120
|
+
[style]="props['style']"
|
121
|
+
>
|
122
|
+
@if (props['beforeIcon']) {
|
123
|
+
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
124
|
+
}
|
125
|
+
@if (hasText) {
|
126
|
+
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
127
|
+
{{ text }}
|
128
|
+
</ng-container>
|
129
|
+
}
|
130
|
+
@if (props['afterIcon']) {
|
131
|
+
<span nz-icon [nzType]="props['afterIcon']"></span>
|
132
|
+
}
|
133
|
+
</a>
|
134
|
+
} @else {
|
135
|
+
<button
|
136
|
+
[formlyAttributes]="field"
|
137
|
+
[attr.type]="field.type"
|
138
|
+
[attr.form]="props['formName']"
|
139
|
+
[attr.title]="props['title']"
|
140
|
+
[disabled]="props['disabled'] || !!formControl.disabled"
|
141
|
+
[nzGhost]="!!props['ghost']"
|
142
|
+
[nzLoading]="!!props['loading']"
|
143
|
+
[nzShape]="props['shape'] ?? null"
|
144
|
+
[nzSize]="props['size']!"
|
145
|
+
[nzBlock]="!!props['block']"
|
146
|
+
[nzDanger]="!!props['danger']"
|
147
|
+
[nzType]="props['nzType'] ?? null"
|
148
|
+
[class]="props['className']"
|
149
|
+
[style]="props['style']"
|
150
|
+
nz-button
|
151
|
+
>
|
152
|
+
@if (props['beforeIcon']) {
|
153
|
+
<span nz-icon [nzType]="props['beforeIcon']"></span>
|
154
|
+
}
|
155
|
+
@if (hasText) {
|
156
|
+
<ng-container *nzStringTemplateOutlet="text; context: { $implicit: field, options: props }">
|
157
|
+
{{ text }}
|
158
|
+
</ng-container>
|
159
|
+
}
|
160
|
+
@if (props['afterIcon']) {
|
161
|
+
<span nz-icon [nzType]="props['afterIcon']"></span>
|
162
|
+
}
|
163
|
+
</button>
|
164
|
+
}
|
165
165
|
`,
|
166
166
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
167
167
|
standalone: false
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-button.mjs","sources":["../../../../packages/formlyantd/button/src/button.type.ts","../../../../packages/formlyantd/button/src/button.config.ts","../../../../packages/formlyantd/button/src/button.module.ts","../../../../packages/formlyantd/button/src/ngx-formly-zorro-antd-button.ts"],"sourcesContent":["import { Component, Type, TemplateRef, Optional, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { NzFormlyFieldConfig, FormlyBoxTemplates, hasTplNameValue, resolveTplName } from 'ngx-formly-zorro-antd/common';\n\nimport type { NzButtonShape, NzButtonSize, NzButtonType } from 'ng-zorro-antd/button';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * @publicApi\n */\nexport interface ButtonProps extends FormlyFieldProps {\n type?: 'a' | 'button';\n\n /**\n * 标题\n */\n title?: string;\n\n /**\n * form 名称\n */\n formName?: string;\n\n /**\n * 按钮内容文本\n */\n text?: string | TemplateRef<{ $implicit: NzSafeAny; options: ButtonProps }>;\n textName?: string;\n\n /**\n * 幽灵属性,使按钮背景透明\n * @default false\n */\n ghost?: boolean;\n\n /**\n * 设置按钮载入状态\n * @default false\n */\n loading?: boolean;\n\n /**\n * 设置按钮形状\n */\n shape?: NzButtonShape;\n\n /**\n * 设置按钮大小\n * @default default\n */\n size?: NzButtonSize;\n\n /**\n * 设置按钮类型\n */\n nzType?: NzButtonType;\n\n /**\n * 将按钮宽度调整为其父宽度的选项\n * @default false\n */\n block?: boolean;\n\n /**\n * 设置危险按钮\n * @default false\n */\n danger?: boolean;\n\n /**\n * 文字前面的图标\n */\n beforeIcon?: string;\n\n /**\n * 文字后面面的图标\n */\n afterIcon?: string;\n}\n\nexport interface FormlyButtonFieldConfig extends NzFormlyFieldConfig<ButtonProps> {\n type: 'button' | 'submit' | 'reset' | Type<FormlyFieldButton>;\n}\n/**\n * @private\n */\n@Component({\n selector: 'formly-field-button',\n template: `\n @if (props.type === 'a') {\n <a\n nz-button\n [formlyAttributes]=\"field\"\n [attr.title]=\"props['title']\"\n [nzGhost]=\"!!props['ghost']\"\n [nzLoading]=\"!!props['loading']\"\n [nzShape]=\"props['shape'] ?? null\"\n [nzSize]=\"props['size']!\"\n [nzBlock]=\"!!props['block']\"\n [nzDanger]=\"!!props['danger']\"\n [nzType]=\"props['nzType'] ?? 'link'\"\n [class]=\"props['className']\"\n [style]=\"props['style']\"\n >\n @if (props['beforeIcon']) {\n <span nz-icon [nzType]=\"props['beforeIcon']\"></span>\n }\n @if (hasText) {\n <ng-container *nzStringTemplateOutlet=\"text; context: { $implicit: field, options: props }\">\n {{ text }}\n </ng-container>\n }\n @if (props['afterIcon']) {\n <span nz-icon [nzType]=\"props['afterIcon']\"></span>\n }\n </a>\n } @else {\n <button\n [formlyAttributes]=\"field\"\n [attr.type]=\"field.type\"\n [attr.form]=\"props['formName']\"\n [attr.title]=\"props['title']\"\n [disabled]=\"props['disabled'] || !!formControl.disabled\"\n [nzGhost]=\"!!props['ghost']\"\n [nzLoading]=\"!!props['loading']\"\n [nzShape]=\"props['shape'] ?? null\"\n [nzSize]=\"props['size']!\"\n [nzBlock]=\"!!props['block']\"\n [nzDanger]=\"!!props['danger']\"\n [nzType]=\"props['nzType'] ?? null\"\n [class]=\"props['className']\"\n [style]=\"props['style']\"\n nz-button\n >\n @if (props['beforeIcon']) {\n <span nz-icon [nzType]=\"props['beforeIcon']\"></span>\n }\n @if (hasText) {\n <ng-container *nzStringTemplateOutlet=\"text; context: { $implicit: field, options: props }\">\n {{ text }}\n </ng-container>\n }\n @if (props['afterIcon']) {\n <span nz-icon [nzType]=\"props['afterIcon']\"></span>\n }\n </button>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class FormlyFieldButton extends FieldType<FieldTypeConfig<ButtonProps>> {\n override defaultOptions = {\n props: {\n ghost: false,\n loading: false,\n block: false,\n size: 'default' as const,\n danger: false\n }\n };\n\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n\n get hasText() {\n return hasTplNameValue(this.props, 'text');\n }\n\n get text() {\n return resolveTplName(this.props, this.fieldTemplates, 'text');\n }\n}\n","import type { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldButton } from './button.type';\n\nexport function withFormlyFieldButton(): ConfigOption {\n return {\n types: [\n {\n name: 'button',\n component: FormlyFieldButton\n },\n {\n name: 'submit',\n extends: 'button'\n },\n {\n name: 'reset',\n extends: 'button'\n }\n ]\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyFieldButton } from './button.type';\nimport { withFormlyFieldButton } from './button.config';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@NgModule({\n declarations: [FormlyFieldButton],\n imports: [CommonModule, NzOutletModule, NzButtonModule, NzIconModule, FormlyModule.forChild(withFormlyFieldButton())]\n})\nexport class FormlyNzButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;AAoFA;;AAEG;AAkEG,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAW5E,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE;QADsB,IAAc,CAAA,cAAA,GAAd,cAAc;AAVpC,QAAA,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AACrH,iBAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-button.mjs","sources":["../../../../packages/formlyantd/button/src/button.type.ts","../../../../packages/formlyantd/button/src/button.config.ts","../../../../packages/formlyantd/button/src/button.module.ts","../../../../packages/formlyantd/button/src/ngx-formly-zorro-antd-button.ts"],"sourcesContent":["import { Component, Type, TemplateRef, Optional, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\nimport { NzFormlyFieldConfig, FormlyBoxTemplates, hasTplNameValue, resolveTplName } from 'ngx-formly-zorro-antd/common';\r\n\r\nimport type { NzButtonShape, NzButtonSize, NzButtonType } from 'ng-zorro-antd/button';\r\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\r\n\r\n/**\r\n * @publicApi\r\n */\r\nexport interface ButtonProps extends FormlyFieldProps {\r\n type?: 'a' | 'button';\r\n\r\n /**\r\n * 标题\r\n */\r\n title?: string;\r\n\r\n /**\r\n * form 名称\r\n */\r\n formName?: string;\r\n\r\n /**\r\n * 按钮内容文本\r\n */\r\n text?: string | TemplateRef<{ $implicit: NzSafeAny; options: ButtonProps }>;\r\n textName?: string;\r\n\r\n /**\r\n * 幽灵属性,使按钮背景透明\r\n * @default false\r\n */\r\n ghost?: boolean;\r\n\r\n /**\r\n * 设置按钮载入状态\r\n * @default false\r\n */\r\n loading?: boolean;\r\n\r\n /**\r\n * 设置按钮形状\r\n */\r\n shape?: NzButtonShape;\r\n\r\n /**\r\n * 设置按钮大小\r\n * @default default\r\n */\r\n size?: NzButtonSize;\r\n\r\n /**\r\n * 设置按钮类型\r\n */\r\n nzType?: NzButtonType;\r\n\r\n /**\r\n * 将按钮宽度调整为其父宽度的选项\r\n * @default false\r\n */\r\n block?: boolean;\r\n\r\n /**\r\n * 设置危险按钮\r\n * @default false\r\n */\r\n danger?: boolean;\r\n\r\n /**\r\n * 文字前面的图标\r\n */\r\n beforeIcon?: string;\r\n\r\n /**\r\n * 文字后面面的图标\r\n */\r\n afterIcon?: string;\r\n}\r\n\r\nexport interface FormlyButtonFieldConfig extends NzFormlyFieldConfig<ButtonProps> {\r\n type: 'button' | 'submit' | 'reset' | Type<FormlyFieldButton>;\r\n}\r\n/**\r\n * @private\r\n */\r\n@Component({\r\n selector: 'formly-field-button',\r\n template: `\r\n @if (props.type === 'a') {\r\n <a\r\n nz-button\r\n [formlyAttributes]=\"field\"\r\n [attr.title]=\"props['title']\"\r\n [nzGhost]=\"!!props['ghost']\"\r\n [nzLoading]=\"!!props['loading']\"\r\n [nzShape]=\"props['shape'] ?? null\"\r\n [nzSize]=\"props['size']!\"\r\n [nzBlock]=\"!!props['block']\"\r\n [nzDanger]=\"!!props['danger']\"\r\n [nzType]=\"props['nzType'] ?? 'link'\"\r\n [class]=\"props['className']\"\r\n [style]=\"props['style']\"\r\n >\r\n @if (props['beforeIcon']) {\r\n <span nz-icon [nzType]=\"props['beforeIcon']\"></span>\r\n }\r\n @if (hasText) {\r\n <ng-container *nzStringTemplateOutlet=\"text; context: { $implicit: field, options: props }\">\r\n {{ text }}\r\n </ng-container>\r\n }\r\n @if (props['afterIcon']) {\r\n <span nz-icon [nzType]=\"props['afterIcon']\"></span>\r\n }\r\n </a>\r\n } @else {\r\n <button\r\n [formlyAttributes]=\"field\"\r\n [attr.type]=\"field.type\"\r\n [attr.form]=\"props['formName']\"\r\n [attr.title]=\"props['title']\"\r\n [disabled]=\"props['disabled'] || !!formControl.disabled\"\r\n [nzGhost]=\"!!props['ghost']\"\r\n [nzLoading]=\"!!props['loading']\"\r\n [nzShape]=\"props['shape'] ?? null\"\r\n [nzSize]=\"props['size']!\"\r\n [nzBlock]=\"!!props['block']\"\r\n [nzDanger]=\"!!props['danger']\"\r\n [nzType]=\"props['nzType'] ?? null\"\r\n [class]=\"props['className']\"\r\n [style]=\"props['style']\"\r\n nz-button\r\n >\r\n @if (props['beforeIcon']) {\r\n <span nz-icon [nzType]=\"props['beforeIcon']\"></span>\r\n }\r\n @if (hasText) {\r\n <ng-container *nzStringTemplateOutlet=\"text; context: { $implicit: field, options: props }\">\r\n {{ text }}\r\n </ng-container>\r\n }\r\n @if (props['afterIcon']) {\r\n <span nz-icon [nzType]=\"props['afterIcon']\"></span>\r\n }\r\n </button>\r\n }\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: false\r\n})\r\nexport class FormlyFieldButton extends FieldType<FieldTypeConfig<ButtonProps>> {\r\n override defaultOptions = {\r\n props: {\r\n ghost: false,\r\n loading: false,\r\n block: false,\r\n size: 'default' as const,\r\n danger: false\r\n }\r\n };\r\n\r\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\r\n super();\r\n }\r\n\r\n get hasText() {\r\n return hasTplNameValue(this.props, 'text');\r\n }\r\n\r\n get text() {\r\n return resolveTplName(this.props, this.fieldTemplates, 'text');\r\n }\r\n}\r\n","import type { ConfigOption } from '@ngx-formly/core';\r\nimport { FormlyFieldButton } from './button.type';\r\n\r\nexport function withFormlyFieldButton(): ConfigOption {\r\n return {\r\n types: [\r\n {\r\n name: 'button',\r\n component: FormlyFieldButton\r\n },\r\n {\r\n name: 'submit',\r\n extends: 'button'\r\n },\r\n {\r\n name: 'reset',\r\n extends: 'button'\r\n }\r\n ]\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\n\r\nimport { FormlyFieldButton } from './button.type';\r\nimport { withFormlyFieldButton } from './button.config';\r\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldButton],\r\n imports: [CommonModule, NzOutletModule, NzButtonModule, NzIconModule, FormlyModule.forChild(withFormlyFieldButton())]\r\n})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BAAqB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAEzG,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AACrH,iBAAA;;;ACbD;;AAEG;;;;"}
|
@@ -34,48 +34,48 @@ class FormlyWrapperCard extends FieldWrapper {
|
|
34
34
|
return resolveTplNameArray(this.props, this.fieldTemplates, 'actions') || [];
|
35
35
|
}
|
36
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormlyWrapperCard, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormlyWrapperCard, isStandalone: false, selector: "formly-wrapper-card", usesInheritance: true, ngImport: i0, template: `
|
38
|
-
<nz-card
|
39
|
-
[nzActions]="nzActions"
|
40
|
-
[formlyAttributes]="field"
|
41
|
-
[class]="props['className']"
|
42
|
-
[style]="props['style']"
|
43
|
-
[nzBodyStyle]="props['bodyStyle'] ?? null"
|
44
|
-
[nzSize]="props['size']!"
|
45
|
-
[nzCover]="nzCover"
|
46
|
-
[nzExtra]="nzExtra"
|
47
|
-
[nzHoverable]="!!props['hoverable']"
|
48
|
-
[nzLoading]="!!props['loading']"
|
49
|
-
[nzTitle]="nzTitle"
|
50
|
-
[nzBordered]="!!props['bordered']"
|
51
|
-
[nzType]="props['type'] ?? null"
|
52
|
-
>
|
53
|
-
<ng-container #fieldComponent></ng-container>
|
54
|
-
</nz-card>
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormlyWrapperCard, isStandalone: false, selector: "formly-wrapper-card", usesInheritance: true, ngImport: i0, template: `
|
38
|
+
<nz-card
|
39
|
+
[nzActions]="nzActions"
|
40
|
+
[formlyAttributes]="field"
|
41
|
+
[class]="props['className']"
|
42
|
+
[style]="props['style']"
|
43
|
+
[nzBodyStyle]="props['bodyStyle'] ?? null"
|
44
|
+
[nzSize]="props['size']!"
|
45
|
+
[nzCover]="nzCover"
|
46
|
+
[nzExtra]="nzExtra"
|
47
|
+
[nzHoverable]="!!props['hoverable']"
|
48
|
+
[nzLoading]="!!props['loading']"
|
49
|
+
[nzTitle]="nzTitle"
|
50
|
+
[nzBordered]="!!props['bordered']"
|
51
|
+
[nzType]="props['type'] ?? null"
|
52
|
+
>
|
53
|
+
<ng-container #fieldComponent></ng-container>
|
54
|
+
</nz-card>
|
55
55
|
`, isInline: true, dependencies: [{ kind: "component", type: i2.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
56
56
|
}
|
57
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormlyWrapperCard, decorators: [{
|
58
58
|
type: Component,
|
59
59
|
args: [{
|
60
60
|
selector: 'formly-wrapper-card',
|
61
|
-
template: `
|
62
|
-
<nz-card
|
63
|
-
[nzActions]="nzActions"
|
64
|
-
[formlyAttributes]="field"
|
65
|
-
[class]="props['className']"
|
66
|
-
[style]="props['style']"
|
67
|
-
[nzBodyStyle]="props['bodyStyle'] ?? null"
|
68
|
-
[nzSize]="props['size']!"
|
69
|
-
[nzCover]="nzCover"
|
70
|
-
[nzExtra]="nzExtra"
|
71
|
-
[nzHoverable]="!!props['hoverable']"
|
72
|
-
[nzLoading]="!!props['loading']"
|
73
|
-
[nzTitle]="nzTitle"
|
74
|
-
[nzBordered]="!!props['bordered']"
|
75
|
-
[nzType]="props['type'] ?? null"
|
76
|
-
>
|
77
|
-
<ng-container #fieldComponent></ng-container>
|
78
|
-
</nz-card>
|
61
|
+
template: `
|
62
|
+
<nz-card
|
63
|
+
[nzActions]="nzActions"
|
64
|
+
[formlyAttributes]="field"
|
65
|
+
[class]="props['className']"
|
66
|
+
[style]="props['style']"
|
67
|
+
[nzBodyStyle]="props['bodyStyle'] ?? null"
|
68
|
+
[nzSize]="props['size']!"
|
69
|
+
[nzCover]="nzCover"
|
70
|
+
[nzExtra]="nzExtra"
|
71
|
+
[nzHoverable]="!!props['hoverable']"
|
72
|
+
[nzLoading]="!!props['loading']"
|
73
|
+
[nzTitle]="nzTitle"
|
74
|
+
[nzBordered]="!!props['bordered']"
|
75
|
+
[nzType]="props['type'] ?? null"
|
76
|
+
>
|
77
|
+
<ng-container #fieldComponent></ng-container>
|
78
|
+
</nz-card>
|
79
79
|
`,
|
80
80
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
81
81
|
standalone: false
|