@dignite-ng/expand.dynamic-form 3.0.0-rc.1 → 3.0.0-rc.11
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/esm2022/lib/components/dynamic/dynamic-config.component.mjs +11 -0
- package/esm2022/lib/components/dynamic/dynamic-control.component.mjs +11 -0
- package/esm2022/lib/components/dynamic/dynamic-search.component.mjs +65 -0
- package/esm2022/lib/components/dynamic/dynamic-view.component.mjs +57 -0
- package/esm2022/lib/components/dynamic/dynamic.component.mjs +20 -15
- package/esm2022/lib/components/dynamic/index.mjs +5 -1
- package/esm2022/lib/components/form/date-edit/date-edit-config.component.mjs +5 -3
- package/esm2022/lib/components/form/date-edit/date-edit-view.component.mjs +40 -0
- package/esm2022/lib/components/form/date-edit/index.mjs +2 -1
- package/esm2022/lib/components/form/form-control-group.mjs +40 -22
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.component.mjs +8 -6
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.mjs +4 -3
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-control.component.mjs +3 -3
- package/esm2022/lib/components/form/numeric-edit/numeric-edit-view.component.mjs +39 -0
- package/esm2022/lib/components/form/select/index.mjs +3 -1
- package/esm2022/lib/components/form/select/select-config.component.mjs +15 -8
- package/esm2022/lib/components/form/select/select-control.component.mjs +26 -17
- package/esm2022/lib/components/form/select/select-search.component.mjs +92 -0
- package/esm2022/lib/components/form/select/select-view.component.mjs +44 -0
- package/esm2022/lib/components/form/switch/index.mjs +3 -1
- package/esm2022/lib/components/form/switch/switch-config.component.mjs +6 -4
- package/esm2022/lib/components/form/switch/switch-control.component.mjs +12 -6
- package/esm2022/lib/components/form/switch/switch-search.component.mjs +76 -0
- package/esm2022/lib/components/form/switch/switch-view.component.mjs +40 -0
- package/esm2022/lib/components/form/text-edit/index.mjs +3 -1
- package/esm2022/lib/components/form/text-edit/text-edit-config.component.mjs +6 -4
- package/esm2022/lib/components/form/text-edit/text-edit-search.component.mjs +80 -0
- package/esm2022/lib/components/form/text-edit/text-edit-view.component.mjs +39 -0
- package/esm2022/lib/components/form/text-edit/text-edit.component.mjs +6 -4
- package/esm2022/lib/dynamic-form.module.mjs +65 -9
- package/esm2022/lib/interfaces/form-config-interfaces.mjs +1 -1
- package/esm2022/lib/services/form-control.service.mjs +33 -0
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs +745 -75
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs.map +1 -1
- package/lib/components/dynamic/dynamic-config.component.d.ts +5 -0
- package/lib/components/dynamic/dynamic-control.component.d.ts +5 -0
- package/lib/components/dynamic/dynamic-search.component.d.ts +28 -0
- package/lib/components/dynamic/dynamic-view.component.d.ts +24 -0
- package/lib/components/dynamic/dynamic.component.d.ts +6 -6
- package/lib/components/dynamic/index.d.ts +4 -0
- package/lib/components/form/date-edit/date-edit-config.component.d.ts +1 -0
- package/lib/components/form/date-edit/date-edit-view.component.d.ts +17 -0
- package/lib/components/form/date-edit/index.d.ts +1 -0
- package/lib/components/form/form-control-group.d.ts +2 -3
- package/lib/components/form/numeric-edit/numberic-edit-config.component.d.ts +2 -1
- package/lib/components/form/numeric-edit/numeric-edit-view.component.d.ts +17 -0
- package/lib/components/form/select/index.d.ts +2 -0
- package/lib/components/form/select/select-config.component.d.ts +1 -0
- package/lib/components/form/select/select-control.component.d.ts +1 -0
- package/lib/components/form/select/select-search.component.d.ts +30 -0
- package/lib/components/form/select/select-view.component.d.ts +17 -0
- package/lib/components/form/switch/index.d.ts +2 -0
- package/lib/components/form/switch/switch-config.component.d.ts +1 -0
- package/lib/components/form/switch/switch-control.component.d.ts +2 -1
- package/lib/components/form/switch/switch-search.component.d.ts +28 -0
- package/lib/components/form/switch/switch-view.component.d.ts +17 -0
- package/lib/components/form/text-edit/index.d.ts +2 -0
- package/lib/components/form/text-edit/text-edit-config.component.d.ts +1 -0
- package/lib/components/form/text-edit/text-edit-search.component.d.ts +30 -0
- package/lib/components/form/text-edit/text-edit-view.component.d.ts +17 -0
- package/lib/components/form/text-edit/text-edit.component.d.ts +1 -0
- package/lib/dynamic-form.module.d.ts +18 -6
- package/lib/interfaces/form-config-interfaces.d.ts +8 -4
- package/lib/services/form-control.service.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, ChangeDetectorRef, ViewChild, Input, Component, ChangeDetectionStrategy, Injectable, ViewContainerRef, Inject, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { Validators, FormArray, FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i2 from '@abp/ng.core';
|
|
6
6
|
import { CoreModule } from '@abp/ng.core';
|
|
7
7
|
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
8
8
|
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
9
|
-
import { NzTreeModule } from 'ng-zorro-antd/tree';
|
|
10
9
|
import * as i3 from '@ngx-validate/core';
|
|
11
10
|
import * as i2$1 from '@angular/common';
|
|
12
11
|
import { DatePipe } from '@angular/common';
|
|
13
12
|
import { pinyin } from 'pinyin-pro';
|
|
13
|
+
import * as i4 from 'ng-zorro-antd/select';
|
|
14
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
14
15
|
|
|
15
16
|
class TextEditConfig {
|
|
16
17
|
constructor(data) {
|
|
@@ -42,6 +43,7 @@ class TextEditConfigComponent {
|
|
|
42
43
|
constructor(fb) {
|
|
43
44
|
this.fb = fb;
|
|
44
45
|
this._TextEditMode = TextEditMode;
|
|
46
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
45
47
|
}
|
|
46
48
|
set type(v) {
|
|
47
49
|
this._type = v;
|
|
@@ -61,7 +63,8 @@ class TextEditConfigComponent {
|
|
|
61
63
|
async dataLoaded() {
|
|
62
64
|
if (this._Entity && this._type) {
|
|
63
65
|
await this.AfterInit();
|
|
64
|
-
this.
|
|
66
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
67
|
+
this.submitclick?.nativeElement?.click();
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
AfterInit() {
|
|
@@ -69,7 +72,7 @@ class TextEditConfigComponent {
|
|
|
69
72
|
this._Entity.setControl('formConfiguration', this.fb.group(new TextEditConfig()));
|
|
70
73
|
if (this._selected && this._selected.formControlName == this._type) {
|
|
71
74
|
this.formConfiguration.patchValue({
|
|
72
|
-
...this._selected.formConfiguration
|
|
75
|
+
...this._selected.formConfiguration,
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
78
|
resolve(true);
|
|
@@ -100,6 +103,7 @@ class TextEditComponent {
|
|
|
100
103
|
this._TextEditMode = TextEditMode;
|
|
101
104
|
/**字段配置列表 */
|
|
102
105
|
this._fields = '';
|
|
106
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
103
107
|
this.isObjEmpty = (obj) => Object.keys(obj).length === 0;
|
|
104
108
|
}
|
|
105
109
|
set entity(v) {
|
|
@@ -126,6 +130,7 @@ class TextEditComponent {
|
|
|
126
130
|
if (this._fields && this._entity && this._parentFiledName) {
|
|
127
131
|
this.extraProperties = this._entity.get(this._parentFiledName);
|
|
128
132
|
await this.AfterInit();
|
|
133
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
129
134
|
this.submitclick?.nativeElement?.click();
|
|
130
135
|
}
|
|
131
136
|
}
|
|
@@ -143,14 +148,14 @@ class TextEditComponent {
|
|
|
143
148
|
ValidatorsArray.push(Validators.maxLength(this._fields.field.formConfiguration['TextEdit.CharLimit']));
|
|
144
149
|
}
|
|
145
150
|
let newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
146
|
-
this.extraProperties
|
|
151
|
+
this.extraProperties?.setControl(this._fields.field.name, newControl);
|
|
147
152
|
resolve(true);
|
|
148
153
|
});
|
|
149
154
|
}
|
|
150
155
|
ngOnDestroy() {
|
|
151
156
|
//Called once, before the instance is destroyed.
|
|
152
157
|
//Add 'implements OnDestroy' to the class.
|
|
153
|
-
this.extraProperties
|
|
158
|
+
this.extraProperties?.removeControl(this._fields.field.name);
|
|
154
159
|
}
|
|
155
160
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
156
161
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TextEditComponent, selector: "df-text-edit", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"_fields.field.formConfiguration['TextEdit.Mode'] ===_TextEditMode.SingleLine\">\n <input type=\"text\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" />\n </ng-container>\n <ng-container *ngIf=\"_fields.field.formConfiguration['TextEdit.Mode'] === _TextEditMode.MultipleLine\">\n <textarea class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" rows=\"3\"></textarea>\n </ng-container>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
|
|
@@ -171,6 +176,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
171
176
|
args: ['submitclick', { static: true }]
|
|
172
177
|
}] } });
|
|
173
178
|
|
|
179
|
+
class TextEditViewComponent {
|
|
180
|
+
constructor() {
|
|
181
|
+
/**展示则内容 */
|
|
182
|
+
this.showValue = '';
|
|
183
|
+
/**是否显示再列表 */
|
|
184
|
+
this.showInList = false;
|
|
185
|
+
/**表单控件Value */
|
|
186
|
+
this._value = '';
|
|
187
|
+
}
|
|
188
|
+
set value(v) {
|
|
189
|
+
this._value = v;
|
|
190
|
+
}
|
|
191
|
+
async ngAfterContentInit() {
|
|
192
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
193
|
+
//Add 'implements AfterContentInit' to the class.
|
|
194
|
+
let valueOptions = this._value;
|
|
195
|
+
if (this.type && valueOptions) {
|
|
196
|
+
this.showValue = valueOptions;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TextEditViewComponent, selector: "df-text-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
201
|
+
}
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, decorators: [{
|
|
203
|
+
type: Component,
|
|
204
|
+
args: [{ selector: 'df-text-edit-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
|
|
205
|
+
}], propDecorators: { showInList: [{
|
|
206
|
+
type: Input
|
|
207
|
+
}], fields: [{
|
|
208
|
+
type: Input
|
|
209
|
+
}], type: [{
|
|
210
|
+
type: Input
|
|
211
|
+
}], value: [{
|
|
212
|
+
type: Input
|
|
213
|
+
}] } });
|
|
214
|
+
|
|
215
|
+
class TextEditSearchComponent {
|
|
216
|
+
constructor(fb) {
|
|
217
|
+
this.fb = fb;
|
|
218
|
+
this._TextEditMode = TextEditMode;
|
|
219
|
+
/**字段配置列表 */
|
|
220
|
+
this._fields = '';
|
|
221
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
222
|
+
this.isObjEmpty = (obj) => Object.keys(obj).length === 0;
|
|
223
|
+
}
|
|
224
|
+
set entity(v) {
|
|
225
|
+
this._entity = v;
|
|
226
|
+
if (v)
|
|
227
|
+
this.dataLoaded();
|
|
228
|
+
}
|
|
229
|
+
set fields(v) {
|
|
230
|
+
this._fields = v;
|
|
231
|
+
if (v)
|
|
232
|
+
this.dataLoaded();
|
|
233
|
+
}
|
|
234
|
+
set parentFiledName(v) {
|
|
235
|
+
this._parentFiledName = v;
|
|
236
|
+
if (v)
|
|
237
|
+
this.dataLoaded();
|
|
238
|
+
}
|
|
239
|
+
set selected(v) {
|
|
240
|
+
this._selected = v || '';
|
|
241
|
+
if (v)
|
|
242
|
+
this.dataLoaded();
|
|
243
|
+
}
|
|
244
|
+
async dataLoaded() {
|
|
245
|
+
if (this._fields && this._entity && this._parentFiledName) {
|
|
246
|
+
this.extraProperties = this._entity.get(this._parentFiledName);
|
|
247
|
+
await this.AfterInit();
|
|
248
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
249
|
+
this.submitclick?.nativeElement?.click();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
AfterInit() {
|
|
253
|
+
return new Promise((resolve, rejects) => {
|
|
254
|
+
let ValidatorsArray = [];
|
|
255
|
+
this._fields.field.formConfiguration = {
|
|
256
|
+
...this.fb.group(new TextEditConfig()).value,
|
|
257
|
+
...this._fields.field.formConfiguration
|
|
258
|
+
};
|
|
259
|
+
let newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
260
|
+
this.extraProperties?.setControl(this._fields.field.name, newControl);
|
|
261
|
+
resolve(true);
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
ngOnDestroy() {
|
|
265
|
+
//Called once, before the instance is destroyed.
|
|
266
|
+
//Add 'implements OnDestroy' to the class.
|
|
267
|
+
this.extraProperties?.removeControl(this._fields.field.name);
|
|
268
|
+
}
|
|
269
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
270
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TextEditSearchComponent, selector: "df-text-edit-search", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\r\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" />\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
|
|
271
|
+
}
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditSearchComponent, decorators: [{
|
|
273
|
+
type: Component,
|
|
274
|
+
args: [{ selector: 'df-text-edit-search', template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\r\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" />\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>" }]
|
|
275
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
|
|
276
|
+
type: Input
|
|
277
|
+
}], fields: [{
|
|
278
|
+
type: Input
|
|
279
|
+
}], parentFiledName: [{
|
|
280
|
+
type: Input
|
|
281
|
+
}], selected: [{
|
|
282
|
+
type: Input
|
|
283
|
+
}], submitclick: [{
|
|
284
|
+
type: ViewChild,
|
|
285
|
+
args: ['submitclick', { static: true }]
|
|
286
|
+
}] } });
|
|
287
|
+
|
|
174
288
|
class SwitchConfig {
|
|
175
289
|
constructor(data) {
|
|
176
290
|
/**默认值 */
|
|
@@ -188,6 +302,7 @@ class SwitchConfig {
|
|
|
188
302
|
class SwitchConfigComponent {
|
|
189
303
|
constructor(fb) {
|
|
190
304
|
this.fb = fb;
|
|
305
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
191
306
|
}
|
|
192
307
|
set type(v) {
|
|
193
308
|
this._type = v;
|
|
@@ -207,7 +322,8 @@ class SwitchConfigComponent {
|
|
|
207
322
|
async dataLoaded() {
|
|
208
323
|
if (this._Entity && this._type) {
|
|
209
324
|
await this.AfterInit();
|
|
210
|
-
this.
|
|
325
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
326
|
+
this.submitclick?.nativeElement?.click();
|
|
211
327
|
}
|
|
212
328
|
}
|
|
213
329
|
AfterInit() {
|
|
@@ -215,7 +331,7 @@ class SwitchConfigComponent {
|
|
|
215
331
|
this._Entity.setControl('formConfiguration', this.fb.group(new SwitchConfig()));
|
|
216
332
|
if (this._selected && this._selected.formControlName == this._type) {
|
|
217
333
|
this.formConfiguration.patchValue({
|
|
218
|
-
...this._selected.formConfiguration
|
|
334
|
+
...this._selected.formConfiguration,
|
|
219
335
|
});
|
|
220
336
|
}
|
|
221
337
|
resolve(true);
|
|
@@ -243,6 +359,7 @@ class SwitchControlComponent {
|
|
|
243
359
|
this.fb = fb;
|
|
244
360
|
/**字段配置列表 */
|
|
245
361
|
this._fields = '';
|
|
362
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
246
363
|
}
|
|
247
364
|
set entity(v) {
|
|
248
365
|
this._entity = v;
|
|
@@ -268,7 +385,8 @@ class SwitchControlComponent {
|
|
|
268
385
|
async dataLoaded() {
|
|
269
386
|
if (this._fields && this._entity) {
|
|
270
387
|
await this.AfterInit();
|
|
271
|
-
this.
|
|
388
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
389
|
+
this.submitclick?.nativeElement?.click();
|
|
272
390
|
}
|
|
273
391
|
}
|
|
274
392
|
AfterInit() {
|
|
@@ -277,7 +395,11 @@ class SwitchControlComponent {
|
|
|
277
395
|
if (this._fields.required) {
|
|
278
396
|
ValidatorsArray.push(Validators.required);
|
|
279
397
|
}
|
|
280
|
-
let newControl = this.fb.control(this._selected
|
|
398
|
+
let newControl = this.fb.control(this._selected
|
|
399
|
+
? this._selected
|
|
400
|
+
: this._selected === false
|
|
401
|
+
? this._selected
|
|
402
|
+
: this._fields.field.formConfiguration['Switch.Default'], ValidatorsArray);
|
|
281
403
|
this.extraProperties.setControl(this._fields.field.name, newControl);
|
|
282
404
|
resolve(true);
|
|
283
405
|
});
|
|
@@ -288,11 +410,11 @@ class SwitchControlComponent {
|
|
|
288
410
|
this.extraProperties.removeControl(this._fields.field.name);
|
|
289
411
|
}
|
|
290
412
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
291
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchControlComponent, selector: "df-switch-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\n </div>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n
|
|
413
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchControlComponent, selector: "df-switch-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\n </div>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
|
|
292
414
|
}
|
|
293
415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchControlComponent, decorators: [{
|
|
294
416
|
type: Component,
|
|
295
|
-
args: [{ selector: 'df-switch-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\n </div>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n
|
|
417
|
+
args: [{ selector: 'df-switch-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\n </div>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
|
|
296
418
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
|
|
297
419
|
type: Input
|
|
298
420
|
}], fields: [{
|
|
@@ -306,14 +428,121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
306
428
|
args: ['submitclick', { static: true }]
|
|
307
429
|
}] } });
|
|
308
430
|
|
|
431
|
+
class SwitchSearchComponent {
|
|
432
|
+
constructor(fb) {
|
|
433
|
+
this.fb = fb;
|
|
434
|
+
/**字段配置列表 */
|
|
435
|
+
this._fields = '';
|
|
436
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
437
|
+
}
|
|
438
|
+
set entity(v) {
|
|
439
|
+
this._entity = v;
|
|
440
|
+
this.dataLoaded();
|
|
441
|
+
}
|
|
442
|
+
set fields(v) {
|
|
443
|
+
this._fields = v;
|
|
444
|
+
this.dataLoaded();
|
|
445
|
+
}
|
|
446
|
+
set parentFiledName(v) {
|
|
447
|
+
this._parentFiledName = v;
|
|
448
|
+
this.dataLoaded();
|
|
449
|
+
}
|
|
450
|
+
set selected(v) {
|
|
451
|
+
// ?v:false;
|
|
452
|
+
this._selected = v;
|
|
453
|
+
this.dataLoaded();
|
|
454
|
+
}
|
|
455
|
+
get extraProperties() {
|
|
456
|
+
return this._entity.get('extraProperties');
|
|
457
|
+
}
|
|
458
|
+
/**数据加载完成 */
|
|
459
|
+
async dataLoaded() {
|
|
460
|
+
if (this._fields && this._entity) {
|
|
461
|
+
await this.AfterInit();
|
|
462
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
463
|
+
this.submitclick?.nativeElement?.click();
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
AfterInit() {
|
|
467
|
+
return new Promise((resolve, rejects) => {
|
|
468
|
+
let ValidatorsArray = [];
|
|
469
|
+
let newControl = this.fb.control(this._selected
|
|
470
|
+
? this._selected
|
|
471
|
+
: this._selected === false
|
|
472
|
+
? this._selected
|
|
473
|
+
: this._fields.field.formConfiguration['Switch.Default'], ValidatorsArray);
|
|
474
|
+
this.extraProperties.setControl(this._fields.field.name, newControl);
|
|
475
|
+
resolve(true);
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
ngOnDestroy() {
|
|
479
|
+
//Called once, before the instance is destroyed.
|
|
480
|
+
//Add 'implements OnDestroy' to the class.
|
|
481
|
+
this.extraProperties.removeControl(this._fields.field.name);
|
|
482
|
+
}
|
|
483
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
484
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchSearchComponent, selector: "df-switch-search", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div formGroupName=\"extraProperties\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <div class=\"form-check form-switch\">\r\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\r\n </div>\r\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
|
|
485
|
+
}
|
|
486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchSearchComponent, decorators: [{
|
|
487
|
+
type: Component,
|
|
488
|
+
args: [{ selector: 'df-switch-search', template: "<form [formGroup]=\"_entity\">\r\n <div formGroupName=\"extraProperties\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <div class=\"form-check form-switch\">\r\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\r\n </div>\r\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>" }]
|
|
489
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
|
|
490
|
+
type: Input
|
|
491
|
+
}], fields: [{
|
|
492
|
+
type: Input
|
|
493
|
+
}], parentFiledName: [{
|
|
494
|
+
type: Input
|
|
495
|
+
}], selected: [{
|
|
496
|
+
type: Input
|
|
497
|
+
}], submitclick: [{
|
|
498
|
+
type: ViewChild,
|
|
499
|
+
args: ['submitclick', { static: true }]
|
|
500
|
+
}] } });
|
|
501
|
+
|
|
502
|
+
class SwitchViewComponent {
|
|
503
|
+
constructor() {
|
|
504
|
+
/**展示则内容 */
|
|
505
|
+
this.showValue = '';
|
|
506
|
+
/**是否显示再列表 */
|
|
507
|
+
this.showInList = false;
|
|
508
|
+
/**表单控件Value */
|
|
509
|
+
this._value = '';
|
|
510
|
+
}
|
|
511
|
+
set value(v) {
|
|
512
|
+
this._value = v;
|
|
513
|
+
}
|
|
514
|
+
async ngAfterContentInit() {
|
|
515
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
516
|
+
//Add 'implements AfterContentInit' to the class.
|
|
517
|
+
let valueOptions = this._value;
|
|
518
|
+
if (this.type) {
|
|
519
|
+
this.showValue = valueOptions;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
523
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SwitchViewComponent, selector: "df-switch-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
524
|
+
}
|
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, decorators: [{
|
|
526
|
+
type: Component,
|
|
527
|
+
args: [{ selector: 'df-switch-view', template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}" }]
|
|
528
|
+
}], propDecorators: { showInList: [{
|
|
529
|
+
type: Input
|
|
530
|
+
}], fields: [{
|
|
531
|
+
type: Input
|
|
532
|
+
}], type: [{
|
|
533
|
+
type: Input
|
|
534
|
+
}], value: [{
|
|
535
|
+
type: Input
|
|
536
|
+
}] } });
|
|
537
|
+
|
|
309
538
|
class NumbericEditConfig {
|
|
310
539
|
constructor(data) {
|
|
311
540
|
/**占位符 */
|
|
312
541
|
this['NumericEditField.Placeholder'] = ['', []];
|
|
313
542
|
/**最小值 */
|
|
314
|
-
this['NumericEditField.Min'] = ['', []];
|
|
543
|
+
this['NumericEditField.Min'] = ['', [Validators.required]];
|
|
315
544
|
//最大值
|
|
316
|
-
this['NumericEditField.Max'] = ['', []];
|
|
545
|
+
this['NumericEditField.Max'] = ['', [Validators.required]];
|
|
317
546
|
// 小数位数
|
|
318
547
|
this['NumericEditField.Decimals'] = [2, []];
|
|
319
548
|
//步长
|
|
@@ -333,6 +562,7 @@ class NumbericEditConfig {
|
|
|
333
562
|
class NumbericEditConfigComponent {
|
|
334
563
|
constructor(fb) {
|
|
335
564
|
this.fb = fb;
|
|
565
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
336
566
|
}
|
|
337
567
|
set type(v) {
|
|
338
568
|
this._type = v;
|
|
@@ -351,7 +581,8 @@ class NumbericEditConfigComponent {
|
|
|
351
581
|
async dataLoaded() {
|
|
352
582
|
if (this._Entity && this._type) {
|
|
353
583
|
await this.AfterInit();
|
|
354
|
-
this.
|
|
584
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
585
|
+
this.submitclick?.nativeElement?.click();
|
|
355
586
|
}
|
|
356
587
|
}
|
|
357
588
|
AfterInit() {
|
|
@@ -366,11 +597,11 @@ class NumbericEditConfigComponent {
|
|
|
366
597
|
});
|
|
367
598
|
}
|
|
368
599
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
369
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditConfigComponent, selector: "df-numberic-edit-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true
|
|
600
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditConfigComponent, selector: "df-numberic-edit-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Placeholder\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Min' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Max' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Max\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericDecimals' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Decimals\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <small class=\"form-text text-muted d-block\">{{'DigniteAbpForms::NumericStepHelp'|abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::FormatSpecifier' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FormatSpecifier\">\n <small class=\"form-text text-muted d-block\">See:<a href=\"https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings\" target=\"_blank\">https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings</a></small>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
370
601
|
}
|
|
371
602
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditConfigComponent, decorators: [{
|
|
372
603
|
type: Component,
|
|
373
|
-
args: [{ selector: 'df-numberic-edit-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Placeholder\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Min' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Max' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Max\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericDecimals' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Decimals\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <small class=\"form-text text-muted d-block\">{{'DigniteAbpForms::NumericStepHelp'|abpLocalization}}</small>\n </div>\n
|
|
604
|
+
args: [{ selector: 'df-numberic-edit-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Placeholder\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Min' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Max' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Max\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericDecimals' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Decimals\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <small class=\"form-text text-muted d-block\">{{'DigniteAbpForms::NumericStepHelp'|abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::FormatSpecifier' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FormatSpecifier\">\n <small class=\"form-text text-muted d-block\">See:<a href=\"https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings\" target=\"_blank\">https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings</a></small>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>" }]
|
|
374
605
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
|
|
375
606
|
type: Input
|
|
376
607
|
}], selected: [{
|
|
@@ -379,7 +610,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
379
610
|
type: Input
|
|
380
611
|
}], submitclick: [{
|
|
381
612
|
type: ViewChild,
|
|
382
|
-
args: ['submitclick', { static:
|
|
613
|
+
args: ['submitclick', { static: false }]
|
|
383
614
|
}] } });
|
|
384
615
|
|
|
385
616
|
function maxDecimalPlacesValidator(maxDecimalPlaces) {
|
|
@@ -419,7 +650,7 @@ class NumbericEditControlComponent {
|
|
|
419
650
|
this.dataLoaded();
|
|
420
651
|
}
|
|
421
652
|
get extraProperties() {
|
|
422
|
-
return this._entity
|
|
653
|
+
return this._entity?.get('extraProperties');
|
|
423
654
|
}
|
|
424
655
|
get fieldInput() { return this.extraProperties.get(this._fields.field.name); }
|
|
425
656
|
/**数据加载完成 */
|
|
@@ -460,7 +691,7 @@ class NumbericEditControlComponent {
|
|
|
460
691
|
let formConfiguration = this._fields.field.formConfiguration;
|
|
461
692
|
let Decimals = formConfiguration['NumericEditField.Decimals'];
|
|
462
693
|
if (decimalPart.length > Decimals) {
|
|
463
|
-
this.fieldInput
|
|
694
|
+
this.fieldInput?.patchValue(val.slice(0, val.length - (decimalPart.length - 2)));
|
|
464
695
|
}
|
|
465
696
|
}
|
|
466
697
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditControlComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -515,6 +746,7 @@ class DateEditConfigComponent {
|
|
|
515
746
|
this._dataPipe = inject(DatePipe);
|
|
516
747
|
this._DateEditInterfaces = DateEditInterfaces;
|
|
517
748
|
this.dateTimeType = 'date';
|
|
749
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
518
750
|
}
|
|
519
751
|
set type(v) {
|
|
520
752
|
this._type = v;
|
|
@@ -532,7 +764,8 @@ class DateEditConfigComponent {
|
|
|
532
764
|
async dataLoaded() {
|
|
533
765
|
if (this._Entity && this._type) {
|
|
534
766
|
await this.AfterInit();
|
|
535
|
-
this.
|
|
767
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
768
|
+
this.submitclick?.nativeElement?.click();
|
|
536
769
|
}
|
|
537
770
|
}
|
|
538
771
|
AfterInit() {
|
|
@@ -680,6 +913,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
680
913
|
args: ['submitclick', { static: true }]
|
|
681
914
|
}] } });
|
|
682
915
|
|
|
916
|
+
class DateEditViewComponent {
|
|
917
|
+
constructor() {
|
|
918
|
+
/**展示则内容 */
|
|
919
|
+
this.showValue = '';
|
|
920
|
+
/**是否显示再列表 */
|
|
921
|
+
this.showInList = false;
|
|
922
|
+
/**表单控件Value */
|
|
923
|
+
this._value = '';
|
|
924
|
+
}
|
|
925
|
+
set value(v) {
|
|
926
|
+
this._value = v;
|
|
927
|
+
}
|
|
928
|
+
async ngAfterContentInit() {
|
|
929
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
930
|
+
//Add 'implements AfterContentInit' to the class.
|
|
931
|
+
let valueOptions = this._value;
|
|
932
|
+
if (this.type && valueOptions) {
|
|
933
|
+
this.showValue = valueOptions;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
937
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: DateEditViewComponent, selector: "df-date-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue|shortDateTime}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue|shortDateTime}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.ShortDateTimePipe, name: "shortDateTime" }] }); }
|
|
938
|
+
}
|
|
939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditViewComponent, decorators: [{
|
|
940
|
+
type: Component,
|
|
941
|
+
args: [{ selector: 'df-date-edit-view', template: "@if(showInList){\r\n{{showValue|shortDateTime}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue|shortDateTime}}\r\n </div>\r\n</div>\r\n}" }]
|
|
942
|
+
}], propDecorators: { showInList: [{
|
|
943
|
+
type: Input
|
|
944
|
+
}], fields: [{
|
|
945
|
+
type: Input
|
|
946
|
+
}], type: [{
|
|
947
|
+
type: Input
|
|
948
|
+
}], value: [{
|
|
949
|
+
type: Input
|
|
950
|
+
}] } });
|
|
951
|
+
|
|
952
|
+
class NumericEditViewComponent {
|
|
953
|
+
constructor() {
|
|
954
|
+
/**展示则内容 */
|
|
955
|
+
this.showValue = '';
|
|
956
|
+
/**是否显示再列表 */
|
|
957
|
+
this.showInList = false;
|
|
958
|
+
/**表单控件Value */
|
|
959
|
+
this._value = '';
|
|
960
|
+
}
|
|
961
|
+
set value(v) {
|
|
962
|
+
this._value = v;
|
|
963
|
+
}
|
|
964
|
+
async ngAfterContentInit() {
|
|
965
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
966
|
+
//Add 'implements AfterContentInit' to the class.
|
|
967
|
+
let valueOptions = this._value;
|
|
968
|
+
if (this.type && valueOptions) {
|
|
969
|
+
this.showValue = valueOptions;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
973
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: NumericEditViewComponent, selector: "df-numeric-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
974
|
+
}
|
|
975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditViewComponent, decorators: [{
|
|
976
|
+
type: Component,
|
|
977
|
+
args: [{ selector: 'df-numeric-edit-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
|
|
978
|
+
}], propDecorators: { showInList: [{
|
|
979
|
+
type: Input
|
|
980
|
+
}], fields: [{
|
|
981
|
+
type: Input
|
|
982
|
+
}], type: [{
|
|
983
|
+
type: Input
|
|
984
|
+
}], value: [{
|
|
985
|
+
type: Input
|
|
986
|
+
}] } });
|
|
987
|
+
|
|
683
988
|
class SelectConfig {
|
|
684
989
|
constructor(data) {
|
|
685
990
|
/**空值文本 */
|
|
@@ -781,6 +1086,7 @@ class SelectConfigComponent {
|
|
|
781
1086
|
constructor(fb, _DfApiService) {
|
|
782
1087
|
this.fb = fb;
|
|
783
1088
|
this._DfApiService = _DfApiService;
|
|
1089
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
784
1090
|
}
|
|
785
1091
|
set type(v) {
|
|
786
1092
|
this._type = v;
|
|
@@ -793,7 +1099,7 @@ class SelectConfigComponent {
|
|
|
793
1099
|
this.dataLoaded();
|
|
794
1100
|
}
|
|
795
1101
|
get formConfiguration() {
|
|
796
|
-
return this._Entity
|
|
1102
|
+
return this._Entity?.get('formConfiguration');
|
|
797
1103
|
}
|
|
798
1104
|
get SelectOptions() {
|
|
799
1105
|
return this.formConfiguration.controls['Select.Options'];
|
|
@@ -801,7 +1107,8 @@ class SelectConfigComponent {
|
|
|
801
1107
|
async dataLoaded() {
|
|
802
1108
|
if (this._Entity && this._type) {
|
|
803
1109
|
await this.AfterInit();
|
|
804
|
-
this.
|
|
1110
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
1111
|
+
this.submitclick?.nativeElement?.click();
|
|
805
1112
|
}
|
|
806
1113
|
}
|
|
807
1114
|
/**增加选项 */
|
|
@@ -818,11 +1125,16 @@ class SelectConfigComponent {
|
|
|
818
1125
|
}
|
|
819
1126
|
AfterInit() {
|
|
820
1127
|
return new Promise((resolve, rejects) => {
|
|
821
|
-
this._Entity
|
|
1128
|
+
this._Entity?.setControl('formConfiguration', this.fb.group(new SelectConfig()));
|
|
822
1129
|
if (this._selected && this._selected.formControlName == this._type) {
|
|
823
|
-
this._selected.formConfiguration['Select.Options']
|
|
1130
|
+
for (const element of this._selected.formConfiguration['Select.Options']) {
|
|
1131
|
+
for (const key in element) {
|
|
1132
|
+
const item = element[key];
|
|
1133
|
+
const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
1134
|
+
element[capitalizedKey] = item;
|
|
1135
|
+
}
|
|
824
1136
|
this.addSelectOptions();
|
|
825
|
-
}
|
|
1137
|
+
}
|
|
826
1138
|
this.formConfiguration.patchValue({
|
|
827
1139
|
...this._selected.formConfiguration,
|
|
828
1140
|
});
|
|
@@ -836,7 +1148,7 @@ class SelectConfigComponent {
|
|
|
836
1148
|
textChange(event, index) {
|
|
837
1149
|
let SelectOptionsItem = this.SelectOptions.at(index);
|
|
838
1150
|
let value = event.target.value;
|
|
839
|
-
if (SelectOptionsItem.get('Value')
|
|
1151
|
+
if (SelectOptionsItem.get('Value')?.value)
|
|
840
1152
|
return;
|
|
841
1153
|
SelectOptionsItem.patchValue({
|
|
842
1154
|
Value: this._DfApiService.chineseToPinyin(value),
|
|
@@ -864,6 +1176,9 @@ class SelectControlComponent {
|
|
|
864
1176
|
this.fb = fb;
|
|
865
1177
|
/**字段配置列表 */
|
|
866
1178
|
this._fields = '';
|
|
1179
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1180
|
+
this._selected = [];
|
|
1181
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
867
1182
|
this.formConfiguration = '';
|
|
868
1183
|
}
|
|
869
1184
|
set fields(v) {
|
|
@@ -873,20 +1188,21 @@ class SelectControlComponent {
|
|
|
873
1188
|
this._parentFiledName = v;
|
|
874
1189
|
}
|
|
875
1190
|
set selected(v) {
|
|
876
|
-
this._selected = v;
|
|
1191
|
+
this._selected = v || [];
|
|
877
1192
|
}
|
|
878
1193
|
set entity(v) {
|
|
879
1194
|
this._entity = v;
|
|
880
1195
|
this.dataLoaded();
|
|
881
1196
|
}
|
|
882
1197
|
get extraProperties() {
|
|
883
|
-
return this._entity
|
|
1198
|
+
return this._entity?.get('extraProperties');
|
|
884
1199
|
}
|
|
885
1200
|
/**数据加载完成 */
|
|
886
1201
|
async dataLoaded() {
|
|
887
1202
|
if (this._fields && this._entity) {
|
|
888
1203
|
await this.AfterInit();
|
|
889
|
-
this.
|
|
1204
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
1205
|
+
this.submitclick?.nativeElement?.click();
|
|
890
1206
|
}
|
|
891
1207
|
}
|
|
892
1208
|
AfterInit() {
|
|
@@ -896,18 +1212,22 @@ class SelectControlComponent {
|
|
|
896
1212
|
ValidatorsArray.push(Validators.required);
|
|
897
1213
|
}
|
|
898
1214
|
this.formConfiguration = this._fields.field.formConfiguration;
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
1215
|
+
const isMultiple = this.formConfiguration['Select.Multiple'];
|
|
1216
|
+
let selectValue = isMultiple ? [] : [];
|
|
1217
|
+
for (const element of this.formConfiguration['Select.Options']) {
|
|
1218
|
+
for (const key in element) {
|
|
1219
|
+
const item = element[key];
|
|
1220
|
+
const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
1221
|
+
element[capitalizedKey] = item;
|
|
1222
|
+
}
|
|
1223
|
+
if (!this._selected) {
|
|
1224
|
+
if (Array.isArray(this._selected) && element.Selected && this._selected.length === 0) {
|
|
1225
|
+
selectValue = isMultiple ? [...selectValue, element.Value] : [element.Value];
|
|
1226
|
+
this._selected = selectValue;
|
|
907
1227
|
}
|
|
908
|
-
}
|
|
909
|
-
this._selected = selectValue;
|
|
1228
|
+
}
|
|
910
1229
|
}
|
|
1230
|
+
// this._selected = selectValue;
|
|
911
1231
|
let newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
912
1232
|
this.extraProperties.setControl(this._fields.field.name, newControl);
|
|
913
1233
|
resolve(true);
|
|
@@ -919,11 +1239,97 @@ class SelectControlComponent {
|
|
|
919
1239
|
this.extraProperties.removeControl(this._fields.field.name);
|
|
920
1240
|
}
|
|
921
1241
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
922
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectControlComponent, selector: "df-select-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\"
|
|
1242
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectControlComponent, selector: "df-select-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\n formControlName=\"{{_fields.field.name}}\">\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select{color:inherit!important}::ng-deep .selectcontrol .ant-select-selection-placeholder{color:inherit!important}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.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"] }] }); }
|
|
923
1243
|
}
|
|
924
1244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, decorators: [{
|
|
925
1245
|
type: Component,
|
|
926
|
-
args: [{ selector: 'df-select-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\"
|
|
1246
|
+
args: [{ selector: 'df-select-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\n formControlName=\"{{_fields.field.name}}\">\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select{color:inherit!important}::ng-deep .selectcontrol .ant-select-selection-placeholder{color:inherit!important}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"] }]
|
|
1247
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
|
|
1248
|
+
type: Input
|
|
1249
|
+
}], parentFiledName: [{
|
|
1250
|
+
type: Input
|
|
1251
|
+
}], selected: [{
|
|
1252
|
+
type: Input
|
|
1253
|
+
}], entity: [{
|
|
1254
|
+
type: Input
|
|
1255
|
+
}], submitclick: [{
|
|
1256
|
+
type: ViewChild,
|
|
1257
|
+
args: ['submitclick', { static: true }]
|
|
1258
|
+
}] } });
|
|
1259
|
+
|
|
1260
|
+
class SelectSearchComponent {
|
|
1261
|
+
constructor(fb) {
|
|
1262
|
+
this.fb = fb;
|
|
1263
|
+
/**字段配置列表 */
|
|
1264
|
+
this._fields = '';
|
|
1265
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
1266
|
+
this.formConfiguration = '';
|
|
1267
|
+
}
|
|
1268
|
+
set fields(v) {
|
|
1269
|
+
this._fields = v;
|
|
1270
|
+
}
|
|
1271
|
+
set parentFiledName(v) {
|
|
1272
|
+
this._parentFiledName = v;
|
|
1273
|
+
}
|
|
1274
|
+
set selected(v) {
|
|
1275
|
+
this._selected = v;
|
|
1276
|
+
}
|
|
1277
|
+
set entity(v) {
|
|
1278
|
+
this._entity = v;
|
|
1279
|
+
this.dataLoaded();
|
|
1280
|
+
}
|
|
1281
|
+
get extraProperties() {
|
|
1282
|
+
return this._entity?.get('extraProperties');
|
|
1283
|
+
}
|
|
1284
|
+
/**数据加载完成 */
|
|
1285
|
+
async dataLoaded() {
|
|
1286
|
+
if (this._fields && this._entity) {
|
|
1287
|
+
await this.AfterInit();
|
|
1288
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
1289
|
+
this.submitclick?.nativeElement?.click();
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
AfterInit() {
|
|
1293
|
+
return new Promise((resolve, rejects) => {
|
|
1294
|
+
let ValidatorsArray = [];
|
|
1295
|
+
this.formConfiguration = this._fields.field.formConfiguration;
|
|
1296
|
+
const isMultiple = this.formConfiguration['Select.Multiple'];
|
|
1297
|
+
let selectValue = isMultiple ? [] : [];
|
|
1298
|
+
for (const element of this.formConfiguration['Select.Options']) {
|
|
1299
|
+
for (const key in element) {
|
|
1300
|
+
const item = element[key];
|
|
1301
|
+
const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
1302
|
+
element[capitalizedKey] = item;
|
|
1303
|
+
}
|
|
1304
|
+
// if (this._selected) {
|
|
1305
|
+
// if (Array.isArray(this._selected) && element.Selected && this._selected.length === 0) {
|
|
1306
|
+
// selectValue = isMultiple ? [...selectValue, element.Value] : [element.Value];
|
|
1307
|
+
// }
|
|
1308
|
+
// }
|
|
1309
|
+
}
|
|
1310
|
+
this._selected = selectValue;
|
|
1311
|
+
let newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
1312
|
+
this.extraProperties.setControl(this._fields.field.name, newControl);
|
|
1313
|
+
resolve(true);
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
changeValue(event) {
|
|
1317
|
+
let selectvalue = this.extraProperties.get(this._fields.field.name).value;
|
|
1318
|
+
if (selectvalue[0] === '') {
|
|
1319
|
+
this.extraProperties.get(this._fields.field.name).setValue([]);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
ngOnDestroy() {
|
|
1323
|
+
//Called once, before the instance is destroyed.
|
|
1324
|
+
//Add 'implements OnDestroy' to the class.
|
|
1325
|
+
this.extraProperties.removeControl(this._fields.field.name);
|
|
1326
|
+
}
|
|
1327
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1328
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectSearchComponent, selector: "df-select-search", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\r\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <select class=\"form-select\" [multiple]=\"false\" [placeholder]=\"formConfiguration['Select.NullText']\" formControlName=\"{{_fields.field.name}}\" (change)=\"changeValue($event)\">\r\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\r\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\r\n <option [value]=\"item.Value\">{{item.Text}}</option>\r\n </ng-container>\r\n </select>\r\n </ng-template>\r\n <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select{color:inherit!important}::ng-deep .selectcontrol .ant-select-selection-placeholder{color:inherit!important}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.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"] }] }); }
|
|
1329
|
+
}
|
|
1330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectSearchComponent, decorators: [{
|
|
1331
|
+
type: Component,
|
|
1332
|
+
args: [{ selector: 'df-select-search', template: "<form [formGroup]=\"_entity\">\r\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\r\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <select class=\"form-select\" [multiple]=\"false\" [placeholder]=\"formConfiguration['Select.NullText']\" formControlName=\"{{_fields.field.name}}\" (change)=\"changeValue($event)\">\r\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\r\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\r\n <option [value]=\"item.Value\">{{item.Text}}</option>\r\n </ng-container>\r\n </select>\r\n </ng-template>\r\n <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select{color:inherit!important}::ng-deep .selectcontrol .ant-select-selection-placeholder{color:inherit!important}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"] }]
|
|
927
1333
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
|
|
928
1334
|
type: Input
|
|
929
1335
|
}], parentFiledName: [{
|
|
@@ -937,6 +1343,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
937
1343
|
args: ['submitclick', { static: true }]
|
|
938
1344
|
}] } });
|
|
939
1345
|
|
|
1346
|
+
class SelectViewComponent {
|
|
1347
|
+
constructor() {
|
|
1348
|
+
/**展示则内容 */
|
|
1349
|
+
this.showValue = '';
|
|
1350
|
+
/**是否显示再列表 */
|
|
1351
|
+
this.showInList = false;
|
|
1352
|
+
/**表单控件Value */
|
|
1353
|
+
this._value = '';
|
|
1354
|
+
}
|
|
1355
|
+
set value(v) {
|
|
1356
|
+
this._value = v;
|
|
1357
|
+
}
|
|
1358
|
+
async ngAfterContentInit() {
|
|
1359
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1360
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1361
|
+
let valueOptions = this._value;
|
|
1362
|
+
if (this.type && valueOptions) {
|
|
1363
|
+
if (Array.isArray(valueOptions)) {
|
|
1364
|
+
this.showValue = valueOptions.join(',');
|
|
1365
|
+
}
|
|
1366
|
+
else {
|
|
1367
|
+
this.showValue = valueOptions;
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1372
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SelectViewComponent, selector: "df-select-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1373
|
+
}
|
|
1374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, decorators: [{
|
|
1375
|
+
type: Component,
|
|
1376
|
+
args: [{ selector: 'df-select-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
|
|
1377
|
+
}], propDecorators: { showInList: [{
|
|
1378
|
+
type: Input
|
|
1379
|
+
}], fields: [{
|
|
1380
|
+
type: Input
|
|
1381
|
+
}], type: [{
|
|
1382
|
+
type: Input
|
|
1383
|
+
}], value: [{
|
|
1384
|
+
type: Input
|
|
1385
|
+
}] } });
|
|
1386
|
+
|
|
940
1387
|
// import { CkEditorConfigComponent, CkEditorControlComponent } from "./ck-editor";
|
|
941
1388
|
/**
|
|
942
1389
|
* 表单控件分组-包含配置,控件,显示的数组
|
|
@@ -947,54 +1394,60 @@ const FieldControlGroup = [
|
|
|
947
1394
|
name: 'TextEdit',
|
|
948
1395
|
fieldConfigComponent: TextEditConfigComponent,
|
|
949
1396
|
fieldComponent: TextEditComponent,
|
|
950
|
-
|
|
951
|
-
|
|
1397
|
+
fieldViewComponent: TextEditViewComponent,
|
|
1398
|
+
fieldSearchComponent: TextEditSearchComponent,
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
952
1401
|
displayName: '开关',
|
|
953
1402
|
name: 'Switch',
|
|
954
1403
|
fieldConfigComponent: SwitchConfigComponent,
|
|
955
1404
|
fieldComponent: SwitchControlComponent,
|
|
956
|
-
|
|
957
|
-
|
|
1405
|
+
fieldViewComponent: SwitchViewComponent,
|
|
1406
|
+
fieldSearchComponent: SwitchSearchComponent,
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
958
1409
|
displayName: '选择',
|
|
959
1410
|
name: 'Select',
|
|
960
1411
|
fieldConfigComponent: SelectConfigComponent,
|
|
961
1412
|
fieldComponent: SelectControlComponent,
|
|
962
|
-
|
|
963
|
-
|
|
1413
|
+
fieldViewComponent: SelectViewComponent,
|
|
1414
|
+
fieldSearchComponent: SelectSearchComponent,
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
964
1417
|
displayName: '数字',
|
|
965
1418
|
name: 'NumericEdit',
|
|
966
1419
|
fieldConfigComponent: NumbericEditConfigComponent,
|
|
967
1420
|
fieldComponent: NumbericEditControlComponent,
|
|
968
|
-
|
|
969
|
-
},
|
|
1421
|
+
fieldViewComponent: NumericEditViewComponent,
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
970
1424
|
displayName: '日期',
|
|
971
1425
|
name: 'DateEdit',
|
|
972
1426
|
fieldConfigComponent: DateEditConfigComponent,
|
|
973
1427
|
fieldComponent: DateEditControlComponent,
|
|
974
|
-
|
|
1428
|
+
fieldViewComponent: DateEditViewComponent,
|
|
975
1429
|
},
|
|
976
1430
|
];
|
|
977
|
-
function getExcludeAssignControl(typeName) {
|
|
978
|
-
// return FieldControlGroup.filter(el => el.name !== typeName)
|
|
979
|
-
return FieldControlGroup;
|
|
980
|
-
}
|
|
981
1431
|
function AddFieldControlGroup(array = []) {
|
|
982
|
-
|
|
1432
|
+
for (const element of array) {
|
|
1433
|
+
let find = FieldControlGroup.find((control) => {
|
|
1434
|
+
return control.name === element.name;
|
|
1435
|
+
});
|
|
1436
|
+
if (!find) {
|
|
1437
|
+
FieldControlGroup.push(element);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
return FieldControlGroup;
|
|
983
1441
|
}
|
|
984
1442
|
|
|
985
1443
|
class DynamicComponent {
|
|
986
|
-
constructor() {
|
|
987
|
-
/**字段配置列表 */
|
|
988
|
-
this._fields = '';
|
|
989
|
-
/**表单控件组 */
|
|
990
|
-
this._fieldControlGroup = FieldControlGroup;
|
|
991
|
-
}
|
|
992
1444
|
set selected(v) {
|
|
993
1445
|
this._selected = v === undefined ? '' : v === null ? '' : v;
|
|
994
1446
|
}
|
|
995
1447
|
set type(v) {
|
|
996
1448
|
this._type = v;
|
|
997
|
-
this.
|
|
1449
|
+
if (this._entity)
|
|
1450
|
+
this.dataLoaded(3);
|
|
998
1451
|
}
|
|
999
1452
|
set culture(v) {
|
|
1000
1453
|
this._culture = v;
|
|
@@ -1011,16 +1464,23 @@ class DynamicComponent {
|
|
|
1011
1464
|
this.dataLoaded(3);
|
|
1012
1465
|
}
|
|
1013
1466
|
}
|
|
1467
|
+
constructor(mergedConfig) {
|
|
1468
|
+
this.mergedConfig = mergedConfig;
|
|
1469
|
+
/**字段配置列表 */
|
|
1470
|
+
this._fields = '';
|
|
1471
|
+
}
|
|
1014
1472
|
/**数据加载完成 */
|
|
1015
|
-
dataLoaded(val) {
|
|
1473
|
+
async dataLoaded(val) {
|
|
1474
|
+
let _fieldControlGroup = AddFieldControlGroup(this.mergedConfig);
|
|
1016
1475
|
if (this._entity) {
|
|
1476
|
+
//加载所有的动态表单组件
|
|
1017
1477
|
if (this._type) {
|
|
1018
|
-
let fieldControlItem =
|
|
1478
|
+
let fieldControlItem = _fieldControlGroup.find(el => el.name === this._type);
|
|
1019
1479
|
this.loadfieldConfigComponent(fieldControlItem);
|
|
1020
1480
|
}
|
|
1021
1481
|
if (this._fields && this._parentFiledName && this._culture) {
|
|
1022
1482
|
/**表单控件组中的项 */
|
|
1023
|
-
let fieldControlItem =
|
|
1483
|
+
let fieldControlItem = _fieldControlGroup.find(el => el.name === this._fields?.field?.formControlName);
|
|
1024
1484
|
this.loadfieldComponent(fieldControlItem);
|
|
1025
1485
|
}
|
|
1026
1486
|
}
|
|
@@ -1054,13 +1514,16 @@ class DynamicComponent {
|
|
|
1054
1514
|
instance.culture = this._culture;
|
|
1055
1515
|
instance.entity = this._entity;
|
|
1056
1516
|
}
|
|
1057
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1517
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, deps: [{ token: 'MERGED_FORM_CONFIG' }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1058
1518
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicComponent, selector: "df-dynamic", inputs: { selected: "selected", type: "type", culture: "culture", parentFiledName: "parentFiledName", fields: "fields", entity: "entity" }, viewQueries: [{ propertyName: "FormControlRef", first: true, predicate: ["FormControlRef"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "FormComponentsRef", first: true, predicate: ["FormComponentsRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<template #FormControlRef></template>\n<template #FormComponentsRef></template>", styles: [""] }); }
|
|
1059
1519
|
}
|
|
1060
1520
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, decorators: [{
|
|
1061
1521
|
type: Component,
|
|
1062
1522
|
args: [{ selector: 'df-dynamic', template: "<template #FormControlRef></template>\n<template #FormComponentsRef></template>" }]
|
|
1063
|
-
}],
|
|
1523
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1524
|
+
type: Inject,
|
|
1525
|
+
args: ['MERGED_FORM_CONFIG']
|
|
1526
|
+
}] }], propDecorators: { selected: [{
|
|
1064
1527
|
type: Input
|
|
1065
1528
|
}], type: [{
|
|
1066
1529
|
type: Input
|
|
@@ -1080,9 +1543,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1080
1543
|
args: ['FormComponentsRef', { read: ViewContainerRef, static: true }]
|
|
1081
1544
|
}] } });
|
|
1082
1545
|
|
|
1546
|
+
class FormControlService {
|
|
1547
|
+
constructor(mergedConfig) {
|
|
1548
|
+
this.mergedConfig = mergedConfig;
|
|
1549
|
+
this._FieldControlGroup = FieldControlGroup;
|
|
1550
|
+
}
|
|
1551
|
+
AddFieldControlGroup() {
|
|
1552
|
+
let array = this.mergedConfig;
|
|
1553
|
+
for (const element of array) {
|
|
1554
|
+
let find = FieldControlGroup.find(control => {
|
|
1555
|
+
return control.name === element.name;
|
|
1556
|
+
});
|
|
1557
|
+
if (!find) {
|
|
1558
|
+
FieldControlGroup.push(element);
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
return FieldControlGroup;
|
|
1562
|
+
}
|
|
1563
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, deps: [{ token: 'MERGED_FORM_CONFIG' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1564
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, providedIn: 'root' }); }
|
|
1565
|
+
}
|
|
1566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, decorators: [{
|
|
1567
|
+
type: Injectable,
|
|
1568
|
+
args: [{
|
|
1569
|
+
providedIn: 'root',
|
|
1570
|
+
}]
|
|
1571
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1572
|
+
type: Inject,
|
|
1573
|
+
args: ['MERGED_FORM_CONFIG']
|
|
1574
|
+
}] }] });
|
|
1575
|
+
|
|
1576
|
+
class DynamicViewComponent {
|
|
1577
|
+
constructor(_FormControlService) {
|
|
1578
|
+
this._FormControlService = _FormControlService;
|
|
1579
|
+
/**是否显示再列表 */
|
|
1580
|
+
this.showInList = false;
|
|
1581
|
+
/**表单控件Value */
|
|
1582
|
+
this._value = '';
|
|
1583
|
+
}
|
|
1584
|
+
set value(v) {
|
|
1585
|
+
this._value = v;
|
|
1586
|
+
// if(this._value) this.dataLoaded();
|
|
1587
|
+
}
|
|
1588
|
+
ngAfterContentInit() {
|
|
1589
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1590
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1591
|
+
if (this.type && this._value !== '') {
|
|
1592
|
+
let _fieldControlGroup = this._FormControlService.AddFieldControlGroup();
|
|
1593
|
+
let fieldControlItem = _fieldControlGroup.find(el => el.name === this.type);
|
|
1594
|
+
this.loadViewComponent(fieldControlItem);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
/**加载动态展示组件 */
|
|
1598
|
+
loadViewComponent(FieldControlItem) {
|
|
1599
|
+
//清空了容器中的所有组件
|
|
1600
|
+
this.FormTemplateRef?.clear();
|
|
1601
|
+
if (!FieldControlItem || !FieldControlItem.fieldViewComponent)
|
|
1602
|
+
return;
|
|
1603
|
+
//在容器中创建组件
|
|
1604
|
+
const { instance } = this.FormTemplateRef?.createComponent(FieldControlItem.fieldViewComponent); //创建组件模板
|
|
1605
|
+
/**向创建的组件模板中传值 */
|
|
1606
|
+
instance.type = this.type;
|
|
1607
|
+
instance.value = this._value;
|
|
1608
|
+
instance.fields = this.fields;
|
|
1609
|
+
instance.showInList = this.showInList;
|
|
1610
|
+
}
|
|
1611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicViewComponent, deps: [{ token: FormControlService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1612
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicViewComponent, selector: "df-dynamic-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, viewQueries: [{ propertyName: "FormTemplateRef", first: true, predicate: ["FormTemplateRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<template #FormTemplateRef></template>", styles: [""] }); }
|
|
1613
|
+
}
|
|
1614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicViewComponent, decorators: [{
|
|
1615
|
+
type: Component,
|
|
1616
|
+
args: [{ selector: 'df-dynamic-view', template: "<template #FormTemplateRef></template>" }]
|
|
1617
|
+
}], ctorParameters: () => [{ type: FormControlService }], propDecorators: { showInList: [{
|
|
1618
|
+
type: Input
|
|
1619
|
+
}], fields: [{
|
|
1620
|
+
type: Input
|
|
1621
|
+
}], type: [{
|
|
1622
|
+
type: Input
|
|
1623
|
+
}], value: [{
|
|
1624
|
+
type: Input
|
|
1625
|
+
}], FormTemplateRef: [{
|
|
1626
|
+
type: ViewChild,
|
|
1627
|
+
args: ['FormTemplateRef', { read: ViewContainerRef, static: true }]
|
|
1628
|
+
}] } });
|
|
1629
|
+
|
|
1630
|
+
class DynamicConfigComponent {
|
|
1631
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1632
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicConfigComponent, selector: "df-dynamic-config", ngImport: i0, template: "<p>dynamic-config works!</p>\r\n", styles: [""] }); }
|
|
1633
|
+
}
|
|
1634
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, decorators: [{
|
|
1635
|
+
type: Component,
|
|
1636
|
+
args: [{ selector: 'df-dynamic-config', template: "<p>dynamic-config works!</p>\r\n" }]
|
|
1637
|
+
}] });
|
|
1638
|
+
|
|
1639
|
+
class DynamicControlComponent {
|
|
1640
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1641
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicControlComponent, selector: "df-dynamic-control", ngImport: i0, template: "<p>dynamic-control works!</p>\r\n", styles: [""] }); }
|
|
1642
|
+
}
|
|
1643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, decorators: [{
|
|
1644
|
+
type: Component,
|
|
1645
|
+
args: [{ selector: 'df-dynamic-control', template: "<p>dynamic-control works!</p>\r\n" }]
|
|
1646
|
+
}] });
|
|
1647
|
+
|
|
1648
|
+
class DynamicSearchComponent {
|
|
1649
|
+
constructor(_FormControlService) {
|
|
1650
|
+
this._FormControlService = _FormControlService;
|
|
1651
|
+
/**字段配置列表 */
|
|
1652
|
+
this._fields = '';
|
|
1653
|
+
}
|
|
1654
|
+
set culture(v) {
|
|
1655
|
+
this._culture = v;
|
|
1656
|
+
}
|
|
1657
|
+
set parentFiledName(v) {
|
|
1658
|
+
this._parentFiledName = v;
|
|
1659
|
+
}
|
|
1660
|
+
set fields(v) {
|
|
1661
|
+
this._fields = v;
|
|
1662
|
+
}
|
|
1663
|
+
set entity(v) {
|
|
1664
|
+
if (v) {
|
|
1665
|
+
this._entity = v;
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
ngAfterContentInit() {
|
|
1669
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1670
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1671
|
+
if (this._fields && this._entity && this._culture) {
|
|
1672
|
+
let _fieldControlGroup = this._FormControlService.AddFieldControlGroup();
|
|
1673
|
+
let fieldControlItem = _fieldControlGroup.find(el => el.name === this._fields?.field?.formControlName);
|
|
1674
|
+
this.loadComponent(fieldControlItem);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
/**加载动态展示组件 */
|
|
1678
|
+
loadComponent(FieldControlItem) {
|
|
1679
|
+
//清空了容器中的所有组件
|
|
1680
|
+
this.FormSearchTemplateRef?.clear();
|
|
1681
|
+
if (!FieldControlItem || !FieldControlItem.fieldSearchComponent)
|
|
1682
|
+
return;
|
|
1683
|
+
//在容器中创建组件
|
|
1684
|
+
const { instance } = this.FormSearchTemplateRef?.createComponent(FieldControlItem.fieldSearchComponent); //创建组件模板
|
|
1685
|
+
/**向创建的组件模板中传值 */
|
|
1686
|
+
instance.fields = this._fields;
|
|
1687
|
+
instance.parentFiledName = this._parentFiledName;
|
|
1688
|
+
instance.culture = this._culture;
|
|
1689
|
+
instance.entity = this._entity;
|
|
1690
|
+
}
|
|
1691
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicSearchComponent, deps: [{ token: FormControlService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1692
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicSearchComponent, selector: "df-dynamic-search", inputs: { culture: "culture", parentFiledName: "parentFiledName", fields: "fields", entity: "entity" }, viewQueries: [{ propertyName: "FormSearchTemplateRef", first: true, predicate: ["FormSearchTemplateRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<template #FormSearchTemplateRef></template>", styles: [""] }); }
|
|
1693
|
+
}
|
|
1694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicSearchComponent, decorators: [{
|
|
1695
|
+
type: Component,
|
|
1696
|
+
args: [{ selector: 'df-dynamic-search', template: "<template #FormSearchTemplateRef></template>" }]
|
|
1697
|
+
}], ctorParameters: () => [{ type: FormControlService }], propDecorators: { culture: [{
|
|
1698
|
+
type: Input
|
|
1699
|
+
}], parentFiledName: [{
|
|
1700
|
+
type: Input
|
|
1701
|
+
}], fields: [{
|
|
1702
|
+
type: Input
|
|
1703
|
+
}], entity: [{
|
|
1704
|
+
type: Input
|
|
1705
|
+
}], FormSearchTemplateRef: [{
|
|
1706
|
+
type: ViewChild,
|
|
1707
|
+
args: ['FormSearchTemplateRef', { read: ViewContainerRef, static: true }]
|
|
1708
|
+
}] } });
|
|
1709
|
+
|
|
1083
1710
|
class DynamicFormModule {
|
|
1084
1711
|
static forRoot(config) {
|
|
1085
|
-
AddFieldControlGroup(config?.cmsFieldControlGroup);
|
|
1086
1712
|
return {
|
|
1087
1713
|
ngModule: DynamicFormModule,
|
|
1088
1714
|
providers: []
|
|
@@ -1099,28 +1725,49 @@ class DynamicFormModule {
|
|
|
1099
1725
|
DateEditControlComponent,
|
|
1100
1726
|
SelectConfigComponent,
|
|
1101
1727
|
SelectControlComponent,
|
|
1102
|
-
DynamicComponent
|
|
1728
|
+
DynamicComponent,
|
|
1729
|
+
DynamicConfigComponent,
|
|
1730
|
+
DynamicViewComponent,
|
|
1731
|
+
DynamicControlComponent,
|
|
1732
|
+
SelectViewComponent,
|
|
1733
|
+
SwitchViewComponent,
|
|
1734
|
+
TextEditViewComponent,
|
|
1735
|
+
DateEditViewComponent,
|
|
1736
|
+
NumericEditViewComponent,
|
|
1737
|
+
DynamicSearchComponent,
|
|
1738
|
+
SelectSearchComponent,
|
|
1739
|
+
TextEditSearchComponent,
|
|
1740
|
+
SwitchSearchComponent], imports: [FormsModule,
|
|
1103
1741
|
CoreModule,
|
|
1104
1742
|
ThemeSharedModule,
|
|
1105
1743
|
ReactiveFormsModule,
|
|
1106
1744
|
NgbDropdownModule,
|
|
1107
|
-
|
|
1745
|
+
NzSelectModule], exports: [TextEditConfigComponent,
|
|
1108
1746
|
TextEditComponent,
|
|
1747
|
+
TextEditViewComponent,
|
|
1109
1748
|
SwitchConfigComponent,
|
|
1110
1749
|
SwitchControlComponent,
|
|
1750
|
+
SwitchViewComponent,
|
|
1111
1751
|
NumbericEditConfigComponent,
|
|
1112
1752
|
NumbericEditControlComponent,
|
|
1113
1753
|
DateEditConfigComponent,
|
|
1114
1754
|
DateEditControlComponent,
|
|
1755
|
+
DateEditViewComponent,
|
|
1115
1756
|
SelectConfigComponent,
|
|
1116
1757
|
SelectControlComponent,
|
|
1117
|
-
|
|
1758
|
+
SelectViewComponent,
|
|
1759
|
+
SelectSearchComponent,
|
|
1760
|
+
DynamicComponent,
|
|
1761
|
+
DynamicConfigComponent,
|
|
1762
|
+
DynamicViewComponent,
|
|
1763
|
+
DynamicControlComponent,
|
|
1764
|
+
DynamicSearchComponent] }); }
|
|
1118
1765
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, imports: [FormsModule,
|
|
1119
1766
|
CoreModule,
|
|
1120
1767
|
ThemeSharedModule,
|
|
1121
1768
|
ReactiveFormsModule,
|
|
1122
1769
|
NgbDropdownModule,
|
|
1123
|
-
|
|
1770
|
+
NzSelectModule] }); }
|
|
1124
1771
|
}
|
|
1125
1772
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, decorators: [{
|
|
1126
1773
|
type: NgModule,
|
|
@@ -1137,6 +1784,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1137
1784
|
SelectConfigComponent,
|
|
1138
1785
|
SelectControlComponent,
|
|
1139
1786
|
DynamicComponent,
|
|
1787
|
+
DynamicConfigComponent,
|
|
1788
|
+
DynamicViewComponent,
|
|
1789
|
+
DynamicControlComponent,
|
|
1790
|
+
SelectViewComponent,
|
|
1791
|
+
SwitchViewComponent,
|
|
1792
|
+
TextEditViewComponent,
|
|
1793
|
+
DateEditViewComponent,
|
|
1794
|
+
NumericEditViewComponent,
|
|
1795
|
+
DynamicSearchComponent,
|
|
1796
|
+
SelectSearchComponent,
|
|
1797
|
+
TextEditSearchComponent,
|
|
1798
|
+
SwitchSearchComponent,
|
|
1140
1799
|
],
|
|
1141
1800
|
imports: [
|
|
1142
1801
|
FormsModule,
|
|
@@ -1144,21 +1803,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1144
1803
|
ThemeSharedModule,
|
|
1145
1804
|
ReactiveFormsModule,
|
|
1146
1805
|
NgbDropdownModule,
|
|
1147
|
-
|
|
1806
|
+
NzSelectModule,
|
|
1807
|
+
// NzTreeModule,
|
|
1148
1808
|
],
|
|
1149
1809
|
exports: [
|
|
1150
1810
|
TextEditConfigComponent,
|
|
1151
1811
|
TextEditComponent,
|
|
1812
|
+
TextEditViewComponent,
|
|
1152
1813
|
SwitchConfigComponent,
|
|
1153
1814
|
SwitchControlComponent,
|
|
1815
|
+
SwitchViewComponent,
|
|
1154
1816
|
NumbericEditConfigComponent,
|
|
1155
1817
|
NumbericEditControlComponent,
|
|
1156
1818
|
DateEditConfigComponent,
|
|
1157
1819
|
DateEditControlComponent,
|
|
1820
|
+
DateEditViewComponent,
|
|
1158
1821
|
SelectConfigComponent,
|
|
1159
1822
|
SelectControlComponent,
|
|
1823
|
+
SelectViewComponent,
|
|
1824
|
+
SelectSearchComponent,
|
|
1160
1825
|
DynamicComponent,
|
|
1826
|
+
DynamicConfigComponent,
|
|
1827
|
+
DynamicViewComponent,
|
|
1828
|
+
DynamicControlComponent,
|
|
1829
|
+
DynamicSearchComponent
|
|
1161
1830
|
],
|
|
1831
|
+
providers: [],
|
|
1162
1832
|
}]
|
|
1163
1833
|
}] });
|
|
1164
1834
|
|
|
@@ -1170,5 +1840,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1170
1840
|
* Generated bundle index. Do not edit.
|
|
1171
1841
|
*/
|
|
1172
1842
|
|
|
1173
|
-
export { AddFieldControlGroup, DateEditConfigComponent, DateEditControlComponent, DynamicComponent, DynamicFormModule, FieldControlGroup, NumbericEditConfigComponent, NumbericEditControlComponent, SelectConfigComponent, SelectControlComponent, SwitchConfigComponent, SwitchControlComponent, TextEditComponent, TextEditConfig, TextEditConfigComponent,
|
|
1843
|
+
export { AddFieldControlGroup, DateEditConfigComponent, DateEditControlComponent, DateEditViewComponent, DynamicComponent, DynamicConfigComponent, DynamicControlComponent, DynamicFormModule, DynamicSearchComponent, DynamicViewComponent, FieldControlGroup, NumbericEditConfigComponent, NumbericEditControlComponent, SelectConfigComponent, SelectControlComponent, SelectSearchComponent, SelectViewComponent, SwitchConfigComponent, SwitchControlComponent, SwitchSearchComponent, SwitchViewComponent, TextEditComponent, TextEditConfig, TextEditConfigComponent, TextEditSearchComponent, TextEditViewComponent, maxDecimalPlacesValidator };
|
|
1174
1844
|
//# sourceMappingURL=dignite-ng-expand.dynamic-form.mjs.map
|