ngx-formly-zorro-antd 17.0.10 → 17.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/autocomplete/autocomplete.props.d.ts +2 -4
- package/card-wrapper/card-wrapper.props.d.ts +3 -2
- package/common/interface.d.ts +3 -1
- 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 +1 -1
- 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 +125 -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 +297 -286
- 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/ngx-formly-zorro-antd-text-value.mjs +5 -0
- package/esm2022/text-value/public_api.mjs +3 -0
- package/esm2022/text-value/text-value.module.mjs +46 -0
- package/esm2022/text-value/text-value.type.mjs +68 -0
- 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 +145 -145
- package/esm2022/upload/upload.module.mjs +1 -1
- package/esm2022/upload/upload.props.mjs +1 -1
- package/esm2022/upload/upload.type.mjs +88 -87
- 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 +50 -50
- 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 +124 -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 +297 -286
- 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 +115 -0
- package/fesm2022/ngx-formly-zorro-antd-text-value.mjs.map +1 -0
- 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 +230 -230
- 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 +8 -16
- package/grid/grid.props.d.ts +6 -9
- package/input/input.type.d.ts +6 -1
- package/input-group/input-group.props.d.ts +4 -0
- package/package.json +24 -18
- package/text-value/index.d.ts +5 -0
- package/text-value/public_api.d.ts +2 -0
- package/text-value/text-value.module.d.ts +11 -0
- package/text-value/text-value.type.d.ts +37 -0
- package/tree-select/tree-select.type.d.ts +2 -3
- package/upload/upload.component.d.ts +3 -4
- package/autocomplete/package.json +0 -3
- package/button/package.json +0 -3
- package/button-group/package.json +0 -3
- package/card/package.json +0 -3
- package/card-wrapper/package.json +0 -3
- package/cascader/package.json +0 -3
- package/checkbox/package.json +0 -3
- package/common/package.json +0 -3
- package/datepicker/package.json +0 -3
- package/extension/package.json +0 -3
- package/form-field/package.json +0 -3
- package/grid/package.json +0 -3
- package/input/package.json +0 -3
- package/input-group/package.json +0 -3
- package/input-number/package.json +0 -3
- package/radio/package.json +0 -3
- package/rate/package.json +0 -3
- package/ref-template/package.json +0 -3
- package/select/package.json +0 -3
- package/slider/package.json +0 -3
- package/space/package.json +0 -3
- package/switch/package.json +0 -3
- package/tabs/package.json +0 -3
- package/textarea/package.json +0 -3
- package/timepicker/package.json +0 -3
- package/transfer/package.json +0 -3
- package/tree-select/package.json +0 -3
- package/upload/package.json +0 -3
@@ -44,134 +44,134 @@ class FormlyFieldSelect extends FieldType {
|
|
44
44
|
}
|
45
45
|
}
|
46
46
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldSelect, selector: "formly-field-select", viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
48
|
-
<nz-select
|
49
|
-
#select
|
50
|
-
[class.ng-dirty]="showError"
|
51
|
-
[ngStyle]="props['
|
52
|
-
[ngClass]="props['
|
53
|
-
[nzPlaceHolder]="props.placeholder ?? null"
|
54
|
-
[compareWith]="props['compareWith']!"
|
55
|
-
[nzAllowClear]="props['allowClear']!!"
|
56
|
-
[nzSelectOnTab]="props['selectOnTab']!!"
|
57
|
-
[nzAutoClearSearchValue]="props['autoClearSearchValue']"
|
58
|
-
[nzBackdrop]="props['backdrop']!!"
|
59
|
-
[nzBorderless]="props['borderless']"
|
60
|
-
[nzOpen]="props['open']!!"
|
61
|
-
[nzDropdownClassName]="props['dropdownClassName']"
|
62
|
-
[nzDropdownMatchSelectWidth]="props['dropdownMatchSelectWidth']!!"
|
63
|
-
[nzDropdownStyle]="props['dropdownStyle'] ?? null"
|
64
|
-
[nzCustomTemplate]="props['customTemplate'] ?? null"
|
65
|
-
[nzServerSearch]="props['serverSearch']!!"
|
66
|
-
[nzMaxMultipleCount]="props['maxMultipleCount']!"
|
67
|
-
[nzMode]="props['mode']!"
|
68
|
-
[nzShowSearch]="props['showSearch']!!"
|
69
|
-
[nzSize]="props['size']!"
|
70
|
-
[nzStatus]="props['status']!"
|
71
|
-
[nzLoading]="props['loading']!!"
|
72
|
-
[nzPlacement]="props['placement']"
|
73
|
-
[nzShowArrow]="props['showArrow']!!"
|
74
|
-
[nzMaxTagCount]="props['maxTagCount']"
|
75
|
-
[nzMaxTagPlaceholder]="props['maxTagPlaceholder'] ?? null"
|
76
|
-
[nzOptionHeightPx]="props['optionHeightPx']!"
|
77
|
-
[nzOptionOverflowSize]="props['optionOverflowSize']!"
|
78
|
-
[formControl]="formControl"
|
79
|
-
[formlyAttributes]="field"
|
80
|
-
(ngModelChange)="props.change?.(field, $event)"
|
81
|
-
(nzBlur)="props.blur?.(field, $event)"
|
82
|
-
(nzFocus)="props.focus?.(field, $event)"
|
83
|
-
(nzOpenChange)="props['openChange'] && props['openChange'](field, $event)"
|
84
|
-
(nzScrollToBottom)="props['scrollToBottom'] && props['scrollToBottom'](field, $event)"
|
85
|
-
(nzOnSearch)="props['onSearch'] && props['onSearch'](field, $event)"
|
86
|
-
>
|
87
|
-
@for (item of to.options | formlySelectOptions: field | async; track item) {
|
88
|
-
@if (item.group) {
|
89
|
-
<nz-option-group [nzLabel]="item.label">
|
90
|
-
@for (child of item.group; track child) {
|
91
|
-
<nz-option
|
92
|
-
[nzValue]="child.value"
|
93
|
-
[nzDisabled]="child.disabled"
|
94
|
-
[nzLabel]="child.label"
|
95
|
-
>
|
96
|
-
</nz-option>
|
97
|
-
}
|
98
|
-
</nz-option-group>
|
99
|
-
} @else {
|
100
|
-
<nz-option
|
101
|
-
[nzValue]="item.value"
|
102
|
-
[nzDisabled]="item.disabled"
|
103
|
-
[nzLabel]="item.label"
|
104
|
-
></nz-option>
|
105
|
-
}
|
106
|
-
}
|
107
|
-
</nz-select>
|
47
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldSelect, selector: "formly-field-select", viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
48
|
+
<nz-select
|
49
|
+
#select
|
50
|
+
[class.ng-dirty]="showError"
|
51
|
+
[ngStyle]="props['ngStyle']"
|
52
|
+
[ngClass]="props['ngClass']"
|
53
|
+
[nzPlaceHolder]="props.placeholder ?? null"
|
54
|
+
[compareWith]="props['compareWith']!"
|
55
|
+
[nzAllowClear]="props['allowClear']!!"
|
56
|
+
[nzSelectOnTab]="props['selectOnTab']!!"
|
57
|
+
[nzAutoClearSearchValue]="props['autoClearSearchValue']"
|
58
|
+
[nzBackdrop]="props['backdrop']!!"
|
59
|
+
[nzBorderless]="props['borderless']"
|
60
|
+
[nzOpen]="props['open']!!"
|
61
|
+
[nzDropdownClassName]="props['dropdownClassName']"
|
62
|
+
[nzDropdownMatchSelectWidth]="props['dropdownMatchSelectWidth']!!"
|
63
|
+
[nzDropdownStyle]="props['dropdownStyle'] ?? null"
|
64
|
+
[nzCustomTemplate]="props['customTemplate'] ?? null"
|
65
|
+
[nzServerSearch]="props['serverSearch']!!"
|
66
|
+
[nzMaxMultipleCount]="props['maxMultipleCount']!"
|
67
|
+
[nzMode]="props['mode']!"
|
68
|
+
[nzShowSearch]="props['showSearch']!!"
|
69
|
+
[nzSize]="props['size']!"
|
70
|
+
[nzStatus]="props['status']!"
|
71
|
+
[nzLoading]="props['loading']!!"
|
72
|
+
[nzPlacement]="props['placement']"
|
73
|
+
[nzShowArrow]="props['showArrow']!!"
|
74
|
+
[nzMaxTagCount]="props['maxTagCount']"
|
75
|
+
[nzMaxTagPlaceholder]="props['maxTagPlaceholder'] ?? null"
|
76
|
+
[nzOptionHeightPx]="props['optionHeightPx']!"
|
77
|
+
[nzOptionOverflowSize]="props['optionOverflowSize']!"
|
78
|
+
[formControl]="formControl"
|
79
|
+
[formlyAttributes]="field"
|
80
|
+
(ngModelChange)="props.change?.(field, $event)"
|
81
|
+
(nzBlur)="props.blur?.(field, $event)"
|
82
|
+
(nzFocus)="props.focus?.(field, $event)"
|
83
|
+
(nzOpenChange)="props['openChange'] && props['openChange'](field, $event)"
|
84
|
+
(nzScrollToBottom)="props['scrollToBottom'] && props['scrollToBottom'](field, $event)"
|
85
|
+
(nzOnSearch)="props['onSearch'] && props['onSearch'](field, $event)"
|
86
|
+
>
|
87
|
+
@for (item of to.options | formlySelectOptions: field | async; track item) {
|
88
|
+
@if (item.group) {
|
89
|
+
<nz-option-group [nzLabel]="item.label">
|
90
|
+
@for (child of item.group; track child) {
|
91
|
+
<nz-option
|
92
|
+
[nzValue]="child.value"
|
93
|
+
[nzDisabled]="child.disabled"
|
94
|
+
[nzLabel]="child.label"
|
95
|
+
>
|
96
|
+
</nz-option>
|
97
|
+
}
|
98
|
+
</nz-option-group>
|
99
|
+
} @else {
|
100
|
+
<nz-option
|
101
|
+
[nzValue]="item.value"
|
102
|
+
[nzDisabled]="item.disabled"
|
103
|
+
[nzLabel]="item.label"
|
104
|
+
></nz-option>
|
105
|
+
}
|
106
|
+
}
|
107
|
+
</nz-select>
|
108
108
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i3.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
109
109
|
}
|
110
110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
111
111
|
type: Component,
|
112
112
|
args: [{
|
113
113
|
selector: 'formly-field-select',
|
114
|
-
template: `
|
115
|
-
<nz-select
|
116
|
-
#select
|
117
|
-
[class.ng-dirty]="showError"
|
118
|
-
[ngStyle]="props['
|
119
|
-
[ngClass]="props['
|
120
|
-
[nzPlaceHolder]="props.placeholder ?? null"
|
121
|
-
[compareWith]="props['compareWith']!"
|
122
|
-
[nzAllowClear]="props['allowClear']!!"
|
123
|
-
[nzSelectOnTab]="props['selectOnTab']!!"
|
124
|
-
[nzAutoClearSearchValue]="props['autoClearSearchValue']"
|
125
|
-
[nzBackdrop]="props['backdrop']!!"
|
126
|
-
[nzBorderless]="props['borderless']"
|
127
|
-
[nzOpen]="props['open']!!"
|
128
|
-
[nzDropdownClassName]="props['dropdownClassName']"
|
129
|
-
[nzDropdownMatchSelectWidth]="props['dropdownMatchSelectWidth']!!"
|
130
|
-
[nzDropdownStyle]="props['dropdownStyle'] ?? null"
|
131
|
-
[nzCustomTemplate]="props['customTemplate'] ?? null"
|
132
|
-
[nzServerSearch]="props['serverSearch']!!"
|
133
|
-
[nzMaxMultipleCount]="props['maxMultipleCount']!"
|
134
|
-
[nzMode]="props['mode']!"
|
135
|
-
[nzShowSearch]="props['showSearch']!!"
|
136
|
-
[nzSize]="props['size']!"
|
137
|
-
[nzStatus]="props['status']!"
|
138
|
-
[nzLoading]="props['loading']!!"
|
139
|
-
[nzPlacement]="props['placement']"
|
140
|
-
[nzShowArrow]="props['showArrow']!!"
|
141
|
-
[nzMaxTagCount]="props['maxTagCount']"
|
142
|
-
[nzMaxTagPlaceholder]="props['maxTagPlaceholder'] ?? null"
|
143
|
-
[nzOptionHeightPx]="props['optionHeightPx']!"
|
144
|
-
[nzOptionOverflowSize]="props['optionOverflowSize']!"
|
145
|
-
[formControl]="formControl"
|
146
|
-
[formlyAttributes]="field"
|
147
|
-
(ngModelChange)="props.change?.(field, $event)"
|
148
|
-
(nzBlur)="props.blur?.(field, $event)"
|
149
|
-
(nzFocus)="props.focus?.(field, $event)"
|
150
|
-
(nzOpenChange)="props['openChange'] && props['openChange'](field, $event)"
|
151
|
-
(nzScrollToBottom)="props['scrollToBottom'] && props['scrollToBottom'](field, $event)"
|
152
|
-
(nzOnSearch)="props['onSearch'] && props['onSearch'](field, $event)"
|
153
|
-
>
|
154
|
-
@for (item of to.options | formlySelectOptions: field | async; track item) {
|
155
|
-
@if (item.group) {
|
156
|
-
<nz-option-group [nzLabel]="item.label">
|
157
|
-
@for (child of item.group; track child) {
|
158
|
-
<nz-option
|
159
|
-
[nzValue]="child.value"
|
160
|
-
[nzDisabled]="child.disabled"
|
161
|
-
[nzLabel]="child.label"
|
162
|
-
>
|
163
|
-
</nz-option>
|
164
|
-
}
|
165
|
-
</nz-option-group>
|
166
|
-
} @else {
|
167
|
-
<nz-option
|
168
|
-
[nzValue]="item.value"
|
169
|
-
[nzDisabled]="item.disabled"
|
170
|
-
[nzLabel]="item.label"
|
171
|
-
></nz-option>
|
172
|
-
}
|
173
|
-
}
|
174
|
-
</nz-select>
|
114
|
+
template: `
|
115
|
+
<nz-select
|
116
|
+
#select
|
117
|
+
[class.ng-dirty]="showError"
|
118
|
+
[ngStyle]="props['ngStyle']"
|
119
|
+
[ngClass]="props['ngClass']"
|
120
|
+
[nzPlaceHolder]="props.placeholder ?? null"
|
121
|
+
[compareWith]="props['compareWith']!"
|
122
|
+
[nzAllowClear]="props['allowClear']!!"
|
123
|
+
[nzSelectOnTab]="props['selectOnTab']!!"
|
124
|
+
[nzAutoClearSearchValue]="props['autoClearSearchValue']"
|
125
|
+
[nzBackdrop]="props['backdrop']!!"
|
126
|
+
[nzBorderless]="props['borderless']"
|
127
|
+
[nzOpen]="props['open']!!"
|
128
|
+
[nzDropdownClassName]="props['dropdownClassName']"
|
129
|
+
[nzDropdownMatchSelectWidth]="props['dropdownMatchSelectWidth']!!"
|
130
|
+
[nzDropdownStyle]="props['dropdownStyle'] ?? null"
|
131
|
+
[nzCustomTemplate]="props['customTemplate'] ?? null"
|
132
|
+
[nzServerSearch]="props['serverSearch']!!"
|
133
|
+
[nzMaxMultipleCount]="props['maxMultipleCount']!"
|
134
|
+
[nzMode]="props['mode']!"
|
135
|
+
[nzShowSearch]="props['showSearch']!!"
|
136
|
+
[nzSize]="props['size']!"
|
137
|
+
[nzStatus]="props['status']!"
|
138
|
+
[nzLoading]="props['loading']!!"
|
139
|
+
[nzPlacement]="props['placement']"
|
140
|
+
[nzShowArrow]="props['showArrow']!!"
|
141
|
+
[nzMaxTagCount]="props['maxTagCount']"
|
142
|
+
[nzMaxTagPlaceholder]="props['maxTagPlaceholder'] ?? null"
|
143
|
+
[nzOptionHeightPx]="props['optionHeightPx']!"
|
144
|
+
[nzOptionOverflowSize]="props['optionOverflowSize']!"
|
145
|
+
[formControl]="formControl"
|
146
|
+
[formlyAttributes]="field"
|
147
|
+
(ngModelChange)="props.change?.(field, $event)"
|
148
|
+
(nzBlur)="props.blur?.(field, $event)"
|
149
|
+
(nzFocus)="props.focus?.(field, $event)"
|
150
|
+
(nzOpenChange)="props['openChange'] && props['openChange'](field, $event)"
|
151
|
+
(nzScrollToBottom)="props['scrollToBottom'] && props['scrollToBottom'](field, $event)"
|
152
|
+
(nzOnSearch)="props['onSearch'] && props['onSearch'](field, $event)"
|
153
|
+
>
|
154
|
+
@for (item of to.options | formlySelectOptions: field | async; track item) {
|
155
|
+
@if (item.group) {
|
156
|
+
<nz-option-group [nzLabel]="item.label">
|
157
|
+
@for (child of item.group; track child) {
|
158
|
+
<nz-option
|
159
|
+
[nzValue]="child.value"
|
160
|
+
[nzDisabled]="child.disabled"
|
161
|
+
[nzLabel]="child.label"
|
162
|
+
>
|
163
|
+
</nz-option>
|
164
|
+
}
|
165
|
+
</nz-option-group>
|
166
|
+
} @else {
|
167
|
+
<nz-option
|
168
|
+
[nzValue]="item.value"
|
169
|
+
[nzDisabled]="item.disabled"
|
170
|
+
[nzLabel]="item.label"
|
171
|
+
></nz-option>
|
172
|
+
}
|
173
|
+
}
|
174
|
+
</nz-select>
|
175
175
|
`,
|
176
176
|
changeDetection: ChangeDetectionStrategy.OnPush
|
177
177
|
}]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-select.mjs","sources":["../../../../packages/formlyantd/select/src/select.type.ts","../../../../packages/formlyantd/select/src/select.module.ts","../../../../packages/formlyantd/select/src/ngx-formly-zorro-antd-select.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy, ViewChild, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { SelectProps } from './select.props';\n\nexport interface FormlySelectFieldConfig extends NzFormlyFieldConfig<SelectProps> {\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <nz-select\n #select\n [class.ng-dirty]=\"showError\"\n [ngStyle]=\"props['style']\"\n [ngClass]=\"props['className']\"\n [nzPlaceHolder]=\"props.placeholder ?? null\"\n [compareWith]=\"props['compareWith']!\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzSelectOnTab]=\"props['selectOnTab']!!\"\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzBorderless]=\"props['borderless']\"\n [nzOpen]=\"props['open']!!\"\n [nzDropdownClassName]=\"props['dropdownClassName']\"\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\n [nzServerSearch]=\"props['serverSearch']!!\"\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\n [nzMode]=\"props['mode']!\"\n [nzShowSearch]=\"props['showSearch']!!\"\n [nzSize]=\"props['size']!\"\n [nzStatus]=\"props['status']!\"\n [nzLoading]=\"props['loading']!!\"\n [nzPlacement]=\"props['placement']\"\n [nzShowArrow]=\"props['showArrow']!!\"\n [nzMaxTagCount]=\"props['maxTagCount']\"\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n (ngModelChange)=\"props.change?.(field, $event)\"\n (nzBlur)=\"props.blur?.(field, $event)\"\n (nzFocus)=\"props.focus?.(field, $event)\"\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\n >\n @for (item of to.options | formlySelectOptions: field | async; track item) {\n @if (item.group) {\n <nz-option-group [nzLabel]=\"item.label\">\n @for (child of item.group; track child) {\n <nz-option\n [nzValue]=\"child.value\"\n [nzDisabled]=\"child.disabled\"\n [nzLabel]=\"child.label\"\n >\n </nz-option>\n }\n </nz-option-group>\n } @else {\n <nz-option\n [nzValue]=\"item.value\"\n [nzDisabled]=\"item.disabled\"\n [nzLabel]=\"item.label\"\n ></nz-option>\n }\n }\n </nz-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\n override defaultOptions = {\n props: {\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\n autoClearSearchValue: true,\n allowClear: false,\n backdrop: false,\n open: false,\n dropdownMatchSelectWidth: true,\n serverSearch: false,\n selectOnTab: false,\n maxMultipleCount: Infinity,\n mode: 'default' as const,\n showSearch: false,\n size: 'default' as const,\n status: '' as const,\n tokenSeparators: [],\n options: [],\n loading: false,\n optionHeightPx: 32,\n optionOverflowSize: 8\n }\n };\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\n ngOnInit(): void {\n if (this.props['filterOption'] instanceof Function) {\n this.select.nzFilterOption = this.props['filterOption'] as NzSafeAny;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { NzSelectModule } from 'ng-zorro-antd/select';\n\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzSelectModule,\n\n FormlyNzFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field']\n },\n { name: 'enum', extends: 'select' }\n ]\n })\n ]\n})\nexport class FormlyNzSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA6EM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAlEjE,IAAA,WAAA,GAAA;;AAmEW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,EAAE,CAAC,EAAa,EAAE,EAAa,KAAK,EAAE,KAAK,EAAE;AACxD,gBAAA,oBAAoB,EAAE,IAAI;AAC1B,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,wBAAwB,EAAE,IAAI;AAC9B,gBAAA,YAAY,EAAE,KAAK;AACnB,gBAAA,WAAW,EAAE,KAAK;AAClB,gBAAA,gBAAgB,EAAE,QAAQ;AAC1B,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,eAAe,EAAE,EAAE;AACnB,gBAAA,OAAO,EAAE,EAAE;AACX,gBAAA,OAAO,EAAE,KAAK;AACd,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AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-select.mjs","sources":["../../../../packages/formlyantd/select/src/select.type.ts","../../../../packages/formlyantd/select/src/select.module.ts","../../../../packages/formlyantd/select/src/ngx-formly-zorro-antd-select.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy, ViewChild, OnInit } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\r\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\r\nimport type { SelectProps } from './select.props';\r\n\r\nexport interface FormlySelectFieldConfig extends NzFormlyFieldConfig<SelectProps> {\r\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-select',\r\n template: `\r\n <nz-select\r\n #select\r\n [class.ng-dirty]=\"showError\"\r\n [ngStyle]=\"props['ngStyle']\"\r\n [ngClass]=\"props['ngClass']\"\r\n [nzPlaceHolder]=\"props.placeholder ?? null\"\r\n [compareWith]=\"props['compareWith']!\"\r\n [nzAllowClear]=\"props['allowClear']!!\"\r\n [nzSelectOnTab]=\"props['selectOnTab']!!\"\r\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\r\n [nzBackdrop]=\"props['backdrop']!!\"\r\n [nzBorderless]=\"props['borderless']\"\r\n [nzOpen]=\"props['open']!!\"\r\n [nzDropdownClassName]=\"props['dropdownClassName']\"\r\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\r\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\r\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\r\n [nzServerSearch]=\"props['serverSearch']!!\"\r\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\r\n [nzMode]=\"props['mode']!\"\r\n [nzShowSearch]=\"props['showSearch']!!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n [nzLoading]=\"props['loading']!!\"\r\n [nzPlacement]=\"props['placement']\"\r\n [nzShowArrow]=\"props['showArrow']!!\"\r\n [nzMaxTagCount]=\"props['maxTagCount']\"\r\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\r\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\r\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n (ngModelChange)=\"props.change?.(field, $event)\"\r\n (nzBlur)=\"props.blur?.(field, $event)\"\r\n (nzFocus)=\"props.focus?.(field, $event)\"\r\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\r\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\r\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\r\n >\r\n @for (item of to.options | formlySelectOptions: field | async; track item) {\r\n @if (item.group) {\r\n <nz-option-group [nzLabel]=\"item.label\">\r\n @for (child of item.group; track child) {\r\n <nz-option\r\n [nzValue]=\"child.value\"\r\n [nzDisabled]=\"child.disabled\"\r\n [nzLabel]=\"child.label\"\r\n >\r\n </nz-option>\r\n }\r\n </nz-option-group>\r\n } @else {\r\n <nz-option\r\n [nzValue]=\"item.value\"\r\n [nzDisabled]=\"item.disabled\"\r\n [nzLabel]=\"item.label\"\r\n ></nz-option>\r\n }\r\n }\r\n </nz-select>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\r\n override defaultOptions = {\r\n props: {\r\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\r\n autoClearSearchValue: true,\r\n allowClear: false,\r\n backdrop: false,\r\n open: false,\r\n dropdownMatchSelectWidth: true,\r\n serverSearch: false,\r\n selectOnTab: false,\r\n maxMultipleCount: Infinity,\r\n mode: 'default' as const,\r\n showSearch: false,\r\n size: 'default' as const,\r\n status: '' as const,\r\n tokenSeparators: [],\r\n options: [],\r\n loading: false,\r\n optionHeightPx: 32,\r\n optionOverflowSize: 8\r\n }\r\n };\r\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\r\n ngOnInit(): void {\r\n if (this.props['filterOption'] instanceof Function) {\r\n this.select.nzFilterOption = this.props['filterOption'] as NzSafeAny;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlySelectModule } from '@ngx-formly/core/select';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { NzSelectModule } from 'ng-zorro-antd/select';\r\n\r\nimport { FormlyFieldSelect } from './select.type';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldSelect],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n NzSelectModule,\r\n\r\n FormlyNzFormFieldModule,\r\n FormlySelectModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'select',\r\n component: FormlyFieldSelect,\r\n wrappers: ['form-field']\r\n },\r\n { name: 'enum', extends: 'select' }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzSelectModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA6EM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAlEjE,IAAA,WAAA,GAAA;;AAmEW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,EAAE,CAAC,EAAa,EAAE,EAAa,KAAK,EAAE,KAAK,EAAE;AACxD,gBAAA,oBAAoB,EAAE,IAAI;AAC1B,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAA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AAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBAEd,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
|
@@ -27,44 +27,44 @@ class FormlyFieldSlider extends FieldType {
|
|
27
27
|
};
|
28
28
|
}
|
29
29
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
30
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FormlyFieldSlider, selector: "formly-field-slider", usesInheritance: true, ngImport: i0, template: `<nz-slider
|
31
|
-
#slider
|
32
|
-
[formControl]="formControl"
|
33
|
-
[formlyAttributes]="field"
|
34
|
-
[nzDots]="props['dots']!!"
|
35
|
-
[nzIncluded]="props['included']!!"
|
36
|
-
[nzMax]="props.max"
|
37
|
-
[nzMin]="props.min"
|
38
|
-
[nzRange]="props['range']!!"
|
39
|
-
[nzStep]="props.step"
|
40
|
-
[nzTipFormatter]="props['tipFormatter']"
|
41
|
-
[nzVertical]="props['vertical']!!"
|
42
|
-
[nzReverse]="props['reverse']!!"
|
43
|
-
[nzTooltipVisible]="props['tooltipVisible']!"
|
44
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
45
|
-
(nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FormlyFieldSlider, selector: "formly-field-slider", usesInheritance: true, ngImport: i0, template: `<nz-slider
|
31
|
+
#slider
|
32
|
+
[formControl]="formControl"
|
33
|
+
[formlyAttributes]="field"
|
34
|
+
[nzDots]="props['dots']!!"
|
35
|
+
[nzIncluded]="props['included']!!"
|
36
|
+
[nzMax]="props.max"
|
37
|
+
[nzMin]="props.min"
|
38
|
+
[nzRange]="props['range']!!"
|
39
|
+
[nzStep]="props.step"
|
40
|
+
[nzTipFormatter]="props['tipFormatter']"
|
41
|
+
[nzVertical]="props['vertical']!!"
|
42
|
+
[nzReverse]="props['reverse']!!"
|
43
|
+
[nzTooltipVisible]="props['tooltipVisible']!"
|
44
|
+
(ngModelChange)="props.change && props.change(field, $event)"
|
45
|
+
(nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
|
46
46
|
></nz-slider>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzSliderComponent, selector: "nz-slider", inputs: ["nzDisabled", "nzDots", "nzIncluded", "nzRange", "nzVertical", "nzReverse", "nzDefaultValue", "nzMarks", "nzMax", "nzMin", "nzStep", "nzTooltipVisible", "nzTooltipPlacement", "nzTipFormatter"], outputs: ["nzOnAfterChange"], exportAs: ["nzSlider"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
47
47
|
}
|
48
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSlider, decorators: [{
|
49
49
|
type: Component,
|
50
50
|
args: [{
|
51
51
|
selector: 'formly-field-slider',
|
52
|
-
template: `<nz-slider
|
53
|
-
#slider
|
54
|
-
[formControl]="formControl"
|
55
|
-
[formlyAttributes]="field"
|
56
|
-
[nzDots]="props['dots']!!"
|
57
|
-
[nzIncluded]="props['included']!!"
|
58
|
-
[nzMax]="props.max"
|
59
|
-
[nzMin]="props.min"
|
60
|
-
[nzRange]="props['range']!!"
|
61
|
-
[nzStep]="props.step"
|
62
|
-
[nzTipFormatter]="props['tipFormatter']"
|
63
|
-
[nzVertical]="props['vertical']!!"
|
64
|
-
[nzReverse]="props['reverse']!!"
|
65
|
-
[nzTooltipVisible]="props['tooltipVisible']!"
|
66
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
67
|
-
(nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
|
52
|
+
template: `<nz-slider
|
53
|
+
#slider
|
54
|
+
[formControl]="formControl"
|
55
|
+
[formlyAttributes]="field"
|
56
|
+
[nzDots]="props['dots']!!"
|
57
|
+
[nzIncluded]="props['included']!!"
|
58
|
+
[nzMax]="props.max"
|
59
|
+
[nzMin]="props.min"
|
60
|
+
[nzRange]="props['range']!!"
|
61
|
+
[nzStep]="props.step"
|
62
|
+
[nzTipFormatter]="props['tipFormatter']"
|
63
|
+
[nzVertical]="props['vertical']!!"
|
64
|
+
[nzReverse]="props['reverse']!!"
|
65
|
+
[nzTooltipVisible]="props['tooltipVisible']!"
|
66
|
+
(ngModelChange)="props.change && props.change(field, $event)"
|
67
|
+
(nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
|
68
68
|
></nz-slider>`,
|
69
69
|
changeDetection: ChangeDetectionStrategy.OnPush
|
70
70
|
}]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-slider.mjs","sources":["../../../../packages/formlyantd/slider/src/slider.type.ts","../../../../packages/formlyantd/slider/src/slider.module.ts","../../../../packages/formlyantd/slider/src/ngx-formly-zorro-antd-slider.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig, FormlyAttributeEvent } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzSliderShowTooltip } from 'ng-zorro-antd/slider';\n\ninterface SlideProps extends FormlyFieldProps {\n /**\n * 是否只能拖拽到刻度上\n * @default false\n */\n dots?: boolean;\n\n /**\n * marks 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列\n * @default true\n */\n included?: boolean;\n\n /**\n * 刻度标记,key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式\n * @default\n * { number: string/HTML } or { number: { style: object, label: string/HTML } }\n */\n marks?: object;\n\n /**\n * 双滑块模式\n * @default false\n */\n range?: boolean;\n\n /**\n * Slider 会把当前值传给 nzTipFormatter,并在 Tooltip 中显示 nzTipFormatter 的返回值,若为 null,则隐藏 Tooltip。\n */\n tipFormatter?: (value: number) => string;\n\n /**\n * 值为 true 时,Slider 为垂直方向\n * @default false\n */\n vertical?: boolean;\n\n /**\n * 反向坐标轴\n * @default false\n */\n reverse?: boolean;\n\n /**\n * 值为 always 时总是显示,值为 never 时在任何情况下都不显示\n * @default default\n */\n tooltipVisible?: NzSliderShowTooltip;\n\n /**\n * 设置 Tooltip 的默认位置。\n */\n tooltipPlacement?: string;\n\n /**\n * 与 onmouseup 触发时机一致,把当前值作为参数传入。\n */\n afterChange?: FormlyAttributeEvent<number[] | number>;\n}\n\nexport interface FormlySlideFieldConfig extends NzFormlyFieldConfig<SlideProps> {\n type: 'slider' | Type<FormlyFieldSlider>;\n}\n\n@Component({\n selector: 'formly-field-slider',\n template: `<nz-slider\n #slider\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDots]=\"props['dots']!!\"\n [nzIncluded]=\"props['included']!!\"\n [nzMax]=\"props.max\"\n [nzMin]=\"props.min\"\n [nzRange]=\"props['range']!!\"\n [nzStep]=\"props.step\"\n [nzTipFormatter]=\"props['tipFormatter']\"\n [nzVertical]=\"props['vertical']!!\"\n [nzReverse]=\"props['reverse']!!\"\n [nzTooltipVisible]=\"props['tooltipVisible']!\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n (nzOnAfterChange)=\"props['afterChange'] && props['afterChange'](field, $event)\"\n ></nz-slider>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SlideProps>> {\n override defaultOptions = {\n props: {\n max: 100,\n min: 0,\n step: 1,\n dots: false,\n included: true,\n range: false,\n vertical: false,\n reverse: false,\n tooltipVisible: 'default' as const\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldSlider } from './slider.type';\nimport { NzSliderModule } from 'ng-zorro-antd/slider';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzSliderModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA2FM,MAAO,iBAAkB,SAAQ,SAAsC,CAAA;AArB7E,IAAA,WAAA,GAAA;;AAsBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,GAAG;AACR,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,KAAK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,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAnBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBAEd,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-slider.mjs","sources":["../../../../packages/formlyantd/slider/src/slider.type.ts","../../../../packages/formlyantd/slider/src/slider.module.ts","../../../../packages/formlyantd/slider/src/ngx-formly-zorro-antd-slider.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig, FormlyAttributeEvent } from 'ngx-formly-zorro-antd/common';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\nimport type { NzSliderShowTooltip } from 'ng-zorro-antd/slider';\r\n\r\ninterface SlideProps extends FormlyFieldProps {\r\n /**\r\n * 是否只能拖拽到刻度上\r\n * @default false\r\n */\r\n dots?: boolean;\r\n\r\n /**\r\n * marks 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列\r\n * @default true\r\n */\r\n included?: boolean;\r\n\r\n /**\r\n * 刻度标记,key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式\r\n * @default\r\n * { number: string/HTML } or { number: { style: object, label: string/HTML } }\r\n */\r\n marks?: object;\r\n\r\n /**\r\n * 双滑块模式\r\n * @default false\r\n */\r\n range?: boolean;\r\n\r\n /**\r\n * Slider 会把当前值传给 nzTipFormatter,并在 Tooltip 中显示 nzTipFormatter 的返回值,若为 null,则隐藏 Tooltip。\r\n */\r\n tipFormatter?: (value: number) => string;\r\n\r\n /**\r\n * 值为 true 时,Slider 为垂直方向\r\n * @default false\r\n */\r\n vertical?: boolean;\r\n\r\n /**\r\n * 反向坐标轴\r\n * @default false\r\n */\r\n reverse?: boolean;\r\n\r\n /**\r\n * 值为 always 时总是显示,值为 never 时在任何情况下都不显示\r\n * @default default\r\n */\r\n tooltipVisible?: NzSliderShowTooltip;\r\n\r\n /**\r\n * 设置 Tooltip 的默认位置。\r\n */\r\n tooltipPlacement?: string;\r\n\r\n /**\r\n * 与 onmouseup 触发时机一致,把当前值作为参数传入。\r\n */\r\n afterChange?: FormlyAttributeEvent<number[] | number>;\r\n}\r\n\r\nexport interface FormlySlideFieldConfig extends NzFormlyFieldConfig<SlideProps> {\r\n type: 'slider' | Type<FormlyFieldSlider>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-slider',\r\n template: `<nz-slider\r\n #slider\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzDots]=\"props['dots']!!\"\r\n [nzIncluded]=\"props['included']!!\"\r\n [nzMax]=\"props.max\"\r\n [nzMin]=\"props.min\"\r\n [nzRange]=\"props['range']!!\"\r\n [nzStep]=\"props.step\"\r\n [nzTipFormatter]=\"props['tipFormatter']\"\r\n [nzVertical]=\"props['vertical']!!\"\r\n [nzReverse]=\"props['reverse']!!\"\r\n [nzTooltipVisible]=\"props['tooltipVisible']!\"\r\n (ngModelChange)=\"props.change && props.change(field, $event)\"\r\n (nzOnAfterChange)=\"props['afterChange'] && props['afterChange'](field, $event)\"\r\n ></nz-slider>`,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SlideProps>> {\r\n override defaultOptions = {\r\n props: {\r\n max: 100,\r\n min: 0,\r\n step: 1,\r\n dots: false,\r\n included: true,\r\n range: false,\r\n vertical: false,\r\n reverse: false,\r\n tooltipVisible: 'default' as const\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { FormlyFieldSlider } from './slider.type';\r\nimport { NzSliderModule } from 'ng-zorro-antd/slider';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldSlider],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n NzSliderModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'slider',\r\n component: FormlyFieldSlider,\r\n wrappers: ['form-field']\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzSliderModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA2FM,MAAO,iBAAkB,SAAQ,SAAsC,CAAA;AArB7E,IAAA,WAAA,GAAA;;AAsBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,GAAG;AACR,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,SAAkB;AACnC,aAAA;SACF,CAAC;AACH,KAAA;8GAdY,iBAAiB,EAAA,IAAA,EAAA,IAAA,E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CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBAEd,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
@@ -24,38 +24,38 @@ class FormlyFieldSpace extends FieldType {
|
|
24
24
|
return resolveTplName(this.props, this.fieldTemplates, 'split');
|
25
25
|
}
|
26
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSpace, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldSpace, selector: "formly-field-space", usesInheritance: true, ngImport: i0, template: `
|
28
|
-
<nz-space
|
29
|
-
[nzSize]="props.size!"
|
30
|
-
[nzAlign]="props.align"
|
31
|
-
[nzDirection]="props.direction!"
|
32
|
-
[nzSplit]="nzSplit ?? null"
|
33
|
-
[nzWrap]="props.wrap!!"
|
34
|
-
[formlyAttributes]="field"
|
35
|
-
>
|
36
|
-
@for (g of field.fieldGroup; track g.id) {
|
37
|
-
<formly-field *nzSpaceItem [field]="g"></formly-field>
|
38
|
-
}
|
39
|
-
</nz-space>
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldSpace, selector: "formly-field-space", usesInheritance: true, ngImport: i0, template: `
|
28
|
+
<nz-space
|
29
|
+
[nzSize]="props.size!"
|
30
|
+
[nzAlign]="props.align"
|
31
|
+
[nzDirection]="props.direction!"
|
32
|
+
[nzSplit]="nzSplit ?? null"
|
33
|
+
[nzWrap]="props.wrap!!"
|
34
|
+
[formlyAttributes]="field"
|
35
|
+
>
|
36
|
+
@for (g of field.fieldGroup; track g.id) {
|
37
|
+
<formly-field *nzSpaceItem [field]="g"></formly-field>
|
38
|
+
}
|
39
|
+
</nz-space>
|
40
40
|
`, isInline: true, dependencies: [{ kind: "component", type: i2.NzSpaceComponent, selector: "nz-space, [nz-space]", inputs: ["nzDirection", "nzAlign", "nzSplit", "nzWrap", "nzSize"], exportAs: ["NzSpace"] }, { kind: "directive", type: i2.NzSpaceItemDirective, selector: "[nzSpaceItem]" }, { kind: "component", type: i3.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
41
41
|
}
|
42
42
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSpace, decorators: [{
|
43
43
|
type: Component,
|
44
44
|
args: [{
|
45
45
|
selector: 'formly-field-space',
|
46
|
-
template: `
|
47
|
-
<nz-space
|
48
|
-
[nzSize]="props.size!"
|
49
|
-
[nzAlign]="props.align"
|
50
|
-
[nzDirection]="props.direction!"
|
51
|
-
[nzSplit]="nzSplit ?? null"
|
52
|
-
[nzWrap]="props.wrap!!"
|
53
|
-
[formlyAttributes]="field"
|
54
|
-
>
|
55
|
-
@for (g of field.fieldGroup; track g.id) {
|
56
|
-
<formly-field *nzSpaceItem [field]="g"></formly-field>
|
57
|
-
}
|
58
|
-
</nz-space>
|
46
|
+
template: `
|
47
|
+
<nz-space
|
48
|
+
[nzSize]="props.size!"
|
49
|
+
[nzAlign]="props.align"
|
50
|
+
[nzDirection]="props.direction!"
|
51
|
+
[nzSplit]="nzSplit ?? null"
|
52
|
+
[nzWrap]="props.wrap!!"
|
53
|
+
[formlyAttributes]="field"
|
54
|
+
>
|
55
|
+
@for (g of field.fieldGroup; track g.id) {
|
56
|
+
<formly-field *nzSpaceItem [field]="g"></formly-field>
|
57
|
+
}
|
58
|
+
</nz-space>
|
59
59
|
`,
|
60
60
|
changeDetection: ChangeDetectionStrategy.OnPush
|
61
61
|
}]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\n\ninterface SpaceProps extends FormlyFieldProps {\n /**\n * 间距大小\n * @default small\n */\n size?: NzSpaceSize;\n /**\n * 间距方向\n * @default horizontal\n */\n direction?: NzSpaceDirection;\n /**\n * 对齐方式\n */\n align?: NzSpaceAlign;\n /**\n * 是否自动换行,仅在 horizontal 时有效\n */\n wrap?: boolean;\n /**\n * 设置分隔符\n */\n split?: TemplateRef<{\n $implicit: number;\n }> | null;\n splitName?: string;\n}\n\nexport interface FormlySpaceFieldConfig extends NzFormlyFieldConfig<SpaceProps> {\n type: 'space' | Type<FormlyFieldSpace>;\n}\n\n@Component({\n selector: 'formly-field-space',\n template: `\n <nz-space\n [nzSize]=\"props.size!\"\n [nzAlign]=\"props.align\"\n [nzDirection]=\"props.direction!\"\n [nzSplit]=\"nzSplit ?? null\"\n [nzWrap]=\"props.wrap!!\"\n [formlyAttributes]=\"field\"\n >\n @for (g of field.fieldGroup; track g.id) {\n <formly-field *nzSpaceItem [field]=\"g\"></formly-field>\n }\n </nz-space>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSpace extends FieldType<FieldTypeConfig<SpaceProps>> {\n override defaultOptions = {\n props: {\n size: 'small' as const,\n direction: 'horizontal' as const,\n wrap: false\n }\n };\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n get nzSplit() {\n return resolveTplName(this.props, this.fieldTemplates, 'split');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldSpace } from './space.type';\n\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\n\n@NgModule({\n declarations: [FormlyFieldSpace],\n imports: [\n CommonModule,\n NzSpaceModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'space',\n component: FormlyFieldSpace\n }\n ]\n })\n ]\n})\nexport class FormlyNzSpaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAyDM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAQ1E,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAPxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,OAAgB;AACtB,gBAAA,SAAS,EAAE,YAAqB;AAChC,gBAAA,IAAI,EAAE,KAAK;AACZ,aAAA;SACF,CAAC;KAGD;AACD,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACjE;8GAbU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,C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{"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\r\n\r\ninterface SpaceProps extends FormlyFieldProps {\r\n /**\r\n * 间距大小\r\n * @default small\r\n */\r\n size?: NzSpaceSize;\r\n /**\r\n * 间距方向\r\n * @default horizontal\r\n */\r\n direction?: NzSpaceDirection;\r\n /**\r\n * 对齐方式\r\n */\r\n align?: NzSpaceAlign;\r\n /**\r\n * 是否自动换行,仅在 horizontal 时有效\r\n */\r\n wrap?: boolean;\r\n /**\r\n * 设置分隔符\r\n */\r\n split?: TemplateRef<{\r\n $implicit: number;\r\n }> | null;\r\n splitName?: string;\r\n}\r\n\r\nexport interface FormlySpaceFieldConfig extends NzFormlyFieldConfig<SpaceProps> {\r\n type: 'space' | Type<FormlyFieldSpace>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-space',\r\n template: `\r\n <nz-space\r\n [nzSize]=\"props.size!\"\r\n [nzAlign]=\"props.align\"\r\n [nzDirection]=\"props.direction!\"\r\n [nzSplit]=\"nzSplit ?? null\"\r\n [nzWrap]=\"props.wrap!!\"\r\n [formlyAttributes]=\"field\"\r\n >\r\n @for (g of field.fieldGroup; track g.id) {\r\n <formly-field *nzSpaceItem [field]=\"g\"></formly-field>\r\n }\r\n </nz-space>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldSpace extends FieldType<FieldTypeConfig<SpaceProps>> {\r\n override defaultOptions = {\r\n props: {\r\n size: 'small' as const,\r\n direction: 'horizontal' as const,\r\n wrap: false\r\n }\r\n };\r\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\r\n super();\r\n }\r\n get nzSplit() {\r\n return resolveTplName(this.props, this.fieldTemplates, 'split');\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\nimport { FormlyFieldSpace } from './space.type';\r\n\r\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldSpace],\r\n imports: [\r\n CommonModule,\r\n NzSpaceModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'space',\r\n component: FormlyFieldSpace\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzSpaceModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAyDM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAQ1E,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAPxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,OAAgB;AACtB,gBAAA,SAAS,EAAE,YAAqB;AAChC,gBAAA,IAAI,EAAE,KAAK;AACZ,aAAA;SACF,CAAC;KAGD;AACD,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACjE;8GAbU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,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,36 @@ class FormlyFieldSwitch extends FieldType {
|
|
21
21
|
};
|
22
22
|
}
|
23
23
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FormlyFieldSwitch, selector: "formly-field-switch", usesInheritance: true, ngImport: i0, template: `
|
25
|
-
<nz-switch
|
26
|
-
[formControl]="formControl"
|
27
|
-
[formlyAttributes]="field"
|
28
|
-
[nzId]="id"
|
29
|
-
[nzCheckedChildren]="props['checkedChildren'] ?? null"
|
30
|
-
[nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
|
31
|
-
[nzSize]="props['size']!"
|
32
|
-
[nzLoading]="props['loading']!!"
|
33
|
-
[nzControl]="props['control']!!"
|
34
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
35
|
-
></nz-switch>
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FormlyFieldSwitch, selector: "formly-field-switch", usesInheritance: true, ngImport: i0, template: `
|
25
|
+
<nz-switch
|
26
|
+
[formControl]="formControl"
|
27
|
+
[formlyAttributes]="field"
|
28
|
+
[nzId]="id"
|
29
|
+
[nzCheckedChildren]="props['checkedChildren'] ?? null"
|
30
|
+
[nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
|
31
|
+
[nzSize]="props['size']!"
|
32
|
+
[nzLoading]="props['loading']!!"
|
33
|
+
[nzControl]="props['control']!!"
|
34
|
+
(ngModelChange)="props.change && props.change(field, $event)"
|
35
|
+
></nz-switch>
|
36
36
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
37
37
|
}
|
38
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldSwitch, decorators: [{
|
39
39
|
type: Component,
|
40
40
|
args: [{
|
41
41
|
selector: 'formly-field-switch',
|
42
|
-
template: `
|
43
|
-
<nz-switch
|
44
|
-
[formControl]="formControl"
|
45
|
-
[formlyAttributes]="field"
|
46
|
-
[nzId]="id"
|
47
|
-
[nzCheckedChildren]="props['checkedChildren'] ?? null"
|
48
|
-
[nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
|
49
|
-
[nzSize]="props['size']!"
|
50
|
-
[nzLoading]="props['loading']!!"
|
51
|
-
[nzControl]="props['control']!!"
|
52
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
53
|
-
></nz-switch>
|
42
|
+
template: `
|
43
|
+
<nz-switch
|
44
|
+
[formControl]="formControl"
|
45
|
+
[formlyAttributes]="field"
|
46
|
+
[nzId]="id"
|
47
|
+
[nzCheckedChildren]="props['checkedChildren'] ?? null"
|
48
|
+
[nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
|
49
|
+
[nzSize]="props['size']!"
|
50
|
+
[nzLoading]="props['loading']!!"
|
51
|
+
[nzControl]="props['control']!!"
|
52
|
+
(ngModelChange)="props.change && props.change(field, $event)"
|
53
|
+
></nz-switch>
|
54
54
|
`,
|
55
55
|
changeDetection: ChangeDetectionStrategy.OnPush
|
56
56
|
}]
|