@dignite-ng/expand.dynamic-form 0.0.29 → 3.0.0-rc.10

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.
Files changed (65) hide show
  1. package/esm2022/lib/components/dynamic/dynamic-config.component.mjs +11 -0
  2. package/esm2022/lib/components/dynamic/dynamic-control.component.mjs +11 -0
  3. package/esm2022/lib/components/dynamic/dynamic-search.component.mjs +65 -0
  4. package/esm2022/lib/components/dynamic/dynamic-view.component.mjs +58 -0
  5. package/esm2022/lib/components/dynamic/dynamic.component.mjs +20 -15
  6. package/esm2022/lib/components/dynamic/index.mjs +5 -1
  7. package/esm2022/lib/components/form/date-edit/date-edit-config.component.mjs +5 -3
  8. package/esm2022/lib/components/form/date-edit/date-edit-view.component.mjs +40 -0
  9. package/esm2022/lib/components/form/date-edit/index.mjs +2 -1
  10. package/esm2022/lib/components/form/form-control-group.mjs +40 -22
  11. package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.component.mjs +8 -6
  12. package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.mjs +4 -3
  13. package/esm2022/lib/components/form/numeric-edit/numberic-edit-control.component.mjs +3 -3
  14. package/esm2022/lib/components/form/numeric-edit/numeric-edit-view.component.mjs +39 -0
  15. package/esm2022/lib/components/form/select/index.mjs +3 -1
  16. package/esm2022/lib/components/form/select/select-config.component.mjs +20 -8
  17. package/esm2022/lib/components/form/select/select-control.component.mjs +27 -17
  18. package/esm2022/lib/components/form/select/select-search.component.mjs +92 -0
  19. package/esm2022/lib/components/form/select/select-view.component.mjs +44 -0
  20. package/esm2022/lib/components/form/switch/index.mjs +3 -1
  21. package/esm2022/lib/components/form/switch/switch-config.component.mjs +6 -4
  22. package/esm2022/lib/components/form/switch/switch-control.component.mjs +12 -6
  23. package/esm2022/lib/components/form/switch/switch-search.component.mjs +76 -0
  24. package/esm2022/lib/components/form/switch/switch-view.component.mjs +41 -0
  25. package/esm2022/lib/components/form/text-edit/index.mjs +3 -1
  26. package/esm2022/lib/components/form/text-edit/text-edit-config.component.mjs +6 -4
  27. package/esm2022/lib/components/form/text-edit/text-edit-search.component.mjs +80 -0
  28. package/esm2022/lib/components/form/text-edit/text-edit-view.component.mjs +39 -0
  29. package/esm2022/lib/components/form/text-edit/text-edit.component.mjs +6 -4
  30. package/esm2022/lib/dynamic-form.module.mjs +65 -9
  31. package/esm2022/lib/interfaces/form-config-interfaces.mjs +1 -1
  32. package/esm2022/lib/services/form-control.service.mjs +33 -0
  33. package/fesm2022/dignite-ng-expand.dynamic-form.mjs +753 -75
  34. package/fesm2022/dignite-ng-expand.dynamic-form.mjs.map +1 -1
  35. package/lib/components/dynamic/dynamic-config.component.d.ts +5 -0
  36. package/lib/components/dynamic/dynamic-control.component.d.ts +5 -0
  37. package/lib/components/dynamic/dynamic-search.component.d.ts +28 -0
  38. package/lib/components/dynamic/dynamic-view.component.d.ts +24 -0
  39. package/lib/components/dynamic/dynamic.component.d.ts +6 -6
  40. package/lib/components/dynamic/index.d.ts +4 -0
  41. package/lib/components/form/date-edit/date-edit-config.component.d.ts +1 -0
  42. package/lib/components/form/date-edit/date-edit-view.component.d.ts +17 -0
  43. package/lib/components/form/date-edit/index.d.ts +1 -0
  44. package/lib/components/form/form-control-group.d.ts +2 -3
  45. package/lib/components/form/numeric-edit/numberic-edit-config.component.d.ts +2 -1
  46. package/lib/components/form/numeric-edit/numeric-edit-view.component.d.ts +17 -0
  47. package/lib/components/form/select/index.d.ts +2 -0
  48. package/lib/components/form/select/select-config.component.d.ts +1 -0
  49. package/lib/components/form/select/select-control.component.d.ts +1 -0
  50. package/lib/components/form/select/select-search.component.d.ts +30 -0
  51. package/lib/components/form/select/select-view.component.d.ts +17 -0
  52. package/lib/components/form/switch/index.d.ts +2 -0
  53. package/lib/components/form/switch/switch-config.component.d.ts +1 -0
  54. package/lib/components/form/switch/switch-control.component.d.ts +2 -1
  55. package/lib/components/form/switch/switch-search.component.d.ts +28 -0
  56. package/lib/components/form/switch/switch-view.component.d.ts +17 -0
  57. package/lib/components/form/text-edit/index.d.ts +2 -0
  58. package/lib/components/form/text-edit/text-edit-config.component.d.ts +1 -0
  59. package/lib/components/form/text-edit/text-edit-search.component.d.ts +30 -0
  60. package/lib/components/form/text-edit/text-edit-view.component.d.ts +17 -0
  61. package/lib/components/form/text-edit/text-edit.component.d.ts +1 -0
  62. package/lib/dynamic-form.module.d.ts +18 -6
  63. package/lib/interfaces/form-config-interfaces.d.ts +8 -4
  64. package/lib/services/form-control.service.d.ts +9 -0
  65. package/package.json +1 -1
@@ -1,16 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, ViewChild, ChangeDetectionStrategy, inject, Injectable, ViewContainerRef, NgModule } from '@angular/core';
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.submitclick.nativeElement.click();
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.setControl(this._fields.field.name, newControl);
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.removeControl(this._fields.field.name);
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.submitclick.nativeElement.click();
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.submitclick.nativeElement.click();
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 ? this._selected : this._selected === false ? this._selected : this._fields.field.formConfiguration['Switch.Default'], ValidatorsArray);
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\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"] }] }); }
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\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
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,122 @@ 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
+ console.log(valueOptions, 'showValueshowValueshowValue');
519
+ if (this.type) {
520
+ this.showValue = valueOptions;
521
+ }
522
+ }
523
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
524
+ 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" }] }); }
525
+ }
526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, decorators: [{
527
+ type: Component,
528
+ 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}" }]
529
+ }], propDecorators: { showInList: [{
530
+ type: Input
531
+ }], fields: [{
532
+ type: Input
533
+ }], type: [{
534
+ type: Input
535
+ }], value: [{
536
+ type: Input
537
+ }] } });
538
+
309
539
  class NumbericEditConfig {
310
540
  constructor(data) {
311
541
  /**占位符 */
312
542
  this['NumericEditField.Placeholder'] = ['', []];
313
543
  /**最小值 */
314
- this['NumericEditField.Min'] = ['', []];
544
+ this['NumericEditField.Min'] = ['', [Validators.required]];
315
545
  //最大值
316
- this['NumericEditField.Max'] = ['', []];
546
+ this['NumericEditField.Max'] = ['', [Validators.required]];
317
547
  // 小数位数
318
548
  this['NumericEditField.Decimals'] = [2, []];
319
549
  //步长
@@ -333,6 +563,7 @@ class NumbericEditConfig {
333
563
  class NumbericEditConfigComponent {
334
564
  constructor(fb) {
335
565
  this.fb = fb;
566
+ this.cdr = inject(ChangeDetectorRef);
336
567
  }
337
568
  set type(v) {
338
569
  this._type = v;
@@ -351,7 +582,8 @@ class NumbericEditConfigComponent {
351
582
  async dataLoaded() {
352
583
  if (this._Entity && this._type) {
353
584
  await this.AfterInit();
354
- this.submitclick.nativeElement.click();
585
+ this.cdr.detectChanges(); // 手动触发变更检测
586
+ this.submitclick?.nativeElement?.click();
355
587
  }
356
588
  }
357
589
  AfterInit() {
@@ -366,11 +598,11 @@ class NumbericEditConfigComponent {
366
598
  });
367
599
  }
368
600
  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, static: 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 \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 \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" }] }); }
601
+ 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
602
  }
371
603
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditConfigComponent, decorators: [{
372
604
  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 \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 \n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>" }]
605
+ 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
606
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
375
607
  type: Input
376
608
  }], selected: [{
@@ -379,7 +611,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
379
611
  type: Input
380
612
  }], submitclick: [{
381
613
  type: ViewChild,
382
- args: ['submitclick', { static: true }]
614
+ args: ['submitclick', { static: false }]
383
615
  }] } });
384
616
 
385
617
  function maxDecimalPlacesValidator(maxDecimalPlaces) {
@@ -419,7 +651,7 @@ class NumbericEditControlComponent {
419
651
  this.dataLoaded();
420
652
  }
421
653
  get extraProperties() {
422
- return this._entity.get('extraProperties');
654
+ return this._entity?.get('extraProperties');
423
655
  }
424
656
  get fieldInput() { return this.extraProperties.get(this._fields.field.name); }
425
657
  /**数据加载完成 */
@@ -460,7 +692,7 @@ class NumbericEditControlComponent {
460
692
  let formConfiguration = this._fields.field.formConfiguration;
461
693
  let Decimals = formConfiguration['NumericEditField.Decimals'];
462
694
  if (decimalPart.length > Decimals) {
463
- this.fieldInput.patchValue(val.slice(0, val.length - (decimalPart.length - 2)).toString());
695
+ this.fieldInput?.patchValue(val.slice(0, val.length - (decimalPart.length - 2)));
464
696
  }
465
697
  }
466
698
  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 +747,7 @@ class DateEditConfigComponent {
515
747
  this._dataPipe = inject(DatePipe);
516
748
  this._DateEditInterfaces = DateEditInterfaces;
517
749
  this.dateTimeType = 'date';
750
+ this.cdr = inject(ChangeDetectorRef);
518
751
  }
519
752
  set type(v) {
520
753
  this._type = v;
@@ -532,7 +765,8 @@ class DateEditConfigComponent {
532
765
  async dataLoaded() {
533
766
  if (this._Entity && this._type) {
534
767
  await this.AfterInit();
535
- this.submitclick.nativeElement.click();
768
+ this.cdr.detectChanges(); // 手动触发变更检测
769
+ this.submitclick?.nativeElement?.click();
536
770
  }
537
771
  }
538
772
  AfterInit() {
@@ -680,6 +914,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
680
914
  args: ['submitclick', { static: true }]
681
915
  }] } });
682
916
 
917
+ class DateEditViewComponent {
918
+ constructor() {
919
+ /**展示则内容 */
920
+ this.showValue = '';
921
+ /**是否显示再列表 */
922
+ this.showInList = false;
923
+ /**表单控件Value */
924
+ this._value = '';
925
+ }
926
+ set value(v) {
927
+ this._value = v;
928
+ }
929
+ async ngAfterContentInit() {
930
+ //Called after ngOnInit when the component's or directive's content has been initialized.
931
+ //Add 'implements AfterContentInit' to the class.
932
+ let valueOptions = this._value;
933
+ if (this.type && valueOptions) {
934
+ this.showValue = valueOptions;
935
+ }
936
+ }
937
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
938
+ 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" }] }); }
939
+ }
940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditViewComponent, decorators: [{
941
+ type: Component,
942
+ 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}" }]
943
+ }], propDecorators: { showInList: [{
944
+ type: Input
945
+ }], fields: [{
946
+ type: Input
947
+ }], type: [{
948
+ type: Input
949
+ }], value: [{
950
+ type: Input
951
+ }] } });
952
+
953
+ class NumericEditViewComponent {
954
+ constructor() {
955
+ /**展示则内容 */
956
+ this.showValue = '';
957
+ /**是否显示再列表 */
958
+ this.showInList = false;
959
+ /**表单控件Value */
960
+ this._value = '';
961
+ }
962
+ set value(v) {
963
+ this._value = v;
964
+ }
965
+ async ngAfterContentInit() {
966
+ //Called after ngOnInit when the component's or directive's content has been initialized.
967
+ //Add 'implements AfterContentInit' to the class.
968
+ let valueOptions = this._value;
969
+ if (this.type && valueOptions) {
970
+ this.showValue = valueOptions;
971
+ }
972
+ }
973
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
974
+ 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"] }] }); }
975
+ }
976
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditViewComponent, decorators: [{
977
+ type: Component,
978
+ 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}" }]
979
+ }], propDecorators: { showInList: [{
980
+ type: Input
981
+ }], fields: [{
982
+ type: Input
983
+ }], type: [{
984
+ type: Input
985
+ }], value: [{
986
+ type: Input
987
+ }] } });
988
+
683
989
  class SelectConfig {
684
990
  constructor(data) {
685
991
  /**空值文本 */
@@ -781,6 +1087,7 @@ class SelectConfigComponent {
781
1087
  constructor(fb, _DfApiService) {
782
1088
  this.fb = fb;
783
1089
  this._DfApiService = _DfApiService;
1090
+ this.cdr = inject(ChangeDetectorRef);
784
1091
  }
785
1092
  set type(v) {
786
1093
  this._type = v;
@@ -793,7 +1100,7 @@ class SelectConfigComponent {
793
1100
  this.dataLoaded();
794
1101
  }
795
1102
  get formConfiguration() {
796
- return this._Entity.get('formConfiguration');
1103
+ return this._Entity?.get('formConfiguration');
797
1104
  }
798
1105
  get SelectOptions() {
799
1106
  return this.formConfiguration.controls['Select.Options'];
@@ -801,7 +1108,8 @@ class SelectConfigComponent {
801
1108
  async dataLoaded() {
802
1109
  if (this._Entity && this._type) {
803
1110
  await this.AfterInit();
804
- this.submitclick.nativeElement.click();
1111
+ this.cdr.detectChanges(); // 手动触发变更检测
1112
+ this.submitclick?.nativeElement?.click();
805
1113
  }
806
1114
  }
807
1115
  /**增加选项 */
@@ -818,11 +1126,21 @@ class SelectConfigComponent {
818
1126
  }
819
1127
  AfterInit() {
820
1128
  return new Promise((resolve, rejects) => {
821
- this._Entity.setControl('formConfiguration', this.fb.group(new SelectConfig()));
1129
+ this._Entity?.setControl('formConfiguration', this.fb.group(new SelectConfig()));
822
1130
  if (this._selected && this._selected.formControlName == this._type) {
823
- this._selected.formConfiguration['Select.Options']?.forEach(el => {
1131
+ // this._selected.formConfiguration['Select.Options']?.forEach(el => {
1132
+ // console.log(this._selected.formConfiguration,'el',el);
1133
+ // this.addSelectOptions();
1134
+ // });
1135
+ for (const element of this._selected.formConfiguration['Select.Options']) {
1136
+ for (const key in element) {
1137
+ const item = element[key];
1138
+ const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
1139
+ element[capitalizedKey] = item;
1140
+ }
824
1141
  this.addSelectOptions();
825
- });
1142
+ }
1143
+ // console.log(this._selected.formConfiguration['Select.Options'],'111111')
826
1144
  this.formConfiguration.patchValue({
827
1145
  ...this._selected.formConfiguration,
828
1146
  });
@@ -836,7 +1154,7 @@ class SelectConfigComponent {
836
1154
  textChange(event, index) {
837
1155
  let SelectOptionsItem = this.SelectOptions.at(index);
838
1156
  let value = event.target.value;
839
- if (SelectOptionsItem.get('Value').value)
1157
+ if (SelectOptionsItem.get('Value')?.value)
840
1158
  return;
841
1159
  SelectOptionsItem.patchValue({
842
1160
  Value: this._DfApiService.chineseToPinyin(value),
@@ -864,6 +1182,9 @@ class SelectControlComponent {
864
1182
  this.fb = fb;
865
1183
  /**字段配置列表 */
866
1184
  this._fields = '';
1185
+ /**父级字段名称,用于为表单设置控件赋值 */
1186
+ this._selected = [];
1187
+ this.cdr = inject(ChangeDetectorRef);
867
1188
  this.formConfiguration = '';
868
1189
  }
869
1190
  set fields(v) {
@@ -873,20 +1194,21 @@ class SelectControlComponent {
873
1194
  this._parentFiledName = v;
874
1195
  }
875
1196
  set selected(v) {
876
- this._selected = v;
1197
+ this._selected = v || [];
877
1198
  }
878
1199
  set entity(v) {
879
1200
  this._entity = v;
880
1201
  this.dataLoaded();
881
1202
  }
882
1203
  get extraProperties() {
883
- return this._entity.get('extraProperties');
1204
+ return this._entity?.get('extraProperties');
884
1205
  }
885
1206
  /**数据加载完成 */
886
1207
  async dataLoaded() {
887
1208
  if (this._fields && this._entity) {
888
1209
  await this.AfterInit();
889
- this.submitclick.nativeElement.click();
1210
+ this.cdr.detectChanges(); // 手动触发变更检测
1211
+ this.submitclick?.nativeElement?.click();
890
1212
  }
891
1213
  }
892
1214
  AfterInit() {
@@ -896,18 +1218,23 @@ class SelectControlComponent {
896
1218
  ValidatorsArray.push(Validators.required);
897
1219
  }
898
1220
  this.formConfiguration = this._fields.field.formConfiguration;
899
- if (!this._selected) {
900
- const isMultiple = this.formConfiguration['Select.Multiple'];
901
- let selectValue = isMultiple ? [] : '';
902
- this.formConfiguration['Select.Options'].forEach(el => {
903
- if (el.Selected) {
904
- selectValue = isMultiple
905
- ? [...selectValue, el.value || el.Value]
906
- : [el.value || el.Value];
1221
+ const isMultiple = this.formConfiguration['Select.Multiple'];
1222
+ let selectValue = isMultiple ? [] : [];
1223
+ console.log(this._fields.field.name, '=>', this._selected, '_selected');
1224
+ for (const element of this.formConfiguration['Select.Options']) {
1225
+ for (const key in element) {
1226
+ const item = element[key];
1227
+ const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
1228
+ element[capitalizedKey] = item;
1229
+ }
1230
+ if (!this._selected) {
1231
+ if (Array.isArray(this._selected) && element.Selected && this._selected.length === 0) {
1232
+ selectValue = isMultiple ? [...selectValue, element.Value] : [element.Value];
1233
+ this._selected = selectValue;
907
1234
  }
908
- });
909
- this._selected = selectValue;
1235
+ }
910
1236
  }
1237
+ // this._selected = selectValue;
911
1238
  let newControl = this.fb.control(this._selected, ValidatorsArray);
912
1239
  this.extraProperties.setControl(this._fields.field.name, newControl);
913
1240
  resolve(true);
@@ -919,11 +1246,97 @@ class SelectControlComponent {
919
1246
  this.extraProperties.removeControl(this._fields.field.name);
920
1247
  }
921
1248
  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\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <select class=\"form-select\" multiple formControlName=\"{{_fields.field.name}}\">\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-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\"\n formControlName=\"{{_fields.field.name}}\">\n <option>{{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\" *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: [""], 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"] }] }); }
1249
+ 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\"\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 <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-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
1250
  }
924
1251
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, decorators: [{
925
1252
  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\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <select class=\"form-select\" multiple formControlName=\"{{_fields.field.name}}\">\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-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\"\n formControlName=\"{{_fields.field.name}}\">\n <option>{{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\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
1253
+ 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\"\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 <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-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"] }]
1254
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
1255
+ type: Input
1256
+ }], parentFiledName: [{
1257
+ type: Input
1258
+ }], selected: [{
1259
+ type: Input
1260
+ }], entity: [{
1261
+ type: Input
1262
+ }], submitclick: [{
1263
+ type: ViewChild,
1264
+ args: ['submitclick', { static: true }]
1265
+ }] } });
1266
+
1267
+ class SelectSearchComponent {
1268
+ constructor(fb) {
1269
+ this.fb = fb;
1270
+ /**字段配置列表 */
1271
+ this._fields = '';
1272
+ this.cdr = inject(ChangeDetectorRef);
1273
+ this.formConfiguration = '';
1274
+ }
1275
+ set fields(v) {
1276
+ this._fields = v;
1277
+ }
1278
+ set parentFiledName(v) {
1279
+ this._parentFiledName = v;
1280
+ }
1281
+ set selected(v) {
1282
+ this._selected = v;
1283
+ }
1284
+ set entity(v) {
1285
+ this._entity = v;
1286
+ this.dataLoaded();
1287
+ }
1288
+ get extraProperties() {
1289
+ return this._entity?.get('extraProperties');
1290
+ }
1291
+ /**数据加载完成 */
1292
+ async dataLoaded() {
1293
+ if (this._fields && this._entity) {
1294
+ await this.AfterInit();
1295
+ this.cdr.detectChanges(); // 手动触发变更检测
1296
+ this.submitclick?.nativeElement?.click();
1297
+ }
1298
+ }
1299
+ AfterInit() {
1300
+ return new Promise((resolve, rejects) => {
1301
+ let ValidatorsArray = [];
1302
+ this.formConfiguration = this._fields.field.formConfiguration;
1303
+ const isMultiple = this.formConfiguration['Select.Multiple'];
1304
+ let selectValue = isMultiple ? [] : [];
1305
+ for (const element of this.formConfiguration['Select.Options']) {
1306
+ for (const key in element) {
1307
+ const item = element[key];
1308
+ const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
1309
+ element[capitalizedKey] = item;
1310
+ }
1311
+ // if (this._selected) {
1312
+ // if (Array.isArray(this._selected) && element.Selected && this._selected.length === 0) {
1313
+ // selectValue = isMultiple ? [...selectValue, element.Value] : [element.Value];
1314
+ // }
1315
+ // }
1316
+ }
1317
+ this._selected = selectValue;
1318
+ let newControl = this.fb.control(this._selected, ValidatorsArray);
1319
+ this.extraProperties.setControl(this._fields.field.name, newControl);
1320
+ resolve(true);
1321
+ });
1322
+ }
1323
+ changeValue(event) {
1324
+ let selectvalue = this.extraProperties.get(this._fields.field.name).value;
1325
+ if (selectvalue[0] === '') {
1326
+ this.extraProperties.get(this._fields.field.name).setValue([]);
1327
+ }
1328
+ }
1329
+ ngOnDestroy() {
1330
+ //Called once, before the instance is destroyed.
1331
+ //Add 'implements OnDestroy' to the class.
1332
+ this.extraProperties.removeControl(this._fields.field.name);
1333
+ }
1334
+ 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 }); }
1335
+ 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\"\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\" 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-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"] }] }); }
1336
+ }
1337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectSearchComponent, decorators: [{
1338
+ type: Component,
1339
+ 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\"\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\" 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-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
1340
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
928
1341
  type: Input
929
1342
  }], parentFiledName: [{
@@ -937,6 +1350,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
937
1350
  args: ['submitclick', { static: true }]
938
1351
  }] } });
939
1352
 
1353
+ class SelectViewComponent {
1354
+ constructor() {
1355
+ /**展示则内容 */
1356
+ this.showValue = '';
1357
+ /**是否显示再列表 */
1358
+ this.showInList = false;
1359
+ /**表单控件Value */
1360
+ this._value = '';
1361
+ }
1362
+ set value(v) {
1363
+ this._value = v;
1364
+ }
1365
+ async ngAfterContentInit() {
1366
+ //Called after ngOnInit when the component's or directive's content has been initialized.
1367
+ //Add 'implements AfterContentInit' to the class.
1368
+ let valueOptions = this._value;
1369
+ if (this.type && valueOptions) {
1370
+ if (Array.isArray(valueOptions)) {
1371
+ this.showValue = valueOptions.join(',');
1372
+ }
1373
+ else {
1374
+ this.showValue = valueOptions;
1375
+ }
1376
+ }
1377
+ }
1378
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1379
+ 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"] }] }); }
1380
+ }
1381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, decorators: [{
1382
+ type: Component,
1383
+ 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}" }]
1384
+ }], propDecorators: { showInList: [{
1385
+ type: Input
1386
+ }], fields: [{
1387
+ type: Input
1388
+ }], type: [{
1389
+ type: Input
1390
+ }], value: [{
1391
+ type: Input
1392
+ }] } });
1393
+
940
1394
  // import { CkEditorConfigComponent, CkEditorControlComponent } from "./ck-editor";
941
1395
  /**
942
1396
  * 表单控件分组-包含配置,控件,显示的数组
@@ -947,54 +1401,60 @@ const FieldControlGroup = [
947
1401
  name: 'TextEdit',
948
1402
  fieldConfigComponent: TextEditConfigComponent,
949
1403
  fieldComponent: TextEditComponent,
950
- // fieldViewComponent:TextBoxViewComponent,
951
- }, {
1404
+ fieldViewComponent: TextEditViewComponent,
1405
+ fieldSearchComponent: TextEditSearchComponent,
1406
+ },
1407
+ {
952
1408
  displayName: '开关',
953
1409
  name: 'Switch',
954
1410
  fieldConfigComponent: SwitchConfigComponent,
955
1411
  fieldComponent: SwitchControlComponent,
956
- // fieldViewComponent:TextBoxViewComponent,
957
- }, {
1412
+ fieldViewComponent: SwitchViewComponent,
1413
+ fieldSearchComponent: SwitchSearchComponent,
1414
+ },
1415
+ {
958
1416
  displayName: '选择',
959
1417
  name: 'Select',
960
1418
  fieldConfigComponent: SelectConfigComponent,
961
1419
  fieldComponent: SelectControlComponent,
962
- // fieldViewComponent:TextBoxViewComponent,
963
- }, {
1420
+ fieldViewComponent: SelectViewComponent,
1421
+ fieldSearchComponent: SelectSearchComponent,
1422
+ },
1423
+ {
964
1424
  displayName: '数字',
965
1425
  name: 'NumericEdit',
966
1426
  fieldConfigComponent: NumbericEditConfigComponent,
967
1427
  fieldComponent: NumbericEditControlComponent,
968
- // fieldViewComponent:TextBoxViewComponent,
969
- }, {
1428
+ fieldViewComponent: NumericEditViewComponent,
1429
+ },
1430
+ {
970
1431
  displayName: '日期',
971
1432
  name: 'DateEdit',
972
1433
  fieldConfigComponent: DateEditConfigComponent,
973
1434
  fieldComponent: DateEditControlComponent,
974
- // fieldViewComponent:TextBoxViewComponent,
1435
+ fieldViewComponent: DateEditViewComponent,
975
1436
  },
976
1437
  ];
977
- function getExcludeAssignControl(typeName) {
978
- // return FieldControlGroup.filter(el => el.name !== typeName)
979
- return FieldControlGroup;
980
- }
981
1438
  function AddFieldControlGroup(array = []) {
982
- FieldControlGroup.push(...array);
1439
+ for (const element of array) {
1440
+ let find = FieldControlGroup.find((control) => {
1441
+ return control.name === element.name;
1442
+ });
1443
+ if (!find) {
1444
+ FieldControlGroup.push(element);
1445
+ }
1446
+ }
1447
+ return FieldControlGroup;
983
1448
  }
984
1449
 
985
1450
  class DynamicComponent {
986
- constructor() {
987
- /**字段配置列表 */
988
- this._fields = '';
989
- /**表单控件组 */
990
- this._fieldControlGroup = FieldControlGroup;
991
- }
992
1451
  set selected(v) {
993
1452
  this._selected = v === undefined ? '' : v === null ? '' : v;
994
1453
  }
995
1454
  set type(v) {
996
1455
  this._type = v;
997
- this.dataLoaded(3);
1456
+ if (this._entity)
1457
+ this.dataLoaded(3);
998
1458
  }
999
1459
  set culture(v) {
1000
1460
  this._culture = v;
@@ -1011,16 +1471,23 @@ class DynamicComponent {
1011
1471
  this.dataLoaded(3);
1012
1472
  }
1013
1473
  }
1474
+ constructor(mergedConfig) {
1475
+ this.mergedConfig = mergedConfig;
1476
+ /**字段配置列表 */
1477
+ this._fields = '';
1478
+ }
1014
1479
  /**数据加载完成 */
1015
- dataLoaded(val) {
1480
+ async dataLoaded(val) {
1481
+ let _fieldControlGroup = AddFieldControlGroup(this.mergedConfig);
1016
1482
  if (this._entity) {
1483
+ //加载所有的动态表单组件
1017
1484
  if (this._type) {
1018
- let fieldControlItem = this._fieldControlGroup.find(el => el.name === this._type);
1485
+ let fieldControlItem = _fieldControlGroup.find(el => el.name === this._type);
1019
1486
  this.loadfieldConfigComponent(fieldControlItem);
1020
1487
  }
1021
1488
  if (this._fields && this._parentFiledName && this._culture) {
1022
1489
  /**表单控件组中的项 */
1023
- let fieldControlItem = this._fieldControlGroup.find(el => el.name === this._fields.field.formControlName);
1490
+ let fieldControlItem = _fieldControlGroup.find(el => el.name === this._fields?.field?.formControlName);
1024
1491
  this.loadfieldComponent(fieldControlItem);
1025
1492
  }
1026
1493
  }
@@ -1054,13 +1521,16 @@ class DynamicComponent {
1054
1521
  instance.culture = this._culture;
1055
1522
  instance.entity = this._entity;
1056
1523
  }
1057
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1524
+ 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
1525
  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
1526
  }
1060
1527
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, decorators: [{
1061
1528
  type: Component,
1062
1529
  args: [{ selector: 'df-dynamic', template: "<template #FormControlRef></template>\n<template #FormComponentsRef></template>" }]
1063
- }], propDecorators: { selected: [{
1530
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1531
+ type: Inject,
1532
+ args: ['MERGED_FORM_CONFIG']
1533
+ }] }], propDecorators: { selected: [{
1064
1534
  type: Input
1065
1535
  }], type: [{
1066
1536
  type: Input
@@ -1080,9 +1550,173 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1080
1550
  args: ['FormComponentsRef', { read: ViewContainerRef, static: true }]
1081
1551
  }] } });
1082
1552
 
1553
+ class FormControlService {
1554
+ constructor(mergedConfig) {
1555
+ this.mergedConfig = mergedConfig;
1556
+ this._FieldControlGroup = FieldControlGroup;
1557
+ }
1558
+ AddFieldControlGroup() {
1559
+ let array = this.mergedConfig;
1560
+ for (const element of array) {
1561
+ let find = FieldControlGroup.find(control => {
1562
+ return control.name === element.name;
1563
+ });
1564
+ if (!find) {
1565
+ FieldControlGroup.push(element);
1566
+ }
1567
+ }
1568
+ return FieldControlGroup;
1569
+ }
1570
+ 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 }); }
1571
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, providedIn: 'root' }); }
1572
+ }
1573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, decorators: [{
1574
+ type: Injectable,
1575
+ args: [{
1576
+ providedIn: 'root',
1577
+ }]
1578
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1579
+ type: Inject,
1580
+ args: ['MERGED_FORM_CONFIG']
1581
+ }] }] });
1582
+
1583
+ class DynamicViewComponent {
1584
+ constructor(_FormControlService) {
1585
+ this._FormControlService = _FormControlService;
1586
+ /**是否显示再列表 */
1587
+ this.showInList = false;
1588
+ /**表单控件Value */
1589
+ this._value = '';
1590
+ }
1591
+ set value(v) {
1592
+ this._value = v;
1593
+ // if(this._value) this.dataLoaded();
1594
+ }
1595
+ ngAfterContentInit() {
1596
+ //Called after ngOnInit when the component's or directive's content has been initialized.
1597
+ //Add 'implements AfterContentInit' to the class.
1598
+ console.log(this._value, '_valuengAfterContentInit');
1599
+ if (this.type && this._value !== '') {
1600
+ let _fieldControlGroup = this._FormControlService.AddFieldControlGroup();
1601
+ let fieldControlItem = _fieldControlGroup.find(el => el.name === this.type);
1602
+ this.loadViewComponent(fieldControlItem);
1603
+ }
1604
+ }
1605
+ /**加载动态展示组件 */
1606
+ loadViewComponent(FieldControlItem) {
1607
+ //清空了容器中的所有组件
1608
+ this.FormTemplateRef?.clear();
1609
+ if (!FieldControlItem || !FieldControlItem.fieldViewComponent)
1610
+ return;
1611
+ //在容器中创建组件
1612
+ const { instance } = this.FormTemplateRef?.createComponent(FieldControlItem.fieldViewComponent); //创建组件模板
1613
+ /**向创建的组件模板中传值 */
1614
+ instance.type = this.type;
1615
+ instance.value = this._value;
1616
+ instance.fields = this.fields;
1617
+ instance.showInList = this.showInList;
1618
+ }
1619
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicViewComponent, deps: [{ token: FormControlService }], target: i0.ɵɵFactoryTarget.Component }); }
1620
+ 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: [""] }); }
1621
+ }
1622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicViewComponent, decorators: [{
1623
+ type: Component,
1624
+ args: [{ selector: 'df-dynamic-view', template: "<template #FormTemplateRef></template>" }]
1625
+ }], ctorParameters: () => [{ type: FormControlService }], propDecorators: { showInList: [{
1626
+ type: Input
1627
+ }], fields: [{
1628
+ type: Input
1629
+ }], type: [{
1630
+ type: Input
1631
+ }], value: [{
1632
+ type: Input
1633
+ }], FormTemplateRef: [{
1634
+ type: ViewChild,
1635
+ args: ['FormTemplateRef', { read: ViewContainerRef, static: true }]
1636
+ }] } });
1637
+
1638
+ class DynamicConfigComponent {
1639
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1640
+ 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: [""] }); }
1641
+ }
1642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, decorators: [{
1643
+ type: Component,
1644
+ args: [{ selector: 'df-dynamic-config', template: "<p>dynamic-config works!</p>\r\n" }]
1645
+ }] });
1646
+
1647
+ class DynamicControlComponent {
1648
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1649
+ 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: [""] }); }
1650
+ }
1651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, decorators: [{
1652
+ type: Component,
1653
+ args: [{ selector: 'df-dynamic-control', template: "<p>dynamic-control works!</p>\r\n" }]
1654
+ }] });
1655
+
1656
+ class DynamicSearchComponent {
1657
+ constructor(_FormControlService) {
1658
+ this._FormControlService = _FormControlService;
1659
+ /**字段配置列表 */
1660
+ this._fields = '';
1661
+ }
1662
+ set culture(v) {
1663
+ this._culture = v;
1664
+ }
1665
+ set parentFiledName(v) {
1666
+ this._parentFiledName = v;
1667
+ }
1668
+ set fields(v) {
1669
+ this._fields = v;
1670
+ }
1671
+ set entity(v) {
1672
+ if (v) {
1673
+ this._entity = v;
1674
+ }
1675
+ }
1676
+ ngAfterContentInit() {
1677
+ //Called after ngOnInit when the component's or directive's content has been initialized.
1678
+ //Add 'implements AfterContentInit' to the class.
1679
+ if (this._fields && this._entity && this._culture) {
1680
+ let _fieldControlGroup = this._FormControlService.AddFieldControlGroup();
1681
+ let fieldControlItem = _fieldControlGroup.find(el => el.name === this._fields?.field?.formControlName);
1682
+ this.loadComponent(fieldControlItem);
1683
+ }
1684
+ }
1685
+ /**加载动态展示组件 */
1686
+ loadComponent(FieldControlItem) {
1687
+ //清空了容器中的所有组件
1688
+ this.FormSearchTemplateRef?.clear();
1689
+ if (!FieldControlItem || !FieldControlItem.fieldSearchComponent)
1690
+ return;
1691
+ //在容器中创建组件
1692
+ const { instance } = this.FormSearchTemplateRef?.createComponent(FieldControlItem.fieldSearchComponent); //创建组件模板
1693
+ /**向创建的组件模板中传值 */
1694
+ instance.fields = this._fields;
1695
+ instance.parentFiledName = this._parentFiledName;
1696
+ instance.culture = this._culture;
1697
+ instance.entity = this._entity;
1698
+ }
1699
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicSearchComponent, deps: [{ token: FormControlService }], target: i0.ɵɵFactoryTarget.Component }); }
1700
+ 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: [""] }); }
1701
+ }
1702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicSearchComponent, decorators: [{
1703
+ type: Component,
1704
+ args: [{ selector: 'df-dynamic-search', template: "<template #FormSearchTemplateRef></template>" }]
1705
+ }], ctorParameters: () => [{ type: FormControlService }], propDecorators: { culture: [{
1706
+ type: Input
1707
+ }], parentFiledName: [{
1708
+ type: Input
1709
+ }], fields: [{
1710
+ type: Input
1711
+ }], entity: [{
1712
+ type: Input
1713
+ }], FormSearchTemplateRef: [{
1714
+ type: ViewChild,
1715
+ args: ['FormSearchTemplateRef', { read: ViewContainerRef, static: true }]
1716
+ }] } });
1717
+
1083
1718
  class DynamicFormModule {
1084
1719
  static forRoot(config) {
1085
- AddFieldControlGroup(config?.cmsFieldControlGroup);
1086
1720
  return {
1087
1721
  ngModule: DynamicFormModule,
1088
1722
  providers: []
@@ -1099,28 +1733,49 @@ class DynamicFormModule {
1099
1733
  DateEditControlComponent,
1100
1734
  SelectConfigComponent,
1101
1735
  SelectControlComponent,
1102
- DynamicComponent], imports: [FormsModule,
1736
+ DynamicComponent,
1737
+ DynamicConfigComponent,
1738
+ DynamicViewComponent,
1739
+ DynamicControlComponent,
1740
+ SelectViewComponent,
1741
+ SwitchViewComponent,
1742
+ TextEditViewComponent,
1743
+ DateEditViewComponent,
1744
+ NumericEditViewComponent,
1745
+ DynamicSearchComponent,
1746
+ SelectSearchComponent,
1747
+ TextEditSearchComponent,
1748
+ SwitchSearchComponent], imports: [FormsModule,
1103
1749
  CoreModule,
1104
1750
  ThemeSharedModule,
1105
1751
  ReactiveFormsModule,
1106
1752
  NgbDropdownModule,
1107
- NzTreeModule], exports: [TextEditConfigComponent,
1753
+ NzSelectModule], exports: [TextEditConfigComponent,
1108
1754
  TextEditComponent,
1755
+ TextEditViewComponent,
1109
1756
  SwitchConfigComponent,
1110
1757
  SwitchControlComponent,
1758
+ SwitchViewComponent,
1111
1759
  NumbericEditConfigComponent,
1112
1760
  NumbericEditControlComponent,
1113
1761
  DateEditConfigComponent,
1114
1762
  DateEditControlComponent,
1763
+ DateEditViewComponent,
1115
1764
  SelectConfigComponent,
1116
1765
  SelectControlComponent,
1117
- DynamicComponent] }); }
1766
+ SelectViewComponent,
1767
+ SelectSearchComponent,
1768
+ DynamicComponent,
1769
+ DynamicConfigComponent,
1770
+ DynamicViewComponent,
1771
+ DynamicControlComponent,
1772
+ DynamicSearchComponent] }); }
1118
1773
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, imports: [FormsModule,
1119
1774
  CoreModule,
1120
1775
  ThemeSharedModule,
1121
1776
  ReactiveFormsModule,
1122
1777
  NgbDropdownModule,
1123
- NzTreeModule] }); }
1778
+ NzSelectModule] }); }
1124
1779
  }
1125
1780
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, decorators: [{
1126
1781
  type: NgModule,
@@ -1137,6 +1792,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1137
1792
  SelectConfigComponent,
1138
1793
  SelectControlComponent,
1139
1794
  DynamicComponent,
1795
+ DynamicConfigComponent,
1796
+ DynamicViewComponent,
1797
+ DynamicControlComponent,
1798
+ SelectViewComponent,
1799
+ SwitchViewComponent,
1800
+ TextEditViewComponent,
1801
+ DateEditViewComponent,
1802
+ NumericEditViewComponent,
1803
+ DynamicSearchComponent,
1804
+ SelectSearchComponent,
1805
+ TextEditSearchComponent,
1806
+ SwitchSearchComponent,
1140
1807
  ],
1141
1808
  imports: [
1142
1809
  FormsModule,
@@ -1144,21 +1811,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1144
1811
  ThemeSharedModule,
1145
1812
  ReactiveFormsModule,
1146
1813
  NgbDropdownModule,
1147
- NzTreeModule,
1814
+ NzSelectModule,
1815
+ // NzTreeModule,
1148
1816
  ],
1149
1817
  exports: [
1150
1818
  TextEditConfigComponent,
1151
1819
  TextEditComponent,
1820
+ TextEditViewComponent,
1152
1821
  SwitchConfigComponent,
1153
1822
  SwitchControlComponent,
1823
+ SwitchViewComponent,
1154
1824
  NumbericEditConfigComponent,
1155
1825
  NumbericEditControlComponent,
1156
1826
  DateEditConfigComponent,
1157
1827
  DateEditControlComponent,
1828
+ DateEditViewComponent,
1158
1829
  SelectConfigComponent,
1159
1830
  SelectControlComponent,
1831
+ SelectViewComponent,
1832
+ SelectSearchComponent,
1160
1833
  DynamicComponent,
1834
+ DynamicConfigComponent,
1835
+ DynamicViewComponent,
1836
+ DynamicControlComponent,
1837
+ DynamicSearchComponent
1161
1838
  ],
1839
+ providers: [],
1162
1840
  }]
1163
1841
  }] });
1164
1842
 
@@ -1170,5 +1848,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1170
1848
  * Generated bundle index. Do not edit.
1171
1849
  */
1172
1850
 
1173
- export { AddFieldControlGroup, DateEditConfigComponent, DateEditControlComponent, DynamicComponent, DynamicFormModule, FieldControlGroup, NumbericEditConfigComponent, NumbericEditControlComponent, SelectConfigComponent, SelectControlComponent, SwitchConfigComponent, SwitchControlComponent, TextEditComponent, TextEditConfig, TextEditConfigComponent, getExcludeAssignControl, maxDecimalPlacesValidator };
1851
+ 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
1852
  //# sourceMappingURL=dignite-ng-expand.dynamic-form.mjs.map