ng-zorro-antd-extension 17.4.2 → 17.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configurable-query/configurable-query.component.d.ts +12 -8
- package/configurable-query/configurable-query.module.d.ts +5 -3
- package/configurable-query/controls/abstract.control.d.ts +2 -1
- package/configurable-query/query-config.service.d.ts +3 -0
- package/dynamic-form/config/dynamic-form-config.d.ts +18 -0
- package/dynamic-form/controls/abstract.control.d.ts +11 -0
- package/dynamic-form/controls/date-picker.control.d.ts +6 -0
- package/dynamic-form/controls/input.control.d.ts +6 -0
- package/dynamic-form/controls/range-picker.control.d.ts +6 -0
- package/dynamic-form/controls/select.control.d.ts +6 -0
- package/dynamic-form/controls/template.control.d.ts +6 -0
- package/dynamic-form/dynamic-form-item/dynamic-form-item.component.d.ts +12 -0
- package/dynamic-form/dynamic-form.component.d.ts +5 -0
- package/dynamic-form/dynamic-form.module.d.ts +23 -0
- package/dynamic-form/index.d.ts +5 -0
- package/dynamic-form/public-api.d.ts +7 -0
- package/dynamic-form/wrapper/control/abstract-control-wrapper.d.ts +12 -0
- package/dynamic-form/wrapper/control/built-in-control-wrapper.d.ts +7 -0
- package/dynamic-form/wrapper/item/abstract-item-wrapper.d.ts +14 -0
- package/dynamic-form/wrapper/item/built-in-item-wrapper.d.ts +6 -0
- package/dynamic-form/wrapper/label/abstract-label-wrapper.d.ts +5 -0
- package/dynamic-form/wrapper/label/built-in-label-wrapper.d.ts +6 -0
- package/esm2022/configurable-query/configurable-query-item/configurable-query-item.component.mjs +4 -3
- package/esm2022/configurable-query/configurable-query.component.mjs +18 -12
- package/esm2022/configurable-query/configurable-query.module.mjs +14 -6
- package/esm2022/configurable-query/controls/abstract.control.mjs +4 -1
- package/esm2022/configurable-query/controls/date-picker.control.mjs +6 -5
- package/esm2022/configurable-query/controls/input.control.mjs +6 -5
- package/esm2022/configurable-query/controls/range-picker.control.mjs +6 -5
- package/esm2022/configurable-query/controls/select.control.mjs +6 -5
- package/esm2022/configurable-query/controls/template.control.mjs +6 -5
- package/esm2022/configurable-query/query-config.service.mjs +4 -1
- package/esm2022/dynamic-form/config/dynamic-form-config.mjs +47 -0
- package/esm2022/dynamic-form/controls/abstract.control.mjs +17 -0
- package/esm2022/dynamic-form/controls/date-picker.control.mjs +20 -0
- package/esm2022/dynamic-form/controls/input.control.mjs +15 -0
- package/esm2022/dynamic-form/controls/range-picker.control.mjs +15 -0
- package/esm2022/dynamic-form/controls/select.control.mjs +49 -0
- package/esm2022/dynamic-form/controls/template.control.mjs +30 -0
- package/esm2022/dynamic-form/dynamic-form-item/dynamic-form-item.component.mjs +31 -0
- package/esm2022/dynamic-form/dynamic-form.component.mjs +45 -0
- package/esm2022/dynamic-form/dynamic-form.module.mjs +72 -0
- package/esm2022/dynamic-form/ng-zorro-antd-extension-dynamic-form.mjs +5 -0
- package/esm2022/dynamic-form/public-api.mjs +8 -0
- package/esm2022/dynamic-form/wrapper/control/abstract-control-wrapper.mjs +30 -0
- package/esm2022/dynamic-form/wrapper/control/built-in-control-wrapper.mjs +32 -0
- package/esm2022/dynamic-form/wrapper/item/abstract-item-wrapper.mjs +44 -0
- package/esm2022/dynamic-form/wrapper/item/built-in-item-wrapper.mjs +27 -0
- package/esm2022/dynamic-form/wrapper/label/abstract-label-wrapper.mjs +10 -0
- package/esm2022/dynamic-form/wrapper/label/built-in-label-wrapper.mjs +17 -0
- package/esm2022/print/nzx-print-content.directive.mjs +2 -2
- package/esm2022/print/nzx-print.module.mjs +1 -1
- package/esm2022/util/lib/getElementByTag.mjs +15 -8
- package/fesm2022/ng-zorro-antd-extension-configurable-query.mjs +53 -27
- package/fesm2022/ng-zorro-antd-extension-configurable-query.mjs.map +1 -1
- package/fesm2022/ng-zorro-antd-extension-dynamic-form.mjs +444 -0
- package/fesm2022/ng-zorro-antd-extension-dynamic-form.mjs.map +1 -0
- package/fesm2022/ng-zorro-antd-extension-print.mjs.map +1 -1
- package/fesm2022/ng-zorro-antd-extension-util.mjs +13 -7
- package/fesm2022/ng-zorro-antd-extension-util.mjs.map +1 -1
- package/package.json +12 -6
- package/print/nzx-print-content.directive.d.ts +1 -1
- package/table-select/abstract-table-select.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Component, InjectionToken, Injectable, Optional, Inject, ViewContainerRef, ViewChild, EventEmitter,
|
|
2
|
+
import { Directive, Input, Component, ChangeDetectionStrategy, InjectionToken, Injectable, Optional, Inject, ViewContainerRef, ViewChild, EventEmitter, Output, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { updateControlStatus } from 'ng-zorro-antd-extension/util';
|
|
4
4
|
import { BehaviorSubject, Subject, takeUntil, fromEvent } from 'rxjs';
|
|
5
5
|
import * as i1$1 from 'ng-zorro-antd/i18n';
|
|
@@ -16,7 +16,11 @@ import * as i6 from 'ng-zorro-antd/button';
|
|
|
16
16
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
17
17
|
import * as i7 from 'ng-zorro-antd/core/transition-patch';
|
|
18
18
|
import * as i8 from 'ng-zorro-antd/core/wave';
|
|
19
|
-
import * as i9 from 'ng-zorro-antd/
|
|
19
|
+
import * as i9 from 'ng-zorro-antd/card';
|
|
20
|
+
import { NzCardModule } from 'ng-zorro-antd/card';
|
|
21
|
+
import * as i10 from 'ng-zorro-antd/space';
|
|
22
|
+
import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
23
|
+
import * as i11 from 'ng-zorro-antd/icon';
|
|
20
24
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
21
25
|
import * as i3 from 'ng-zorro-antd/date-picker';
|
|
22
26
|
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
@@ -45,6 +49,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
45
49
|
* 用来动态添加control type类型控件,类型控件需要继承此控件
|
|
46
50
|
*/
|
|
47
51
|
class NzxAbstractControl {
|
|
52
|
+
get formControl() {
|
|
53
|
+
return this.form.get(this.control.controlName);
|
|
54
|
+
}
|
|
48
55
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxAbstractControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
49
56
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NzxAbstractControl, inputs: { form: "form", control: "control" }, ngImport: i0 }); }
|
|
50
57
|
}
|
|
@@ -62,12 +69,12 @@ class NzxDatePickerControlComponent extends NzxAbstractControl {
|
|
|
62
69
|
<ng-container [formGroup]="form">
|
|
63
70
|
<nz-date-picker
|
|
64
71
|
[ngStyle]="{ width: '100%' }"
|
|
65
|
-
[
|
|
72
|
+
[formControl]="formControl"
|
|
66
73
|
[nzPlaceHolder]="control.placeholder!"
|
|
67
74
|
>
|
|
68
75
|
</nz-date-picker>
|
|
69
76
|
</ng-container>
|
|
70
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.
|
|
77
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
71
78
|
}
|
|
72
79
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxDatePickerControlComponent, decorators: [{
|
|
73
80
|
type: Component,
|
|
@@ -76,12 +83,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
76
83
|
<ng-container [formGroup]="form">
|
|
77
84
|
<nz-date-picker
|
|
78
85
|
[ngStyle]="{ width: '100%' }"
|
|
79
|
-
[
|
|
86
|
+
[formControl]="formControl"
|
|
80
87
|
[nzPlaceHolder]="control.placeholder!"
|
|
81
88
|
>
|
|
82
89
|
</nz-date-picker>
|
|
83
90
|
</ng-container>
|
|
84
91
|
`,
|
|
92
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
85
93
|
}]
|
|
86
94
|
}] });
|
|
87
95
|
|
|
@@ -90,13 +98,13 @@ class NzxInputControlComponent extends NzxAbstractControl {
|
|
|
90
98
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NzxInputControlComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
91
99
|
<ng-container [formGroup]="form">
|
|
92
100
|
<input
|
|
101
|
+
[formControl]="formControl"
|
|
93
102
|
nz-input
|
|
94
103
|
type="text"
|
|
95
104
|
[placeholder]="control.placeholder"
|
|
96
|
-
[formControlName]="control.controlName!"
|
|
97
105
|
/>
|
|
98
106
|
</ng-container>
|
|
99
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.
|
|
107
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
100
108
|
}
|
|
101
109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxInputControlComponent, decorators: [{
|
|
102
110
|
type: Component,
|
|
@@ -104,13 +112,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
104
112
|
template: `
|
|
105
113
|
<ng-container [formGroup]="form">
|
|
106
114
|
<input
|
|
115
|
+
[formControl]="formControl"
|
|
107
116
|
nz-input
|
|
108
117
|
type="text"
|
|
109
118
|
[placeholder]="control.placeholder"
|
|
110
|
-
[formControlName]="control.controlName!"
|
|
111
119
|
/>
|
|
112
120
|
</ng-container>
|
|
113
121
|
`,
|
|
122
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
123
|
}]
|
|
115
124
|
}] });
|
|
116
125
|
|
|
@@ -119,12 +128,12 @@ class NzxRangePickerControlComponent extends NzxAbstractControl {
|
|
|
119
128
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NzxRangePickerControlComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
120
129
|
<ng-container [formGroup]="form">
|
|
121
130
|
<nz-range-picker
|
|
131
|
+
[formControl]="formControl"
|
|
122
132
|
[ngStyle]="{ width: '100%' }"
|
|
123
|
-
[formControlName]="control.controlName!"
|
|
124
133
|
>
|
|
125
134
|
</nz-range-picker>
|
|
126
135
|
</ng-container>
|
|
127
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.
|
|
136
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i3.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
128
137
|
}
|
|
129
138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxRangePickerControlComponent, decorators: [{
|
|
130
139
|
type: Component,
|
|
@@ -132,12 +141,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
132
141
|
template: `
|
|
133
142
|
<ng-container [formGroup]="form">
|
|
134
143
|
<nz-range-picker
|
|
144
|
+
[formControl]="formControl"
|
|
135
145
|
[ngStyle]="{ width: '100%' }"
|
|
136
|
-
[formControlName]="control.controlName!"
|
|
137
146
|
>
|
|
138
147
|
</nz-range-picker>
|
|
139
148
|
</ng-container>
|
|
140
149
|
`,
|
|
150
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
141
151
|
}]
|
|
142
152
|
}] });
|
|
143
153
|
|
|
@@ -146,7 +156,7 @@ class NzxSelectControlComponent extends NzxAbstractControl {
|
|
|
146
156
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NzxSelectControlComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
147
157
|
<ng-container [formGroup]="form">
|
|
148
158
|
<nz-select
|
|
149
|
-
[
|
|
159
|
+
[formControl]="formControl"
|
|
150
160
|
[nzShowSearch]="control.nzxShowSearch ?? true"
|
|
151
161
|
[nzAllowClear]="control.nzxAllowClear ?? true"
|
|
152
162
|
[nzPlaceHolder]="control.placeholder!"
|
|
@@ -159,7 +169,7 @@ class NzxSelectControlComponent extends NzxAbstractControl {
|
|
|
159
169
|
</nz-option>
|
|
160
170
|
</nz-select>
|
|
161
171
|
</ng-container>
|
|
162
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.
|
|
172
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3$1.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
163
173
|
}
|
|
164
174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxSelectControlComponent, decorators: [{
|
|
165
175
|
type: Component,
|
|
@@ -167,7 +177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
167
177
|
template: `
|
|
168
178
|
<ng-container [formGroup]="form">
|
|
169
179
|
<nz-select
|
|
170
|
-
[
|
|
180
|
+
[formControl]="formControl"
|
|
171
181
|
[nzShowSearch]="control.nzxShowSearch ?? true"
|
|
172
182
|
[nzAllowClear]="control.nzxAllowClear ?? true"
|
|
173
183
|
[nzPlaceHolder]="control.placeholder!"
|
|
@@ -181,6 +191,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
181
191
|
</nz-select>
|
|
182
192
|
</ng-container>
|
|
183
193
|
`,
|
|
194
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
184
195
|
}]
|
|
185
196
|
}] });
|
|
186
197
|
|
|
@@ -190,11 +201,11 @@ class NzxTemplateControlComponent extends NzxAbstractControl {
|
|
|
190
201
|
<ng-container
|
|
191
202
|
*ngTemplateOutlet="
|
|
192
203
|
control.templateRef!;
|
|
193
|
-
context: { $implicit:
|
|
204
|
+
context: { $implicit: formControl, formGroup: form }
|
|
194
205
|
"
|
|
195
206
|
>
|
|
196
207
|
</ng-container>
|
|
197
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
208
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
198
209
|
}
|
|
199
210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxTemplateControlComponent, decorators: [{
|
|
200
211
|
type: Component,
|
|
@@ -203,11 +214,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
203
214
|
<ng-container
|
|
204
215
|
*ngTemplateOutlet="
|
|
205
216
|
control.templateRef!;
|
|
206
|
-
context: { $implicit:
|
|
217
|
+
context: { $implicit: formControl, formGroup: form }
|
|
207
218
|
"
|
|
208
219
|
>
|
|
209
220
|
</ng-container>
|
|
210
221
|
`,
|
|
222
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
211
223
|
}]
|
|
212
224
|
}] });
|
|
213
225
|
|
|
@@ -235,6 +247,7 @@ class NzxQueryConfigService {
|
|
|
235
247
|
}
|
|
236
248
|
}
|
|
237
249
|
}
|
|
250
|
+
/** 添加controlType 类型控件 */
|
|
238
251
|
addControlType(controlType) {
|
|
239
252
|
const find = this.controlTypePoll.some((i) => i.key === controlType.key);
|
|
240
253
|
if (find) {
|
|
@@ -242,6 +255,7 @@ class NzxQueryConfigService {
|
|
|
242
255
|
}
|
|
243
256
|
this.controlTypePoll.push(controlType);
|
|
244
257
|
}
|
|
258
|
+
/** 删除controlType 类型控件 */
|
|
245
259
|
removeControlType(key) {
|
|
246
260
|
const find = this.controlTypePoll.some((i) => i.key === key);
|
|
247
261
|
if (find) {
|
|
@@ -251,6 +265,7 @@ class NzxQueryConfigService {
|
|
|
251
265
|
throw `ControlType:: ${key} not exists !`;
|
|
252
266
|
}
|
|
253
267
|
}
|
|
268
|
+
/** 刷新 */
|
|
254
269
|
refreshControlType() {
|
|
255
270
|
this.controlTypes$.next(this.controlTypePoll);
|
|
256
271
|
}
|
|
@@ -313,7 +328,7 @@ class NzxConfigurableQueryItemComponent {
|
|
|
313
328
|
<ng-template #controlTemp></ng-template>
|
|
314
329
|
</nz-form-control>
|
|
315
330
|
</nz-form-item>
|
|
316
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3$2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i4.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }] }); }
|
|
331
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3$2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i4.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
317
332
|
}
|
|
318
333
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxConfigurableQueryItemComponent, decorators: [{
|
|
319
334
|
type: Component,
|
|
@@ -335,6 +350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
335
350
|
</nz-form-control>
|
|
336
351
|
</nz-form-item>
|
|
337
352
|
`,
|
|
353
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
338
354
|
}]
|
|
339
355
|
}], ctorParameters: () => [{ type: NzxQueryConfigService }], propDecorators: { form: [{
|
|
340
356
|
type: Input
|
|
@@ -350,13 +366,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
350
366
|
* 支持模板自定义,在使用模板自定义时,要注意controlType应该设置为Template并且确保controlName与指令上的nzxControl应该相同
|
|
351
367
|
*/
|
|
352
368
|
class NzxConfigurableQueryComponent {
|
|
353
|
-
/**
|
|
369
|
+
/** 组件最终的查询参数 */
|
|
354
370
|
get queryParams() {
|
|
355
371
|
return this._queryParams;
|
|
356
372
|
}
|
|
357
373
|
set queryParams(value) {
|
|
358
374
|
this._queryParams = value;
|
|
359
375
|
}
|
|
376
|
+
/** 判断当前组件是否展示展开折叠按钮 */
|
|
360
377
|
get nzxCollapse() {
|
|
361
378
|
return this.controls.some((i) => i.hasOwnProperty('collapse'));
|
|
362
379
|
}
|
|
@@ -364,19 +381,21 @@ class NzxConfigurableQueryComponent {
|
|
|
364
381
|
this.i18n = i18n;
|
|
365
382
|
this.fb = fb;
|
|
366
383
|
this.cd = cd;
|
|
367
|
-
/**
|
|
384
|
+
/**
|
|
385
|
+
* 配置项用来生成查询表单
|
|
386
|
+
*/
|
|
368
387
|
this.controls = [];
|
|
369
|
-
/**
|
|
388
|
+
/** 查询表单排列方式默认start */
|
|
370
389
|
this.nzxJustify = 'start';
|
|
371
|
-
/**
|
|
390
|
+
/** 查询项间隔默认为8 */
|
|
372
391
|
this.nzxGutter = 8;
|
|
373
|
-
/**
|
|
392
|
+
/** 一行展示多少查询项默认展示3个 */
|
|
374
393
|
this.lineNumber = 3;
|
|
375
394
|
/** 操作按钮所占栅格数,24则换行 */
|
|
376
395
|
this.nzxBtnSpan = null;
|
|
377
|
-
/**
|
|
396
|
+
/** 初始化时,是否主动触发查询 */
|
|
378
397
|
this.initQuery = false;
|
|
379
|
-
/** 缺省
|
|
398
|
+
/** 缺省 固定参数会固定携带在抛出事件中 */
|
|
380
399
|
this.fixedParams = {};
|
|
381
400
|
/** 查询时会触发抛出查询参数 */
|
|
382
401
|
this.queryChange = new EventEmitter();
|
|
@@ -544,6 +563,7 @@ class NzxConfigurableQueryComponent {
|
|
|
544
563
|
this.destroy$.next();
|
|
545
564
|
this.destroy$.complete();
|
|
546
565
|
}
|
|
566
|
+
/** 计算展开收起icon、文案 */
|
|
547
567
|
calculateText() {
|
|
548
568
|
if (this.controls.some((i) => i.collapse === true)) {
|
|
549
569
|
this.collapseIcon = 'down';
|
|
@@ -602,11 +622,11 @@ class NzxConfigurableQueryComponent {
|
|
|
602
622
|
}
|
|
603
623
|
}
|
|
604
624
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxConfigurableQueryComponent, deps: [{ token: i1$1.NzI18nService }, { token: i2.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
605
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NzxConfigurableQueryComponent, selector: "nzx-configurable-query", inputs: { controls: "controls", nzxJustify: "nzxJustify", nzxGutter: "nzxGutter", lineNumber: "lineNumber", nzxBtnSpan: "nzxBtnSpan", initQuery: "initQuery", fixedParams: "fixedParams" }, outputs: { queryChange: "queryChange", resetChange: "resetChange" }, queries: [{ propertyName: "controlTemplateList", predicate: NzxControlDirective, descendants: true }], viewQueries: [{ propertyName: "queyFormEl", first: true, predicate: ["queyForm"], descendants: true }], exportAs: ["NzxConfigurableQuery"], usesOnChanges: true, ngImport: i0, template: "<form #queyForm class=\"nzx-query-container\" nz-form [formGroup]=\"queryForm\">\n
|
|
625
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NzxConfigurableQueryComponent, selector: "nzx-configurable-query", inputs: { controls: "controls", nzxJustify: "nzxJustify", nzxGutter: "nzxGutter", lineNumber: "lineNumber", nzxBtnSpan: "nzxBtnSpan", initQuery: "initQuery", fixedParams: "fixedParams" }, outputs: { queryChange: "queryChange", resetChange: "resetChange" }, queries: [{ propertyName: "controlTemplateList", predicate: NzxControlDirective, descendants: true }], viewQueries: [{ propertyName: "queyFormEl", first: true, predicate: ["queyForm"], descendants: true }], exportAs: ["NzxConfigurableQuery"], usesOnChanges: true, ngImport: i0, template: "<nz-card>\n <form #queyForm class=\"nzx-query-container\" nz-form [formGroup]=\"queryForm\">\n <div nz-row [nzGutter]=\"nzxGutter\" [nzJustify]=\"nzxJustify\">\n <ng-container *ngFor=\"let config of controls; let i = index\">\n <div\n *ngIf=\"!config.hidden\"\n nz-col\n [nzSpan]=\"config.nzxSpan || 24 / lineNumber\"\n [hidden]=\"config.collapse\"\n [nzOrder]=\"i\"\n >\n <nzx-configurable-query-item\n *ngIf=\"config.controlName\"\n [form]=\"queryForm\"\n [control]=\"config\"\n ></nzx-configurable-query-item>\n </div>\n </ng-container>\n\n <div\n class=\"nzx-query-btn\"\n nz-col\n [nzOrder]=\"controls.length\"\n [nzSpan]=\"nzxBtnSpan || 24 / lineNumber\"\n >\n <div nz-row nzJustify=\"end\" nzAlign=\"middle\">\n <nz-space>\n <button\n *nzSpaceItem\n nz-button\n nzType=\"primary\"\n type=\"button\"\n title=\"Enter\"\n (click)=\"search()\"\n >\n {{ locale['query'] }}\n </button>\n <button\n *nzSpaceItem\n nz-button\n type=\"button\"\n title=\"ctrl+r\"\n (click)=\"reset()\"\n >\n {{ locale['reset'] }}\n </button>\n <ng-container *nzSpaceItem>\n <ng-content></ng-content>\n </ng-container>\n <ng-container *ngIf=\"nzxCollapse\">\n <a\n *nzSpaceItem\n nz-button\n nzType=\"link\"\n (click)=\"toggleCollapse()\"\n >\n {{ collapseText }}\n <i nz-icon [nzType]=\"collapseIcon\"></i>\n </a>\n </ng-container>\n </nz-space>\n </div>\n </div>\n </div>\n </form>\n</nz-card>\n", styles: [".nzx-query-container [nz-form-label]{overflow:visible}.nzx-query-container .nzx-query-btn{flex-grow:2;max-width:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3$2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i4.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i6.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i7.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i9.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzBorderless", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "component", type: i10.NzSpaceComponent, selector: "nz-space, [nz-space]", inputs: ["nzDirection", "nzAlign", "nzSplit", "nzWrap", "nzSize"], exportAs: ["NzSpace"] }, { kind: "directive", type: i10.NzSpaceItemDirective, selector: "[nzSpaceItem]" }, { kind: "directive", type: i11.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: NzxConfigurableQueryItemComponent, selector: "nzx-configurable-query-item", inputs: ["form", "control"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
606
626
|
}
|
|
607
627
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxConfigurableQueryComponent, decorators: [{
|
|
608
628
|
type: Component,
|
|
609
|
-
args: [{ selector: 'nzx-configurable-query', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'NzxConfigurableQuery', template: "<form #queyForm class=\"nzx-query-container\" nz-form [formGroup]=\"queryForm\">\n
|
|
629
|
+
args: [{ selector: 'nzx-configurable-query', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'NzxConfigurableQuery', template: "<nz-card>\n <form #queyForm class=\"nzx-query-container\" nz-form [formGroup]=\"queryForm\">\n <div nz-row [nzGutter]=\"nzxGutter\" [nzJustify]=\"nzxJustify\">\n <ng-container *ngFor=\"let config of controls; let i = index\">\n <div\n *ngIf=\"!config.hidden\"\n nz-col\n [nzSpan]=\"config.nzxSpan || 24 / lineNumber\"\n [hidden]=\"config.collapse\"\n [nzOrder]=\"i\"\n >\n <nzx-configurable-query-item\n *ngIf=\"config.controlName\"\n [form]=\"queryForm\"\n [control]=\"config\"\n ></nzx-configurable-query-item>\n </div>\n </ng-container>\n\n <div\n class=\"nzx-query-btn\"\n nz-col\n [nzOrder]=\"controls.length\"\n [nzSpan]=\"nzxBtnSpan || 24 / lineNumber\"\n >\n <div nz-row nzJustify=\"end\" nzAlign=\"middle\">\n <nz-space>\n <button\n *nzSpaceItem\n nz-button\n nzType=\"primary\"\n type=\"button\"\n title=\"Enter\"\n (click)=\"search()\"\n >\n {{ locale['query'] }}\n </button>\n <button\n *nzSpaceItem\n nz-button\n type=\"button\"\n title=\"ctrl+r\"\n (click)=\"reset()\"\n >\n {{ locale['reset'] }}\n </button>\n <ng-container *nzSpaceItem>\n <ng-content></ng-content>\n </ng-container>\n <ng-container *ngIf=\"nzxCollapse\">\n <a\n *nzSpaceItem\n nz-button\n nzType=\"link\"\n (click)=\"toggleCollapse()\"\n >\n {{ collapseText }}\n <i nz-icon [nzType]=\"collapseIcon\"></i>\n </a>\n </ng-container>\n </nz-space>\n </div>\n </div>\n </div>\n </form>\n</nz-card>\n", styles: [".nzx-query-container [nz-form-label]{overflow:visible}.nzx-query-container .nzx-query-btn{flex-grow:2;max-width:none}\n"] }]
|
|
610
630
|
}], ctorParameters: () => [{ type: i1$1.NzI18nService }, { type: i2.FormBuilder }, { type: i0.ChangeDetectorRef }], propDecorators: { controls: [{
|
|
611
631
|
type: Input
|
|
612
632
|
}], nzxJustify: [{
|
|
@@ -673,6 +693,8 @@ class NzxConfigurableQueryModule {
|
|
|
673
693
|
NzButtonModule,
|
|
674
694
|
NzSelectModule,
|
|
675
695
|
NzDatePickerModule,
|
|
696
|
+
NzCardModule,
|
|
697
|
+
NzSpaceModule,
|
|
676
698
|
NzIconModule,
|
|
677
699
|
NzI18nModule], exports: [NzxControlDirective, NzxConfigurableQueryComponent] }); }
|
|
678
700
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NzxConfigurableQueryModule, imports: [CommonModule,
|
|
@@ -683,6 +705,8 @@ class NzxConfigurableQueryModule {
|
|
|
683
705
|
NzButtonModule,
|
|
684
706
|
NzSelectModule,
|
|
685
707
|
NzDatePickerModule,
|
|
708
|
+
NzCardModule,
|
|
709
|
+
NzSpaceModule,
|
|
686
710
|
NzIconModule,
|
|
687
711
|
NzI18nModule] }); }
|
|
688
712
|
}
|
|
@@ -708,6 +732,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
708
732
|
NzButtonModule,
|
|
709
733
|
NzSelectModule,
|
|
710
734
|
NzDatePickerModule,
|
|
735
|
+
NzCardModule,
|
|
736
|
+
NzSpaceModule,
|
|
711
737
|
NzIconModule,
|
|
712
738
|
NzI18nModule,
|
|
713
739
|
],
|