ngx-formly-zorro-antd 14.0.0 → 14.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 +38 -38
- package/autocomplete/index.d.ts +5 -5
- package/autocomplete/public_api.d.ts +1 -1
- package/button/button.module.d.ts +11 -11
- package/button/button.type.d.ts +66 -66
- package/button/index.d.ts +5 -5
- package/button/public_api.d.ts +2 -2
- package/card/card.module.d.ts +10 -10
- package/card/card.wrapper.d.ts +58 -58
- package/card/index.d.ts +5 -5
- package/card/public_api.d.ts +2 -2
- package/cascader/cascader.module.d.ts +12 -12
- package/cascader/cascader.type.d.ts +152 -152
- package/cascader/index.d.ts +5 -5
- package/cascader/public_api.d.ts +2 -2
- package/checkbox/checkbox.module.d.ts +12 -12
- package/checkbox/checkbox.type.d.ts +35 -35
- package/checkbox/index.d.ts +5 -5
- package/checkbox/public_api.d.ts +2 -2
- package/datepicker/datepicker.module.d.ts +12 -12
- package/datepicker/datepicker.props.d.ts +149 -146
- package/datepicker/datepicker.type.d.ts +32 -31
- package/datepicker/index.d.ts +5 -5
- package/datepicker/public_api.d.ts +2 -2
- package/esm2020/autocomplete/autocomplete.props.mjs +2 -2
- package/esm2020/autocomplete/ngx-formly-zorro-antd-autocomplete.mjs +4 -4
- package/esm2020/autocomplete/public_api.mjs +2 -2
- package/esm2020/button/button.module.mjs +61 -61
- package/esm2020/button/button.type.mjs +110 -110
- package/esm2020/button/ngx-formly-zorro-antd-button.mjs +4 -4
- package/esm2020/button/public_api.mjs +3 -3
- package/esm2020/card/card.module.mjs +43 -43
- package/esm2020/card/card.wrapper.mjs +47 -47
- package/esm2020/card/ngx-formly-zorro-antd-card.mjs +4 -4
- package/esm2020/card/public_api.mjs +3 -3
- package/esm2020/cascader/cascader.module.mjs +51 -51
- package/esm2020/cascader/cascader.type.mjs +112 -112
- package/esm2020/cascader/ngx-formly-zorro-antd-cascader.mjs +4 -4
- package/esm2020/cascader/public_api.mjs +3 -3
- package/esm2020/checkbox/checkbox.module.mjs +59 -59
- package/esm2020/checkbox/checkbox.type.mjs +69 -69
- package/esm2020/checkbox/ngx-formly-zorro-antd-checkbox.mjs +4 -4
- package/esm2020/checkbox/public_api.mjs +3 -3
- package/esm2020/datepicker/datepicker.module.mjs +51 -51
- package/esm2020/datepicker/datepicker.props.mjs +2 -2
- package/esm2020/datepicker/datepicker.type.mjs +196 -189
- package/esm2020/datepicker/ngx-formly-zorro-antd-datepicker.mjs +4 -4
- package/esm2020/datepicker/public_api.mjs +3 -3
- package/esm2020/form-field/form-field.module.mjs +45 -45
- package/esm2020/form-field/form-field.props.mjs +2 -2
- package/esm2020/form-field/form-field.wrapper.mjs +127 -127
- package/esm2020/form-field/ngx-formly-zorro-antd-form-field.mjs +4 -4
- package/esm2020/form-field/public_api.mjs +2 -2
- package/esm2020/grid/grid.module.mjs +41 -41
- package/esm2020/grid/grid.props.mjs +2 -2
- package/esm2020/grid/grid.type.mjs +71 -71
- package/esm2020/grid/ngx-formly-zorro-antd-grid.mjs +4 -4
- package/esm2020/grid/public_api.mjs +3 -3
- package/esm2020/index.mjs +2 -2
- package/esm2020/input/input.module.mjs +89 -89
- package/esm2020/input/input.props.mjs +2 -2
- package/esm2020/input/input.type.mjs +309 -309
- package/esm2020/input/ngx-formly-zorro-antd-input.mjs +4 -4
- package/esm2020/input/public_api.mjs +3 -3
- package/esm2020/input-group/input-group.module.mjs +47 -47
- package/esm2020/input-group/input-group.props.mjs +2 -2
- package/esm2020/input-group/input-group.type.mjs +71 -71
- package/esm2020/input-group/ngx-formly-zorro-antd-input-group.mjs +4 -4
- package/esm2020/input-group/public_api.mjs +3 -3
- package/esm2020/input-number/input-number.module.mjs +59 -59
- package/esm2020/input-number/input-number.props.mjs +2 -2
- package/esm2020/input-number/input-number.type.mjs +128 -128
- package/esm2020/input-number/ngx-formly-zorro-antd-input-number.mjs +4 -4
- package/esm2020/input-number/public_api.mjs +3 -3
- package/esm2020/lib/ui-ng-zorro-antd.mjs +2 -2
- package/esm2020/lib/ui-ng-zorro-antd.module.mjs +97 -97
- package/esm2020/ngx-formly-zorro-antd.mjs +4 -4
- package/esm2020/radio/ngx-formly-zorro-antd-radio.mjs +4 -4
- package/esm2020/radio/public_api.mjs +3 -3
- package/esm2020/radio/radio.module.mjs +59 -59
- package/esm2020/radio/radio.type.mjs +96 -96
- package/esm2020/rate/ngx-formly-zorro-antd-rate.mjs +4 -4
- package/esm2020/rate/public_api.mjs +3 -3
- package/esm2020/rate/rate.module.mjs +51 -51
- package/esm2020/rate/rate.type.mjs +63 -63
- package/esm2020/select/ngx-formly-zorro-antd-select.mjs +4 -4
- package/esm2020/select/public_api.mjs +3 -3
- package/esm2020/select/select.module.mjs +57 -57
- package/esm2020/select/select.props.mjs +2 -2
- package/esm2020/select/select.type.mjs +167 -163
- package/esm2020/slider/ngx-formly-zorro-antd-slider.mjs +4 -4
- package/esm2020/slider/public_api.mjs +3 -3
- package/esm2020/slider/slider.module.mjs +51 -51
- package/esm2020/slider/slider.type.mjs +67 -67
- package/esm2020/switch/ngx-formly-zorro-antd-switch.mjs +4 -4
- package/esm2020/switch/public_api.mjs +3 -3
- package/esm2020/switch/switch.module.mjs +51 -51
- package/esm2020/switch/switch.type.mjs +53 -53
- package/esm2020/tabs/ngx-formly-zorro-antd-tabs.mjs +4 -4
- package/esm2020/tabs/public_api.mjs +3 -3
- package/esm2020/tabs/tabs.module.mjs +41 -41
- package/esm2020/tabs/tabs.props.mjs +2 -2
- package/esm2020/tabs/tabs.wrapper.mjs +111 -111
- package/esm2020/textarea/ngx-formly-zorro-antd-textarea.mjs +4 -4
- package/esm2020/textarea/public_api.mjs +3 -3
- package/esm2020/textarea/textarea.module.mjs +51 -51
- package/esm2020/textarea/textarea.type.mjs +88 -88
- package/esm2020/timepicker/ngx-formly-zorro-antd-timepicker.mjs +4 -4
- package/esm2020/timepicker/public_api.mjs +3 -3
- package/esm2020/timepicker/timepicker.module.mjs +51 -51
- package/esm2020/timepicker/timepicker.type.mjs +96 -92
- package/esm2020/transfer/ngx-formly-zorro-antd-transfer.mjs +4 -4
- package/esm2020/transfer/public_api.mjs +3 -3
- package/esm2020/transfer/transfer.component.mjs +128 -128
- package/esm2020/transfer/transfer.module.mjs +52 -52
- package/esm2020/transfer/transfer.type.mjs +87 -87
- package/esm2020/tree-select/ngx-formly-zorro-antd-tree-select.mjs +4 -4
- package/esm2020/tree-select/public_api.mjs +3 -3
- package/esm2020/tree-select/tree-select.module.mjs +51 -51
- package/esm2020/tree-select/tree-select.type.mjs +98 -98
- package/esm2020/upload/ngx-formly-zorro-antd-upload.mjs +4 -4
- package/esm2020/upload/public_api.mjs +3 -3
- package/esm2020/upload/upload.component.mjs +174 -174
- package/esm2020/upload/upload.module.mjs +60 -60
- package/esm2020/upload/upload.type.mjs +119 -119
- package/fesm2015/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
- package/fesm2015/ngx-formly-zorro-antd-button.mjs +152 -152
- package/fesm2015/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-card.mjs +77 -77
- package/fesm2015/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-cascader.mjs +145 -145
- package/fesm2015/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs +110 -110
- package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs +229 -222
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-form-field.mjs +155 -155
- package/fesm2015/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-grid.mjs +97 -97
- package/fesm2015/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input-group.mjs +102 -102
- package/fesm2015/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input-number.mjs +169 -169
- package/fesm2015/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input.mjs +376 -376
- package/fesm2015/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-radio.mjs +134 -134
- package/fesm2015/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-rate.mjs +97 -97
- package/fesm2015/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-select.mjs +203 -199
- package/fesm2015/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-slider.mjs +101 -101
- package/fesm2015/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-switch.mjs +87 -87
- package/fesm2015/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs +137 -137
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs +121 -121
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs +129 -125
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-transfer.mjs +241 -241
- package/fesm2015/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs +131 -131
- package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs +321 -321
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd.mjs +74 -74
- package/fesm2015/ngx-formly-zorro-antd.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
- package/fesm2020/ngx-formly-zorro-antd-button.mjs +152 -152
- package/fesm2020/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-card.mjs +77 -77
- package/fesm2020/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-cascader.mjs +145 -145
- package/fesm2020/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs +110 -110
- package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs +229 -222
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-form-field.mjs +155 -155
- package/fesm2020/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-grid.mjs +97 -97
- package/fesm2020/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input-group.mjs +102 -102
- package/fesm2020/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input-number.mjs +169 -169
- package/fesm2020/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input.mjs +376 -376
- package/fesm2020/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-radio.mjs +134 -134
- package/fesm2020/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-rate.mjs +97 -97
- package/fesm2020/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-select.mjs +203 -199
- package/fesm2020/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-slider.mjs +101 -101
- package/fesm2020/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-switch.mjs +87 -87
- package/fesm2020/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs +137 -137
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs +121 -121
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs +129 -125
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-transfer.mjs +241 -241
- package/fesm2020/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs +131 -131
- package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs +320 -320
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd.mjs +74 -74
- package/fesm2020/ngx-formly-zorro-antd.mjs.map +1 -1
- package/form-field/form-field.module.d.ts +11 -11
- package/form-field/form-field.props.d.ts +105 -105
- package/form-field/form-field.wrapper.d.ts +9 -9
- package/form-field/index.d.ts +5 -5
- package/form-field/public_api.d.ts +3 -3
- package/grid/grid.module.d.ts +10 -10
- package/grid/grid.props.d.ts +44 -44
- package/grid/grid.type.d.ts +11 -11
- package/grid/index.d.ts +5 -5
- package/grid/public_api.d.ts +3 -3
- package/index.d.ts +1 -1
- package/input/index.d.ts +5 -5
- package/input/input.module.d.ts +14 -14
- package/input/input.props.d.ts +36 -33
- package/input/input.type.d.ts +26 -26
- package/input/public_api.d.ts +2 -2
- package/input-group/index.d.ts +5 -5
- package/input-group/input-group.module.d.ts +11 -11
- package/input-group/input-group.props.d.ts +56 -56
- package/input-group/input-group.type.d.ts +22 -22
- package/input-group/public_api.d.ts +3 -3
- package/input-number/index.d.ts +5 -5
- package/input-number/input-number.module.d.ts +12 -12
- package/input-number/input-number.props.d.ts +81 -78
- package/input-number/input-number.type.d.ts +24 -24
- package/input-number/public_api.d.ts +2 -2
- package/lib/ui-ng-zorro-antd.d.ts +1 -1
- package/lib/ui-ng-zorro-antd.module.d.ts +27 -27
- package/package.json +6 -2
- package/radio/index.d.ts +5 -5
- package/radio/public_api.d.ts +2 -2
- package/radio/radio.module.d.ts +14 -14
- package/radio/radio.type.d.ts +38 -38
- package/rate/index.d.ts +5 -5
- package/rate/public_api.d.ts +2 -2
- package/rate/rate.module.d.ts +12 -12
- package/rate/rate.type.d.ts +57 -57
- package/select/index.d.ts +5 -5
- package/select/public_api.d.ts +2 -2
- package/select/select.module.d.ts +13 -13
- package/select/select.props.d.ts +166 -162
- package/select/select.type.d.ts +35 -35
- package/slider/index.d.ts +5 -5
- package/slider/public_api.d.ts +2 -2
- package/slider/slider.module.d.ts +12 -12
- package/slider/slider.type.d.ts +76 -76
- package/switch/index.d.ts +5 -5
- package/switch/public_api.d.ts +2 -2
- package/switch/switch.module.d.ts +12 -12
- package/switch/switch.type.d.ts +44 -44
- package/tabs/index.d.ts +5 -5
- package/tabs/public_api.d.ts +2 -2
- package/tabs/tabs.module.d.ts +10 -10
- package/tabs/tabs.props.d.ts +126 -126
- package/tabs/tabs.wrapper.d.ts +28 -28
- package/textarea/index.d.ts +5 -5
- package/textarea/public_api.d.ts +2 -2
- package/textarea/textarea.module.d.ts +12 -12
- package/textarea/textarea.type.d.ts +38 -38
- package/timepicker/index.d.ts +5 -5
- package/timepicker/public_api.d.ts +2 -2
- package/timepicker/timepicker.module.d.ts +12 -12
- package/timepicker/timepicker.type.d.ts +138 -131
- package/transfer/index.d.ts +5 -5
- package/transfer/public_api.d.ts +2 -2
- package/transfer/transfer.component.d.ts +26 -26
- package/transfer/transfer.module.d.ts +13 -13
- package/transfer/transfer.type.d.ts +118 -118
- package/tree-select/index.d.ts +5 -5
- package/tree-select/public_api.d.ts +2 -2
- package/tree-select/tree-select.module.d.ts +12 -12
- package/tree-select/tree-select.type.d.ts +158 -158
- package/upload/index.d.ts +5 -5
- package/upload/public_api.d.ts +2 -2
- package/upload/upload.component.d.ts +27 -27
- package/upload/upload.module.d.ts +15 -15
- package/upload/upload.type.d.ts +173 -173
@@ -9,111 +9,111 @@ import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
|
|
9
9
|
import * as i2 from 'ng-zorro-antd/slider';
|
10
10
|
import { NzSliderModule } from 'ng-zorro-antd/slider';
|
11
11
|
|
12
|
-
class FormlyFieldSlider extends FieldType {
|
13
|
-
constructor() {
|
14
|
-
super(...arguments);
|
15
|
-
this.defaultOptions = {
|
16
|
-
props: {
|
17
|
-
max: 100,
|
18
|
-
min: 0,
|
19
|
-
step: 1,
|
20
|
-
dots: false,
|
21
|
-
included: true,
|
22
|
-
range: false,
|
23
|
-
vertical: false,
|
24
|
-
reverse: false,
|
25
|
-
tooltipVisible: 'default'
|
26
|
-
}
|
27
|
-
};
|
28
|
-
}
|
29
|
-
}
|
30
|
-
FormlyFieldSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
31
|
-
FormlyFieldSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldSlider, selector: "formly-field-slider", usesInheritance: true, ngImport: i0, template: `<nz-slider
|
32
|
-
#slider
|
33
|
-
[formControl]="formControl"
|
34
|
-
[formlyAttributes]="field"
|
35
|
-
[nzDots]="props['dots']!!"
|
36
|
-
[nzIncluded]="props['included']!!"
|
37
|
-
[nzMax]="props.max"
|
38
|
-
[nzMin]="props.min"
|
39
|
-
[nzRange]="props['range']!!"
|
40
|
-
[nzStep]="props.step"
|
41
|
-
[nzTipFormatter]="props['tipFormatter']"
|
42
|
-
[nzVertical]="props['vertical']!!"
|
43
|
-
[nzReverse]="props['reverse']!!"
|
44
|
-
[nzTooltipVisible]="props['tooltipVisible']!"
|
45
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
46
|
-
(nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
|
47
|
-
></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 });
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSlider, decorators: [{
|
49
|
-
type: Component,
|
50
|
-
args: [{
|
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)"
|
68
|
-
></nz-slider>`,
|
69
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
70
|
-
}]
|
12
|
+
class FormlyFieldSlider extends FieldType {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments);
|
15
|
+
this.defaultOptions = {
|
16
|
+
props: {
|
17
|
+
max: 100,
|
18
|
+
min: 0,
|
19
|
+
step: 1,
|
20
|
+
dots: false,
|
21
|
+
included: true,
|
22
|
+
range: false,
|
23
|
+
vertical: false,
|
24
|
+
reverse: false,
|
25
|
+
tooltipVisible: 'default'
|
26
|
+
}
|
27
|
+
};
|
28
|
+
}
|
29
|
+
}
|
30
|
+
FormlyFieldSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
31
|
+
FormlyFieldSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldSlider, selector: "formly-field-slider", usesInheritance: true, ngImport: i0, template: `<nz-slider
|
32
|
+
#slider
|
33
|
+
[formControl]="formControl"
|
34
|
+
[formlyAttributes]="field"
|
35
|
+
[nzDots]="props['dots']!!"
|
36
|
+
[nzIncluded]="props['included']!!"
|
37
|
+
[nzMax]="props.max"
|
38
|
+
[nzMin]="props.min"
|
39
|
+
[nzRange]="props['range']!!"
|
40
|
+
[nzStep]="props.step"
|
41
|
+
[nzTipFormatter]="props['tipFormatter']"
|
42
|
+
[nzVertical]="props['vertical']!!"
|
43
|
+
[nzReverse]="props['reverse']!!"
|
44
|
+
[nzTooltipVisible]="props['tooltipVisible']!"
|
45
|
+
(ngModelChange)="props.change && props.change(field, $event)"
|
46
|
+
(nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
|
47
|
+
></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 });
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSlider, decorators: [{
|
49
|
+
type: Component,
|
50
|
+
args: [{
|
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)"
|
68
|
+
></nz-slider>`,
|
69
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
70
|
+
}]
|
71
71
|
}] });
|
72
72
|
|
73
|
-
class FormlyNzSliderModule {
|
74
|
-
}
|
75
|
-
FormlyNzSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
76
|
-
FormlyNzSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
|
77
|
-
ReactiveFormsModule,
|
78
|
-
FormlyNzFormFieldModule,
|
79
|
-
NzSliderModule, i3.FormlyModule] });
|
80
|
-
FormlyNzSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, imports: [CommonModule,
|
81
|
-
ReactiveFormsModule,
|
82
|
-
FormlyNzFormFieldModule,
|
83
|
-
NzSliderModule,
|
84
|
-
FormlyModule.forChild({
|
85
|
-
types: [
|
86
|
-
{
|
87
|
-
name: 'slider',
|
88
|
-
component: FormlyFieldSlider,
|
89
|
-
wrappers: ['form-field']
|
90
|
-
}
|
91
|
-
]
|
92
|
-
})] });
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, decorators: [{
|
94
|
-
type: NgModule,
|
95
|
-
args: [{
|
96
|
-
declarations: [FormlyFieldSlider],
|
97
|
-
imports: [
|
98
|
-
CommonModule,
|
99
|
-
ReactiveFormsModule,
|
100
|
-
FormlyNzFormFieldModule,
|
101
|
-
NzSliderModule,
|
102
|
-
FormlyModule.forChild({
|
103
|
-
types: [
|
104
|
-
{
|
105
|
-
name: 'slider',
|
106
|
-
component: FormlyFieldSlider,
|
107
|
-
wrappers: ['form-field']
|
108
|
-
}
|
109
|
-
]
|
110
|
-
})
|
111
|
-
]
|
112
|
-
}]
|
73
|
+
class FormlyNzSliderModule {
|
74
|
+
}
|
75
|
+
FormlyNzSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
76
|
+
FormlyNzSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
|
77
|
+
ReactiveFormsModule,
|
78
|
+
FormlyNzFormFieldModule,
|
79
|
+
NzSliderModule, i3.FormlyModule] });
|
80
|
+
FormlyNzSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, imports: [CommonModule,
|
81
|
+
ReactiveFormsModule,
|
82
|
+
FormlyNzFormFieldModule,
|
83
|
+
NzSliderModule,
|
84
|
+
FormlyModule.forChild({
|
85
|
+
types: [
|
86
|
+
{
|
87
|
+
name: 'slider',
|
88
|
+
component: FormlyFieldSlider,
|
89
|
+
wrappers: ['form-field']
|
90
|
+
}
|
91
|
+
]
|
92
|
+
})] });
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, decorators: [{
|
94
|
+
type: NgModule,
|
95
|
+
args: [{
|
96
|
+
declarations: [FormlyFieldSlider],
|
97
|
+
imports: [
|
98
|
+
CommonModule,
|
99
|
+
ReactiveFormsModule,
|
100
|
+
FormlyNzFormFieldModule,
|
101
|
+
NzSliderModule,
|
102
|
+
FormlyModule.forChild({
|
103
|
+
types: [
|
104
|
+
{
|
105
|
+
name: 'slider',
|
106
|
+
component: FormlyFieldSlider,
|
107
|
+
wrappers: ['form-field']
|
108
|
+
}
|
109
|
+
]
|
110
|
+
})
|
111
|
+
]
|
112
|
+
}]
|
113
113
|
}] });
|
114
114
|
|
115
|
-
/**
|
116
|
-
* Generated bundle index. Do not edit.
|
115
|
+
/**
|
116
|
+
* Generated bundle index. Do not edit.
|
117
117
|
*/
|
118
118
|
|
119
119
|
export { FormlyFieldSlider, FormlyNzSliderModule };
|
@@ -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';\
|
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, FormlyFieldConfig } from '@ngx-formly/core';\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?: (field: FormlyFieldConfig, value: number[] | number) => void;\n}\n\nexport interface FormlySlideFieldConfig extends FormlyFieldConfig<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":";;;;;;;;;;;AA0FM,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,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAnBlB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;AAgBI,eAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,U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A,CAAA,CAAA;AAaL,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAhB7B,YAAY;QACZ,mBAAmB;QACnB,uBAAuB;QACvB,cAAc;QAEd,YAAY,CAAC,QAAQ,CAAC;AACpB,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,IAAI,EAAE,QAAQ;AACd,oBAAA,SAAS,EAAE,iBAAiB;oBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iBAAA;AACF,aAAA;SACF,CAAC,CAAA,EAAA,CAAA,CAAA;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;;;;"}
|
@@ -9,97 +9,97 @@ import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
|
|
9
9
|
import * as i2 from 'ng-zorro-antd/switch';
|
10
10
|
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
11
11
|
|
12
|
-
class FormlyFieldSwitch extends FieldType {
|
13
|
-
constructor() {
|
14
|
-
super(...arguments);
|
15
|
-
this.defaultOptions = {
|
16
|
-
props: {
|
17
|
-
size: 'default',
|
18
|
-
loading: false,
|
19
|
-
control: false
|
20
|
-
}
|
21
|
-
};
|
22
|
-
}
|
23
|
-
}
|
24
|
-
FormlyFieldSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
25
|
-
FormlyFieldSwitch.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldSwitch, selector: "formly-field-switch", usesInheritance: true, ngImport: i0, template: `
|
26
|
-
<nz-switch
|
27
|
-
[formControl]="formControl"
|
28
|
-
[formlyAttributes]="field"
|
29
|
-
[nzId]="id"
|
30
|
-
[nzCheckedChildren]="props['checkedChildren'] ?? null"
|
31
|
-
[nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
|
32
|
-
[nzSize]="props['size']!"
|
33
|
-
[nzLoading]="props['loading']!!"
|
34
|
-
[nzControl]="props['control']!!"
|
35
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
36
|
-
></nz-switch>
|
37
|
-
`, 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 });
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSwitch, decorators: [{
|
39
|
-
type: Component,
|
40
|
-
args: [{
|
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>
|
54
|
-
`,
|
55
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
56
|
-
}]
|
12
|
+
class FormlyFieldSwitch extends FieldType {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments);
|
15
|
+
this.defaultOptions = {
|
16
|
+
props: {
|
17
|
+
size: 'default',
|
18
|
+
loading: false,
|
19
|
+
control: false
|
20
|
+
}
|
21
|
+
};
|
22
|
+
}
|
23
|
+
}
|
24
|
+
FormlyFieldSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
25
|
+
FormlyFieldSwitch.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldSwitch, selector: "formly-field-switch", usesInheritance: true, ngImport: i0, template: `
|
26
|
+
<nz-switch
|
27
|
+
[formControl]="formControl"
|
28
|
+
[formlyAttributes]="field"
|
29
|
+
[nzId]="id"
|
30
|
+
[nzCheckedChildren]="props['checkedChildren'] ?? null"
|
31
|
+
[nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
|
32
|
+
[nzSize]="props['size']!"
|
33
|
+
[nzLoading]="props['loading']!!"
|
34
|
+
[nzControl]="props['control']!!"
|
35
|
+
(ngModelChange)="props.change && props.change(field, $event)"
|
36
|
+
></nz-switch>
|
37
|
+
`, 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 });
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSwitch, decorators: [{
|
39
|
+
type: Component,
|
40
|
+
args: [{
|
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>
|
54
|
+
`,
|
55
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
56
|
+
}]
|
57
57
|
}] });
|
58
58
|
|
59
|
-
class FormlyNzSwitchModule {
|
60
|
-
}
|
61
|
-
FormlyNzSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
62
|
-
FormlyNzSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, declarations: [FormlyFieldSwitch], imports: [CommonModule,
|
63
|
-
ReactiveFormsModule,
|
64
|
-
FormlyNzFormFieldModule,
|
65
|
-
NzSwitchModule, i3.FormlyModule] });
|
66
|
-
FormlyNzSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, imports: [CommonModule,
|
67
|
-
ReactiveFormsModule,
|
68
|
-
FormlyNzFormFieldModule,
|
69
|
-
NzSwitchModule,
|
70
|
-
FormlyModule.forChild({
|
71
|
-
types: [
|
72
|
-
{
|
73
|
-
name: 'switch',
|
74
|
-
component: FormlyFieldSwitch,
|
75
|
-
wrappers: ['form-field']
|
76
|
-
}
|
77
|
-
]
|
78
|
-
})] });
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, decorators: [{
|
80
|
-
type: NgModule,
|
81
|
-
args: [{
|
82
|
-
declarations: [FormlyFieldSwitch],
|
83
|
-
imports: [
|
84
|
-
CommonModule,
|
85
|
-
ReactiveFormsModule,
|
86
|
-
FormlyNzFormFieldModule,
|
87
|
-
NzSwitchModule,
|
88
|
-
FormlyModule.forChild({
|
89
|
-
types: [
|
90
|
-
{
|
91
|
-
name: 'switch',
|
92
|
-
component: FormlyFieldSwitch,
|
93
|
-
wrappers: ['form-field']
|
94
|
-
}
|
95
|
-
]
|
96
|
-
})
|
97
|
-
]
|
98
|
-
}]
|
59
|
+
class FormlyNzSwitchModule {
|
60
|
+
}
|
61
|
+
FormlyNzSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
62
|
+
FormlyNzSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, declarations: [FormlyFieldSwitch], imports: [CommonModule,
|
63
|
+
ReactiveFormsModule,
|
64
|
+
FormlyNzFormFieldModule,
|
65
|
+
NzSwitchModule, i3.FormlyModule] });
|
66
|
+
FormlyNzSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, imports: [CommonModule,
|
67
|
+
ReactiveFormsModule,
|
68
|
+
FormlyNzFormFieldModule,
|
69
|
+
NzSwitchModule,
|
70
|
+
FormlyModule.forChild({
|
71
|
+
types: [
|
72
|
+
{
|
73
|
+
name: 'switch',
|
74
|
+
component: FormlyFieldSwitch,
|
75
|
+
wrappers: ['form-field']
|
76
|
+
}
|
77
|
+
]
|
78
|
+
})] });
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, decorators: [{
|
80
|
+
type: NgModule,
|
81
|
+
args: [{
|
82
|
+
declarations: [FormlyFieldSwitch],
|
83
|
+
imports: [
|
84
|
+
CommonModule,
|
85
|
+
ReactiveFormsModule,
|
86
|
+
FormlyNzFormFieldModule,
|
87
|
+
NzSwitchModule,
|
88
|
+
FormlyModule.forChild({
|
89
|
+
types: [
|
90
|
+
{
|
91
|
+
name: 'switch',
|
92
|
+
component: FormlyFieldSwitch,
|
93
|
+
wrappers: ['form-field']
|
94
|
+
}
|
95
|
+
]
|
96
|
+
})
|
97
|
+
]
|
98
|
+
}]
|
99
99
|
}] });
|
100
100
|
|
101
|
-
/**
|
102
|
-
* Generated bundle index. Do not edit.
|
101
|
+
/**
|
102
|
+
* Generated bundle index. Do not edit.
|
103
103
|
*/
|
104
104
|
|
105
105
|
export { FormlyFieldSwitch, FormlyNzSwitchModule };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-switch.mjs","sources":["../../../../packages/formlyantd/switch/src/switch.type.ts","../../../../packages/formlyantd/switch/src/switch.module.ts","../../../../packages/formlyantd/switch/src/ngx-formly-zorro-antd-switch.ts"],"sourcesContent":["import { Component, Type, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-switch.mjs","sources":["../../../../packages/formlyantd/switch/src/switch.type.ts","../../../../packages/formlyantd/switch/src/switch.module.ts","../../../../packages/formlyantd/switch/src/ngx-formly-zorro-antd-switch.ts"],"sourcesContent":["import { Component, Type, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { NzSizeDSType } from 'ng-zorro-antd/core/types';\n\ninterface SwitchProps extends FormlyFieldProps {\n /**\n * 选中时的内容\n */\n checkedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 非选中时的内容\n */\n unCheckedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 开关大小\n */\n size?: NzSizeDSType;\n\n /**\n * 加载中的开关\n * @default false\n */\n loading?: boolean;\n\n /**\n * 是否完全由用户控制状态\n * @default false\n */\n control?: boolean;\n}\n\nexport interface FormlySwitchFieldConfig extends FormlyFieldConfig<SwitchProps> {\n type: 'switch' | Type<FormlyFieldSwitch>;\n}\n\n@Component({\n selector: 'formly-field-switch',\n template: `\n <nz-switch\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzId]=\"id\"\n [nzCheckedChildren]=\"props['checkedChildren'] ?? null\"\n [nzUnCheckedChildren]=\"props['unCheckedChildren'] ?? null\"\n [nzSize]=\"props['size']!\"\n [nzLoading]=\"props['loading']!!\"\n [nzControl]=\"props['control']!!\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n ></nz-switch>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSwitch extends FieldType<FieldTypeConfig<SwitchProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n loading: false,\n control: false\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldSwitch } from './switch.type';\n\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\n\n@NgModule({\n declarations: [FormlyFieldSwitch],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n\n NzSwitchModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'switch',\n component: FormlyFieldSwitch,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAwDM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAjB9E,IAAA,WAAA,GAAA;;AAkBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,KAAK;AACf,aAAA;SACF,CAAC;AACH,KAAA;;8GARY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAflB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;AAYT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA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